|
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. 48 for ( i = 0; i < _ndaug; i++ ) { 55 << _modelname.c_str() << " generator expected " 56 << " charge to be conserved, found:" << endl; 58 << "Parent charge of " << ( qpar / 3 ) << endl; 60 << "Sum of daughter charge of " << ( q / 3 ) << endl; 63 for ( i = 0; i < _ndaug; i++ ) { 68 << "Will terminate execution!" << endl; 93 return 1000000.0 * prob; 96 if ( prob > probmax * 1.0001 ) { 98 << "prob > probmax:(" << prob << ">" << probmax << ")"; 102 for ( i = 0; i < _ndaug; i++ ) { 122 << "prob > probmax:(" << prob << ">" << probmax << ")"; 126 for ( int i = 0; i < _ndaug; i++ ) { 140 return std::string( "" ); 146 << "Should never call EvtDecayBase::command" << endl; 210 std::vector<std::string>& args, 211 std::string name, double brfr ) 224 for ( i = 0; i < _ndaug; i++ ) { 234 for ( i = 0; i < _narg; i++ ) { 255 for ( i = 0; i < _ndaug; i++ ) { 261 << "This is fine for development, but must be provided for production." 264 << "Never fear though - the decay will use the \n"; 266 << "500 iterations to build up a good probmax \n"; 268 << "before accepting a decay. " << endl; 314 for ( int i = 0; i < _ndaug; i++ ) { 337 if ( maxOkMass < 0.0000000001 ) 341 maxOkMass = p-> mass(); 347 double minDaugMass = 0.; 348 for ( i = 0; i < par-> getNDaug(); i++ ) { 353 minDaugMass += dau-> mass(); 359 if ( maxOkMass > ( maxParMass - minDaugMass ) ) 360 maxOkMass = maxParMass - minDaugMass; 382 if ( count > 10000 ) { 384 << "Can not find a valid mass for: " 387 << "Now printing parent and/or grandparent tree\n"; 403 << "maxokmass=" << maxOkMass << " " 407 for ( i = 0; i < p-> getNDaug(); i++ ) { 415 << "taking a default value\n"; 426 for ( i = 0; i < p-> getNDaug(); i++ ) { 438 if ( massSum < mass ) 440 if ( mass > maxOkMass ) 457 for ( i = 0; i < ndaugs; i++ ) { 466 masses[0] = p-> mass(); 474 for ( i = 0; i < ndaugs; i++ ) { 476 mass_sum = mass_sum + masses[i]; 481 if ( count == 10000 ) { 484 << " (m=" << p-> mass() << ")" << endl; 486 << "To the following daugthers" << endl; 487 for ( i = 0; i < ndaugs; i++ ) { 492 << "Has been rejected " << count 493 << " times, will now take minimal masses " 494 << " of daugthers" << endl; 497 for ( i = 0; i < ndaugs; i++ ) { 499 mass_sum = mass_sum + masses[i]; 501 if ( mass_sum > p-> mass() ) { 503 << "Parent mass=" << p-> mass() 504 << "to light for daugthers." << endl 505 << "Will throw the event away." << endl; 512 } while ( mass_sum > p-> mass() ); 522 << _modelname.c_str() << " generator expected " << endl; 535 << " arguments but found:" << _narg << endl; 538 << "Will terminate execution!" << endl; 546 << _modelname.c_str() << " generator expected "; 552 << " daughters but found:" << _ndaug << endl; 555 << "Will terminate execution!" << endl; 563 if ( parenttype != sp ) { 565 << _modelname.c_str() << " did not get the correct parent spin\n"; 568 << "Will terminate execution!" << endl; 576 if ( parenttype != sp ) { 579 << " did not get the correct daughter spin d=" << d1 << endl; 582 << "Will terminate execution!" << endl; 597 for ( int i = 0; i < _narg; i++ ) { 613 const char* str = _args[j].c_str(); 615 while ( str[i] != 0 ) { 616 if ( isalpha( str[i] ) && str[i] != 'e' ) { 618 << "String " << str << " is not a number" << endl; 625 double result = strtod( _args[j]. c_str(), tc ); 641 std::vector<int> useDs; 642 for ( int i = 0; i < _ndaug; i++ ) 643 useDs.push_back( 0 ); 645 for ( int i = 0; i < _ndaug; i++ ) { 646 bool foundIt = false; 647 for ( int j = 0; j < _ndaug; j++ ) { 651 _daug[i].getAlias() == other._daug[j].getAlias() ) { 657 if ( foundIt == false ) 660 for ( int i = 0; i < _ndaug; i++ )
static void findMass(EvtParticle *p)
const char * c_str(Index i)
static std::string name(EvtId i)
double getProbMax(double prob)
EvtParticle * getParent() const
virtual std::string commandName()
std::vector< std::string > _args
double getArg(unsigned int j)
static EvtSpinType::spintype getSpinType(EvtId i)
virtual std::string getParamDefault(int i)
virtual std::string getParamName(int i)
virtual void initProbMax()
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
std::vector< double > _storedArgs
std::vector< double > _argsD
double resetProbMax(double prob)
void setProbMax(double prbmx)
void printSummary() const
EvtId getParentId() const
void saveDecayInfo(EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
void checkNDaug(int d1, int d2=-1)
static double findMaxMass(EvtParticle *p)
static double getMinMass(EvtId i)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static void setRejectFlag()
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtParticle * getDaug(int i)
virtual void command(std::string cmd)
static double getMass(EvtId i)
std::vector< EvtId > _daug
static void findMasses(EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
virtual bool matchingDecay(const EvtDecayBase &other) const
static int getStdHep(EvtId id)
Index other(Index i, Index j)
static double getMaxMass(EvtId i)
EvtId getDaug(int i) const
|