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
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
26#include "EvtGenBase/EvtPDL.hh"
30
31#include <iostream>
32#include <stdlib.h>
33#include <string>
34
35using namespace std;
36
37std::string EvtTauHadnu::getName() const
38{
39 return "TAUHADNU";
40}
41
43{
44 return new EvtTauHadnu;
45}
46
48{
49 // check that there are 0 arguments
50
52
53 //the last daughter should be a neutrino
55
56 int i;
57 for ( i = 0; i < ( getNDaug() - 1 ); i++ ) {
59 }
60
61 bool validndaug = false;
62
63 if ( getNDaug() == 4 ) {
64 //pipinu
65 validndaug = true;
66 checkNArg( 7 );
67 m_beta = getArg( 0 );
68 m_mRho = getArg( 1 );
69 m_gammaRho = getArg( 2 );
70 m_mRhopr = getArg( 3 );
71 m_gammaRhopr = getArg( 4 );
72 m_mA1 = getArg( 5 );
73 m_gammaA1 = getArg( 6 );
74 }
75 if ( getNDaug() == 3 ) {
76 //pipinu
77 validndaug = true;
78 checkNArg( 5 );
79 m_beta = getArg( 0 );
80 m_mRho = getArg( 1 );
81 m_gammaRho = getArg( 2 );
82 m_mRhopr = getArg( 3 );
83 m_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 const EvtId TAUM = EvtPDL::getId( "tau-" );
117
118 EvtIdSet thePis{ "pi+", "pi-", "pi0" };
119 EvtIdSet theKs{ "K+", "K-" };
120
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 = m_mA1 * m_mA1;
191
192 double gammaA1X = m_gammaA1 * gFunc( Q2, samePi1 ) /
193 gFunc( mA12, samePi1 );
194
195 EvtComplex denBW_A1( mA12 - Q2, -1. * m_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
226double EvtTauHadnu::gFunc( double Q2, int dupD )
227{
228 double mpi = EvtPDL::getMeanMass( getDaug( dupD ) );
229 double mpi2 = pow( mpi, 2. );
230 if ( Q2 < pow( m_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
238EvtComplex EvtTauHadnu::Fpi( double s, double xm1, double xm2 )
239{
240 EvtComplex BW_rho = BW( s, m_mRho, m_gammaRho, xm1, xm2 );
241 EvtComplex BW_rhopr = BW( s, m_mRhopr, m_gammaRhopr, xm1, xm2 );
242
243 return ( BW_rho + m_beta * BW_rhopr ) / ( 1. + m_beta );
244}
245
246EvtComplex 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}
double arg(const EvtComplex &c)
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getDaug(int i) const
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
bool contains(const EvtId &id) const
Definition EvtIdSet.cpp:46
Definition EvtId.hh:27
static std::string name(EvtId i)
Definition EvtPDL.cpp:376
static double getMeanMass(EvtId i)
Definition EvtPDL.cpp:306
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
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
virtual EvtDiracSpinor sp(int) const
double m_beta
void decay(EvtParticle *p) override
EvtComplex BW(double s, double m, double gamma, double xm1, double xm2)
EvtComplex Fpi(double s, double xm1, double xm2)
std::string getName() const override
void init() override
double m_gammaA1
double m_gammaRho
EvtDecayBase * clone() const override
double m_gammaRhopr
double gFunc(double m2, int dupD)
double m_mRho
void initProbMax() override
double m_mRhopr
double mass() const
double mass2() const