EvtAbsLineShape Class Reference

#include <EvtAbsLineShape.hh>

Inheritance diagram for EvtAbsLineShape:

EvtFlatLineShape EvtManyDeltaFuncLineShape EvtRelBreitWignerBarrierFact List of all members.

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 ()

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

Definition at line 31 of file EvtAbsLineShape.hh.


Constructor & Destructor Documentation

EvtAbsLineShape::EvtAbsLineShape (  ) 

Definition at line 38 of file EvtAbsLineShape.cc.

Referenced by clone().

00038                                  {
00039 }

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

Definition at line 44 of file EvtAbsLineShape.cc.

References _applyFixForSP8, _includeBirthFact, _includeDecayFact, _mass, _massMax, _massMin, _maxRange, _spin, and _width.

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 }

EvtAbsLineShape::~EvtAbsLineShape (  )  [virtual]

Definition at line 41 of file EvtAbsLineShape.cc.

00041                                   {
00042 }

EvtAbsLineShape::EvtAbsLineShape ( const EvtAbsLineShape x  ) 

Definition at line 69 of file EvtAbsLineShape.cc.

References _applyFixForSP8, _includeBirthFact, _includeDecayFact, _mass, _massMax, _massMin, _maxRange, _spin, _width, and x.

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 }


Member Function Documentation

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

Definition at line 71 of file EvtAbsLineShape.hh.

References _addFactorPn.

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

00071 { _addFactorPn = factor;}

EvtAbsLineShape * EvtAbsLineShape::clone (  )  [virtual]

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

Definition at line 96 of file EvtAbsLineShape.cc.

References EvtAbsLineShape().

00096                                         {
00097 
00098   return new EvtAbsLineShape(*this);
00099 }

void EvtAbsLineShape::fixForSP8 (  )  [inline]

Definition at line 87 of file EvtAbsLineShape.hh.

References _applyFixForSP8.

Referenced by EvtPartProp::fixLSForSP8().

00087 { _applyFixForSP8=true;}

double EvtAbsLineShape::getMass (  )  [inline]

Definition at line 41 of file EvtAbsLineShape.hh.

References _mass.

Referenced by EvtPartProp::getMass(), and EvtPartProp::newLineShape().

00041 {return _mass;}

double EvtAbsLineShape::getMassMax (  )  [inline]

Definition at line 43 of file EvtAbsLineShape.hh.

References _massMax.

Referenced by EvtPartProp::getMassMax().

00043 {return _massMax;}

double EvtAbsLineShape::getMassMin (  )  [inline]

Definition at line 42 of file EvtAbsLineShape.hh.

References _massMin.

Referenced by EvtPartProp::getMassMin().

00042 {return _massMin;} 

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

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

Definition at line 171 of file EvtAbsLineShape.cc.

References _width, and genRecEmupikp::i.

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

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 }

double EvtAbsLineShape::getMaxRange (  )  [inline]

Definition at line 44 of file EvtAbsLineShape.hh.

References _maxRange.

Referenced by EvtPartProp::getMaxRange(), and EvtPartProp::newLineShape().

00044 {return _maxRange;}

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

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

Definition at line 119 of file EvtAbsLineShape.cc.

References _addFactorPn, _mass, _massMax, _massMin, _width, calibUtil::ERROR, EvtRandom::Flat(), EvtPDL::getMeanMass(), max, EvtPDL::name(), EvtTwoBodyVertex::pD(), report(), and tan().

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

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 }

EvtSpinType::spintype EvtAbsLineShape::getSpinType (  )  [inline]

Definition at line 46 of file EvtAbsLineShape.hh.

References _spin.

Referenced by EvtPartProp::newLineShape().

00046 {return _spin;}

double EvtAbsLineShape::getWidth (  )  [inline]

Definition at line 45 of file EvtAbsLineShape.hh.

References _width.

Referenced by EvtPartProp::getWidth(), and EvtPartProp::newLineShape().

00045 {return _width;} 

void EvtAbsLineShape::includeBirthFactor ( bool  yesno  )  [inline]

Definition at line 70 of file EvtAbsLineShape.hh.

References _includeBirthFact.

Referenced by EvtPartProp::includeBirthFactor().

00070 { _includeBirthFact = yesno; }

void EvtAbsLineShape::includeDecayFactor ( bool  yesno  )  [inline]

Definition at line 72 of file EvtAbsLineShape.hh.

References _includeDecayFact.

Referenced by EvtPartProp::includeDecayFactor().

00072 { _includeDecayFact = yesno; }

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

Definition at line 82 of file EvtAbsLineShape.cc.

References _applyFixForSP8, _includeBirthFact, _includeDecayFact, _mass, _massMax, _massMin, _maxRange, _spin, _width, and x.

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 }

virtual void EvtAbsLineShape::reSetBlatt ( double  blatt  )  [inline, virtual]

Reimplemented in EvtRelBreitWignerBarrierFact.

Definition at line 69 of file EvtAbsLineShape.hh.

Referenced by EvtPartProp::reSetBlatt().

00069 {};

void EvtAbsLineShape::reSetMass ( double  mass  )  [inline]

Definition at line 50 of file EvtAbsLineShape.hh.

References _mass.

Referenced by EvtPartProp::reSetMass().

00050 { _mass=mass;}

void EvtAbsLineShape::reSetMassMax ( double  mass  )  [inline]

Definition at line 68 of file EvtAbsLineShape.hh.

References _massMax.

Referenced by EvtPartProp::reSetMassMax().

00068 { _massMax=mass;}

