|
EvtGen
2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
|
Go to the documentation of this file. 179 << "Error in EvtParticle::setVectorSpinDensity" << endl; 208 for ( i = 0; i < n; i++ ) { 209 for ( j = 0; j < n; j++ ) { 211 for ( k = 0; k < n; k++ ) { 212 for ( l = 0; l < n; l++ ) { 213 tmp += R. get( l, i ) * rho. get( l, k ) * 223 double alpha, double beta, 236 for ( i = 0; i < n; i++ ) { 237 for ( j = 0; j < n; j++ ) { 239 for ( k = 0; k < n; k++ ) { 240 for ( l = 0; l < n; l++ ) { 241 tmp += R. get( l, i ) * rho. get( l, k ) * 255 double parMass = -1.; 258 parMass = par-> mass(); 259 for ( size_t i = 0; i < par-> getNDaug(); i++ ) { 269 for ( size_t ii = 0; ii < _ndaug; ii++ ) { 280 double* dauMasses = 0; 283 dauMasses = new double[ _ndaug]; 284 for ( size_t j = 0; j < _ndaug; j++ ) { 295 if ( tempPar-> getDaug( 0 ) == this ) 304 othDauId, parMass, dauMasses ) ); 328 static EvtIdSet borUps( BS0, BSB, BD0, BDB, U4S ); 331 bool hasBorUps = false; 338 if ( ( getNDaug() == 0 && !hasBorUps ) && 339 ( thisId == BS0 || thisId == BSB || thisId == BD0 || thisId == BDB ) ) { 349 if ( getId() == BS0 ) { 352 } else if ( getId() == BSB ) { 355 } else if ( getId() == BD0 ) { 358 } else if ( getId() == BDB ) { 361 } else if ( getId() == D0 ) { 364 } else if ( getId() == D0B ) { 388 for ( size_t i = 0; i < p-> getNDaug(); i++ ) { 400 double* dauMasses = 0; 403 dauId = new EvtId[nDaugT]; 404 dauMasses = new double[nDaugT]; 405 for ( j = 0; j < nDaugT; j++ ) { 417 if ( tempPar-> getDaug( 0 ) == this ) 426 dauId, othDauId, parMass, 475 bool massTreeOK( true ); 480 if ( massTreeOK == false ) { 483 << p-> mass() << " to decay channel number " << _channel << endl; 499 ( thisId == BS0 || thisId == BSB || thisId == BD0 || thisId == BDB ) ) { 504 if ( decayer != 0 ) { 518 double massProb = 1.; 522 while ( massProb < ranNum ) { 529 if ( counter > 10000 ) { 530 if ( counter == 10001 ) { 532 << "Too many iterations to determine the mass tree. Parent mass= " 533 << p-> mass() << " " << massProb << endl; 536 << "will take next combo with non-zero likelihood\n"; 540 if ( counter > 20000 ) { 545 if ( massProb > 0. ) { 548 << "Taking the minimum mass of all particles in the chain\n"; 551 << "Sorry, no luck finding a valid set of masses. This may be a pathological combo\n"; 576 dMasses = new double[nDaug]; 577 for ( i = 0; i < nDaug; i++ ) 590 for ( i = 0; i < nDaug; i++ ) { 598 for ( size_t i = 0; i < _ndaug; i++ ) { 621 << "and you have asked for the:" << i << "th polarization vector." 622 << " I.e. you thought it was a" 623 << " vector particle!" << endl; 633 << "and you have asked for the:" << i << "th polarization vector." 634 << " I.e. you thought it was a" 635 << " vector particle!" << endl; 645 << "th polarization vector of photon." 646 << " I.e. you thought it was a" 647 << " photon particle!" << endl; 657 << "and you have asked for the:" << i 658 << "th polarization vector of a photon." 659 << " I.e. you thought it was a" 660 << " photon particle!" << endl; 670 << "and you have asked for the:" << i << "th dirac spinor." 671 << " I.e. you thought it was a" 672 << " Dirac particle!" << endl; 682 << "and you have asked for the:" << i << "th dirac spinor." 683 << " I.e. you thought it was a" 684 << " Dirac particle!" << endl; 695 << " I.e. you thought it was a" 696 << " neutrino particle!" << endl; 707 << " I.e. you thought it was a" 708 << " neutrino particle!" << endl; 718 << "and you have asked for the:" << i << "th tensor." 719 << " I.e. you thought it was a" 720 << " Tensor particle!" << endl; 730 << "and you have asked for the:" << i << "th tensor." 731 << " I.e. you thought it was a" 732 << " Tensor particle!" << endl; 742 << "and you have asked for the:" << i << "th Rarita-Schwinger spinor." 743 << " I.e. you thought it was a" 744 << " RaritaSchwinger particle!" << std::endl; 754 << "and you have asked for the:" << i << "th Rarita-Schwinger spinor." 755 << " I.e. you thought it was a" 756 << " RaritaSchwinger particle!" << std::endl; 766 temp = this-> getP4(); 771 mom = ptemp-> getP4(); 787 mom = ptemp-> getP4(); 803 temp. set( 0.0, 0.0, 0.0, 0.0 ); 809 temp = ( ptemp-> _t / ptemp-> mass() ) * ( ptemp-> getP4() ); 813 mom = ptemp-> getP4(); 815 temp = temp + ( ptemp-> _t / ptemp-> mass() ) * ( ptemp-> getP4() ); 837 while ( bpart-> _daug[i] != current ) { 841 if ( bpart == rootOfTree ) { 842 if ( i + 1 == bpart-> _ndaug ) 849 } while ( i >= bpart-> _ndaug ); 851 return bpart-> _daug[i]; 855 EvtId* list_of_stable ) 866 while ( list_of_stable[ii] != EvtId( -1, -1 ) ) { 867 if ( getId() == list_of_stable[ii] ) { 874 for ( size_t i = 0; i < _ndaug; i++ ) { 879 for ( size_t i = 0; i < _ndaug; i++ ) { 891 for ( size_t i = 0; i < _ndaug; i++ ) { 896 for ( size_t i = 0; i < _ndaug; i++ ) { 904 EvtId* list_of_stable ) 911 while ( list_of_stable[ii] != EvtId( -1, -1 ) ) { 912 if ( getId() == list_of_stable[ii] ) { 920 for ( size_t i = 0; i < _ndaug; i++ ) { 922 firstparent, lastparent, 926 for ( size_t i = 0; i < _ndaug; i++ ) { 928 secondary, list_of_stable ); 937 for ( size_t i = 0; i < _ndaug; i++ ) { 939 firstparent, lastparent, 943 for ( size_t i = 0; i < _ndaug; i++ ) { 952 newlevel = level + 1; 956 for ( i = 0; i < ( 5 * level ); i++ ) { 962 for ( i = 0; i < _ndaug; i++ ) { 966 for ( i = 0; i < _ndaug; i++ ) { 972 for ( i = 0; i < _ndaug; i++ ) { 981 << "This is the current decay chain" << endl; 984 << this-> mass() << " " << this-> getP4() << endl; 993 newlevel = level + 1; 995 std::string retval = ""; 997 for ( i = 0; i < _ndaug; i++ ) { 1059 << "Unknown particle type in EvtParticle::printParticle()" 1064 << "Number of daughters:" << _ndaug << "\n"; 1104 bool forceDaugMassReset, 1105 double poleSize, int whichTwo1, 1114 static double mass[100]; 1127 bool resetDaughters = false; 1130 resetDaughters = true; 1131 if ( numdaughter == this-> getNDaug() ) 1132 for ( i = 0; i < numdaughter; i++ ) { 1134 resetDaughters = true; 1139 if ( resetDaughters || forceDaugMassReset ) { 1145 if ( massTreeOK == false ) { 1151 for ( i = 0; i < numdaughter; i++ ) { 1155 if ( poleSize < -0.1 ) { 1157 if ( numdaughter == 1 ) { 1162 for ( i = 0; i < numdaughter; i++ ) { 1167 if ( numdaughter != 3 ) { 1169 << "Only can generate pole phase space " 1170 << "distributions for 3 body final states" << endl 1171 << "Will terminate." << endl; 1175 if ( ( whichTwo1 == 1 && whichTwo2 == 0 ) || 1176 ( whichTwo1 == 0 && whichTwo2 == 1 ) ) { 1184 if ( ( whichTwo1 == 1 && whichTwo2 == 2 ) || 1185 ( whichTwo1 == 2 && whichTwo2 == 1 ) ) { 1193 if ( ( whichTwo1 == 0 && whichTwo2 == 2 ) || 1194 ( whichTwo1 == 2 && whichTwo2 == 0 ) ) { 1204 << "Invalid pair of particle to generate a pole dist " 1205 << whichTwo1 << " " << whichTwo2 << endl 1206 << "Will terminate." << endl; 1215 std::vector<EvtId> idVector ) 1220 unsigned int nVector = idVector.size(); 1221 if ( nVector < ndaugstore ) { 1223 << "Asking to make " << ndaugstore << " daughters when there " 1224 << "are only " << nVector << " EvtId values available" << endl; 1230 for ( i = 0; i < ndaugstore; i++ ) { 1231 idArray[i] = idVector[i]; 1247 if ( _ndaug != ndaugstore ) { 1249 << "Asking to make a different number of " 1250 << "daughters than what was previously created." << endl; 1253 for ( size_t i = 0; i < _ndaug; i++ ) { 1255 << "Original daugther:" 1258 for ( size_t i = 0; i < ndaugstore; i++ ) { 1266 for ( i = 0; i < ndaugstore; i++ ) { 1269 pdaug-> setId( id[i] ); 1296 EvtAttIntMap::iterator mapIter; 1299 attValue = mapIter->second; 1310 double attValue = 0.0; 1312 EvtAttDblMap::iterator mapIter; 1315 attValue = mapIter->second; virtual EvtTensor4C epsTensorParent(int i) const
virtual EvtVector4C epsPhoton(int i)
void createSecondary(int stdhepindex, EvtParticle *prnt)
EvtSpinDensity _rhoForward
static std::string name(EvtId i)
void printTreeRec(unsigned int level) const
virtual EvtRaritaSchwinger spRSParent(int) const
void printParticle() const
virtual int nRealDaughters()
void setDecayProb(double p)
virtual EvtVector4C eps(int i) const
static double PhaseSpacePole(double M, double m1, double m2, double m3, double a, EvtVector4R p4[10])
static EvtDecayTable * getInstance()
std::string treeStr() const
virtual EvtDiracSpinor sp(int) const
EvtParticle * getParent() const
void init_photon(EvtParticle **part)
std::string getName() const
void init_tensor(EvtParticle **part)
EvtSpinType::spintype getSpinType() const
void createParticle(EvtVector4R p4, EvtVector4R x, int prntfirst, int prntlast, int id)
static EvtSpinType::spintype getSpinType(EvtId i)
void makeStdHepRec(int firstparent, int lastparent, EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
void init_vector(EvtParticle **part)
EvtVector4R getP4Lab() const
std::string treeStrRec(unsigned int level) const
virtual EvtRaritaSchwinger spRS(int) const
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtAttIntMap _intAttributes
static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau)
void initDecay(bool useMinMass=false)
Evt3Rank3C conj(const Evt3Rank3C &t2)
const EvtComplex & get(int i, int j) const
void insertDaugPtr(int idaug, EvtParticle *partptr)
static double getctau(EvtId i)
EvtAttDblMap _dblAttributes
static double getMeanMass(EvtId i)
int getSpinStates() const
virtual EvtVector4C epsParentPhoton(int i)
static int getSpinStates(spintype stype)
void makeDaughters(unsigned int ndaug, EvtId *id)
EvtVector4R get4Pos() const
void set(int i, double d)
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
virtual EvtDiracSpinor spParent(int) const
void setLifetime(double tau)
EvtDecayBase * getDecayFunc(EvtParticle *p)
static EvtParticle * particleFactory(EvtSpinType::spintype spinType)
EvtVector4R getP4LabBeforeFSR()
void incoherentMix(const EvtId id, double &t, int &mix)
int getAttribute(std::string attName)
virtual void makeDecay(EvtParticle *p, bool recursive=true)=0
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
virtual EvtVector4C epsParent(int i) const
virtual EvtSpinDensity rotateToHelicityBasis() const =0
void deleteDaughters(bool keepChannel=false)
void init_dirac(EvtParticle **part)
EvtParticle * nextIter(EvtParticle *rootOfTree=0)
static double getMinMass(EvtId i)
void addDaug(EvtParticle *node)
void init_string(EvtParticle **part)
static EvtId getId(const std::string &name)
const EvtVector4R & getP4() const
void init(EvtId part_n, double e, double px, double py, double pz)
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
virtual EvtTensor4C epsTensor(int i) const
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
static double getWidth(EvtId i)
virtual EvtDiracSpinor spParentNeutrino() const
virtual EvtDiracSpinor spNeutrino() const
void init_scalar(EvtParticle **part)
EvtSpinDensity _rhoBackward
static EvtCPUtil * getInstance()
double getAttributeDouble(std::string attName)
void setDiagonalSpinDensity()
EvtParticle * getDaug(int i)
void set(int i, int j, const EvtComplex &rhoij)
int contains(const EvtId id)
static double getMass(EvtId i)
void makeStdHep(EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
EvtParticle * _daug[MAX_DAUG]
EvtVector4R getP4Restframe() const
static EvtId chargeConj(EvtId id)
static int getStdHep(EvtId id)
static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
void setVectorSpinDensity()
void init_neutrino(EvtParticle **part)
|