#include <EvtAbsLineShape.hh>
Inheritance diagram for EvtAbsLineShape:
Public Member Functions | |
void | addFactorPn (double factor=0.) |
virtual EvtAbsLineShape * | clone () |
EvtAbsLineShape (const EvtAbsLineShape &x) | |
EvtAbsLineShape (double mass, double width, double maxRange, EvtSpinType::spintype sp) | |
EvtAbsLineShape () | |
void | fixForSP8 () |
double | getMass () |
double | getMassMax () |
double | getMassMin () |
virtual double | getMassProb (double mass, double massPar, int nDaug, double *massDau) |
double | getMaxRange () |
virtual double | getRandMass (EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses) |
EvtSpinType::spintype | getSpinType () |
double | getWidth () |
void | includeBirthFactor (bool yesno) |
void | includeDecayFactor (bool yesno) |
EvtAbsLineShape & | operator= (const EvtAbsLineShape &x) |
virtual void | reSetBlatt (double blatt) |
void | reSetMass (double mass) |
void | reSetMassMax (double mass) |
void | reSetMassMin (double mass) |
void | reSetWidth (double width) |
virtual double | rollMass () |
void | setPWForBirthL (int spin, EvtId par, EvtId othD) |
void | setPWForDecay (int spin, EvtId d1, EvtId d2) |
virtual | ~EvtAbsLineShape () |
Protected Attributes | |
double | _addFactorPn |
bool | _applyFixForSP8 |
bool | _includeBirthFact |
bool | _includeDecayFact |
double | _mass |
double | _massMax |
double | _massMin |
double | _maxRange |
EvtSpinType::spintype | _spin |
std::vector< EvtId > | _userSetBirthOthD |
std::vector< EvtId > | _userSetBirthPar |
std::vector< int > | _userSetBirthPW |
std::vector< int > | _userSetPW |
std::vector< EvtId > | _userSetPWD1 |
std::vector< EvtId > | _userSetPWD2 |
double | _width |
|
00038 { 00039 }
|
|
00044 { 00045 00046 _includeDecayFact = false; 00047 _includeBirthFact = false; 00048 _applyFixForSP8 = false; 00049 _mass=mass; 00050 _width=width; 00051 _spin=sp; 00052 _maxRange=maxRange; 00053 double maxdelta=15.0*width; 00054 //if ( width>0.001 ) { 00055 // if ( 5.0*width < 0.6 ) maxdelta = 0.6; 00056 //} 00057 if ( maxRange > 0.00001 ) { 00058 _massMax=mass+maxdelta; 00059 _massMin=mass-maxRange; 00060 } 00061 else{ 00062 _massMax=mass+maxdelta; 00063 _massMin=mass-15.0*width; 00064 } 00065 if ( _massMin< 0. ) _massMin=0.; 00066 _massMax=mass+maxdelta; 00067 }
|
|
00041 { 00042 }
|
|
00069 { 00070 00071 _includeDecayFact = x._includeDecayFact; 00072 _includeBirthFact = x._includeBirthFact; 00073 _mass=x._mass; 00074 _massMax=x._massMax; 00075 _massMin=x._massMin; 00076 _width=x._width; 00077 _spin=x._spin; 00078 _maxRange=x._maxRange; 00079 _applyFixForSP8 = x._applyFixForSP8; 00080 }
|
|
00056 { _addFactorPn = factor;}
|
|
Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact. 00096 { 00097 00098 return new EvtAbsLineShape(*this); 00099 }
|
|
00072 { _applyFixForSP8=true;}
|
|
00041 {return _mass;}
|
|
00043 {return _massMax;}
|
|
00042 {return _massMin;}
|
|
Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact. 00171 { 00172 00173 double dTotMass=0.; 00174 if ( nDaug>1) { 00175 int i; 00176 for (i=0; i<nDaug; i++) { 00177 dTotMass+=massDau[i]; 00178 } 00179 //report(INFO,"EvtGen") << mass << " " << massPar << " " << dTotMass << " "<< endl; 00180 // if ( (mass-dTotMass)<0.0001 ) return 0.; 00181 if ( (mass<dTotMass) ) return 0.; 00182 } 00183 if ( _width< 0.0001) return 1.; 00184 00185 // no parent - lets not panic 00186 if ( massPar>0.0000000001 ) { 00187 if ( mass > massPar) return 0.; 00188 } 00189 //Otherwise return the right value. 00190 //Fortunately we have generated events according to a non-rel BW, so 00191 //just return.. 00192 //EvtPropBreitWigner bw(_mass,_width); 00193 //EvtPropFactor<EvtTwoBodyVertex> f(bw); 00194 //EvtComplex fm=f.eval(mass); 00195 //EvtComplex fm0=f.eval(_mass); 00196 //return (abs(fm)*abs(fm))/(abs(fm0)*abs(fm0)); 00197 return 1.0; 00198 }
|
|
00044 {return _maxRange;}
|
|
Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact. 00119 { 00120 00121 if ( _width< 0.0001) return _mass; 00122 //its not flat - but generated according to a BW 00123 00124 if (maxMass>0&&maxMass<_massMin) { 00125 report(ERROR,"EvtGen") << "In EvtAbsLineShape::getRandMass"<<endl; 00126 report(ERROR,"EvtGen") << "Decaying particle "<<EvtPDL::name(*parId) 00127 << " with mass "<<maxMass<<endl; 00128 report(ERROR,"EvtGen") << " to particle" 00129 << " with a minimal mass of "<< _massMin<<endl; 00130 } 00131 00132 double mMin=_massMin; 00133 double mMax=_massMax; 00134 if ( maxMass>-0.5 && maxMass< mMax) mMax=maxMass; 00135 double ymin = atan( 2.0*(mMin-_mass)/_width); 00136 double ymax = atan( 2.0*(mMax-_mass)/_width); 00137 00138 loop: 00139 double themass = ( _mass + ((_width/2.0)*tan(EvtRandom::Flat(ymin,ymax)))); 00140 00141 if(fabs(_addFactorPn)>0.00000001){// addFactorPn, pingrg-2010-1-10 00142 double massOthD=EvtPDL::getMeanMass(*othDaugId); 00143 double massParent=EvtPDL::getMeanMass(*parId); 00144 double phsp,maxp,maxp1,maxp2; 00145 if(themass+massOthD <massParent ){ 00146 EvtTwoBodyVertex vb(themass,massOthD,massParent,1.0); 00147 phsp = vb.pD(); 00148 } else {return themass;} 00149 00150 if( (massOthD + mMax)< massParent){ 00151 EvtTwoBodyVertex vb1(massOthD,mMax,massParent,1); 00152 EvtTwoBodyVertex vb2(massOthD,mMin,massParent,1); 00153 maxp = vb1.pD(); 00154 maxp1 = pow(maxp,_addFactorPn*2.0); 00155 maxp = vb2.pD(); 00156 maxp2= pow(maxp,_addFactorPn*2.0); 00157 maxp = max(maxp1,maxp2); 00158 }else {return themass;} 00159 00160 double wt = pow(phsp,_addFactorPn*2.0)/maxp; 00161 double rdm = EvtRandom::Flat(0.0,1.0); 00162 00163 if(rdm> wt ) goto loop; 00164 00165 } 00166 00167 return themass; 00168 // return EvtRandom::Flat(_massMin,_massMax); 00169 }
|
|
00046 {return _spin;}
|
|
00045 {return _width;}
|
|
00055 { _includeBirthFact = yesno; }
|
|
00057 { _includeDecayFact = yesno; }
|
|
00082 { 00083 00084 _includeDecayFact = x._includeDecayFact; 00085 _includeBirthFact = x._includeBirthFact; 00086 _mass=x._mass; 00087 _massMax=x._massMax; 00088 _massMin=x._massMin; 00089 _width=x._width; 00090 _spin=x._spin; 00091 _maxRange=x._maxRange; 00092 _applyFixForSP8 = x._applyFixForSP8; 00093 return *this; 00094 }
|
|
Reimplemented in EvtRelBreitWignerBarrierFact. 00054 {};
|
|
00050 { _mass=mass;}
|
|
00053 { _massMax=mass;}
|
|
00052 { _massMin=mass;}
|
|
00051 { _width=width;}
|
|
00102 { 00103 00104 double ymin, ymax; 00105 double temp; 00106 00107 if ( _width < 0.0001 ) { 00108 return _mass; 00109 } 00110 else{ 00111 ymin = atan( 2.0*(_massMin-_mass)/_width); 00112 ymax = atan( 2.0*(_massMax-_mass)/_width); 00113 00114 temp= ( _mass + ((_width/2.0)*tan(EvtRandom::Flat(ymin,ymax)))); 00115 00116 return temp; 00117 } 00118 }
|
|
00063 { 00064 _userSetBirthPW.push_back(spin); 00065 _userSetBirthOthD.push_back(othD); 00066 _userSetBirthPar.push_back(par); 00067 }
|
|
00058 { 00059 _userSetPW.push_back(spin); 00060 _userSetPWD1.push_back(d1); 00061 _userSetPWD2.push_back(d2); 00062 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|