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

#include <EvtRexc.hh>

+ Inheritance diagram for EvtRexc:

Public Member Functions

 EvtRexc ()
 
virtual ~EvtRexc ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double baryonAng (double mx)
 
bool angularSampling (EvtParticle *par)
 
bool hadron_angle_sampling (EvtVector4R ppi, EvtVector4R pcm)
 
bool meson_sampling (EvtVector4R pcm, EvtVector4R pi)
 
bool VP_sampling (EvtVector4R pcm, EvtVector4R pi)
 
 EvtRexc ()
 
virtual ~EvtRexc ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double baryonAng (double mx)
 
bool angularSampling (EvtParticle *par)
 
bool hadron_angle_sampling (EvtVector4R ppi, EvtVector4R pcm)
 
bool meson_sampling (EvtVector4R pcm, EvtVector4R pi)
 
bool VP_sampling (EvtVector4R pcm, EvtVector4R pi)
 
- 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

◆ EvtRexc() [1/2]

EvtRexc::EvtRexc ( )
inline

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

23{}

Referenced by clone().

◆ ~EvtRexc() [1/2]

EvtRexc::~EvtRexc ( )
virtual

◆ EvtRexc() [2/2]

EvtRexc::EvtRexc ( )
inline

◆ ~EvtRexc() [2/2]

virtual EvtRexc::~EvtRexc ( )
virtual

Member Function Documentation

◆ angularSampling() [1/2]

bool EvtRexc::angularSampling ( EvtParticle par)

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

89 {
90 bool tagp,tagk;
91 tagk=0;
92 tagp=0;
93 int nds = par->getNDaug();
94 for(int i=0;i<par->getNDaug();i++){
95 EvtId di=par->getDaug(i)->getId();
96 EvtVector4R p4i = par->getDaug(i)->getP4Lab();
97 int pdgcode =EvtPDL::getStdHep( di );
98 double alpha=1;
99 double angmax = 1+alpha;
100 double costheta = cos(p4i.theta());
101 double ang=1+alpha*costheta*costheta;
102 double xratio = ang/angmax;
103 double xi=EvtRandom::Flat(0.,1);
104 //std::cout<<"pdgcode "<<pdgcode<<std::endl;
105 //std::cout<<ang<<" "<<angmax<<" "<<xi<<" "<<xratio<<std::endl;
106 if(xi>xratio) return false;
107 }//loop over duaghters
108 return true;
109}
double cos(const BesAngle a)
Definition: BesAngle.h:213
const double alpha
float costheta

Referenced by decay().

◆ angularSampling() [2/2]

bool EvtRexc::angularSampling ( EvtParticle par)

◆ baryonAng() [1/2]

double EvtRexc::baryonAng ( double  mx)

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

111 {
112 double mp=0.938;
113 double u = 0.938/mx;
114 u = u*u;
115 double u2 = (1+u)*(1+u);
116 double uu = u*(1+6*u);
117 double alpha = (u2-uu)/(u2+uu);
118 return alpha;
119}
const double mp
Definition: incllambda.cxx:45

◆ baryonAng() [2/2]

double EvtRexc::baryonAng ( double  mx)

◆ clone() [1/2]

EvtDecayBase * EvtRexc::clone ( )
virtual

◆ clone() [2/2]

EvtDecayBase * EvtRexc::clone ( )
virtual

Implements EvtDecayBase.

◆ decay() [1/2]

void EvtRexc::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

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

50 {
51 double mhds = p->mass();
52 int mymode = EvtConExc::conexcmode;
53 myconexc->init_mode(mymode);
54 //std::cout<<"EvtRexc:: A selected mode is "<<mymode<<" with Mhds= "<<mhds<<std::endl; //debugging
55 int _ndaugs = myconexc->getNdaugs();
56 EvtId *daugs=myconexc->getDaugId();
57 //debugging
58 /*
59 std::cout<<"Ndaugs= "<<_ndaugs<<std::endl;
60 for(int i=0;i<_ndaugs;i++){
61 std::cout<<i<<" "<<EvtPDL::getStdHep(daugs[i])<<std::endl;
62 }
63 */
64 Loop:
65 double totmass=0;
66 p->makeDaughters(_ndaugs,daugs);
67 for(int i=0;i< _ndaugs;i++){
68 EvtParticle* di=p->getDaug(i);
69 double xmi=EvtPDL::getMass(di->getId());
70 di->setMass(xmi);
71 totmass += xmi;
72 }
73 if(totmass > p->mass()) goto Loop;
74
75 double weight = p->initializePhaseSpace( _ndaugs , daugs);
76 // std::cout<<"weight= "<<weight<<std::endl;
77 if( EvtConExc::multimode==1 && _ndaugs==2){
78 _daugs[0]=daugs[0];
79 _daugs[1]=daugs[1];
80 EvtVector4R pd1 = p->getDaug(0)->getP4();
81 double _cms=EvtPDL::getMass(p->getId());
82 EvtVector4R pcm(_cms,0,0,0);
83 bool bang=hadron_angle_sampling(pd1,pcm);
84 if(!bang) goto Loop;
85 }else if( (2.5< mhds && mhds<3.092 || mhds>3.1012) && !angularSampling(p)) goto Loop;
86 return ;
87}
*********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
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)

