EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
src
EvtGenModels
EvtVPHOtoVISRHi.cpp
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#include "
EvtGenModels/EvtVPHOtoVISRHi.hh
"
22
23
#include "
EvtGenBase/EvtGenKine.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
#include "
EvtGenBase/EvtRandom.hh
"
27
#include "
EvtGenBase/EvtReport.hh
"
28
#include "
EvtGenBase/EvtVector4C.hh
"
29
#include "
EvtGenBase/EvtVector4R.hh
"
30
31
#include <stdlib.h>
32
#include <string>
33
34
using
std::endl;
35
36
std::string
EvtVPHOtoVISRHi::getName
()
const
37
{
38
return
"VPHOTOVISRHI"
;
39
}
40
41
EvtDecayBase
*
EvtVPHOtoVISRHi::clone
()
const
42
{
43
return
new
EvtVPHOtoVISRHi
;
44
}
45
46
void
EvtVPHOtoVISRHi::init
()
47
{
48
// check that there are 0 or 1 arguments
49
checkNArg
( 0, 1 );
50
51
// check that there are 2 daughters
52
checkNDaug
( 2 );
53
54
// check the parent and daughter spins
55
checkSpinParent
(
EvtSpinType::VECTOR
);
56
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
57
checkSpinDaughter
( 1,
EvtSpinType::PHOTON
);
58
}
59
60
void
EvtVPHOtoVISRHi::initProbMax
()
61
{
62
setProbMax
( 20.0 );
63
}
64
65
void
EvtVPHOtoVISRHi::decay
(
EvtParticle
* p )
66
{
67
//take photon along z-axis, either forward or backward.
68
//Implement this as generating the photon momentum along
69
//the z-axis uniformly
70
double
power = 1;
71
if
(
getNArg
() == 1 )
72
power =
getArg
( 0 );
73
// define particle names
74
static
const
EvtId
D0 =
EvtPDL::getId
(
"D0"
);
75
static
const
EvtId
D0B =
EvtPDL::getId
(
"anti-D0"
);
76
static
const
EvtId
DP =
EvtPDL::getId
(
"D+"
);
77
static
const
EvtId
DM =
EvtPDL::getId
(
"D-"
);
78
static
const
EvtId
DSM =
EvtPDL::getId
(
"D_s-"
);
79
static
const
EvtId
DSP =
EvtPDL::getId
(
"D_s+"
);
80
static
const
EvtId
DSMS =
EvtPDL::getId
(
"D_s*-"
);
81
static
const
EvtId
DSPS =
EvtPDL::getId
(
"D_s*+"
);
82
static
const
EvtId
D0S =
EvtPDL::getId
(
"D*0"
);
83
static
const
EvtId
D0BS =
EvtPDL::getId
(
"anti-D*0"
);
84
static
const
EvtId
DPS =
EvtPDL::getId
(
"D*+"
);
85
static
const
EvtId
DMS =
EvtPDL::getId
(
"D*-"
);
86
// setup some parameters
87
double
w = p->
mass
();
88
double
s = w * w;
89
double
L = 2.0 * log( w / 0.000511 );
90
double
alpha = 1 / 137.0;
91
double
beta = ( L - 1 ) * 2.0 * alpha /
EvtConst::pi
;
92
// make sure only 2 or 3 body are present
93
assert( p->
getDaug
( 0 )->
getNDaug
() == 2 || p->
getDaug
( 0 )->
getNDaug
() == 3 );
94
95
// determine minimum rest mass of parent
96
double
md1 =
EvtPDL::getMeanMass
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() );
97
double
md2 =
EvtPDL::getMeanMass
( p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() );
98
double
minResMass = md1 + md2;
99
if
( p->
getDaug
( 0 )->
getNDaug
() == 3 ) {
100
double
md3 =
EvtPDL::getMeanMass
( p->
getDaug
( 0 )->
getDaug
( 2 )->
getId
() );
101
minResMass = minResMass + md3;
102
}
103
104
// calculate the maximum energy of the ISR photon
105
double
pgmax = ( s - minResMass * minResMass ) / ( 2.0 * w );
106
double
pgz = 0.99 * pgmax *
107
exp
( log(
EvtRandom::Flat
( 1.0 ) ) / ( beta * power ) );
108
if
(
EvtRandom::Flat
( 1.0 ) < 0.5 )
109
pgz = -pgz;
110
111
double
k = fabs( pgz );
112
// print of ISR energy
113
// std::cout << "Energy ISR :"<< k <<std::endl;
114
EvtVector4R
p4g( k, 0.0, 0.0, pgz );
115
116
EvtVector4R
p4res = p->
getP4Restframe
() - p4g;
117
118
double
mres = p4res.
mass
();
119
120
// set masses
121
p->
getDaug
( 0 )->
init
(
getDaug
( 0 ), p4res );
122
p->
getDaug
( 1 )->
init
(
getDaug
( 1 ), p4g );
123
124
// determine XS - langbw
125
// very crude way of determining XS just a simple straight line Approx.
126
// this was determined by eye.
127
// lots of cout statements to make plots to check that things are working as expected
128
double
sigma = 9.0;
129
if
( mres <= 3.9 )
130
sigma = 0.00001;
131
132
bool
sigmacomputed(
false
);
133
134
// DETERMINE XS FOR D*D*
135
if
( p->
getDaug
( 0 )->
getNDaug
() == 2 &&
136
( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == D0S &&
137
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == D0BS ) ||
138
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DPS &&
139
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DMS ) ) ) {
140
if
( mres > 4.18 ) {
141
sigma *= 5. / 9. *
142
( 1. - 1. * sqrt( ( 4.18 - mres ) * ( 4.18 - mres ) ) /
143
( 4.3 - 4.18 ) );
144
}
else
if
( mres > 4.07 && mres <= 4.18 ) {
145
sigma *= 5. / 9.;
146
}
else
if
( mres <= 4.07 && mres > 4.03 ) {
147
sigma *= ( 5. / 9. - 1.5 / 9. *
148
sqrt( ( 4.07 - mres ) * ( 4.07 - mres ) ) /
149
( 4.07 - 4.03 ) );
150
}
else
if
( mres <= 4.03 && mres >= 4.013 ) {
151
sigma *= ( 3.5 / 9. - 3.5 / 9. *
152
sqrt( ( 4.03 - mres ) * ( 4.03 - mres ) ) /
153
( 4.03 - 4.013 ) );
154
}
else
{
155
sigma = 0.00001;
156
}
157
sigmacomputed =
true
;
158
// std::cout << "DSDSXS "<<sigma<< " " << mres<<std::endl;
159
}
160
161
// DETERMINE XS FOR D*D
162
if
( p->
getDaug
( 0 )->
getNDaug
() == 2 &&
163
( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == D0S &&
164
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == D0B ) ||
165
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DPS &&
166
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DM ) ||
167
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == D0BS &&
168
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == D0 ) ||
169
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DMS &&
170
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DP ) ) ) {
171
if
( mres >= 4.2 ) {
172
sigma *= 1.5 / 9.;
173
}
else
if
( mres > 4.06 && mres < 4.2 ) {
174
sigma *= ( ( 1.5 / 9. + 2.5 / 9. *
175
sqrt( ( 4.2 - mres ) * ( 4.2 - mres ) ) /
176
( 4.2 - 4.06 ) ) );
177
}
else
if
( mres >= 4.015 && mres < 4.06 ) {
178
sigma *= ( ( 4. / 9. +
179
3. / 9. * sqrt( ( 4.06 - mres ) * ( 4.06 - mres ) ) /
180
( 4.06 - 4.015 ) ) );
181
}
else
if
( mres < 4.015 && mres >= 3.9 ) {
182
sigma *= ( ( 7. / 9. -
183
7 / 9. * sqrt( ( 4.015 - mres ) * ( 4.015 - mres ) ) /
184
( 4.015 - 3.9 ) ) );
185
}
else
{
186
sigma = 0.00001;
187
}
188
sigmacomputed =
true
;
189
// std::cout << "DSDXS "<<sigma<< " " << mres<<std::endl;
190
}
191
192
// DETERMINE XS FOR Ds*Ds*
193
if
( ( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DSPS &&
194
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DSMS ) ) ) {
195
if
( mres > ( 2.112 + 2.112 ) ) {
196
sigma = 0.4;
197
}
else
{
198
// sigma=0.4;
199
// sigma = 0 surely below Ds*Ds* threshold? - ponyisi
200
sigma = 0.00001;
201
}
202
sigmacomputed =
true
;
203
// std::cout << "DsSDsSXS "<<sigma<< " " << mres<<std::endl;
204
}
205
206
// DETERMINE XS FOR Ds*Ds
207
if
( p->
getDaug
( 0 )->
getNDaug
() == 2 &&
208
( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DSPS &&
209
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DSM ) ||
210
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DSMS &&
211
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DSP ) ) ) {
212
if
( mres > 4.26 ) {
213
sigma = 0.05;
214
}
else
if
( mres > 4.18 && mres <= 4.26 ) {
215
sigma *= 1. / 9. *
216
( 0.05 + 0.95 * sqrt( ( 4.26 - mres ) * ( 4.26 - mres ) ) /
217
( 4.26 - 4.18 ) );
218
}
else
if
( mres > 4.16 && mres <= 4.18 ) {
219
sigma *= 1 / 9.;
220
}
else
if
( mres <= 4.16 && mres > 4.08 ) {
221
sigma *= 1 / 9. *
222
( 1 - sqrt( ( 4.16 - mres ) * ( 4.16 - mres ) ) /
223
( 4.16 - 4.08 ) );
224
}
else
if
( mres <= ( 4.08 ) ) {
225
sigma = 0.00001;
226
}
227
sigmacomputed =
true
;
228
// std::cout << "DsSDsXS "<<sigma<< " " << mres<<std::endl;
229
}
230
231
// DETERMINE XS FOR DD
232
if
( p->
getDaug
( 0 )->
getNDaug
() == 2 &&
233
( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == D0 &&
234
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == D0B ) ||
235
( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DP &&
236
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DM ) ) ) {
237
sigma *= 0.4 / 9.;
238
sigmacomputed =
true
;
239
// std::cout << "DDXS "<<sigma<< " " << mres<<std::endl;
240
}
241
242
// DETERMINE XS FOR DsDs
243
if
( p->
getDaug
( 0 )->
getNDaug
() == 2 &&
244
( ( p->
getDaug
( 0 )->
getDaug
( 0 )->
getId
() == DSP &&
245
p->
getDaug
( 0 )->
getDaug
( 1 )->
getId
() == DSM ) ) ) {
246
sigma *= 0.2 / 9.;
247
sigmacomputed =
true
;
248
// std::cout << "DsDsXS "<<sigma<< " " << mres<<std::endl;
249
}
250
251
// DETERMINE XS FOR MULTIBODY
252
if
( p->
getDaug
( 0 )->
getNDaug
() == 3 ) {
253
if
( mres > 4.03 ) {
254
sigma *= 0.5 / 9.;
255
}
else
{
256
sigma = 0.00001;
257
}
258
sigmacomputed =
true
;
259
// std::cout << "DSDpiXS "<<sigma<< " " << mres<<std::endl;
260
}
261
262
if
( !sigmacomputed ) {
263
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
264
<<
"VPHOTOVISRHI: This model requires daughters to be listed in a particular order."
265
<< endl
266
<<
"The following are acceptable:"
<< endl
267
<<
"D0 anti-D0"
<< endl
268
<<
"D+ D-"
<< endl
269
<<
"D*0 anti-D0"
<< endl
270
<<
"anti-D*0 D0"
<< endl
271
<<
"D*+ D-"
<< endl
272
<<
"D*- D+"
<< endl
273
<<
"D*0 anti-D*0"
<< endl
274
<<
"D*+ D*-"
<< endl
275
<<
"D_s+ D_s-"
<< endl
276
<<
"D_s*+ D_s-"
<< endl
277
<<
"D_s*- D_s+"
<< endl
278
<<
"D_s*+ D_s*-"
<< endl
279
<<
"(D* D pi can be in any order)"
<< endl
280
<<
"Aborting..."
<< endl;
281
assert( 0 );
282
}
283
284
if
( sigma < 0 )
285
sigma = 0.0;
286
287
double
norm = sqrt( sigma );
288
289
// EvtParticle* d=p->getDaug(0);
290
291
vertex
( 0, 0, 0, norm * p->
eps
( 0 ) * p->
epsParent
( 0 ).
conj
() );
292
vertex
( 1, 0, 0, norm * p->
eps
( 1 ) * p->
epsParent
( 0 ).
conj
() );
293
vertex
( 2, 0, 0, norm * p->
eps
( 2 ) * p->
epsParent
( 0 ).
conj
() );
294
295
vertex
( 0, 1, 0, norm * p->
eps
( 0 ) * p->
epsParent
( 1 ).
conj
() );
296
vertex
( 1, 1, 0, norm * p->
eps
( 1 ) * p->
epsParent
( 1 ).
conj
() );
297
vertex
( 2, 1, 0, norm * p->
eps
( 2 ) * p->
epsParent
( 1 ).
conj
() );
298
299
vertex
( 0, 2, 0, norm * p->
eps
( 0 ) * p->
epsParent
( 2 ).
conj
() );
300
vertex
( 1, 2, 0, norm * p->
eps
( 1 ) * p->
epsParent
( 2 ).
conj
() );
301
vertex
( 2, 2, 0, norm * p->
eps
( 2 ) * p->
epsParent
( 2 ).
conj
() );
302
303
vertex
( 0, 0, 1, norm * p->
eps
( 0 ) * p->
epsParent
( 0 ).
conj
() );
304
vertex
( 1, 0, 1, norm * p->
eps
( 1 ) * p->
epsParent
( 0 ).
conj
() );
305
vertex
( 2, 0, 1, norm * p->
eps
( 2 ) * p->
epsParent
( 0 ).
conj
() );
306
307
vertex
( 0, 1, 1, norm * p->
eps
( 0 ) * p->
epsParent
( 1 ).
conj
() );
308
vertex
( 1, 1, 1, norm * p->
eps
( 1 ) * p->
epsParent
( 1 ).
conj
() );
309
vertex
( 2, 1, 1, norm * p->
eps
( 2 ) * p->
epsParent
( 1 ).
conj
() );
310
311
vertex
( 0, 2, 1, norm * p->
eps
( 0 ) * p->
epsParent
( 2 ).
conj
() );
312
vertex
( 1, 2, 1, norm * p->
eps
( 1 ) * p->
epsParent
( 2 ).
conj
() );
313
vertex
( 2, 2, 1, norm * p->
eps
( 2 ) * p->
epsParent
( 2 ).
conj
() );
314
315
return
;
316
}
exp
EvtComplex exp(const EvtComplex &c)
Definition
EvtComplex.hh:242
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtVPHOtoVISRHi.hh
EvtVector4C.hh
EvtVector4R.hh
EvtConst::pi
static const double pi
Definition
EvtConst.hh:26
EvtDecayAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtDecayAmp.hh:37
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::checkSpinParent
void checkSpinParent(EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:534
EvtDecayBase::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
EvtDecayBase::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
EvtDecayBase::checkNDaug
void checkNDaug(int d1, int d2=-1)
Definition
EvtDecayBase.cpp:516
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition
EvtDecayBase.cpp:492
EvtId
Definition
EvtId.hh:27
EvtPDL::getMeanMass
static double getMeanMass(EvtId i)
Definition
EvtPDL.cpp:306
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition
EvtPDL.cpp:283
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::epsParent
virtual EvtVector4C epsParent(int i) const
Definition
EvtParticle.cpp:611
EvtParticle::init
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle::getId
EvtId getId() const
Definition
EvtParticle.cpp:124
EvtParticle::getP4Restframe
EvtVector4R getP4Restframe() const
Definition
EvtParticle.cpp:788
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::mass
double mass() const
Definition
EvtParticle.cpp:159
EvtParticle::getNDaug
size_t getNDaug() const
Definition
EvtParticle.cpp:154
EvtParticle::eps
virtual EvtVector4C eps(int i) const
Definition
EvtParticle.cpp:623
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtVPHOtoVISRHi
Definition
EvtVPHOtoVISRHi.hh:30
EvtVPHOtoVISRHi::init
void init() override
Definition
EvtVPHOtoVISRHi.cpp:46
EvtVPHOtoVISRHi::decay
void decay(EvtParticle *p) override
Definition
EvtVPHOtoVISRHi.cpp:65
EvtVPHOtoVISRHi::initProbMax
void initProbMax() override
Definition
EvtVPHOtoVISRHi.cpp:60
EvtVPHOtoVISRHi::clone
EvtDecayBase * clone() const override
Definition
EvtVPHOtoVISRHi.cpp:41
EvtVPHOtoVISRHi::getName
std::string getName() const override
Definition
EvtVPHOtoVISRHi.cpp:36
EvtVector4C::conj
EvtVector4C conj() const
Definition
EvtVector4C.hh:204
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cpp:48
Generated by
1.17.0