BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDecayProb Class Reference

#include <EvtDecayProb.hh>

+ Inheritance diagram for EvtDecayProb:

Public Member Functions

void makeDecay (EvtParticle *p)
 
void setProb (double prob)
 
double getProb ()
 
void setWeight (double weight)
 
virtual ~EvtDecayProb ()
 
- Public Member Functions inherited from EvtDecayBase
virtual void getName (std::string &name)=0
 
virtual void decay (EvtParticle *p)=0
 
virtual void makeDecay (EvtParticle *p)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual void init ()
 
virtual void initProbMax ()
 
virtual std::string commandName ()
 
virtual void command (std::string cmd)
 
double getProbMax (double prob)
 
double resetProbMax (double prob)
 
 EvtDecayBase ()
 
virtual ~EvtDecayBase ()
 
virtual bool matchingDecay (const EvtDecayBase &other) const
 
EvtId getParentId ()
 
double getBranchingFraction ()
 
void disableCheckQ ()
 
void checkQ ()
 
int getNDaug ()
 
EvtIdgetDaugs ()
 
EvtId getDaug (int i)
 
int getNArg ()
 
int getPHOTOS ()
 
void setPHOTOS ()
 
void setVerbose ()
 
void setSummary ()
 
double * getArgs ()
 
std::string * getArgsStr ()
 
double getArg (int j)
 
std::string getArgStr (int j)
 
std::string getModelName ()
 
int getDSum ()
 
int summary ()
 
int verbose ()
 
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
 
void printSummary ()
 
void setProbMax (double prbmx)
 
void noProbMax ()
 
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
 
void checkNDaug (int d1, int d2=-1)
 
void checkSpinParent (EvtSpinType::spintype sp)
 
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
 
virtual int nRealDaughters ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
 
static void findMass (EvtParticle *p)
 
static double findMaxMass (EvtParticle *p)
 
- Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 28 of file EvtDecayProb.hh.

Constructor & Destructor Documentation

◆ ~EvtDecayProb()

virtual EvtDecayProb::~EvtDecayProb ( )
inlinevirtual

Definition at line 38 of file EvtDecayProb.hh.

38{}

Member Function Documentation

◆ getProb()

double EvtDecayProb::getProb ( )
inline

Definition at line 35 of file EvtDecayProb.hh.

35{ return _prob;}

◆ makeDecay()

void EvtDecayProb::makeDecay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 31 of file EvtDecayProb.cc.

31 {
32
33 int ntimes=10000;
34
35 double dummy;
36
37 do{
38 _weight=1.0;
40
41 decay(p);
42 //report(INFO,"EvtGen") << _weight << endl;
43 ntimes--;
44
45 _prob = _prob/_weight;
46
47 dummy=getProbMax(_prob)*EvtRandom::Flat();
48 p->setDecayProb(_prob/getProbMax(_prob));
49 // report(INFO,"EvtGen") << _prob <<" "<<dummy<<" "<<ntimes<<endl;
50 }while(ntimes&&(_prob<dummy));
51 //report(INFO,"EvtGen") << ntimes <<endl;
52 if (ntimes==0){
53 report(DEBUG,"EvtGen") << "Tried accept/reject:10000"
54 <<" times, and rejected all the times!"<<endl;
55 report(DEBUG,"EvtGen") << "Is therefore accepting the last event!"<<endl;
56 report(DEBUG,"EvtGen") << "Decay of particle:"<<
57 EvtPDL::name(p->getId()).c_str()<<"(channel:"<<
58 p->getChannel()<<") with mass "<<p->mass()<<endl;
59
60 int ii;
61 for(ii=0;ii<p->getNDaug();ii++){
62 report(DEBUG,"EvtGen") <<"Daughter "<<ii<<":"<<
63 EvtPDL::name(p->getDaug(ii)->getId()).c_str()<<" with mass "<<
64 p->getDaug(ii)->mass()<<endl;
65 }
66 }
67
68
70 rho.SetDiag(p->getSpinStates());
74 }
75
76
77 //Now decay the daughters.
79 int i;
80 for(i=0;i<p->getNDaug();i++){
81 //Need to set the spin density of the daughters to be
82 //diagonal.
83 rho.SetDiag(p->getDaug(i)->getSpinStates());
85
86 //Now decay the daughter. Really!
87 p->getDaug(i)->decay();
88 }
89 }
90
91}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ DEBUG
Definition: EvtReport.hh:53
virtual void decay(EvtParticle *p)=0
double getProbMax(double prob)
Definition: EvtDecayBase.cc:67
bool daugsDecayedByParentModel()
bool _daugsDecayedByParentModel
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
void setSpinDensityBackward(const EvtSpinDensity &rho)
Definition: EvtParticle.hh:338
void setSpinDensityForward(const EvtSpinDensity &rho)
Definition: EvtParticle.hh:307
void setDecayProb(double p)
void decay()
Definition: EvtParticle.cc:404
EvtId getId() const
Definition: EvtParticle.cc:113
int getSpinStates() const
Definition: EvtParticle.cc:118
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double mass() const
Definition: EvtParticle.cc:127
int getChannel() const
Definition: EvtParticle.cc:123
static bool alwaysRadCorr()
Definition: EvtRadCorr.cc:65
static void doRadCorr(EvtParticle *p)
Definition: EvtRadCorr.cc:52
static double Flat()
Definition: EvtRandom.cc:73
void SetDiag(int n)

◆ setProb()

void EvtDecayProb::setProb ( double  prob)
inline

Definition at line 34 of file EvtDecayProb.hh.

34{ _prob=prob;}

Referenced by EvtBsquark::decay(), EvtFlatQ2::decay(), and EvtPi0Dalitz::decay().

◆ setWeight()

void EvtDecayProb::setWeight ( double  weight)
inline

Definition at line 36 of file EvtDecayProb.hh.

36{_weight=weight;}
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition: KarFin.h:34

Referenced by EvtPi0Dalitz::decay().


The documentation for this class was generated from the following files: