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
EvtVVP.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 EvtVVP::getName() const
33{
34 return "VVP";
35}
36
38{
39 return new EvtVVP;
40}
41
43{
45
46 if ( getNDaug() == 2 ) { // chi -> gamma psi radiative mode
47 // This model needs 0 parameters, but previously was defined as requiring 8!
48 // Check for 0 or 8 parameters in the decay file for backwards compatibility
49 checkNArg( 0, 8 );
50 checkNDaug( 2 );
53
54 } else if ( getNDaug() == 3 ) { // chi -> psi lepton lepton
58 checkNArg( 1 );
59 m_delta = getArg( 0 );
60 }
61}
62
64{
65 if ( getNDaug() == 2 ) {
66 setProbMax( 2.0 );
67
68 } else if ( getNDaug() == 3 ) {
69 const EvtId daugId = getDaug( 1 );
70
71 if ( daugId == EvtPDL::getId( "mu+" ) ||
72 daugId == EvtPDL::getId( "mu-" ) ) {
73 setProbMax( 15.0 );
74 } else if ( daugId == EvtPDL::getId( "e+" ) ||
75 daugId == EvtPDL::getId( "e-" ) ) {
76 setProbMax( 600.0 );
77 }
78 }
79}
80
82{
83 if ( getNDaug() == 2 ) {
84 decay_2body( root );
85 } else if ( getNDaug() == 3 ) {
86 decay_3body( root );
87 }
88}
89
91{
93 // Vector is first particle, photon is the second
94 EvtParticle *v, *ph;
95 v = p->getDaug( 0 );
96 ph = p->getDaug( 1 );
97 EvtVector3C epsp[3];
98 EvtVector3C epsv[3];
99 EvtVector3C epsph[2];
100 epsp[0] = p->eps( 0 ).vec();
101 epsp[1] = p->eps( 1 ).vec();
102 epsp[2] = p->eps( 2 ).vec();
103
104 epsv[0] = v->eps( 0 ).vec().conj();
105 epsv[1] = v->eps( 1 ).vec().conj();
106 epsv[2] = v->eps( 2 ).vec().conj();
107
108 epsph[0] = ph->epsParentPhoton( 0 ).vec().conj();
109 epsph[1] = ph->epsParentPhoton( 1 ).vec().conj();
110
111 int i, j, k;
112 for ( i = 0; i < 3; i++ ) {
113 for ( j = 0; j < 3; j++ ) {
114 for ( k = 0; k < 2; k++ ) {
115 vertex( i, j, k, epsp[i].cross( epsv[j] ) * epsph[k] );
116 }
117 }
118 }
119}
120
122{
124 EvtParticle* psi = root->getDaug( 0 );
125 EvtParticle* mup = root->getDaug( 1 );
126 EvtParticle* mum = root->getDaug( 2 );
127
128 EvtVector4R k1 = mup->getP4(), // mu+ momentum
129 k2 = mum->getP4(), // mu- momentum
130 k = k1 + k2; // photon momentum
131
132 double kSq = k * k;
133
134 // The decay amplitude needs four-vector products. Make sure we have
135 // valid values for these, otherwise set the amplitude to zero.
136 // We need to set _amp2 (EvtDecayAmp) via the vertex() function call
137 // even when the amplitude is zero, otherwise the amplitude from the
138 // previous accepted event will be used, potentially leading to biases
139
140 // Selection on k^2 to avoid inefficient generation for the electron modes
141 bool validAmp( true );
142 if ( kSq < 1e-3 ) {
143 validAmp = false;
144 }
145
146 // Extra checks to make sure we are not dividing by zero
147 double dSq = m_delta * m_delta;
148 double dSqDenom = dSq - kSq;
149 if ( fabs( dSqDenom ) < 1e-10 ) {
150 validAmp = false;
151 }
152
153 double factor( 1.0 );
154 if ( validAmp ) {
155 factor = dSq / ( dSqDenom * kSq );
156 }
157
158 int iPols[4] = { 0, 0, 0, 0 };
159
160 // Calculate the amplitude terms, looping over the chi, psi and lepton states
161 for ( int iChi = 0; iChi < 3; iChi++ ) {
162 iPols[0] = iChi;
163 EvtVector4C epsChi = root->epsParent( iChi );
164
165 for ( int iPsi = 0; iPsi < 3; iPsi++ ) {
166 iPols[1] = iPsi;
167 EvtVector4C epsPsi = psi->epsParent( iPsi ).conj();
168
169 for ( int iMplus = 0; iMplus < 2; iMplus++ ) {
170 iPols[2] = iMplus;
171 EvtDiracSpinor spMplus = mup->spParent( iMplus );
172
173 for ( int iMminus = 0; iMminus < 2; iMminus++ ) {
174 iPols[3] = iMminus;
175 EvtDiracSpinor spMminus = mum->spParent( iMminus );
176 EvtVector4C epsGamma =
177 EvtLeptonVCurrent( spMplus, spMminus ).conj();
178
179 // Based on Baranov PRD 85,014034 (2012), Eq 10
180 // amp = e_{mu nu alpha beta} epsChi^mu epsPsi^nu epsGamma^alpha k^beta/k^2
181 EvtComplex amp( 0.0, 0.0 );
182 if ( validAmp ) {
183 amp = k * dual( EvtGenFunctions::directProd( epsChi,
184 epsPsi ) )
185 .cont1( epsGamma );
186 }
187 amp *= factor;
188
189 // Set the amplitude matrix element using the vertex function
190 vertex( iPols, amp );
191 }
192 }
193 }
194 }
195}
EvtVector4C EvtLeptonVCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtTensor4C dual(const EvtTensor4C &t2)
EvtVector3R cross(const EvtVector3R &p1, const EvtVector3R &p2)
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 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 EvtVector4C eps(int i) const
EvtVector4C cont1(const EvtVector4C &v4) const
void init() override
Definition EvtVVP.cpp:42
EvtVVP()
Definition EvtVVP.hh:37
void decay_3body(EvtParticle *p)
Definition EvtVVP.cpp:121
std::string getName() const override
Definition EvtVVP.cpp:32
double m_delta
Definition EvtVVP.hh:49
void decay(EvtParticle *p) override
Definition EvtVVP.cpp:81
EvtDecayBase * clone() const override
Definition EvtVVP.cpp:37
void decay_2body(EvtParticle *p)
Definition EvtVVP.cpp:90
void initProbMax() override
Definition EvtVVP.cpp:63
EvtVector3C conj() const
EvtVector4C conj() const
EvtVector3C vec() const
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)