BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAbsLineShape Class Reference

#include <EvtAbsLineShape.hh>

+ Inheritance diagram for EvtAbsLineShape:

Public Member Functions

 EvtAbsLineShape ()
 
 EvtAbsLineShape (double mass, double width, double maxRange, EvtSpinType::spintype sp)
 
virtual ~EvtAbsLineShape ()
 
EvtAbsLineShapeoperator= (const EvtAbsLineShape &x)
 
 EvtAbsLineShape (const EvtAbsLineShape &x)
 
double getMass ()
 
double getMassMin ()
 
double getMassMax ()
 
double getMaxRange ()
 
double getWidth ()
 
EvtSpinType::spintype getSpinType ()
 
virtual double rollMass ()
 
virtual EvtAbsLineShapeclone ()
 
void reSetMass (double mass)
 
void reSetWidth (double width)
 
void reSetMassMin (double mass)
 
void reSetMassMax (double mass)
 
virtual void reSetBlatt (double blatt)
 
void includeBirthFactor (bool yesno)
 
void addFactorPn (double factor=0.)
 
void includeDecayFactor (bool yesno)
 
void setPWForDecay (int spin, EvtId d1, EvtId d2)
 
void setPWForBirthL (int spin, EvtId par, EvtId othD)
 
virtual double getRandMass (EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
 
virtual double getMassProb (double mass, double massPar, int nDaug, double *massDau)
 
void fixForSP8 ()
 
 EvtAbsLineShape ()
 
 EvtAbsLineShape (double mass, double width, double maxRange, EvtSpinType::spintype sp)
 
virtual ~EvtAbsLineShape ()
 
EvtAbsLineShapeoperator= (const EvtAbsLineShape &x)
 
 EvtAbsLineShape (const EvtAbsLineShape &x)
 
double getMass ()
 
double getMassMin ()
 
double getMassMax ()
 
double getMaxRange ()
 
double getWidth ()
 
EvtSpinType::spintype getSpinType ()
 
virtual double rollMass ()
 
virtual EvtAbsLineShapeclone ()
 
void reSetMass (double mass)
 
void reSetWidth (double width)
 
void reSetMassMin (double mass)
 
void reSetMassMax (double mass)
 
virtual void reSetBlatt (double blatt)
 
void includeBirthFactor (bool yesno)
 
void addFactorPn (double factor=0.)
 
void includeDecayFactor (bool yesno)
 
void setPWForDecay (int spin, EvtId d1, EvtId d2)
 
void setPWForBirthL (int spin, EvtId par, EvtId othD)
 
virtual double getRandMass (EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
 
virtual double getMassProb (double mass, double massPar, int nDaug, double *massDau)
 
void fixForSP8 ()
 

Protected Attributes

bool _includeDecayFact
 
bool _includeBirthFact
 
double _addFactorPn
 
double _mass
 
double _massMin
 
double _massMax
 
double _width
 
double _maxRange
 
std::vector< EvtId_userSetPWD1
 
std::vector< EvtId_userSetPWD2
 
std::vector< int > _userSetPW
 
std::vector< EvtId_userSetBirthPar
 
std::vector< EvtId_userSetBirthOthD
 
std::vector< int > _userSetBirthPW
 
EvtSpinType::spintype _spin
 
bool _applyFixForSP8
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtAbsLineShape() [1/6]

EvtAbsLineShape::EvtAbsLineShape ( )

Definition at line 38 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

38 {
39}

Referenced by clone().

◆ EvtAbsLineShape() [2/6]

EvtAbsLineShape::EvtAbsLineShape ( double  mass,
double  width,
double  maxRange,
EvtSpinType::spintype  sp 
)

Definition at line 44 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

44 {
45
46 _includeDecayFact = false;
47 _includeBirthFact = false;
48 _applyFixForSP8 = false;
49 _mass=mass;
50 _width=width;
51 _spin=sp;
52 _maxRange=maxRange;
53 double maxdelta=15.0*width;
54 //if ( width>0.001 ) {
55 // if ( 5.0*width < 0.6 ) maxdelta = 0.6;
56 //}
57 if ( maxRange > 0.00001 ) {
58 _massMax=mass+maxdelta;
59 _massMin=mass-maxRange;
60 }
61 else{
62 _massMax=mass+maxdelta;
63 _massMin=mass-15.0*width;
64 }
65 if ( _massMin< 0. ) _massMin=0.;
66 _massMax=mass+maxdelta;
67}
double mass

◆ ~EvtAbsLineShape() [1/2]

EvtAbsLineShape::~EvtAbsLineShape ( )
virtual

◆ EvtAbsLineShape() [3/6]

EvtAbsLineShape::EvtAbsLineShape ( const EvtAbsLineShape x)

Definition at line 69 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

69 {
70
71 _includeDecayFact = x._includeDecayFact;
72 _includeBirthFact = x._includeBirthFact;
73 _mass=x._mass;
74 _massMax=x._massMax;
75 _massMin=x._massMin;
76 _width=x._width;
77 _spin=x._spin;
78 _maxRange=x._maxRange;
79 _applyFixForSP8 = x._applyFixForSP8;
80}
Double_t x[10]

◆ EvtAbsLineShape() [4/6]

EvtAbsLineShape::EvtAbsLineShape ( )

◆ EvtAbsLineShape() [5/6]

EvtAbsLineShape::EvtAbsLineShape ( double  mass,
double  width,
double  maxRange,
EvtSpinType::spintype  sp 
)

◆ ~EvtAbsLineShape() [2/2]

virtual EvtAbsLineShape::~EvtAbsLineShape ( )
virtual

◆ EvtAbsLineShape() [6/6]

EvtAbsLineShape::EvtAbsLineShape ( const EvtAbsLineShape x)

Member Function Documentation

◆ addFactorPn() [1/2]

void EvtAbsLineShape::addFactorPn ( double  factor = 0.)
inline

◆ addFactorPn() [2/2]

void EvtAbsLineShape::addFactorPn ( double  factor = 0.)
inline

◆ clone() [1/2]

◆ clone() [2/2]

◆ fixForSP8() [1/2]

void EvtAbsLineShape::fixForSP8 ( )
inline

◆ fixForSP8() [2/2]

void EvtAbsLineShape::fixForSP8 ( )
inline

◆ getMass() [1/2]

double EvtAbsLineShape::getMass ( )
inline

◆ getMass() [2/2]

double EvtAbsLineShape::getMass ( )
inline

Definition at line 41 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

41{return _mass;}

◆ getMassMax() [1/2]

double EvtAbsLineShape::getMassMax ( )
inline

◆ getMassMax() [2/2]

double EvtAbsLineShape::getMassMax ( )
inline

◆ getMassMin() [1/2]

double EvtAbsLineShape::getMassMin ( )
inline

◆ getMassMin() [2/2]

double EvtAbsLineShape::getMassMin ( )
inline

◆ getMassProb() [1/2]

double EvtAbsLineShape::getMassProb ( double  mass,
double  massPar,
int  nDaug,
double *  massDau 
)
virtual

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, EvtRelBreitWignerBarrierFact, EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

Definition at line 171 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

171 {
172
173 double dTotMass=0.;
174 if ( nDaug>1) {
175 int i;
176 for (i=0; i<nDaug; i++) {
177 dTotMass+=massDau[i];
178 }
179 //report(INFO,"EvtGen") << mass << " " << massPar << " " << dTotMass << " "<< endl;
180 // if ( (mass-dTotMass)<0.0001 ) return 0.;
181 if ( (mass<dTotMass) ) return 0.;
182 }
183 if ( _width< 0.0001) return 1.;
184
185 // no parent - lets not panic
186 if ( massPar>0.0000000001 ) {
187 if ( mass > massPar) return 0.;
188 }
189 //Otherwise return the right value.
190 //Fortunately we have generated events according to a non-rel BW, so
191 //just return..
192 //EvtPropBreitWigner bw(_mass,_width);
193 //EvtPropFactor<EvtTwoBodyVertex> f(bw);
194 //EvtComplex fm=f.eval(mass);
195 //EvtComplex fm0=f.eval(_mass);
196 //return (abs(fm)*abs(fm))/(abs(fm0)*abs(fm0));
197 return 1.0;
198}

Referenced by EvtPartProp::getMassProb(), and EvtRelBreitWignerBarrierFact::getMassProb().

◆ getMassProb() [2/2]

virtual double EvtAbsLineShape::getMassProb ( double  mass,
double  massPar,
int  nDaug,
double *  massDau 
)
virtual

◆ getMaxRange() [1/2]

double EvtAbsLineShape::getMaxRange ( )
inline

◆ getMaxRange() [2/2]

double EvtAbsLineShape::getMaxRange ( )
inline

◆ getRandMass() [1/2]

double EvtAbsLineShape::getRandMass ( EvtId parId,
int  nDaug,
EvtId dauId,
EvtId othDaugId,
double  maxMass,
double *  dauMasses 
)
virtual

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, EvtRelBreitWignerBarrierFact, EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

Definition at line 119 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

119 {
120
121 if ( _width< 0.0001) return _mass;
122 //its not flat - but generated according to a BW
123
124 if (maxMass>0&&maxMass<_massMin) {
125 report(ERROR,"EvtGen") << "In EvtAbsLineShape::getRandMass"<<endl;
126 report(ERROR,"EvtGen") << "Decaying particle "<<EvtPDL::name(*parId)
127 << " with mass "<<maxMass<<endl;
128 report(ERROR,"EvtGen") << " to particle"
129 << " with a minimal mass of "<< _massMin<<endl;
130 }
131
132 double mMin=_massMin;
133 double mMax=_massMax;
134 if ( maxMass>-0.5 && maxMass< mMax) mMax=maxMass;
135 double ymin = atan( 2.0*(mMin-_mass)/_width);
136 double ymax = atan( 2.0*(mMax-_mass)/_width);
137
138 loop:
139 double themass = ( _mass + ((_width/2.0)*tan(EvtRandom::Flat(ymin,ymax))));
140
141 if(fabs(_addFactorPn)>0.00000001){// addFactorPn, pingrg-2010-1-10
142 double massOthD=EvtPDL::getMeanMass(*othDaugId);
143 double massParent=EvtPDL::getMeanMass(*parId);
144 double phsp,maxp,maxp1,maxp2;
145 if(themass+massOthD <massParent ){
146 EvtTwoBodyVertex vb(themass,massOthD,massParent,1.0);
147 phsp = vb.pD();
148 } else {return themass;}
149
150 if( (massOthD + mMax)< massParent){
151 EvtTwoBodyVertex vb1(massOthD,mMax,massParent,1);
152 EvtTwoBodyVertex vb2(massOthD,mMin,massParent,1);
153 maxp = vb1.pD();
154 maxp1 = pow(maxp,_addFactorPn*2.0);
155 maxp = vb2.pD();
156 maxp2= pow(maxp,_addFactorPn*2.0);
157 maxp = max(maxp1,maxp2);
158 }else {return themass;}
159
160 double wt = pow(phsp,_addFactorPn*2.0)/maxp;
161 double rdm = EvtRandom::Flat(0.0,1.0);
162
163 if(rdm> wt ) goto loop;
164
165 }
166
167 return themass;
168 // return EvtRandom::Flat(_massMin,_massMax);
169}
double tan(const BesAngle a)
Definition: BesAngle.h:216
ostream & report(Severity severity, const char *facility)

Referenced by EvtRelBreitWignerBarrierFact::getRandMass(), and EvtPartProp::getRandMass().

◆ getRandMass() [2/2]

virtual double EvtAbsLineShape::getRandMass ( EvtId parId,
int  nDaug,
EvtId dauId,
EvtId othDaugId,
double  maxMass,
double *  dauMasses 
)
virtual

◆ getSpinType() [1/2]

EvtSpinType::spintype EvtAbsLineShape::getSpinType ( )
inline

◆ getSpinType() [2/2]

EvtSpinType::spintype EvtAbsLineShape::getSpinType ( )
inline

Definition at line 46 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

46{return _spin;}

◆ getWidth() [1/2]

double EvtAbsLineShape::getWidth ( )
inline

◆ getWidth() [2/2]

double EvtAbsLineShape::getWidth ( )
inline

◆ includeBirthFactor() [1/2]

void EvtAbsLineShape::includeBirthFactor ( bool  yesno)
inline

◆ includeBirthFactor() [2/2]

void EvtAbsLineShape::includeBirthFactor ( bool  yesno)
inline

◆ includeDecayFactor() [1/2]

void EvtAbsLineShape::includeDecayFactor ( bool  yesno)
inline

◆ includeDecayFactor() [2/2]

void EvtAbsLineShape::includeDecayFactor ( bool  yesno)
inline

◆ operator=() [1/2]

EvtAbsLineShape & EvtAbsLineShape::operator= ( const EvtAbsLineShape x)

Definition at line 82 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

82 {
83
84 _includeDecayFact = x._includeDecayFact;
85 _includeBirthFact = x._includeBirthFact;
86 _mass=x._mass;
87 _massMax=x._massMax;
88 _massMin=x._massMin;
89 _width=x._width;
90 _spin=x._spin;
91 _maxRange=x._maxRange;
92 _applyFixForSP8 = x._applyFixForSP8;
93 return *this;
94}

◆ operator=() [2/2]

EvtAbsLineShape & EvtAbsLineShape::operator= ( const EvtAbsLineShape x)

◆ reSetBlatt() [1/2]

virtual void EvtAbsLineShape::reSetBlatt ( double  blatt)
inlinevirtual

◆ reSetBlatt() [2/2]

virtual void EvtAbsLineShape::reSetBlatt ( double  blatt)
inlinevirtual

◆ reSetMass() [1/2]

void EvtAbsLineShape::reSetMass ( double  mass)
inline

◆ reSetMass() [2/2]

void EvtAbsLineShape::reSetMass ( double  mass)
inline

◆ reSetMassMax() [1/2]

void EvtAbsLineShape::reSetMassMax ( double  mass)
inline

◆ reSetMassMax() [2/2]

void EvtAbsLineShape::reSetMassMax ( double  mass)
inline

◆ reSetMassMin() [1/2]

void EvtAbsLineShape::reSetMassMin ( double  mass)
inline

◆ reSetMassMin() [2/2]

void EvtAbsLineShape::reSetMassMin ( double  mass)
inline

◆ reSetWidth() [1/2]

void EvtAbsLineShape::reSetWidth ( double  width)
inline

Definition at line 51 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

51 {
52 _width=width;
53 // <--- added by L.L. Wang to fix a bug
54 double maxdelta=15.0*width;
55 if ( _maxRange > 0.00001 ) {
56 _massMax=_mass+maxdelta;
58 }
59 else{
60 _massMax=_mass+maxdelta;
61 _massMin=_mass-15.0*width;
62 }
63 if ( _massMin< 0. ) _massMin=0.;
64 _massMax=_mass+maxdelta;
65 // ---> //
66 }

Referenced by EvtPartProp::reSetWidth().

◆ reSetWidth() [2/2]

void EvtAbsLineShape::reSetWidth ( double  width)
inline

Definition at line 51 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

51 {
52 _width=width;
53 // <--- added by L.L. Wang to fix a bug
54 double maxdelta=15.0*width;
55 if ( _maxRange > 0.00001 ) {
56 _massMax=_mass+maxdelta;
58 }
59 else{
60 _massMax=_mass+maxdelta;
61 _massMin=_mass-15.0*width;
62 }
63 if ( _massMin< 0. ) _massMin=0.;
64 _massMax=_mass+maxdelta;
65 // ---> //
66 }

◆ rollMass() [1/2]

double EvtAbsLineShape::rollMass ( )
virtual

Definition at line 102 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.cc.

102 {
103
104 double ymin, ymax;
105 double temp;
106
107 if ( _width < 0.0001 ) {
108 return _mass;
109 }
110 else{
111 ymin = atan( 2.0*(_massMin-_mass)/_width);
112 ymax = atan( 2.0*(_massMax-_mass)/_width);
113
114 temp= ( _mass + ((_width/2.0)*tan(EvtRandom::Flat(ymin,ymax))));
115
116 return temp;
117 }
118}

Referenced by EvtPartProp::rollMass().

◆ rollMass() [2/2]

virtual double EvtAbsLineShape::rollMass ( )
virtual

◆ setPWForBirthL() [1/2]

void EvtAbsLineShape::setPWForBirthL ( int  spin,
EvtId  par,
EvtId  othD 
)
inline

◆ setPWForBirthL() [2/2]

void EvtAbsLineShape::setPWForBirthL ( int  spin,
EvtId  par,
EvtId  othD 
)
inline

Definition at line 78 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

78 {
79 _userSetBirthPW.push_back(spin);
80 _userSetBirthOthD.push_back(othD);
81 _userSetBirthPar.push_back(par);
82 }

◆ setPWForDecay() [1/2]

void EvtAbsLineShape::setPWForDecay ( int  spin,
EvtId  d1,
EvtId  d2 
)
inline

◆ setPWForDecay() [2/2]

void EvtAbsLineShape::setPWForDecay ( int  spin,
EvtId  d1,
EvtId  d2 
)
inline

Definition at line 73 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAbsLineShape.hh.

73 {
74 _userSetPW.push_back(spin);
75 _userSetPWD1.push_back(d1);
76 _userSetPWD2.push_back(d2);
77 }

Member Data Documentation

◆ _addFactorPn

double EvtAbsLineShape::_addFactorPn
protected

◆ _applyFixForSP8

◆ _includeBirthFact

◆ _includeDecayFact

◆ _mass

◆ _massMax

◆ _massMin

◆ _maxRange

◆ _spin

◆ _userSetBirthOthD

std::vector< EvtId > EvtAbsLineShape::_userSetBirthOthD
protected

◆ _userSetBirthPar

std::vector< EvtId > EvtAbsLineShape::_userSetBirthPar
protected

◆ _userSetBirthPW

std::vector< int > EvtAbsLineShape::_userSetBirthPW
protected

◆ _userSetPW

std::vector< int > EvtAbsLineShape::_userSetPW
protected

◆ _userSetPWD1

std::vector< EvtId > EvtAbsLineShape::_userSetPWD1
protected

◆ _userSetPWD2

std::vector< EvtId > EvtAbsLineShape::_userSetPWD2
protected

◆ _width


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