g4tools  5.4.0
randf
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_randf
5 #define tools_randf
6 
7 #include "randT"
8 #include "rtausmef"
9 
10 namespace tools {
11 
12 class rgaussf : public rgauss<rtausmef,float> {
14 public:
15  rgaussf(float a_mean = 0,float a_std_dev = 1):parent(m_flat,a_mean,a_std_dev),m_flat(){}
16  virtual ~rgaussf(){}
17 public:
18  rgaussf(const rgaussf& a_from):parent(m_flat),m_flat(a_from.m_flat){}
19  rgaussf& operator=(const rgaussf& a_from) {
20  parent::operator=(a_from);
21  m_flat = a_from.m_flat;
22  return *this;
23  }
24 public:
25  float shoot() const {return parent::shoot(::sqrtf,::logf);}
26 protected:
28 };
29 
30 class rexpf : public rexp<rtausmef,float> {
32 public:
33  rexpf(float a_rate = 1):parent(m_flat,a_rate),m_flat(){}
34  virtual ~rexpf(){}
35 public:
36  rexpf(const rexpf& a_from):parent(m_flat),m_flat(a_from.m_flat){}
37  rexpf& operator=(const rexpf& a_from) {
38  parent::operator=(a_from);
39  m_flat = a_from.m_flat;
40  return *this;
41  }
42 public:
43  float shoot() const {return parent::shoot(::logf);}
44 protected:
46 };
47 
48 }
49 
50 #include "mathf"
51 
52 namespace tools {
53 
54 class rbwf : public rbw<rtausmef,float> {
56 public:
57  rbwf(float a_mean = 0,float a_gamma = 1):parent(m_flat,a_mean,a_gamma),m_flat(){}
58  virtual ~rbwf(){}
59 public:
60  rbwf(const rbwf& a_from):parent(m_flat),m_flat(a_from.m_flat){}
61  rbwf& operator=(const rbwf& a_from) {
62  parent::operator=(a_from);
63  m_flat = a_from.m_flat;
64  return *this;
65  }
66 public:
67  float shoot() const {return parent::shoot(fhalf_pi(),::tanf);}
68 protected:
70 };
71 
72 }
73 
74 #endif
tools::rbw< rtausmef, float >::operator=
rbw & operator=(const rbw &a_from)
Definition: randT:52
tools::rexpf::operator=
rexpf & operator=(const rexpf &a_from)
Definition: randf:37
tools::rgaussf
Definition: randf:12
tools::rexpf::m_flat
rtausmef m_flat
Definition: randf:45
tools::rbwf::rbwf
rbwf(const rbwf &a_from)
Definition: randf:60
tools::rgaussf::rgaussf
rgaussf(float a_mean=0, float a_std_dev=1)
Definition: randf:15
tools::rexp< rtausmef, float >::shoot
float shoot(math_func a_log) const
Definition: randT:81
tools::rgaussf::shoot
float shoot() const
Definition: randf:25
tools::rexpf
Definition: randf:30
tools::rexp< rtausmef, float >::operator=
rexp & operator=(const rexp &a_from)
Definition: randT:79
tools::rgaussf::m_flat
rtausmef m_flat
Definition: randf:27
tools::rexp
Definition: randT:72
tools::rexpf::rexpf
rexpf(float a_rate=1)
Definition: randf:33
tools::rbwf
Definition: randf:54
tools::rgaussf::operator=
rgaussf & operator=(const rgaussf &a_from)
Definition: randf:19
tools::rgauss
Definition: randT:10
tools::rbwf::rbwf
rbwf(float a_mean=0, float a_gamma=1)
Definition: randf:57
tools::rbwf::m_flat
rtausmef m_flat
Definition: randf:69
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::rbw
Definition: randT:46
tools::fhalf_pi
float fhalf_pi()
Definition: mathf:13
tools::rexpf::rexpf
rexpf(const rexpf &a_from)
Definition: randf:36
tools::rexpf::~rexpf
virtual ~rexpf()
Definition: randf:34
tools::rexpf::shoot
float shoot() const
Definition: randf:43
mathf
tools::rtausmef
Definition: rtausmef:14
tools::rgauss< rtausmef, float >::shoot
float shoot(math_func a_sqrt, math_func a_log) const
Definition: randT:26
tools::rgaussf::~rgaussf
virtual ~rgaussf()
Definition: randf:16
tools::rgauss< rtausmef, float >::operator=
rgauss & operator=(const rgauss &a_from)
Definition: randT:20
tools::rbwf::shoot
float shoot() const
Definition: randf:67
tools::rbw< rtausmef, float >::shoot
float shoot(const float &a_half_pi, float(*a_tan)(float)) const
Definition: randT:58
rtausmef
tools::rgaussf::rgaussf
rgaussf(const rgaussf &a_from)
Definition: randf:18
tools::rbwf::operator=
rbwf & operator=(const rbwf &a_from)
Definition: randf:61
randT
tools::rbwf::~rbwf
virtual ~rbwf()
Definition: randf:58