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
EvtPto3P.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/EvtPto3P.hh
"
22
23
#include "
EvtGenBase/EvtPDL.hh
"
24
#include "
EvtGenBase/EvtPto3PAmpFactory.hh
"
25
using namespace
EvtCyclic3
;
26
27
EvtDalitzPlot
EvtPto3P::dp
()
28
{
29
// There must be 3 daughters. All particles must be pseudoscalars.
30
// Charge must be conserved. Number of arguments must be non-zero.
31
32
EvtId
parent =
getParentId
();
33
assert(
getNDaug
() == 3 );
34
EvtId
dau0 =
getDaug
( 0 );
35
EvtId
dau1 =
getDaug
( 1 );
36
EvtId
dau2 =
getDaug
( 2 );
37
38
assert(
EvtPDL::getSpinType
( parent ) ==
EvtSpinType::SCALAR
);
39
assert(
EvtPDL::getSpinType
( dau0 ) ==
EvtSpinType::SCALAR
);
40
assert(
EvtPDL::getSpinType
( dau1 ) ==
EvtSpinType::SCALAR
);
41
assert(
EvtPDL::getSpinType
( dau2 ) ==
EvtSpinType::SCALAR
);
42
assert(
EvtPDL::chg3
( parent ) ==
43
EvtPDL::chg3
( dau0 ) +
EvtPDL::chg3
( dau1 ) +
EvtPDL::chg3
( dau2 ) );
44
assert(
getNArg
() > 0 );
45
46
return
EvtDalitzPlot
(
EvtPDL::getMass
( dau0 ),
EvtPDL::getMass
( dau1 ),
47
EvtPDL::getMass
( dau2 ),
EvtPDL::getMass
( parent ) );
48
}
49
50
EvtAmpFactory<EvtDalitzPoint>
*
EvtPto3P::createFactory
(
51
const
EvtMultiChannelParser
& parser )
52
{
53
// Compute the interval size
54
55
EvtDalitzPlot
plot =
dp
();
56
EvtAmpFactory<EvtDalitzPoint>
* fact =
new
EvtPto3PAmpFactory
( plot );
57
fact->
build
( parser, 10000 );
58
return
fact;
59
}
60
61
std::vector<EvtVector4R>
EvtPto3P::initDaughters
(
const
EvtDalitzPoint
&
x
)
const
62
{
63
std::vector<EvtVector4R> v;
64
assert(
x
.isValid() );
65
66
// Calculate in the r.f. of AB
67
68
double
eA =
x
.e(
A
,
AB
);
69
double
eB =
x
.e(
B
,
AB
);
70
double
eC =
x
.e(
C
,
AB
);
71
double
pA =
x
.p(
A
,
AB
);
72
double
pC =
x
.p(
C
,
AB
);
73
double
cos =
x
.cosTh(
CA
,
AB
);
74
double
sin = sqrt( 1.0 - cos * cos );
75
76
EvtVector4R
vA( eA, 0, 0, pA );
77
EvtVector4R
vB( eB, 0, 0, -pA );
78
EvtVector4R
vC( eC, 0, pC * sin, pC * cos );
79
80
// Boost from rest frame of AB to rest-frame of decaying particle
81
// vboost is the 4-momentum of frame being boosted from in the frame
82
// being boosted into.
83
84
EvtVector4R
vboost = vA + vB + vC;
85
vboost.
set
( 1, -vboost.
get
( 1 ) );
86
vboost.
set
( 2, -vboost.
get
( 2 ) );
87
vboost.
set
( 3, -vboost.
get
( 3 ) );
88
vA.
applyBoostTo
( vboost );
89
vB.
applyBoostTo
( vboost );
90
vC.
applyBoostTo
( vboost );
91
92
// Rotate
93
94
double
alpha =
EvtRandom::Flat
(
EvtConst::twoPi
);
95
double
beta = acos(
EvtRandom::Flat
( -1.0, 1.0 ) );
96
double
gamma =
EvtRandom::Flat
(
EvtConst::twoPi
);
97
98
vA.
applyRotateEuler
( alpha, beta, gamma );
99
vB.
applyRotateEuler
( alpha, beta, gamma );
100
vC.
applyRotateEuler
( alpha, beta, gamma );
101
102
// Fill vector
103
104
assert( v.size() == 0 );
105
v.push_back( vA );
106
v.push_back( vB );
107
v.push_back( vC );
108
109
return
v;
110
}
EvtPDL.hh
EvtPto3PAmpFactory.hh
EvtPto3P.hh
EvtAmpFactory
Definition
EvtAmpFactory.hh:40
EvtAmpFactory::build
virtual void build(const EvtMultiChannelParser &parser, int nItg)
Definition
EvtAmpFactory.hh:62
EvtConst::twoPi
static const double twoPi
Definition
EvtConst.hh:27
EvtDalitzPlot
Definition
EvtDalitzPlot.hh:30
EvtDalitzPoint
Definition
EvtDalitzPoint.hh:38
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
EvtDecayBase::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
EvtDecayBase::getParentId
EvtId getParentId() const
Definition
EvtDecayBase.hh:60
EvtDecayBase::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
EvtId
Definition
EvtId.hh:27
EvtIntervalDecayAmp< EvtDalitzPoint >::x
const EvtDalitzPoint & x() const
Definition
EvtIntervalDecayAmp.hh:186
EvtMultiChannelParser
Definition
EvtMultiChannelParser.hh:40
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition
EvtPDL.cpp:371
EvtPDL::chg3
static int chg3(EvtId i)
Definition
EvtPDL.cpp:366
EvtPDL::getMass
static double getMass(EvtId i)
Definition
EvtPDL.cpp:311
EvtPto3PAmpFactory
Definition
EvtPto3PAmpFactory.hh:33
EvtPto3P::dp
EvtDalitzPlot dp()
Definition
EvtPto3P.cpp:27
EvtPto3P::initDaughters
std::vector< EvtVector4R > initDaughters(const EvtDalitzPoint &p) const override
Definition
EvtPto3P.cpp:61
EvtPto3P::createFactory
EvtAmpFactory< EvtDalitzPoint > * createFactory(const EvtMultiChannelParser &parser) override
Definition
EvtPto3P.cpp:50
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::applyRotateEuler
void applyRotateEuler(double alpha, double beta, double gamma)
Definition
EvtVector4R.cpp:83
EvtVector4R::get
double get(int i) const
Definition
EvtVector4R.hh:163
EvtVector4R::set
void set(int i, double d)
Definition
EvtVector4R.hh:168
EvtVector4R::applyBoostTo
void applyBoostTo(const EvtVector4R &p4, bool inverse=false)
Definition
EvtVector4R.cpp:111
EvtCyclic3
Definition
EvtCyclic3.hh:28
EvtCyclic3::AB
@ AB
Definition
EvtCyclic3.hh:42
EvtCyclic3::CA
@ CA
Definition
EvtCyclic3.hh:40
EvtCyclic3::A
@ A
Definition
EvtCyclic3.hh:32
EvtCyclic3::C
@ C
Definition
EvtCyclic3.hh:34
EvtCyclic3::B
@ B
Definition
EvtCyclic3.hh:33
Generated by
1.17.0