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
EvtSVPHelCPMix.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/EvtSVPHelCPMix.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtComplex.hh
"
25
#include "
EvtGenBase/EvtConst.hh
"
26
#include "
EvtGenBase/EvtId.hh
"
27
#include "
EvtGenBase/EvtPDL.hh
"
28
#include "
EvtGenBase/EvtParticle.hh
"
29
#include "
EvtGenBase/EvtRandom.hh
"
30
#include "
EvtGenBase/EvtReport.hh
"
31
32
#include "
EvtGenModels/EvtSVPHelAmp.hh
"
33
34
#include <iostream>
35
#include <stdlib.h>
36
37
std::string
EvtSVPHelCPMix::getName
()
const
38
{
39
return
"SVPHELCPMIX"
;
40
}
41
42
EvtDecayBase
*
EvtSVPHelCPMix::clone
()
const
43
{
44
return
new
EvtSVPHelCPMix
;
45
}
46
47
void
EvtSVPHelCPMix::init
()
48
{
49
// check that there are 5 arguments
50
checkNArg
( 5 );
51
checkNDaug
( 2 );
52
53
checkSpinParent
(
EvtSpinType::SCALAR
);
54
55
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
56
checkSpinDaughter
( 1,
EvtSpinType::PHOTON
);
57
}
58
59
void
EvtSVPHelCPMix::initProbMax
()
60
{
61
setProbMax
( 2.0 * (
getArg
( 0 ) *
getArg
( 0 ) +
getArg
( 2 ) *
getArg
( 2 ) ) );
62
}
63
64
void
EvtSVPHelCPMix::decay
(
EvtParticle
* p )
65
{
66
static
const
EvtId
BS0 =
EvtPDL::getId
(
"B_s0"
);
67
//static const EvtId BSB = EvtPDL::getId("anti-B_s0");
68
69
//Flavour tagging of the initial state. Note that flavour mixing has already been applied out of this model
70
//Initial_state == 0 (Bs at the initial state) and Initial_state == 1 (Anti-Bs in the initial state)
71
int
Initial_state( -1 );
72
if
(
EvtCPUtil::getInstance
()->isBsMixed(
73
p ) ) {
//The decaying particle has suffered flavour mixing, thus the initial state is its antiparticle
74
if
( p->
getId
() == BS0 ) {
75
Initial_state = 1;
76
}
else
{
77
Initial_state = 0;
78
}
79
}
else
{
//The decaying particle has NOT suffered flavour mixing, thus the initial state is itself
80
if
( p->
getId
() == BS0 ) {
81
Initial_state = 0;
82
}
else
{
83
Initial_state = 1;
84
}
85
}
86
87
static
const
EvtId
BSH =
EvtPDL::getId
(
"B_s0H"
);
88
static
const
double
ctauH =
EvtPDL::getctau
( BSH );
89
static
const
double
gammaH = 1.0 / ctauH;
90
91
static
const
double
deltaGamma =
EvtCPUtil::getInstance
()->
getDeltaGamma
(
92
BS0 );
93
94
//Here we're gonna generate and set the "envelope" lifetime, so we take the longest living component (for positive deltaGamma: tauH)
95
//t is initialized following a e^(gammaH*t) lifetime distribution. When computing the amplitudes a factor e^(gammaH*t/2) should be substracted.
96
double
t = -log(
EvtRandom::Flat
() ) *
97
( 1.0 / gammaH );
//This overrules the lifetimes made by the program performing the mixing (CPUtil)
98
if
(
EvtCPUtil::getInstance
()->isBsMixed( p ) ) {
99
p->
getParent
()->
setLifetime
( t );
100
}
else
{
101
p->
setLifetime
( t );
102
}
103
104
static
const
double
deltaMs =
EvtCPUtil::getInstance
()->
getDeltaM
( BS0 );
105
double
mt =
exp
( -std::max( 0.0, deltaGamma ) * t / ( 2.0 *
EvtConst::c
) );
106
double
pt =
exp
( +std::min( 0.0, deltaGamma ) * t / ( 2.0 *
EvtConst::c
) );
107
108
//Using the same sign convention as in J.P. Silva, hep-ph/0410351 (2004)
109
EvtComplex
qp =
EvtComplex
( cos( -2.0 *
getArg
( 4 ) ),
110
sin( -2.0 *
getArg
( 4 ) ) );
// q/p=e^(-2*beta_s)
111
EvtComplex
gplus =
112
( mt *
EvtComplex
( cos( deltaMs * t / ( 2.0 *
EvtConst::c
) ),
113
sin( deltaMs * t / ( 2.0 *
EvtConst::c
) ) ) +
114
pt *
EvtComplex
( cos( deltaMs * t / ( 2.0 *
EvtConst::c
) ),
115
sin( -deltaMs * t / ( 2.0 *
EvtConst::c
) ) ) ) /
116
2.0;
117
EvtComplex
gminus =
118
( +mt *
EvtComplex
( cos( deltaMs * t / ( 2.0 *
EvtConst::c
) ),
119
sin( deltaMs * t / ( 2.0 *
EvtConst::c
) ) ) -
120
pt *
EvtComplex
( cos( deltaMs * t / ( 2.0 *
EvtConst::c
) ),
121
sin( -deltaMs * t / ( 2.0 *
EvtConst::c
) ) ) ) /
122
2.0;
123
124
//These should be filled with the helicity amplitudes at t=0
125
EvtComplex
arg_hm, arg_hp;
126
arg_hp =
EvtComplex
(
getArg
( 0 ) * cos(
getArg
( 1 ) ),
127
getArg
( 0 ) * sin(
getArg
( 1 ) ) );
128
arg_hm =
EvtComplex
(
getArg
( 2 ) * cos(
getArg
( 3 ) ),
129
getArg
( 2 ) * sin(
getArg
( 3 ) ) );
130
131
//Time-dependent amplitudes H+(t) and H-(t) are computed for a Bs and Anti-Bs in the initial state
132
EvtComplex
hp, hm;
133
if
( Initial_state == 0 ) {
//These are the equations for Bs
134
135
hp = arg_hp * gplus + qp *
conj
( arg_hm ) * gminus;
136
hm = arg_hm * gplus + qp *
conj
( arg_hp ) * gminus;
137
138
}
else
if
( Initial_state == 1 ) {
//The equations for Anti-Bs
139
140
hp =
conj
( arg_hm ) * gplus + ( 1.0 / qp ) * arg_hp * gminus;
141
hm =
conj
( arg_hp ) * gplus + ( 1.0 / qp ) * arg_hm * gminus;
142
143
}
else
{
144
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
145
<<
"Initial state was not BSB or BS0!"
<< std::endl;
146
::abort();
147
}
148
149
//Compute the decay amplitudes from the time-dependent helicity amplitudes
150
EvtSVPHelAmp::SVPHel
( p,
m_amp2
,
getDaug
( 0 ),
getDaug
( 1 ), hp, hm );
151
152
return
;
153
}
EvtCPUtil.hh
EvtComplex.hh
conj
EvtComplex conj(const EvtComplex &c)
Definition
EvtComplex.hh:198
exp
EvtComplex exp(const EvtComplex &c)
Definition
EvtComplex.hh:242
EvtConst.hh
EvtId.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
EvtSVPHelAmp.hh
EvtSVPHelCPMix.hh
EvtCPUtil::getInstance
static EvtCPUtil * getInstance()
Definition
EvtCPUtil.cpp:42
EvtCPUtil::getDeltaM
double getDeltaM(const EvtId id)
Definition
EvtCPUtil.cpp:551
EvtCPUtil::getDeltaGamma
double getDeltaGamma(const EvtId id)
Definition
EvtCPUtil.cpp:531
EvtComplex
Definition
EvtComplex.hh:29
EvtConst::c
static const double c
Definition
EvtConst.hh:30
EvtDecayAmp::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
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::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::getctau
static double getctau(EvtId i)
Definition
EvtPDL.cpp:351
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition
EvtPDL.cpp:283
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::getId
EvtId getId() const
Definition
EvtParticle.cpp:124
EvtParticle::setLifetime
void setLifetime(double tau)
Definition
EvtParticle.cpp:95
EvtParticle::getParent
EvtParticle * getParent() const
Definition
EvtParticle.cpp:90
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
EvtSVPHelAmp::SVPHel
static void SVPHel(EvtParticle *parent, EvtAmp &, EvtId n_v1, EvtId n_ph, const EvtComplex &hp, const EvtComplex &hm)
Definition
EvtSVPHelAmp.cpp:75
EvtSVPHelCPMix
Definition
EvtSVPHelCPMix.hh:36
EvtSVPHelCPMix::decay
void decay(EvtParticle *p) override
Definition
EvtSVPHelCPMix.cpp:64
EvtSVPHelCPMix::clone
EvtDecayBase * clone() const override
Definition
EvtSVPHelCPMix.cpp:42
EvtSVPHelCPMix::init
void init() override
Definition
EvtSVPHelCPMix.cpp:47
EvtSVPHelCPMix::initProbMax
void initProbMax() override
Definition
EvtSVPHelCPMix.cpp:59
EvtSVPHelCPMix::getName
std::string getName() const override
Definition
EvtSVPHelCPMix.cpp:37
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
Generated by
1.17.0