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.
EvtLNuGamma.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 
23 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtReport.hh"
33 
34 #include <iostream>
35 #include <stdlib.h>
36 #include <string>
37 
38 std::string EvtLNuGamma::getName()
39 {
40  return "LNUGAMMA";
41 }
42 
44 {
45  return new EvtLNuGamma;
46 }
47 
49 {
50  // check that there are 3 or 4 arguments
51  checkNArg( 3, 4 );
52  checkNDaug( 3 );
53 
54  if ( getNArg() == 4 ) {
55  // Argv[3] is a flag set to 0 if abs(f_a/f_v) is 1
56  // and not set to 0 if f_a/f_v is set to 0.
57  if ( getArg( 3 ) > 0 ) {
58  _fafvzero = true;
59  } else {
60  _fafvzero = false;
61  }
62  } else {
63  _fafvzero = false;
64  }
65 
67 
71 }
72 
74 {
75  setProbMax( 7000.0 );
76 }
77 
79 {
80  static EvtId BM = EvtPDL::getId( "B-" );
81  static EvtId DM = EvtPDL::getId( "D-" );
83 
84  EvtComplex myI( 0, 1 );
85 
86  EvtParticle *lept, *neut, *phot;
87  lept = p->getDaug( 0 );
88  neut = p->getDaug( 1 );
89  phot = p->getDaug( 2 );
90 
91  EvtVector4C lept1, lept2, photon1, photon2;
92 
93  if ( p->getId() == BM || p->getId() == DM ) {
94  lept1 = EvtLeptonVACurrent( lept->spParent( 0 ),
95  neut->spParentNeutrino() );
96  lept2 = EvtLeptonVACurrent( lept->spParent( 1 ),
97  neut->spParentNeutrino() );
98  } else {
99  lept1 = EvtLeptonVACurrent( neut->spParentNeutrino(),
100  lept->spParent( 0 ) );
101  lept2 = EvtLeptonVACurrent( neut->spParentNeutrino(),
102  lept->spParent( 1 ) );
103  }
104 
105  EvtVector4R photp = phot->getP4(); // Photon 4-momentum in parent rest frame
106  double photE = photp.get( 0 ); // Photon energy in parent rest frame
107 
108  EvtVector4C photone1 = phot->epsParentPhoton( 0 ).conj();
109  EvtVector4C photone2 = phot->epsParentPhoton( 1 ).conj();
110 
111  EvtVector4R parVelocity( 1, 0, 0, 0 ); // Parent velocity in parent rest-frame
112 
113  double fv, fa;
114 
115  fv = getFormFactor( photE );
116  if ( _fafvzero ) {
117  fa = 0.0;
118  } else if ( p->getId() == BM || p->getId() == DM ) {
119  fa = -fv;
120  } else {
121  fa = fv;
122  }
123 
124  EvtVector4C temp1a =
125  dual( EvtGenFunctions::directProd( parVelocity, photp ) ).cont2( photone1 );
126  EvtVector4C temp2a =
127  dual( EvtGenFunctions::directProd( parVelocity, photp ) ).cont2( photone2 );
128 
129  EvtVector4C temp1b = ( photone1 ) * ( parVelocity * photp );
130  EvtVector4C temp1c = ( photp ) * ( photone1 * parVelocity );
131 
132  EvtVector4C temp2b = ( photone2 ) * ( parVelocity * photp );
133  EvtVector4C temp2c = ( photp ) * ( photone2 * parVelocity );
134 
135  photon1 = ( temp1a * fv ) + ( myI * fa * ( temp1b - temp1c ) );
136  photon2 = ( temp2a * fv ) + ( myI * fa * ( temp2b - temp2c ) );
137 
138  vertex( 0, 0, lept1.cont( photon1 ) );
139  vertex( 0, 1, lept1.cont( photon2 ) );
140  vertex( 1, 0, lept2.cont( photon1 ) );
141  vertex( 1, 1, lept2.cont( photon2 ) );
142 
143  return;
144 }
145 
146 double EvtLNuGamma::getFormFactor( double photonEnergy )
147 {
148  // Arg[0] = photon mass cutoff (GeV)
149  // Arg[1] = R (GeV^(-1))
150  // Arg[2] = m_b (GeV)
151  // Using Korchemsky et al. Phy Rev D 61 (2000) 114510
152  // Up to a constant
153 
154  double formFactor = 0;
155  double qu = 2. / 3.;
156  double qb = -1. / 3.;
157 
158  if ( photonEnergy > getArg( 0 ) ) {
159  formFactor = ( 1 / photonEnergy ) *
160  ( ( qu * getArg( 1 ) ) - ( qb / getArg( 2 ) ) );
161  }
162  return formFactor;
163 }
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
std::string getName() override
Definition: EvtLNuGamma.cpp:38
double getArg(unsigned int j)
void init() override
Definition: EvtLNuGamma.cpp:48
EvtTensor4C dual(const EvtTensor4C &t2)
EvtVector4C cont2(const EvtVector4C &v4) const
void decay(EvtParticle *p) override
Definition: EvtLNuGamma.cpp:78
EvtDecayBase * clone() override
Definition: EvtLNuGamma.cpp:43
virtual EvtVector4C epsParentPhoton(int i)
EvtId getId() const
virtual EvtDiracSpinor spParent(int) const
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
double getFormFactor(double photonEnergy)
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double get(int i) const
Definition: EvtVector4R.hh:162
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
bool _fafvzero
Definition: EvtLNuGamma.hh:41
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)
virtual EvtDiracSpinor spParentNeutrino() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtVector4C conj() const
Definition: EvtVector4C.hh:202
void initProbMax() override
Definition: EvtLNuGamma.cpp:73
EvtComplex cont(const EvtVector4C &v4) const
Definition: EvtVector4C.hh:140
int getNArg() const
Definition: EvtDecayBase.hh:68