void EvtAbsLineShape::reSetMassMin ( double  mass  )  [inline]

Definition at line 67 of file EvtAbsLineShape.hh.

References _massMin.

Referenced by EvtPartProp::reSetMassMin().

00067 { _massMin=mass;}

void EvtAbsLineShape::reSetWidth ( double  width  )  [inline]

Definition at line 51 of file EvtAbsLineShape.hh.

References _mass, _massMax, _massMin, _maxRange, and _width.

Referenced by EvtPartProp::reSetWidth().

00051                                 { 
00052           _width=width;
00053           // <--- added by L.L. Wang to fix a bug
00054           double maxdelta=15.0*width;
00055           if ( _maxRange > 0.00001 ) {
00056                   _massMax=_mass+maxdelta;
00057                   _massMin=_mass-_maxRange;
00058           }
00059           else{
00060                   _massMax=_mass+maxdelta;
00061                   _massMin=_mass-15.0*width;
00062           }
00063           if ( _massMin< 0. ) _massMin=0.;
00064           _massMax=_mass+maxdelta;
00065           // ---> //
00066   }

double EvtAbsLineShape::rollMass (  )  [virtual]

Definition at line 102 of file EvtAbsLineShape.cc.

References _mass, _massMax, _massMin, _width, EvtRandom::Flat(), tan(), and subSeperate::temp.

Referenced by EvtPartProp::rollMass().

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 }

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

Definition at line 78 of file EvtAbsLineShape.hh.

References _userSetBirthOthD, _userSetBirthPar, and _userSetBirthPW.

Referenced by EvtPartProp::setPWForBirthL().

00078                                                         { 
00079           _userSetBirthPW.push_back(spin);
00080           _userSetBirthOthD.push_back(othD);
00081           _userSetBirthPar.push_back(par);
00082   }

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

Definition at line 73 of file EvtAbsLineShape.hh.

References _userSetPW, _userSetPWD1, and _userSetPWD2.

Referenced by EvtPartProp::setPWForDecay().

00073                                                     { 
00074           _userSetPW.push_back(spin);
00075           _userSetPWD1.push_back(d1);
00076           _userSetPWD2.push_back(d2);
00077   }


Member Data Documentation

double EvtAbsLineShape::_addFactorPn [protected]

Definition at line 92 of file EvtAbsLineShape.hh.

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

bool EvtAbsLineShape::_applyFixForSP8 [protected]

Definition at line 112 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), fixForSP8(), EvtRelBreitWignerBarrierFact::getRandMass(), and operator=().

bool EvtAbsLineShape::_includeBirthFact [protected]

Definition at line 91 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), EvtRelBreitWignerBarrierFact::getRandMass(), includeBirthFactor(), EvtRelBreitWignerBarrierFact::operator=(), and operator=().

bool EvtAbsLineShape::_includeDecayFact [protected]

Definition at line 90 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), EvtRelBreitWignerBarrierFact::getRandMass(), includeDecayFactor(), EvtRelBreitWignerBarrierFact::operator=(), and operator=().

double EvtAbsLineShape::_mass [protected]

Definition at line 93 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), getMass(), EvtRelBreitWignerBarrierFact::getRandMass(), getRandMass(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), operator=(), reSetMass(), reSetWidth(), and rollMass().

double EvtAbsLineShape::_massMax [protected]

Definition at line 95 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), getMassMax(), EvtRelBreitWignerBarrierFact::getRandMass(), EvtManyDeltaFuncLineShape::getRandMass(), EvtFlatLineShape::getRandMass(), getRandMass(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), operator=(), reSetMassMax(), reSetWidth(), and rollMass().

double EvtAbsLineShape::_massMin [protected]

Definition at line 94 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), getMassMin(), EvtRelBreitWignerBarrierFact::getRandMass(), EvtManyDeltaFuncLineShape::getRandMass(), EvtFlatLineShape::getRandMass(), getRandMass(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), operator=(), reSetMassMin(), reSetWidth(), and rollMass().

double EvtAbsLineShape::_maxRange [protected]

Definition at line 97 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), getMaxRange(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), operator=(), and reSetWidth().

EvtSpinType::spintype EvtAbsLineShape::_spin [protected]

Definition at line 110 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), EvtRelBreitWignerBarrierFact::getRandMass(), getSpinType(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), and operator=().

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

Definition at line 107 of file EvtAbsLineShape.hh.

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

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

Definition at line 107 of file EvtAbsLineShape.hh.

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

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

Definition at line 108 of file EvtAbsLineShape.hh.

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

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

Definition at line 104 of file EvtAbsLineShape.hh.

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

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

Definition at line 103 of file EvtAbsLineShape.hh.

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

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

Definition at line 103 of file EvtAbsLineShape.hh.

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

double EvtAbsLineShape::_width [protected]

Definition at line 96 of file EvtAbsLineShape.hh.

Referenced by EvtAbsLineShape(), EvtFlatLineShape::EvtFlatLineShape(), EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(), EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(), EvtRelBreitWignerBarrierFact::getMassProb(), getMassProb(), EvtRelBreitWignerBarrierFact::getRandMass(), EvtManyDeltaFuncLineShape::getRandMass(), getRandMass(), getWidth(), EvtRelBreitWignerBarrierFact::operator=(), EvtManyDeltaFuncLineShape::operator=(), EvtFlatLineShape::operator=(), operator=(), reSetWidth(), and rollMass().


Generated on Tue Nov 29 23:18:51 2016 for BOSS_7.0.2 by  doxygen 1.4.7