MINT2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BWFct Class Reference

#include <BWFct.h>

Inheritance diagram for BWFct:
IGenFct

Public Member Functions

 BWFct (const DalitzCoordinate &c, double M, double Gamma)
 
 BWFct (const BWFct &other)
 
virtual void setLimits (double sMin, double sMax)
 
virtual double getSMi () const
 
virtual double getSMa () const
 
virtual double generateRho (TRandom *rnd=gRandom) const
 
virtual double generate (TRandom *rnd=gRandom) const
 
virtual DalitzCoordinate getCoordinate () const
 
virtual void setCoordinate (const DalitzCoordinate &c)
 
virtual double generatingPDFValue (double sij) const
 
virtual double generatingFctValue (double sij) const
 
virtual double integral () const
 
virtual bool flat () const
 
virtual double coordTransformFromS (double s) const
 
virtual double coordTransformToS (double rho) const
 
virtual double transformedPDFValue (double rho) const
 
virtual double transformedFctValue (double rho) const
 
virtual double transformedFctMax () const
 
virtual double transformedIntegral () const
 
virtual double getRhoMi () const
 
virtual double getRhoMa () const
 
virtual ~BWFct ()
 
- Public Member Functions inherited from IGenFct
virtual ~IGenFct ()
 

Private Member Functions

double rhoMi () const
 
double rhoMa () const
 
double norm () const
 
double unitFactor () const
 

Private Attributes

DalitzCoordinate _coord
 
double _M
 
double _G
 

Detailed Description

Definition at line 11 of file BWFct.h.

Constructor & Destructor Documentation

◆ BWFct() [1/2]

BWFct::BWFct ( const DalitzCoordinate c,
double  M,
double  Gamma 
)

Definition at line 12 of file BWFct.cpp.

13  : _coord(c)
14  , _M(M)
15  , _G(Gamma)
16 {}
double _G
Definition: BWFct.h:13
DalitzCoordinate _coord
Definition: BWFct.h:12
double _M
Definition: BWFct.h:13

◆ BWFct() [2/2]

BWFct::BWFct ( const BWFct other)

Definition at line 17 of file BWFct.cpp.

18  : IGenFct()
19  , _coord(other._coord)
20  , _M(other._M)
21  , _G(other._G)
22 {}
double _G
Definition: BWFct.h:13
DalitzCoordinate _coord
Definition: BWFct.h:12
double _M
Definition: BWFct.h:13

◆ ~BWFct()

virtual BWFct::~BWFct ( )
inlinevirtual

Definition at line 52 of file BWFct.h.

52 {};

Member Function Documentation

◆ coordTransformFromS()

double BWFct::coordTransformFromS ( double  s) const
virtual

Reimplemented from IGenFct.

Definition at line 83 of file BWFct.cpp.

83  {
84  return atan( ( s - _M*_M)/(_M*_G) );
85 }
static const double s
double _G
Definition: BWFct.h:13
double _M
Definition: BWFct.h:13

◆ coordTransformToS()

double BWFct::coordTransformToS ( double  rho) const
virtual

Reimplemented from IGenFct.

Definition at line 86 of file BWFct.cpp.

86  {
87  return _M * _G * tan(rho) + _M*_M;
88 }
double _G
Definition: BWFct.h:13
double _M
Definition: BWFct.h:13

◆ flat()

virtual bool BWFct::flat ( ) const
inlinevirtual

Reimplemented from IGenFct.

Definition at line 40 of file BWFct.h.

40 {return false;}

◆ generate()

double BWFct::generate ( TRandom *  rnd = gRandom) const
virtual

Implements IGenFct.

Definition at line 61 of file BWFct.cpp.

61  {
62  bool dbThis = false;
63 
64  double rho = generateRho(rnd);
65  double s = coordTransformToS(rho);
66 
67  if(dbThis) cout << "_M = " << _M
68  << ", _G = " << _G
69  << ", rho = " << rho
70  << ", rhoMi = " << rhoMi()
71  << ", rhoMa = " << rhoMa()
72  << ", sMi = " << _coord.min()
73  << ", sMa = " << _coord.max()
74  << ", s = " << s
75  << endl;
76 
77  return s;
78 }
double min() const
static const double s
double max() const
double rhoMi() const
Definition: BWFct.cpp:37
virtual double coordTransformToS(double rho) const
Definition: BWFct.cpp:86
virtual double generateRho(TRandom *rnd=gRandom) const
Definition: BWFct.cpp:51
double _G
Definition: BWFct.h:13
DalitzCoordinate _coord
Definition: BWFct.h:12
double rhoMa() const
Definition: BWFct.cpp:44
double _M
Definition: BWFct.h:13

