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