BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/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
11#include "EvtGenBase/EvtPatches.hh"
12#include <stdlib.h>
13#include "EvtGenBase/EvtParticle.hh"
14#include "EvtGenBase/EvtGenKine.hh"
15#include "EvtGenBase/EvtPDL.hh"
16#include "EvtGenBase/EvtReport.hh"
17#include "EvtGenModels/EvtRexc.hh"
18#include "EvtGenBase/EvtRandom.hh"
19#include "EvtGenBase/EvtHelSys.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
37void EvtRexc::init(){
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}
double cos(const BesAngle a)
Definition: BesAngle.h:213
const double alpha
*********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
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtSpinType::spintype getSpinType(EvtId i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
const double mp
Definition: incllambda.cxx:45
float costheta
const float pi
Definition: vector3.h:133