◆ generateRho()

double BWFct::generateRho ( TRandom *  rnd = gRandom) const
virtual

Implements IGenFct.

Definition at line 51 of file BWFct.cpp.

51  {
52  // bool dbThis = false;
53 
54  double rho = rhoMi() + rnd->Rndm()*(rhoMa() - rhoMi());
55  return rho;
56 }
double rhoMi() const
Definition: BWFct.cpp:37
double rhoMa() const
Definition: BWFct.cpp:44

◆ generatingFctValue()

double BWFct::generatingFctValue ( double  sij) const
virtual

Implements IGenFct.

Definition at line 126 of file BWFct.cpp.

126  {
127  // bool dbThis = false;
128  if(sij < _coord.min() || sij > _coord.max()) return 0;
129 
130  double m2diff = _M * _M - sij;
131  double fct = unitFactor()/(m2diff*m2diff + _M*_M * _G*_G);
132  return fct;
133 }
double min() const
double max() const
double _G
Definition: BWFct.h:13
DalitzCoordinate _coord
Definition: BWFct.h:12
double _M
Definition: BWFct.h:13
double unitFactor() const
Definition: BWFct.cpp:80

◆ generatingPDFValue()

double BWFct::generatingPDFValue ( double  sij) const
virtual

Implements IGenFct.

Definition at line 108 of file BWFct.cpp.

108  {
109  bool dbThis=false;
110 
111  double nr = integral();
112  if(nr <= 0) return 0;
113  double fct = generatingFctValue(sij);
114  if(dbThis){
115  cout << " BWFct::generatingPDFValue "
116  << _coord
117  << " _M^2 " << _M*_M
118  << " _G = " << _G
119  << ", sij = " << sij
120  << " returning " << fct << " / " << nr
121  << " = " << fct/nr
122  << endl;
123  }
124  return fct/nr;
125 }
virtual double integral() const
Definition: BWFct.cpp:104
double _G
Definition: BWFct.h:13
DalitzCoordinate _coord
Definition: BWFct.h:12
virtual double generatingFctValue(double sij) const
Definition: BWFct.cpp:126
double _M
Definition: BWFct.h:13

◆ getCoordinate()

DalitzCoordinate BWFct::getCoordinate ( ) const
virtual

Implements IGenFct.

Definition at line 135 of file BWFct.cpp.

135  {
136  return _coord;
137 }
DalitzCoordinate _coord
Definition: BWFct.h:12

◆ getRhoMa()

virtual double BWFct::getRhoMa ( ) const
inlinevirtual

Reimplemented from IGenFct.

Definition at line 50 of file BWFct.h.

50 {return rhoMa();}
double rhoMa() const
Definition: BWFct.cpp:44

◆ getRhoMi()

virtual double BWFct::getRhoMi ( ) const
inlinevirtual

Reimplemented from IGenFct.

Definition at line 49 of file BWFct.h.

49 {return rhoMi();}
double rhoMi() const
Definition: BWFct.cpp:37

◆ getSMa()

virtual double BWFct::getSMa ( ) const
inlinevirtual

Implements IGenFct.

Definition at line 28 of file BWFct.h.

28 {return _coord.max();}
double max() const
DalitzCoordinate _coord
Definition: BWFct.h:12

◆ getSMi()

virtual double BWFct::getSMi ( ) const
inlinevirtual

Implements IGenFct.

Definition at line 27 of file BWFct.h.

27 {return _coord.min();}
double min() const
DalitzCoordinate _coord
Definition: BWFct.h:12

◆ integral()

double BWFct::integral ( ) const
virtual

Implements IGenFct.

Definition at line 104 of file BWFct.cpp.

104  {
105  return unitFactor()*(rhoMa() - rhoMi())/(_G*_M);
106 }
double rhoMi() const
Definition: BWFct.cpp:37
double _G
Definition: BWFct.h:13
double rhoMa() const
Definition: BWFct.cpp:44
double _M
Definition: BWFct.h:13
double unitFactor() const
Definition: BWFct.cpp:80

◆ norm()

double BWFct::norm ( ) const
private

