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