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
EvtFlatSqDalitz.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/EvtFlatSqDalitz.hh
"
22
23
#include "
EvtGenBase/EvtConst.hh
"
24
#include "
EvtGenBase/EvtGenKine.hh
"
25
#include "
EvtGenBase/EvtPDL.hh
"
26
#include "
EvtGenBase/EvtParticle.hh
"
27
#include "
EvtGenBase/EvtRandom.hh
"
28
#include "
EvtGenBase/EvtReport.hh
"
29
30
#include <cmath>
31
#include <string>
32
33
std::string
EvtFlatSqDalitz::getName
()
const
34
{
35
return
"FLATSQDALITZ"
;
36
}
37
38
EvtDecayBase
*
EvtFlatSqDalitz::clone
()
const
39
{
40
return
new
EvtFlatSqDalitz
;
41
}
42
43
void
EvtFlatSqDalitz::initProbMax
()
44
{
45
noProbMax
();
46
}
47
48
void
EvtFlatSqDalitz::init
()
49
{
50
//check there are 3 daughters
51
checkNDaug
( 3 );
52
53
// check that there are 0 arguments
54
checkNArg
( 0, 2, 4 );
55
56
if
(
getNArg
() > 0 ) {
57
m_mPrimeMin
=
getArg
( 0 );
58
m_mPrimeMax
=
getArg
( 1 );
59
}
60
if
(
getNArg
() > 2 ) {
61
m_thetaPrimeMin
=
getArg
( 2 );
62
m_thetaPrimeMax
=
getArg
( 3 );
63
}
64
}
65
66
void
EvtFlatSqDalitz::decay
(
EvtParticle
* p )
67
{
68
p->
makeDaughters
(
getNDaug
(),
getDaugs
() );
69
p->
generateMassTree
();
70
const
double
mParent = p->
mass
();
71
EvtParticle
* daug1 = p->
getDaug
( 0 );
72
EvtParticle
* daug2 = p->
getDaug
( 1 );
73
EvtParticle
* daug3 = p->
getDaug
( 2 );
74
const
double
mDaug1 = daug1->
mass
();
75
const
double
mDaug2 = daug2->
mass
();
76
const
double
mDaug3 = daug3->
mass
();
77
const
double
mParentSq = mParent * mParent;
78
const
double
mDaug1Sq = mDaug1 * mDaug1;
79
const
double
mDaug2Sq = mDaug2 * mDaug2;
80
const
double
mDaug3Sq = mDaug3 * mDaug3;
81
82
// Generate m' and theta'
83
const
double
mPrime =
EvtRandom::Flat
(
m_mPrimeMin
,
m_mPrimeMax
);
84
const
double
thetaPrime =
EvtRandom::Flat
(
m_thetaPrimeMin
,
m_thetaPrimeMax
);
85
86
// calculate m12 and m23
87
const
double
m12 = 0.5 * ( std::cos( mPrime *
EvtConst::pi
) + 1 ) *
88
( mParent - ( mDaug1 + mDaug2 + mDaug3 ) ) +
89
mDaug1 + mDaug2;
90
const
double
m12Sq = m12 * m12;
91
92
const
double
en1 = ( m12Sq - mDaug2Sq + mDaug1Sq ) / ( 2. * m12 );
93
const
double
en3 = ( mParentSq - m12Sq - mDaug3Sq ) / ( 2. * m12 );
94
95
const
double
p1 = std::sqrt( en1 * en1 - mDaug1Sq );
96
const
double
p3 = std::sqrt( en3 * en3 - mDaug3Sq );
97
const
double
m13Sq =
98
mDaug1Sq + mDaug3Sq +
99
2.0 * ( en1 * en3 - p1 * p3 * std::cos(
EvtConst::pi
* thetaPrime ) );
100
const
double
m23Sq = mParentSq - m12Sq - m13Sq + mDaug1Sq + mDaug2Sq +
101
mDaug3Sq;
102
103
// Turn m12 and m23 into momenta
104
EvtGenKine::ThreeBodyKine
( m12Sq, m23Sq, p );
105
106
return
;
107
}
EvtConst.hh
EvtFlatSqDalitz.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtConst::pi
static const double pi
Definition
EvtConst.hh:26
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
EvtDecayBase::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::noProbMax
void noProbMax()
Definition
EvtDecayBase.cpp:301
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
EvtFlatSqDalitz
Definition
EvtFlatSqDalitz.hh:31
EvtFlatSqDalitz::m_mPrimeMax
double m_mPrimeMax
Definition
EvtFlatSqDalitz.hh:43
EvtFlatSqDalitz::m_mPrimeMin
double m_mPrimeMin
Definition
EvtFlatSqDalitz.hh:42
EvtFlatSqDalitz::getName
std::string getName() const override
Definition
EvtFlatSqDalitz.cpp:33
EvtFlatSqDalitz::decay
void decay(EvtParticle *p) override
Definition
EvtFlatSqDalitz.cpp:66
EvtFlatSqDalitz::init
void init() override
Definition
EvtFlatSqDalitz.cpp:48
EvtFlatSqDalitz::initProbMax
void initProbMax() override
Definition
EvtFlatSqDalitz.cpp:43
EvtFlatSqDalitz::m_thetaPrimeMax
double m_thetaPrimeMax
Definition
EvtFlatSqDalitz.hh:45
EvtFlatSqDalitz::m_thetaPrimeMin
double m_thetaPrimeMin
Definition
EvtFlatSqDalitz.hh:44
EvtFlatSqDalitz::clone
EvtDecayBase * clone() const override
Definition
EvtFlatSqDalitz.cpp:38
EvtGenKine::ThreeBodyKine
static void ThreeBodyKine(const double m12Sq, const double m23Sq, EvtParticle *p)
Definition
EvtGenKine.cpp:350
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::mass
double mass() const
Definition
EvtParticle.cpp:159
EvtParticle::generateMassTree
bool generateMassTree()
Definition
EvtParticle.cpp:509
EvtParticle::makeDaughters
void makeDaughters(size_t ndaug, const EvtId *id)
Definition
EvtParticle.cpp:1235
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
Generated by
1.17.0