◆ rhoMa()

double BWFct::rhoMa ( ) const
private

Definition at line 44 of file BWFct.cpp.

44  {
45  double rhoMa = 0.5*pi;
46  if(_coord.min() < _coord.max() ){
48  }
49  return rhoMa;
50 }
double min() const
virtual double coordTransformFromS(double s) const
Definition: BWFct.cpp:83
static const double pi
double max() const
DalitzCoordinate _coord
Definition: BWFct.h:12
double rhoMa() const
Definition: BWFct.cpp:44

◆ rhoMi()

double BWFct::rhoMi ( ) const
private

Definition at line 37 of file BWFct.cpp.

37  {
38  double rhoMi = -0.5*pi;
39  if(_coord.min() < _coord.max() ){
41  }
42  return rhoMi;
43 }
double min() const
virtual double coordTransformFromS(double s) const
Definition: BWFct.cpp:83
static const double pi
double max() const
double rhoMi() const
Definition: BWFct.cpp:37
DalitzCoordinate _coord
Definition: BWFct.h:12

◆ setCoordinate()

void BWFct::setCoordinate ( const DalitzCoordinate c)
virtual

Implements IGenFct.

Definition at line 138 of file BWFct.cpp.

138  {
139  _coord = c;
140 }
DalitzCoordinate _coord
Definition: BWFct.h:12

◆ setLimits()

void BWFct::setLimits ( double  sMin,
double  sMax 
)
virtual

Implements IGenFct.

Definition at line 31 of file BWFct.cpp.

31  {
32  // cout << "setting limits to " << sMin << ", " << sMax << endl;
33  _coord.setMin(sMin);
34  _coord.setMax(sMax);
35 }
void setMax(double max)
DalitzCoordinate _coord
Definition: BWFct.h:12
void setMin(double min)

◆ transformedFctMax()

double BWFct::transformedFctMax ( ) const
virtual

Implements IGenFct.

Definition at line 58 of file BWFct.cpp.

58  {
59  return unitFactor()/(_G*_M);
60 }
double _G
Definition: BWFct.h:13
double _M
Definition: BWFct.h:13
double unitFactor() const
Definition: BWFct.cpp:80

◆ transformedFctValue()

double BWFct::transformedFctValue ( double  rho) const
virtual

Reimplemented from IGenFct.

Definition at line 95 of file BWFct.cpp.

95  {
96  if(rho > rhoMa() || rho < rhoMi()) return 0;
97  return 1.0*unitFactor()/(_G*_M);
98 }
double rhoMi() const
Definition: BWFct.cpp:37
double _G
Definition: BWFct.h:13
double rhoMa() const
Definition: BWFct.cpp:44
double _M
Definition: BWFct.h:13
double unitFactor() const
Definition: BWFct.cpp:80

◆ transformedIntegral()

double BWFct::transformedIntegral ( ) const
virtual

Definition at line 99 of file BWFct.cpp.

99  {
100  return 1.0*unitFactor()*(rhoMa() - rhoMi())/(_G*_M);
101 }
double rhoMi() const
Definition: BWFct.cpp:37
double _G
Definition: BWFct.h:13
double rhoMa() const
Definition: BWFct.cpp:44
double _M
Definition: BWFct.h:13
double unitFactor() const
Definition: BWFct.cpp:80

◆ transformedPDFValue()

double BWFct::transformedPDFValue ( double  rho) const
virtual

Definition at line 90 of file BWFct.cpp.

90  {
91  if(rho > rhoMa() || rho < rhoMi()) return 0;
92  return 1.0*unitFactor()/(rhoMa() - rhoMi());
93 }
double rhoMi() const
Definition: BWFct.cpp:37
double rhoMa() const
Definition: BWFct.cpp:44
double unitFactor() const
Definition: BWFct.cpp:80

◆ unitFactor()

double BWFct::unitFactor ( ) const
private

Definition at line 80 of file BWFct.cpp.

80  {
81  return (GeV*GeV)*(GeV*GeV);
82 }
static const double GeV

Member Data Documentation

◆ _coord

DalitzCoordinate BWFct::_coord
private

Definition at line 12 of file BWFct.h.

◆ _G

double BWFct::_G
private

Definition at line 13 of file BWFct.h.

◆ _M

double BWFct::_M
private

Definition at line 13 of file BWFct.h.


The documentation for this class was generated from the following files: