BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRexc.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// pingrg-2014-10-16
3// Model REXC : used to decay vgam to the final state as in ConExc model
4// Name: REXC: R-scan exclusive decay model
5// Decay cards:
6// Decay vgam
7// 1 REXC;
8// Enddecay
9//------------------------------------------------------------------------
10
12#include <stdlib.h>
15#include "EvtGenBase/EvtPDL.hh"
20#include <string>
21
23
24void EvtRexc::getName(std::string& model_name){
25
26 model_name="REXC"; //R-scan exclusive decay model
27
28}
29
31
32 return new EvtRexc;
33
34}
35
36
38
39 // check that there are 0 arguments
40 checkNArg(0);
41 myconexc = new EvtConExc();
42}
43
45
46 noProbMax();
47
48}
49
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}
88
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}
110
111double EvtRexc::baryonAng(double mx){
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}
120
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}
136
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}
147
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}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
const double alpha
double cos(const BesAngle a)
*********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
void noProbMax()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
double getHelAng(int i)
Definition: EvtHelSys.cc:54
Definition: EvtId.hh:27
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static double getMass(EvtId i)
Definition: EvtPDL.hh:46
void setMass(double m)
Definition: EvtParticle.hh:372
void makeDaughters(int ndaug, EvtId *id)
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:685
EvtId getId() const
Definition: EvtParticle.cc:113
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double mass() const
Definition: EvtParticle.cc:127
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition: EvtRandom.cc:74
virtual ~EvtRexc()
Definition: EvtRexc.cc:22
void init()
Definition: EvtRexc.cc:37
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition: EvtRexc.cc:121
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtRexc.cc:148
void decay(EvtParticle *p)
Definition: EvtRexc.cc:50
EvtDecayBase * clone()
Definition: EvtRexc.cc:30
bool angularSampling(EvtParticle *par)
Definition: EvtRexc.cc:89
void initProbMax()
Definition: EvtRexc.cc:44
EvtRexc()
Definition: EvtRexc.hh:23
double baryonAng(double mx)
Definition: EvtRexc.cc:111
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtRexc.cc:137
void getName(std::string &name)
Definition: EvtRexc.cc:24
double get(int i) const
Definition: EvtVector4R.hh:179
void set(int i, double d)
Definition: EvtVector4R.hh:183
double theta()
Definition: EvtVector4R.cc:249
const double mp
Definition: incllambda.cxx:45
float costheta