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
EvtTVP.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
22
24#include "EvtGenBase/EvtPDL.hh"
29
30#include <cmath>
31
32std::string EvtTVP::getName() const
33{
34 return "TVP";
35}
36
38{
39 return new EvtTVP;
40}
41
43{
44 if ( getNDaug() == 2 ) {
45 decay_2body( root );
46 } else if ( getNDaug() == 3 ) {
47 decay_3body( root );
48 }
49}
50
52{
54
55 if ( getNDaug() == 2 ) { // chi -> gamma psi radiative mode
56 checkNArg( 0 );
59 } else if ( getNDaug() == 3 ) { // chi -> psi lepton lepton
60 checkNDaug( 3 );
64 checkNArg( 1 );
65 m_delta = getArg( 0 );
66 }
67}
68
70{
71 if ( getNDaug() == 2 ) {
72 const EvtId parId = getParentId();
73 if ( parId == EvtPDL::getId( "chi_b2" ) ) {
74 setProbMax( 15.0 );
75 } else {
76 setProbMax( 2.5 );
77 }
78
79 } else if ( getNDaug() == 3 ) {
80 double dSq = m_delta * m_delta;
81 double denom = dSq - 0.2;
82 double ratio( 1.0 );
83 if ( fabs( denom ) > 1e-10 ) {
84 ratio = dSq / denom;
85 }
86 double ffCor = ratio * ratio;
87
88 const EvtId daugId = getDaug( 1 );
89 const EvtId parId = getParentId();
90
91 if ( daugId == EvtPDL::getId( "mu+" ) ||
92 daugId == EvtPDL::getId( "mu-" ) ) {
93 if ( parId == EvtPDL::getId( "chi_c2" ) ) {
94 setProbMax( ffCor * 85.0 ); // tested on 1e6 events
95 } else if ( parId == EvtPDL::getId( "chi_b2" ) ) {
96 setProbMax( ffCor * 750.0 ); // tested on 1e6 events
97 }
98
99 } else if ( daugId == EvtPDL::getId( "e+" ) ||
100 daugId == EvtPDL::getId( "e-" ) ) {
101 if ( parId == EvtPDL::getId( "chi_c2" ) ) {
102 setProbMax( ffCor * 3.5e3 ); // tested on 1e5 events
103 } else if ( parId == EvtPDL::getId( "chi_b2" ) ) {
104 setProbMax( ffCor * 2.6e4 );
105 }
106 }
107 }
108}
109
111{
113
114 // Photon is the first particle and psi is the second
115 // to ensure decay file backwards compatibility
116 EvtParticle* photon = root->getDaug( 0 );
117 EvtParticle* psi = root->getDaug( 1 );
118
119 EvtVector4R p = psi->getP4(), // psi momentum
120 k = photon->getP4(); // Photon momentum
121
122 for ( int iPsi = 0; iPsi < 3; iPsi++ ) {
123 EvtVector4C epsPsi = psi->epsParent( iPsi ).conj();
124
125 for ( int iGamma = 0; iGamma < 2; iGamma++ ) {
126 EvtVector4C epsGamma = photon->epsParentPhoton( iGamma ).conj();
127
128 for ( int iChi = 0; iChi < 5; iChi++ ) {
129 EvtTensor4C epsChi = root->epsTensor( iChi );
130
131 // Baranov PRD 85,014034 (2012), Eq 11
132 // amp = p^mu epsPsi^a epsChi_{a b} [k_mu epsGamma_b - k_b epsGamma_mu]
133 EvtVector4C eee = epsChi.cont1( epsPsi );
134 EvtVector4C vvv = ( p * k ) * eee - ( k * eee ) * p;
135 EvtComplex amp = vvv * epsGamma;
136 vertex( iChi, iGamma, iPsi, amp );
137 }
138 }
139 }
140}
141
143{
145 EvtParticle* psi = root->getDaug( 0 );
146 EvtParticle* mup = root->getDaug( 1 );
147 EvtParticle* mum = root->getDaug( 2 );
148
149 EvtVector4R p = psi->getP4(), // psi momentum
150 k1 = mup->getP4(), // mu+ momentum
151 k2 = mum->getP4(), // mu- momentum
152 k = k1 + k2; // photon momentum
153
154 double kSq = k * k;
155
156 // The decay amplitude needs four-vector products. Make sure we have
157 // valid values for these, otherwise set the amplitude to zero.
158 // We need to set _amp2 (EvtDecayAmp) via the vertex() function call
159 // even when the amplitude is zero, otherwise the amplitude from the
160 // previous accepted event will be used, potentially leading to biases
161
162 // Selection on k^2 to avoid inefficient generation for the electron modes
163 bool validAmp( true );
164 if ( kSq < 1e-3 ) {
165 validAmp = false;
166 }
167
168 double dSq = m_delta * m_delta;
169 double dSqDenom = dSq - kSq;
170 if ( fabs( dSqDenom ) < 1e-10 ) {
171 validAmp = false;
172 }
173
174 double factor( 1.0 );
175 if ( validAmp ) {
176 factor = dSq / ( dSqDenom * kSq );
177 }
178
179 // Calculate the amplitude terms, looping over the psi and lepton states
180 int iPols[4] = { 0, 0, 0, 0 };
181
182 for ( int iChi = 0; iChi < 5; iChi++ ) {
183 iPols[0] = iChi;
184 EvtTensor4C epsChi = root->epsTensor( iChi );
185
186 for ( int iPsi = 0; iPsi < 3; iPsi++ ) {
187 iPols[1] = iPsi;
188 EvtVector4C epsPsi = psi->epsParent( iPsi ).conj();
189
190 for ( int iMplus = 0; iMplus < 2; iMplus++ ) {
191 iPols[2] = iMplus;
192 EvtDiracSpinor spMplus = mup->spParent( iMplus );
193
194 for ( int iMminus = 0; iMminus < 2; iMminus++ ) {
195 iPols[3] = iMminus;
196 EvtDiracSpinor spMminus = mum->spParent( iMminus );
197 EvtVector4C epsGamma = EvtLeptonVCurrent( spMplus, spMminus );
198
199 // Based on Baranov PRD 85,014034 (2012), Eq 11
200 // amp = p^mu epsPsi^a epsChi_{a b} [k_mu epsGamma_b - k_b epsGamma_mu]/k^2
201 EvtVector4C eee = epsChi.cont1( epsPsi );
202 EvtVector4C vvv = ( p * k ) * eee - ( k * eee ) * p;
203 EvtComplex amp( 0.0, 0.0 );
204 if ( validAmp ) {
205 amp = vvv * epsGamma;
206 }
207 amp *= factor;
208
209 // Set the amplitude matrix element using the vertex function
210 vertex( iPols, amp );
211 }
212 }
213 }
214 }
215}
EvtVector4C EvtLeptonVCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getParentId() const
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
virtual EvtVector4C epsParent(int i) const
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
virtual EvtDiracSpinor spParent(int) const
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
virtual EvtVector4C epsParentPhoton(int i) const
virtual EvtTensor4C epsTensor(int i) const
void decay_3body(EvtParticle *p)
Definition EvtTVP.cpp:142
EvtDecayBase * clone() const override
Definition EvtTVP.cpp:37
void decay_2body(EvtParticle *p)
Definition EvtTVP.cpp:110
void init() override
Definition EvtTVP.cpp:51
std::string getName() const override
Definition EvtTVP.cpp:32
void initProbMax() override
Definition EvtTVP.cpp:69
void decay(EvtParticle *p) override
Definition EvtTVP.cpp:42
double m_delta
Definition EvtTVP.hh:49
EvtVector4C cont1(const EvtVector4C &v4) const
EvtVector4C conj() const