BOSS
8.0.0
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 "
EvtRexc.hh
"
12
#include "
../EvtGenBase/EvtGenKine.hh
"
13
#include "
../EvtGenBase/EvtHelSys.hh
"
14
#include "
../EvtGenBase/EvtPDL.hh
"
15
#include "
../EvtGenBase/EvtParticle.hh
"
16
#include "
../EvtGenBase/EvtPatches.hh
"
17
#include "
../EvtGenBase/EvtRandom.hh
"
18
#include "
../EvtGenBase/EvtReport.hh
"
19
#include <stdlib.h>
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
EvtDecayBase
*
EvtRexc::clone
() {
return
new
EvtRexc
; }
30
31
void
EvtRexc::init
() {
32
33
// check that there are 0 arguments
34
checkNArg
( 0 );
35
myconexc =
new
EvtConExc
();
36
}
37
38
void
EvtRexc::initProbMax
() {
noProbMax
(); }
39
40
void
EvtRexc::decay
(
EvtParticle
* p ) {
41
double
mhds = p->
mass
();
42
int
mymode =
EvtConExc::conexcmode
;
43
myconexc->init_mode( mymode );
44
// std::cout<<"EvtRexc:: A selected mode is "<<mymode<<" with Mhds= "<<mhds<<std::endl;
45
// //debugging
46
int
_ndaugs = myconexc->getNdaugs();
47
EvtId
* daugs = myconexc->getDaugId();
48
// debugging
49
/*
50
std::cout<<"Ndaugs= "<<_ndaugs<<std::endl;
51
for(int i=0;i<_ndaugs;i++){
52
std::cout<<i<<" "<<EvtPDL::getStdHep(daugs[i])<<std::endl;
53
}
54
*/
55
Loop:
56
double
totmass = 0;
57
p->
makeDaughters
( _ndaugs, daugs );
58
for
(
int
i = 0; i < _ndaugs; i++ )
59
{
60
EvtParticle
* di = p->
getDaug
( i );
61
double
xmi =
EvtPDL::getMass
( di->
getId
() );
62
di->
setMass
( xmi );
63
totmass += xmi;
64
}
65
if
( totmass > p->
mass
() )
goto
Loop;
66
67
double
weight
= p->
initializePhaseSpace
( _ndaugs, daugs );
68
// std::cout<<"weight= "<<weight<<std::endl;
69
if
(
EvtConExc::multimode
== 1 && _ndaugs == 2 )
70
{
71
_daugs[0] = daugs[0];
72
_daugs[1] = daugs[1];
73
EvtVector4R
pd1 = p->
getDaug
( 0 )->
getP4
();
74
double
_cms =
EvtPDL::getMass
( p->
getId
() );
75
EvtVector4R
pcm( _cms, 0, 0, 0 );
76
bool
bang =
hadron_angle_sampling
( pd1, pcm );
77
if
( !bang )
goto
Loop;
78
}
79
else
if
( ( 2.5 < mhds && mhds < 3.092 || mhds > 3.1012 ) && !
angularSampling
( p ) )
80
goto
Loop;
81
return
;
82
}
83
84
bool
EvtRexc::angularSampling
(
EvtParticle
* par ) {
85
bool
tagp, tagk;
86
tagk = 0;
87
tagp = 0;
88
int
nds = par->
getNDaug
();
89
for
(
int
i = 0; i < par->
getNDaug
(); i++ )
90
{
91
EvtId
di = par->
getDaug
( i )->
getId
();
92
EvtVector4R
p4i = par->
getDaug
( i )->
getP4Lab
();
93
int
pdgcode =
EvtPDL::getStdHep
( di );
94
double
alpha
= 1;
95
double
angmax = 1 +
alpha
;
96
double
costheta =
cos
( p4i.
theta
() );
97
double
ang = 1 +
alpha
* costheta * costheta;
98
double
xratio = ang / angmax;
99
double
xi =
EvtRandom::Flat
( 0., 1 );
100
// std::cout<<"pdgcode "<<pdgcode<<std::endl;
101
// std::cout<<ang<<" "<<angmax<<" "<<xi<<" "<<xratio<<std::endl;
102
if
( xi > xratio )
return
false
;
103
}
// loop over duaghters
104
return
true
;
105
}
106
107
double
EvtRexc::baryonAng
(
double
mx ) {
108
double
mp
= 0.938;
109
double
u = 0.938 / mx;
110
u = u * u;
111
double
u2 = ( 1 + u ) * ( 1 + u );
112
double
uu = u * ( 1 + 6 * u );
113
double
alpha
= ( u2 - uu ) / ( u2 + uu );
114
return
alpha
;
115
}
116
117
bool
EvtRexc::hadron_angle_sampling
(
EvtVector4R
ppi,
EvtVector4R
pcm ) {
118
EvtVector4R
pbst = -1 * pcm;
119
pbst.
set
( 0, pcm.
get
( 0 ) );
120
EvtVector4R
p4i =
boostTo
( ppi, pbst );
121
EvtSpinType::spintype
type0 =
EvtPDL::getSpinType
( _daugs[0] );
122
EvtSpinType::spintype
type1 =
EvtPDL::getSpinType
( _daugs[1] );
123
if
( type0 ==
EvtSpinType::SCALAR
&& type1 ==
EvtSpinType::SCALAR
)
124
{
125
bool
msn_ang =
meson_sampling
( pcm, p4i );
126
return
msn_ang;
127
}
128
else
if
( type0 ==
EvtSpinType::VECTOR
&& type1 ==
EvtSpinType::SCALAR
||
129
type1 ==
EvtSpinType::VECTOR
&& type0 ==
EvtSpinType::SCALAR
)
130
{
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
; }
146
else
{
return
false
; }
147
}
148
149
bool
EvtRexc::VP_sampling
(
EvtVector4R
pcm,
EvtVector4R
pi
) {
150
EvtHelSys
angles( pcm,
pi
);
// using helicity sys.angles
151
double
theta = angles.
getHelAng
( 1 );
152
double
phi = angles.
getHelAng
( 2 );
153
double
costheta =
cos
( theta );
// using helicity angles in parent system
154
155
double
pm =
EvtRandom::Flat
( 0., 1 );
156
double
ang = 1 + costheta * costheta;
157
if
( pm < ang / 2. ) {
return
true
; }
158
else
{
return
false
; }
159
}
boostTo
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
Definition
EvtDiracSpinor.cc:67
EvtGenKine.hh
EvtHelSys.hh
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
alpha
double alpha
Definition
EvtPhokharaDef.hh:17
pi
double pi
Definition
EvtPhokharaDef.hh:17
mp
double mp
Definition
EvtPhokharaDef.hh:17
EvtRandom.hh
EvtReport.hh
EvtRexc.hh
cos
double cos(const BesAngle a)
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcGeom/BesAngle.h:187
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::conexcmode
static int conexcmode
Definition
EvtConExc.hh:214
EvtConExc::multimode
static int multimode
Definition
EvtConExc.hh:214
EvtDecayBase::EvtDecayBase
EvtDecayBase()
Definition
EvtDecayBase.cc:205
EvtDecayBase::noProbMax
void noProbMax()
Definition
EvtDecayBase.cc:267
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition
EvtDecayBase.cc:449
EvtHelSys
Definition
EvtHelSys.hh:44
EvtHelSys::getHelAng
double getHelAng(int i)
Definition
EvtHelSys.cc:52
EvtId
Definition
EvtId.hh:27
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition
EvtPDL.hh:61
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition
EvtPDL.hh:66
EvtPDL::getMass
static double getMass(EvtId i)
Definition
EvtPDL.hh:44
EvtParticle
Definition
EvtParticle.hh:42
EvtParticle::setMass
void setMass(double m)
Definition
EvtParticle.hh:368
EvtParticle::makeDaughters
void makeDaughters(int ndaug, EvtId *id)
Definition
EvtParticle.cc:1150
EvtParticle::getP4Lab
EvtVector4R getP4Lab()
Definition
EvtParticle.cc:694
EvtParticle::getId
EvtId getId() const
Definition
EvtParticle.cc:100
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cc:108
EvtParticle::getNDaug
int getNDaug() const
Definition
EvtParticle.cc:112
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition
EvtParticle.cc:80
EvtParticle::mass
double mass() const
Definition
EvtParticle.cc:114
EvtParticle::initializePhaseSpace
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition
EvtParticle.cc:1042
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cc:69
EvtRexc::~EvtRexc
virtual ~EvtRexc()
Definition
EvtRexc.cc:22
EvtRexc::init
void init()
Definition
EvtRexc.cc:31
EvtRexc::hadron_angle_sampling
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition
EvtRexc.cc:117
EvtRexc::VP_sampling
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition
EvtRexc.cc:149
EvtRexc::decay
void decay(EvtParticle *p)
Definition
EvtRexc.cc:40
EvtRexc::clone
EvtDecayBase * clone()
Definition
EvtRexc.cc:29
EvtRexc::angularSampling
bool angularSampling(EvtParticle *par)
Definition
EvtRexc.cc:84
EvtRexc::initProbMax
void initProbMax()
Definition
EvtRexc.cc:38
EvtRexc::EvtRexc
EvtRexc()
Definition
EvtRexc.hh:22
EvtRexc::baryonAng
double baryonAng(double mx)
Definition
EvtRexc.cc:107
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:30
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:31
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:32
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition
EvtVector4R.hh:171
EvtVector4R::set
void set(int i, double d)
Definition
EvtVector4R.hh:173
EvtVector4R::theta
double theta()
Definition
EvtVector4R.cc:224
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenModels
EvtRexc.cc
Generated by
1.16.1