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.
EvtTauHadnu.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/EvtGenKine.hh"
25 #include "EvtGenBase/EvtIdSet.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtReport.hh"
30 
31 #include <iostream>
32 #include <stdlib.h>
33 #include <string>
34 
35 using namespace std;
36 
37 std::string EvtTauHadnu::getName()
38 {
39  return "TAUHADNU";
40 }
41 
43 {
44  return new EvtTauHadnu;
45 }
46 
48 {
49  // check that there are 0 arguments
50 
51  checkSpinParent( EvtSpinType::DIRAC );
52 
53  //the last daughter should be a neutrino
54  checkSpinDaughter( getNDaug() - 1, EvtSpinType::NEUTRINO );
55 
56  int i;
57  for ( i = 0; i < ( getNDaug() - 1 ); i++ ) {
58  checkSpinDaughter( i, EvtSpinType::SCALAR );
59  }
60 
61  bool validndaug = false;
62 
63  if ( getNDaug() == 4 ) {
64  //pipinu
65  validndaug = true;
66  checkNArg( 7 );
67  _beta = getArg( 0 );
68  _mRho = getArg( 1 );
69  _gammaRho = getArg( 2 );
70  _mRhopr = getArg( 3 );
71  _gammaRhopr = getArg( 4 );
72  _mA1 = getArg( 5 );
73  _gammaA1 = getArg( 6 );
74  }
75  if ( getNDaug() == 3 ) {
76  //pipinu
77  validndaug = true;
78  checkNArg( 5 );
79  _beta = getArg( 0 );
80  _mRho = getArg( 1 );
81  _gammaRho = getArg( 2 );
82  _mRhopr = getArg( 3 );
83  _gammaRhopr = getArg( 4 );
84  }
85  if ( getNDaug() == 2 ) {
86  //pipinu
87  validndaug = true;
88  checkNArg( 0 );
89  }
90 
91  if ( !validndaug ) {
92  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
93  << "Have not yet implemented this final state in TAUHADNUKS model"
94  << endl;
95  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Ndaug=" << getNDaug() << endl;
96  int id;
97  for ( id = 0; id < ( getNDaug() - 1 ); id++ )
98  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
99  << "Daug " << id << " " << EvtPDL::name( getDaug( id ) ).c_str()
100  << endl;
101  }
102 }
103 
105 {
106  if ( getNDaug() == 2 )
107  setProbMax( 90.0 );
108  if ( getNDaug() == 3 )
109  setProbMax( 2500.0 );
110  if ( getNDaug() == 4 )
111  setProbMax( 30000.0 );
112 }
113 
115 {
116  static EvtId TAUM = EvtPDL::getId( "tau-" );
117 
118  EvtIdSet thePis( "pi+", "pi-", "pi0" );
119  EvtIdSet theKs( "K+", "K-" );
120 
121  p->initializePhaseSpace( getNDaug(), getDaugs() );
122 
123  EvtParticle* nut;
124  nut = p->getDaug( getNDaug() - 1 );
125  p->getDaug( 0 )->getP4();
126 
127  //get the leptonic current
128  EvtVector4C tau1, tau2;
129 
130  if ( p->getId() == TAUM ) {
131  tau1 = EvtLeptonVACurrent( nut->spParentNeutrino(), p->sp( 0 ) );
132  tau2 = EvtLeptonVACurrent( nut->spParentNeutrino(), p->sp( 1 ) );
133  } else {
134  tau1 = EvtLeptonVACurrent( p->sp( 0 ), nut->spParentNeutrino() );
135  tau2 = EvtLeptonVACurrent( p->sp( 1 ), nut->spParentNeutrino() );
136  }
137 
138  EvtVector4C hadCurr;
139  bool foundHadCurr = false;
140  if ( getNDaug() == 2 ) {
141  hadCurr = p->getDaug( 0 )->getP4();
142  foundHadCurr = true;
143  }
144  if ( getNDaug() == 3 ) {
145  //pi pi0 nu with rho and rhopr resonance
146  if ( thePis.contains( getDaug( 0 ) ) && thePis.contains( getDaug( 1 ) ) ) {
147  EvtVector4R q1 = p->getDaug( 0 )->getP4();
148  EvtVector4R q2 = p->getDaug( 1 )->getP4();
149  double m1 = q1.mass();
150  double m2 = q2.mass();
151 
152  hadCurr = Fpi( ( q1 + q2 ).mass2(), m1, m2 ) * ( q1 - q2 );
153 
154  foundHadCurr = true;
155  }
156  }
157  if ( getNDaug() == 4 ) {
158  if ( thePis.contains( getDaug( 0 ) ) && thePis.contains( getDaug( 1 ) ) &&
159  thePis.contains( getDaug( 2 ) ) ) {
160  //figure out which is the different charged pi
161  //want it to be q3
162 
163  int diffPi( 0 ), samePi1( 0 ), samePi2( 0 );
164  if ( getDaug( 0 ) == getDaug( 1 ) ) {
165  diffPi = 2;
166  samePi1 = 0;
167  samePi2 = 1;
168  }
169  if ( getDaug( 0 ) == getDaug( 2 ) ) {
170  diffPi = 1;
171  samePi1 = 0;
172  samePi2 = 2;
173  }
174  if ( getDaug( 1 ) == getDaug( 2 ) ) {
175  diffPi = 0;
176  samePi1 = 1;
177  samePi2 = 2;
178  }
179 
180  EvtVector4R q1 = p->getDaug( samePi1 )->getP4();
181  EvtVector4R q2 = p->getDaug( samePi2 )->getP4();
182  EvtVector4R q3 = p->getDaug( diffPi )->getP4();
183 
184  double m1 = q1.mass();
185  double m2 = q2.mass();
186  double m3 = q3.mass();
187 
188  EvtVector4R Q = q1 + q2 + q3;
189  double Q2 = Q.mass2();
190  double _mA12 = _mA1 * _mA1;
191 
192  double _gammaA1X = _gammaA1 * gFunc( Q2, samePi1 ) /
193  gFunc( _mA12, samePi1 );
194 
195  EvtComplex denBW_A1( _mA12 - Q2, -1. * _mA1 * _gammaA1X );
196  EvtComplex BW_A1 = _mA12 / denBW_A1;
197 
198  hadCurr = BW_A1 *
199  ( ( ( q1 - q3 ) - ( Q * ( Q * ( q1 - q3 ) ) / Q2 ) ) *
200  Fpi( ( q1 + q3 ).mass2(), m1, m3 ) +
201  ( ( q2 - q3 ) - ( Q * ( Q * ( q2 - q3 ) ) / Q2 ) ) *
202  Fpi( ( q2 + q3 ).mass2(), m2, m3 ) );
203 
204  foundHadCurr = true;
205  }
206  }
207 
208  if ( !foundHadCurr ) {
209  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
210  << "Have not yet implemented this final state in TAUHADNUKS model"
211  << endl;
212  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Ndaug=" << getNDaug() << endl;
213  int id;
214  for ( id = 0; id < ( getNDaug() - 1 ); id++ )
215  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
216  << "Daug " << id << " " << EvtPDL::name( getDaug( id ) ).c_str()
217  << endl;
218  }
219 
220  vertex( 0, tau1 * hadCurr );
221  vertex( 1, tau2 * hadCurr );
222 
223  return;
224 }
225 
226 double EvtTauHadnu::gFunc( double Q2, int dupD )
227 {
228  double mpi = EvtPDL::getMeanMass( getDaug( dupD ) );
229  double mpi2 = pow( mpi, 2. );
230  if ( Q2 < pow( _mRho + mpi, 2. ) ) {
231  double arg = Q2 - 9. * mpi2;
232  return 4.1 * pow( arg, 3. ) * ( 1. - 3.3 * arg + 5.8 * pow( arg, 2. ) );
233  } else
234  return Q2 * ( 1.623 + 10.38 / Q2 - 9.32 / pow( Q2, 2. ) +
235  0.65 / pow( Q2, 3. ) );
236 }
237 
238 EvtComplex EvtTauHadnu::Fpi( double s, double xm1, double xm2 )
239 {
240  EvtComplex BW_rho = BW( s, _mRho, _gammaRho, xm1, xm2 );
241  EvtComplex BW_rhopr = BW( s, _mRhopr, _gammaRhopr, xm1, xm2 );
242 
243  return ( BW_rho + _beta * BW_rhopr ) / ( 1. + _beta );
244 }
245 
246 EvtComplex EvtTauHadnu::BW( double s, double m, double gamma, double xm1,
247  double xm2 )
248 {
249  double m2 = pow( m, 2. );
250 
251  if ( s > pow( xm1 + xm2, 2. ) ) {
252  double qs = sqrt( fabs( ( s - pow( xm1 + xm2, 2. ) ) *
253  ( s - pow( xm1 - xm2, 2. ) ) ) ) /
254  sqrt( s );
255  double qm = sqrt( fabs( ( m2 - pow( xm1 + xm2, 2. ) ) *
256  ( m2 - pow( xm1 - xm2, 2. ) ) ) ) /
257  m;
258 
259  gamma *= m2 / s * pow( qs / qm, 3. );
260  } else
261  gamma = 0.;
262 
263  EvtComplex denBW( m2 - s, -1. * sqrt( s ) * gamma );
264 
265  return m2 / denBW;
266 }
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
void decay(EvtParticle *p) override
virtual EvtDiracSpinor sp(int) const
void init() override
Definition: EvtTauHadnu.cpp:47
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
double mass() const
Definition: EvtVector4R.cpp:49
EvtDecayBase * clone() override
Definition: EvtTauHadnu.cpp:42
EvtComplex BW(double s, double m, double gamma, double xm1, double xm2)
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
EvtId getId() const
Definition: EvtId.hh:27
EvtComplex Fpi(double s, double xm1, double xm2)
double mass2() const
Definition: EvtVector4R.hh:100
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void initProbMax() override
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
virtual EvtDiracSpinor spParentNeutrino() const
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
double gFunc(double m2, int dupD)
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
int contains(const EvtId id)
Definition: EvtIdSet.cpp:422
double arg(const EvtComplex &c)
Definition: EvtComplex.hh:214
std::string getName() override
Definition: EvtTauHadnu.cpp:37