BOSS 7.1.2
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)
 
- Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
- Public Member Functions inherited from EvtDecayBase
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 19 of file EvtRexc.hh.

Constructor & Destructor Documentation

◆ EvtRexc()

EvtRexc::EvtRexc ( )
inline

Definition at line 23 of file EvtRexc.hh.

23{}

Referenced by clone().

◆ ~EvtRexc()

EvtRexc::~EvtRexc ( )
virtual

Definition at line 22 of file EvtRexc.cc.

22{}

Member Function Documentation

◆ angularSampling()

bool EvtRexc::angularSampling ( EvtParticle * par)

Definition at line 89 of file 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
Definition EvtId.hh:27
static int getStdHep(EvtId id)
Definition EvtPDL.hh:56
EvtVector4R getP4Lab()
EvtId getId() const
int getNDaug() const
EvtParticle * getDaug(int i)
static double Flat()
Definition EvtRandom.cc:74
double theta()
float costheta

Referenced by decay().

◆ baryonAng()

double EvtRexc::baryonAng ( double mx)

Definition at line 111 of file 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

◆ clone()

EvtDecayBase * EvtRexc::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 30 of file EvtRexc.cc.

30 {
31
32 return new EvtRexc;
33
34}
EvtRexc()
Definition EvtRexc.hh:23

◆ decay()

void EvtRexc::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 50 of file 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
int getNdaugs()
Definition EvtConExc.hh:209
static int conexcmode
Definition EvtConExc.hh:212
static int multimode
Definition EvtConExc.hh:212
void init_mode(int mode)
Definition EvtConExc.cc:751
EvtId * getDaugId()
Definition EvtConExc.hh:210
static double getMass(EvtId i)
Definition EvtPDL.hh:46
void setMass(double m)
void makeDaughters(int ndaug, EvtId *id)
const EvtVector4R & getP4() const
double mass() const
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition EvtRexc.cc:121
bool angularSampling(EvtParticle *par)
Definition EvtRexc.cc:89

◆ getName()

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

Implements EvtDecayBase.

Definition at line 24 of file EvtRexc.cc.

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

◆ hadron_angle_sampling()

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

Definition at line 121 of file 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)
Definition EvtPDL.hh:61
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition EvtRexc.cc:148
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition EvtRexc.cc:137
double get(int i) const
void set(int i, double d)

Referenced by decay().

◆ init()

void EvtRexc::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 37 of file 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)

◆ initProbMax()

void EvtRexc::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 44 of file EvtRexc.cc.

44 {
45
46 noProbMax();
47
48}

◆ meson_sampling()

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

Definition at line 137 of file 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().

◆ VP_sampling()

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

Definition at line 148 of file 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().


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