BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtSingleParticle2 Class Reference

#include <EvtSingleParticle2.hh>

+ Inheritance diagram for EvtSingleParticle2:

Public Member Functions

 EvtSingleParticle2 ()
 
virtual ~EvtSingleParticle2 ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void decay (EvtParticle *p)
 
void init ()
 
 EvtSingleParticle2 ()
 
virtual ~EvtSingleParticle2 ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void decay (EvtParticle *p)
 
void init ()
 
- Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
- 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 ()
 
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)
 
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 ()
 
bool daugsDecayedByParentModel ()
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtSingleParticle2() [1/2]

EvtSingleParticle2::EvtSingleParticle2 ( )
inline

Definition at line 33 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSingleParticle2.hh.

33{}

Referenced by clone().

◆ ~EvtSingleParticle2() [1/2]

EvtSingleParticle2::~EvtSingleParticle2 ( )
virtual

◆ EvtSingleParticle2() [2/2]

EvtSingleParticle2::EvtSingleParticle2 ( )
inline

◆ ~EvtSingleParticle2() [2/2]

virtual EvtSingleParticle2::~EvtSingleParticle2 ( )
virtual

Member Function Documentation

◆ clone() [1/2]

EvtDecayBase * EvtSingleParticle2::clone ( )
virtual

◆ clone() [2/2]

EvtDecayBase * EvtSingleParticle2::clone ( )
virtual

Implements EvtDecayBase.

◆ decay() [1/2]

void EvtSingleParticle2::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 111 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSingleParticle2.cc.

111 {
112
113 EvtParticle *d;
114 EvtVector4R p4;
115
116 double mass=EvtPDL::getMass(getDaug(0));
117
119 d=p->getDaug(0);
120
121 //generate flat distribution in p
122 //we are now in the parents restframe! This means the
123 //restframe of the e+e- collison.
124
125 double theta;
126 if(thetamax==thetamin) {theta=thetamax;} else
127 theta=EvtRandom::Flat(thetamin,thetamax);
128 double phi;
129 if(phimin==phimax){phi=phimin;} else
130 phi = EvtRandom::Flat(phimin,phimax);
131 double pxy;
132 if(pxymin==pxymax){pxy=pxymin;} else
133 pxy = EvtRandom::Flat(pxymin,pxymax);
134
135 pmag=pxy/sin(theta);
136 cthetamax=cos(thetamax);
137 cthetamin=cos(thetamin);
138 double cthetalab;
139
140 // do{
141 //generate flat distribution in costheta
142
143 p4.set(sqrt(mass*mass+pmag*pmag),pmag*cos(phi)*sin(theta),
144 pmag*sin(phi)*sin(theta),pmag*cos(theta));
145 d->init( getDaug(0),p4);
146 //get 4 vector in the lab frame!
147 EvtVector4R p4lab=d->getP4Lab();
148 cthetalab=p4lab.get(3)/p4lab.d3mag();
149 // }while (cthetalab>cthetamax||cthetalab<cthetamin);
150
151 return ;
152}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
double mass
virtual void init(EvtId part_n, const EvtVector4R &p4)=0

◆ decay() [2/2]

void EvtSingleParticle2::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

◆ getName() [1/2]

void EvtSingleParticle2::getName ( std::string &  name)
virtual

Implements EvtDecayBase.

Definition at line 34 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSingleParticle2.cc.

34 {
35
36 model_name="SINGLE2";
37
38}

◆ getName() [2/2]

void EvtSingleParticle2::getName ( std::string &  name)
virtual

Implements EvtDecayBase.

◆ init() [1/2]

void EvtSingleParticle2::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 46 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSingleParticle2.cc.

46 {
47
48
49 //turn off checks for charge conservation
51
52 if ((getNArg()==6)||(getNArg()==4)||(getNArg()==2)) {
53
54 if (getNArg()==6){
55 //copy the arguments into eaiser to remember names!
56
57 pxymin=getArg(0);
58 pxymax=getArg(1);
59
60 thetamin=getArg(2);
61 thetamax=getArg(3);
62
63 phimin=getArg(4);
64 phimax=getArg(5);
65
66 }
67
68 if (getNArg()==4){
69 //copy the arguments into eaiser to remember names!
70 pxymin=getArg(0);
71 pxymax=getArg(1);
72
73 thetamin=getArg(2);
74 thetamax=getArg(3);
75
76 phimin=0.0;
77 phimax=EvtConst::twoPi;
78
79 }
80
81 if (getNArg()==2){
82 //copy the arguments into eaiser to remember names!
83 pxymin=getArg(0);
84 pxymax=getArg(1);
85
86 thetamin=0.376383;
87 thetamax=2.76521; //|cos(theta)|<0.93
88
89 phimin=0.0;
90 phimax=EvtConst::twoPi;
91
92 }
93
94
95 }else{
96
97 report(ERROR,"EvtGen") << "EvtSingleParticle generator expected "
98 << " 5, 3, or 1 arguments but found:"<<getNArg()<<endl;
99 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
100 ::abort();
101 }
102
103
104 report(INFO,"EvtGen") << "The single particle generator has been configured:"
105 <<endl;
106 report(INFO,"EvtGen") << thetamax << " > theta > " << thetamin <<endl;
107 report(INFO,"EvtGen") << phimax << " > phi > " << phimin <<endl;
108
109}
ostream & report(Severity severity, const char *facility)

◆ init() [2/2]

void EvtSingleParticle2::init ( )
virtual

Reimplemented from EvtDecayBase.


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