BOSS
7.0.6
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
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
22
EvtRexc::~EvtRexc
() {}
23
24
void
EvtRexc::getName
(std::string& model_name){
25
26
model_name=
"REXC"
;
//R-scan exclusive decay model
27
28
}
29
30
EvtDecayBase
*
EvtRexc::clone
(){
31
32
return
new
EvtRexc
;
33
34
}
35
36
37
void
EvtRexc::init
(){
38
39
// check that there are 0 arguments
40
checkNArg
(0);
41
myconexc =
new
EvtConExc
();
42
}
43
44
void
EvtRexc::initProbMax
(){
45
46
noProbMax
();
47
48
}
49
50
void
EvtRexc::decay
(
EvtParticle
*p ){
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
89
bool
EvtRexc::angularSampling
(
EvtParticle
* par){
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
111
double
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
121
bool
EvtRexc::hadron_angle_sampling
(
EvtVector4R
ppi,
EvtVector4R
pcm){
122
EvtVector4R
pbst=-1*pcm;
123
pbst.
set
(0,pcm.
get
(0));
124
EvtVector4R
p4i =
boostTo
(ppi,pbst);
125
EvtSpinType::spintype
type0 =
EvtPDL::getSpinType
(_daugs[0]);
126
EvtSpinType::spintype
type1 =
EvtPDL::getSpinType
(_daugs[1]);
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
137
bool
EvtRexc::meson_sampling
(
EvtVector4R
pcm,
EvtVector4R
pi
){
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
148
bool
EvtRexc::VP_sampling
(
EvtVector4R
pcm,
EvtVector4R
pi
){
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
}
cos
double cos(const BesAngle a)
Definition:
BesAngle.h:213
boostTo
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
Definition:
EvtDiracSpinor.cc:75
EvtGenKine.hh
EvtHelSys.hh
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
EvtRandom.hh
EvtReport.hh
EvtRexc.hh
alpha
const double alpha
Definition:
FastVertexFit.cxx:4
weight
*********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
EvtConExc
Definition:
EvtConExc.hh:138
EvtConExc::getNdaugs
int getNdaugs()
Definition:
EvtConExc.hh:209
EvtConExc::conexcmode
static int conexcmode
Definition:
EvtConExc.hh:212
EvtConExc::multimode
static int multimode
Definition:
EvtConExc.hh:212
EvtConExc::init_mode
void init_mode(int mode)
Definition:
EvtConExc.cc:751
EvtConExc::getDaugId
EvtId * getDaugId()
Definition:
EvtConExc.hh:210
EvtDecayBase
Definition:
EvtDecayBase.hh:33
EvtDecayBase::noProbMax
void noProbMax()
Definition:
EvtDecayBase.cc:304
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition:
EvtDecayBase.cc:482
EvtHelSys
Definition:
EvtHelSys.hh:44
EvtHelSys::getHelAng
double getHelAng(int i)
Definition:
EvtHelSys.cc:54
EvtId
Definition:
EvtId.hh:27
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition:
EvtPDL.hh:56
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition:
EvtPDL.hh:61
EvtPDL::getMass
static double getMass(EvtId i)
Definition:
EvtPDL.hh:46
EvtParticle
Definition:
EvtParticle.hh:42
EvtParticle::setMass
void setMass(double m)
Definition:
EvtParticle.hh:372
EvtParticle::makeDaughters
void makeDaughters(int ndaug, EvtId *id)
Definition:
EvtParticle.cc:1177
EvtParticle::getP4Lab
EvtVector4R getP4Lab()
Definition:
EvtParticle.cc:685
EvtParticle::getId
EvtId getId() const
Definition:
EvtParticle.cc:113
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition:
EvtParticle.cc:121
EvtParticle::getNDaug
int getNDaug() const
Definition:
EvtParticle.cc:125
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition:
EvtParticle.cc:85
EvtParticle::mass
double mass() const
Definition:
EvtParticle.cc:127
EvtParticle::initializePhaseSpace
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition:
EvtParticle.cc:1071
EvtRandom::Flat
static double Flat()
Definition:
EvtRandom.cc:74
EvtRexc::~EvtRexc
virtual ~EvtRexc()
Definition:
EvtRexc.cc:22
EvtRexc::init
void init()
Definition:
EvtRexc.cc:37
EvtRexc::hadron_angle_sampling
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition:
EvtRexc.cc:121
EvtRexc::VP_sampling
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition:
EvtRexc.cc:148
EvtRexc::decay
void decay(EvtParticle *p)
Definition:
EvtRexc.cc:50
EvtRexc::clone
EvtDecayBase * clone()
Definition:
EvtRexc.cc:30
EvtRexc::angularSampling
bool angularSampling(EvtParticle *par)
Definition:
EvtRexc.cc:89
EvtRexc::initProbMax
void initProbMax()
Definition:
EvtRexc.cc:44
EvtRexc::EvtRexc
EvtRexc()
Definition:
EvtRexc.hh:23
EvtRexc::baryonAng
double baryonAng(double mx)
Definition:
EvtRexc.cc:111
EvtRexc::meson_sampling
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition:
EvtRexc.cc:137
EvtRexc::getName
void getName(std::string &name)
Definition:
EvtRexc.cc:24
EvtSpinType::spintype
spintype
Definition:
EvtSpinType.hh:31
EvtSpinType::SCALAR
@ SCALAR
Definition:
EvtSpinType.hh:31
EvtSpinType::VECTOR
@ VECTOR
Definition:
EvtSpinType.hh:31
EvtVector4R
Definition:
EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition:
EvtVector4R.hh:179
EvtVector4R::set
void set(int i, double d)
Definition:
EvtVector4R.hh:183
EvtVector4R::theta
double theta()
Definition:
EvtVector4R.cc:249
mp
const double mp
Definition:
incllambda.cxx:45
costheta
float costheta
Definition:
prepare_data.cxx:28
pi
const float pi
Definition:
vector3.h:133
source
Generator
BesEvtGen
BesEvtGen-00-04-08
src
EvtGen
EvtGenModels
EvtRexc.cc
Generated by
1.9.6