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