EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
src
EvtGenModels
EvtPi0Dalitz.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/EvtPi0Dalitz.hh
"
22
23
#include "
EvtGenBase/EvtDiracSpinor.hh
"
24
#include "
EvtGenBase/EvtGenKine.hh
"
25
#include "
EvtGenBase/EvtPDL.hh
"
26
#include "
EvtGenBase/EvtParticle.hh
"
27
#include "
EvtGenBase/EvtReport.hh
"
28
#include "
EvtGenBase/EvtTensor4C.hh
"
29
#include "
EvtGenBase/EvtVector4C.hh
"
30
31
#include <fstream>
32
#include <stdio.h>
33
#include <stdlib.h>
34
#include <string>
35
using
std::fstream;
36
37
std::string
EvtPi0Dalitz::getName
()
const
38
{
39
return
"PI0_DALITZ"
;
40
}
41
42
EvtDecayBase
*
EvtPi0Dalitz::clone
()
const
43
{
44
return
new
EvtPi0Dalitz
;
45
}
46
47
void
EvtPi0Dalitz::initProbMax
()
48
{
49
// Search for maximum probability. In order to avoid setting up all
50
// particles with spinors and four-momenta, we use result after all
51
// contractions, which is:
52
// 1/((m_R^2-q^2)^2+m_R^2 Gamma_R^2) 1/(2q^2) (M^2-q^2)^2 beta_l
53
// (1+cos(theta)^2) where we set cos(theta)=1
54
auto
daughter1 =
getDaug
( 0 );
55
auto
daughter2 =
getDaug
( 1 );
56
double
q2Min =
EvtPDL::getMass
( daughter1 ) +
EvtPDL::getMass
( daughter2 );
57
q2Min *= q2Min;
58
double
q2Max =
EvtPDL::getMass
(
getParentId
() );
59
q2Max *= q2Max;
60
const
int
steps = 20000;
61
const
double
step = ( q2Max - q2Min ) / steps;
62
double
maxProb = 0;
63
for
(
int
ii = 0; ii < steps; ++ii ) {
64
double
q2 = q2Min + ii * step;
65
const
double
mSqDiff =
m_m0Sq
- q2;
66
const
double
q2Sq = q2 * q2;
67
double
prob = ( q2Max - q2 ) * ( q2Max - q2 ) * ( q2 - q2Min ) / ( q2Sq );
68
prob *= ( 1.0 / ( mSqDiff * mSqDiff +
m_m0SqG0Sq
) );
69
// When generating events, we do not start from phase-space, but
70
// add some pole to it, weight of which is taken into account
71
// elsewhere
72
prob /= 1.0 +
m_poleSize
/ ( q2Sq );
73
if
( prob > maxProb ) {
74
maxProb = prob;
75
}
76
}
77
setProbMax
( maxProb * 1.05 );
78
}
79
80
void
EvtPi0Dalitz::init
()
81
{
82
// check that there are 0 arguments
83
checkNArg
( 0 );
84
checkNDaug
( 3 );
85
86
checkSpinParent
(
EvtSpinType::SCALAR
);
87
88
checkSpinDaughter
( 0,
EvtSpinType::DIRAC
);
89
checkSpinDaughter
( 1,
EvtSpinType::DIRAC
);
90
checkSpinDaughter
( 2,
EvtSpinType::PHOTON
);
91
92
// Rescale pole size to improve efficiency. Not sure about exact
93
// factor, but this seem to be best simple rescaling for
94
// eta-->e+e-gamma.
95
const
double
parentMass =
EvtPDL::getMass
(
getParentId
() );
96
m_poleSize
*= parentMass * parentMass / ( 0.135 * 0.135 );
97
}
98
99
void
EvtPi0Dalitz::decay
(
EvtParticle
* p )
100
{
101
EvtParticle
*ep, *em, *gamma;
102
setWeight
( p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
(),
false
,
103
m_poleSize
, 0, 1 ) );
104
ep = p->
getDaug
( 0 );
105
em = p->
getDaug
( 1 );
106
gamma = p->
getDaug
( 2 );
107
108
// the next four lines generates events with a weight such that
109
// the efficiency for selecting them is good. The parameter below of
110
// 0.1 is the size of the peak at low q^2 (in arbitrary units).
111
// The value of 0.1 is appropriate for muons.
112
// when you use this remember to remove the cut on q^2!
113
114
//ep em invariant mass^2
115
double
m2 = ( ep->
getP4
() + em->
getP4
() ).mass2();
116
EvtVector4R
q = ep->
getP4
() + em->
getP4
();
117
//Just use the prob summed over spins...
118
119
EvtTensor4C
w, v;
120
121
v = 2.0 * ( gamma->
getP4
() * q ) *
122
EvtGenFunctions::directProd
( q, gamma->
getP4
() ) -
123
( gamma->
getP4
() * q ) * ( gamma->
getP4
() * q ) *
EvtTensor4C::g
() -
124
m2 *
EvtGenFunctions::directProd
( gamma->
getP4
(), gamma->
getP4
() );
125
126
w = 4.0 * (
EvtGenFunctions::directProd
( ep->
getP4
(), em->
getP4
() ) +
127
EvtGenFunctions::directProd
( em->
getP4
(), ep->
getP4
() ) -
128
EvtTensor4C::g
() *
129
( ep->
getP4
() * em->
getP4
() - ep->
getP4
().
mass2
() ) );
130
131
double
prob = (
real
(
cont
( v, w ) ) ) / ( m2 * m2 );
132
const
double
m2Diff =
m_m0Sq
- m2;
133
prob *= ( 1.0 / ( m2Diff * m2Diff +
m_m0SqG0Sq
) );
134
135
// EvtGenReport(EVTGEN_INFO,"EvtGen") << "prob is "<<prob<<endl;
136
setProb
( prob );
137
138
return
;
139
}
real
double real(const EvtComplex &c)
Definition
EvtComplex.hh:232
EvtDiracSpinor.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtPi0Dalitz.hh
EvtReport.hh
cont
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)
Definition
EvtTensor4C.cpp:290
EvtTensor4C.hh
EvtVector4C.hh
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
EvtDecayBase::checkSpinParent
void checkSpinParent(EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:534
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
EvtDecayBase::getParentId
EvtId getParentId() const
Definition
EvtDecayBase.hh:60
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
EvtDecayBase::getDaugs
const EvtId * getDaugs() const
Definition
EvtDecayBase.hh:65
EvtDecayProb::setProb
void setProb(double prob)
Definition
EvtDecayProb.hh:32
EvtDecayProb::setWeight
void setWeight(double weight)
Definition
EvtDecayProb.hh:34
EvtPDL::getMass
static double getMass(EvtId i)
Definition
EvtPDL.cpp:311
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::initializePhaseSpace
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition
EvtParticle.cpp:1100
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtPi0Dalitz
Definition
EvtPi0Dalitz.hh:28
EvtPi0Dalitz::m_poleSize
double m_poleSize
Definition
EvtPi0Dalitz.hh:39
EvtPi0Dalitz::m_m0Sq
const double m_m0Sq
Definition
EvtPi0Dalitz.hh:43
EvtPi0Dalitz::m_m0SqG0Sq
const double m_m0SqG0Sq
Definition
EvtPi0Dalitz.hh:44
EvtPi0Dalitz::getName
std::string getName() const override
Definition
EvtPi0Dalitz.cpp:37
EvtPi0Dalitz::initProbMax
void initProbMax() override
Definition
EvtPi0Dalitz.cpp:47
EvtPi0Dalitz::clone
EvtDecayBase * clone() const override
Definition
EvtPi0Dalitz.cpp:42
EvtPi0Dalitz::init
void init() override
Definition
EvtPi0Dalitz.cpp:80
EvtPi0Dalitz::decay
void decay(EvtParticle *p) override
Definition
EvtPi0Dalitz.cpp:99
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtTensor4C
Definition
EvtTensor4C.hh:38
EvtTensor4C::g
static const EvtTensor4C & g()
Definition
EvtTensor4C.cpp:43
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass2
double mass2() const
Definition
EvtVector4R.hh:100
EvtGenFunctions::directProd
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
Definition
EvtTensor3C.cpp:153
Generated by
1.16.1