◆ decay() [2/2]

void EvtRexc::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

◆ getName() [1/2]

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

Implements EvtDecayBase.

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

24 {
25
26 model_name="REXC"; //R-scan exclusive decay model
27
28}

◆ getName() [2/2]

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

Implements EvtDecayBase.

◆ hadron_angle_sampling() [1/2]

bool EvtRexc::hadron_angle_sampling ( EvtVector4R  ppi,
EvtVector4R  pcm 
)

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

121 {
122 EvtVector4R pbst=-1*pcm;
123 pbst.set(0,pcm.get(0));
124 EvtVector4R p4i = boostTo(ppi,pbst);
127 if(type0==EvtSpinType::SCALAR &&type1==EvtSpinType::SCALAR ){
128 bool msn_ang = meson_sampling(pcm,p4i);
129 return msn_ang;
130 }else if(type0==EvtSpinType::VECTOR &&type1==EvtSpinType::SCALAR || type1==EvtSpinType::VECTOR &&type0==EvtSpinType::SCALAR ){
131 bool msn_ang = VP_sampling(pcm,p4i);
132 return msn_ang;
133 }
134 return true;
135}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
static EvtSpinType::spintype getSpinType(EvtId i)
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)

Referenced by decay().

◆ hadron_angle_sampling() [2/2]

bool EvtRexc::hadron_angle_sampling ( EvtVector4R  ppi,
EvtVector4R  pcm 
)

◆ init() [1/2]

void EvtRexc::init ( )
virtual

Reimplemented from EvtDecayBase.

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

37 {
38
39 // check that there are 0 arguments
40 checkNArg(0);
41 myconexc = new EvtConExc();
42}
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ init() [2/2]

void EvtRexc::init ( )
virtual

Reimplemented from EvtDecayBase.

◆ initProbMax() [1/2]

void EvtRexc::initProbMax ( )
virtual

◆ initProbMax() [2/2]

void EvtRexc::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

◆ meson_sampling() [1/2]

bool EvtRexc::meson_sampling ( EvtVector4R  pcm,
EvtVector4R  pi 
)

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

137 {
138 EvtHelSys angles(pcm,pi); //using helicity sys.angles
139 double theta=angles.getHelAng(1);
140 double phi =angles.getHelAng(2);
141 double costheta=cos(theta); //using helicity angles in parent system
142
143 double pm= EvtRandom::Flat(0.,1);
144 double ang = 1 - costheta*costheta;
145 if(pm< ang/1.) {return true;}else{return false;}
146}
const float pi
Definition: vector3.h:133

Referenced by hadron_angle_sampling().

◆ meson_sampling() [2/2]

bool EvtRexc::meson_sampling ( EvtVector4R  pcm,
EvtVector4R  pi 
)

◆ VP_sampling() [1/2]

bool EvtRexc::VP_sampling ( EvtVector4R  pcm,
EvtVector4R  pi 
)

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

148 {
149 EvtHelSys angles(pcm,pi); //using helicity sys.angles
150 double theta=angles.getHelAng(1);
151 double phi =angles.getHelAng(2);
152 double costheta=cos(theta); //using helicity angles in parent system
153
154 double pm= EvtRandom::Flat(0.,1);
155 double ang = 1 + costheta*costheta;
156 if(pm< ang/2.) {return true;}else{return false;}
157}

Referenced by hadron_angle_sampling().

◆ VP_sampling() [2/2]

bool EvtRexc::VP_sampling ( EvtVector4R  pcm,
EvtVector4R  pi 
)

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