Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtAbsLineShape Class Reference

#include <EvtAbsLineShape.hh>

Inheritance diagram for EvtAbsLineShape:

EvtFlatLineShape EvtManyDeltaFuncLineShape EvtRelBreitWignerBarrierFact List of all members.

Public Member Functions

void addFactorPn (double factor=0.)
virtual EvtAbsLineShapeclone ()
 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)
EvtAbsLineShapeoperator= (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

Constructor & Destructor Documentation

EvtAbsLineShape::EvtAbsLineShape  ) 
 

00038                                  {
00039 }

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

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]
 

00041                                   {
00042 }

EvtAbsLineShape::EvtAbsLineShape const EvtAbsLineShape 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]
 

00056 { _addFactorPn = factor;}

EvtAbsLineShape * EvtAbsLineShape::clone  )  [virtual]
 

Reimplemented in EvtFlatLineShape, EvtManyDeltaFuncLineShape, and EvtRelBreitWignerBarrierFact.

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

void EvtAbsLineShape::fixForSP8  )  [inline]
 

00072 { _applyFixForSP8=true;}

double EvtAbsLineShape::getMass  )  [inline]
 

00041 {return _mass;}

double EvtAbsLineShape::getMassMax  )  [inline]
 

00043 {return _massMax;}

double EvtAbsLineShape::getMassMin  )  [inline]
 

00042 {return _massMin;} 

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

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 }

double EvtAbsLineShape::getMaxRange  )  [inline]
 

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.

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]
 

00046 {return _spin;}

double EvtAbsLineShape::getWidth  )  [inline]
 

00045 {return _width;} 

void EvtAbsLineShape::includeBirthFactor bool  yesno  )  [inline]
 

00055 { _includeBirthFact = yesno; }

void EvtAbsLineShape::includeDecayFactor bool  yesno  )  [inline]
 

00057 { _includeDecayFact = yesno; }

EvtAbsLineShape & EvtAbsLineShape::operator= const EvtAbsLineShape 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.

00054 {};

void EvtAbsLineShape::reSetMass double  mass  )  [inline]
 

00050 { _mass=mass;}

void EvtAbsLineShape::reSetMassMax double  mass  )  [inline]
 

00053 { _massMax=mass;}

void EvtAbsLineShape::reSetMassMin double  mass  )  [inline]
 

00052 { _massMin=mass;}

void EvtAbsLineShape::reSetWidth double  width  )  [inline]
 

00051 { _width=width;}

double EvtAbsLineShape::rollMass  )  [virtual]
 

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]
 

00063                                                         { 
00064     _userSetBirthPW.push_back(spin);
00065     _userSetBirthOthD.push_back(othD);
00066     _userSetBirthPar.push_back(par);
00067   }

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

00058                                                     { 
00059     _userSetPW.push_back(spin);
00060     _userSetPWD1.push_back(d1);
00061     _userSetPWD2.push_back(d2);
00062   }


Member Data Documentation

double EvtAbsLineShape::_addFactorPn [protected]
 

bool EvtAbsLineShape::_applyFixForSP8 [protected]
 

bool EvtAbsLineShape::_includeBirthFact [protected]
 

bool EvtAbsLineShape::_includeDecayFact [protected]
 

double EvtAbsLineShape::_mass [protected]
 

double EvtAbsLineShape::_massMax [protected]
 

double EvtAbsLineShape::_massMin [protected]
 

double EvtAbsLineShape::_maxRange [protected]
 

EvtSpinType::spintype EvtAbsLineShape::_spin [protected]
 

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

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

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

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

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

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

double EvtAbsLineShape::_width [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:03:07 2011 for BOSS6.5.5 by  doxygen 1.3.9.1