14 using namespace genie;
15 using namespace genie::hnl;
18 BRCalculator::BRCalculator() :
72 s2w = std::pow( std::sin(
wAng ), 2.0 );
94 { 0.0, 1.0 }, { 0.01, (2.0 + 0.968309)/3.0 },
95 { 0.019970, 0.968309 }, { 0.029963, 0.952842 }, { 0.040037, 0.922646 }, { 0.049839, 0.907908 },
96 { 0.060075, 0.879136 }, { 0.070117, 0.824297 }, { 0.080272, 0.772880 }, { 0.090139, 0.736432 },
97 { 0.099924, 0.679466 }, { 0.110059, 0.607039 }, { 0.120445, 0.560082 }, { 0.130123, 0.508503 },
98 { 0.140579, 0.461674 }, { 0.150900, 0.405874 }, { 0.159906, 0.356819 }, { 0.170544, 0.303751 },
99 { 0.180722, 0.267038 }, { 0.190278, 0.227323 }, { 0.200340, 0.193514 }, { 0.209579, 0.159513 },
100 { 0.219244, 0.129386 }, { 0.230837, 0.101623 }, { 0.239932, 0.081113 }, { 0.249386, 0.060704 },
101 { 0.260887, 0.043990 }, { 0.269425, 0.031878 }, { 0.280041, 0.021660 }, { 0.289206, 0.014251 },
102 { 0.300601, 0.007729 }, { 0.310440, 0.004059 }, { 0.320600, 0.001935 }, { 0.330028, 0.000713 },
103 { 0.339733, 0.000184 }, { 0.350852, 0.00000953 }
107 { 0.0, 1.0 }, { 0.01, (2.0 + 0.968309)/3.0 },
108 { 0.019970, 0.968309 }, { 0.029963, 0.937622 }, { 0.040037, 0.907908 }, { 0.049839, 0.879136 },
109 { 0.060075, 0.824297 }, { 0.070117, 0.772880 }, { 0.079757, 0.713094 }, { 0.090139, 0.647424 },
110 { 0.100570, 0.578413 }, { 0.110059, 0.525146 }, { 0.120045, 0.454300 }, { 0.130964, 0.393012 },
111 { 0.140127, 0.334561 }, { 0.149932, 0.275778 }, { 0.159906, 0.227323 }, { 0.170544, 0.181443 },
112 { 0.180722, 0.137994 }, { 0.190278, 0.101623 }, { 0.200340, 0.071309 }, { 0.210933, 0.046917 },
113 { 0.220661, 0.025445 }, { 0.229355, 0.013362 }, { 0.239932, 0.003930 }, { 0.250997, 0.000037 }
117 { 0.0, 1.0 }, { 0.01, (2.0 + 0.772880)/3.0 },
118 { 0.020099, 0.772880 }, { 0.029963, 0.560082 }, { 0.040037, 0.356819 }, { 0.050161, 0.193514 },
119 { 0.060075, 0.089341 }, { 0.069667, 0.032922 }, { 0.080272, 0.007247 }, { 0.090139, 0.000713 },
120 { 0.100570, 0.00000363 }
137 if( x < 0. || x > 0.5 ) {
LOG(
"HNL",
pERROR ) <<
"BRCalculator::GetFormfactorF1:: Illegal x = " << x; exit( 3 ); }
138 if( x == 0.5 )
return 0.;
145 if( x < 0. || x > 0.5 ) {
LOG(
"HNL",
pERROR ) <<
"BRCalculator::GetFormfactorF2:: Illegal x = " << x; exit( 3 ); }
146 if( x == 0.5 )
return 0.;
182 double den = da * std::pow( (1.0 - da), 2.0 );
187 assert( M + ma <= mP );
190 return Ua42 * KScale;
194 assert( mP ==
mK || mP ==
mK0 );
195 assert( ma ==
mE || ma ==
mMu );
199 std::map< double, double >::iterator scmit = scaleMap.begin();
202 while( (*scmit).first <= M && scmit != scaleMap.end() ){ ++scmit; }
203 std::map< double, double >::iterator scpit = std::prev( scmit, 1 );
206 assert( scmit != scaleMap.end() );
208 if( scaleMap.find( M ) != scaleMap.end() )
return (*scmit).second;
210 double l1 = TMath::Log( (*scpit).second );
211 double l2 = TMath::Log( (*scmit).second );
212 double t = ( M - (*scpit).first ) / ( (*scmit).first - (*scpit).first );
213 return TMath::Exp( l1 + ( l2 - l1 ) * t );
217 assert( M + ma +
mPi0 <= mP );
220 return Ua42 * KScale;
225 std::map< double, double >::iterator scmit = scaleMap.begin();
226 while( (*scmit).first <= M && scmit != scaleMap.end() ){ ++scmit; }
227 std::map< double, double >::iterator scpit = std::prev( scmit, 1 );
230 assert( scmit != scaleMap.end() );
232 if( scaleMap.find( M ) != scaleMap.end() )
return (*scmit).second;
234 double l1 = TMath::Log( (*scpit).second );
235 double l2 = TMath::Log( (*scmit).second );
236 double t = ( M - (*scpit).first ) / ( (*scmit).first - (*scpit).first );
237 return TMath::Exp( l1 + ( l2 - l1 ) * t );
241 assert( M +
mE <=
mMu );
244 return ( Ue42 + Umu42 + Ut42 ) * KScale;
273 const double preFac =
GF2 * M*M*M / ( 32. *
pi );
274 const double kinPart = ( 1. - x*x ) * ( 1. - x*x );
275 return preFac * ( Ue42 + Umu42 + Ut42 ) *
fpi2 * kinPart;
281 const double preFac =
GF2 * M*M*M / ( 16. *
pi );
283 const double othPart = 1. - xPi*xPi - xLep*xLep * ( 2. + xPi*xPi - xLep*xLep );
284 return preFac *
fpi2 * Ua42 *
Vud2 * kalPart * othPart;
288 const double preFac =
GF2 * TMath::Power( M, 5. ) / ( 192. *
pi*
pi*
pi );
289 return preFac * ( Ue42 + Umu42 + Ut42 );
293 const double preFac =
GF2 * TMath::Power( M, 5. ) / ( 192. *
pi*
pi*
pi );
297 const double C1Part = ( Ue42 + Umu42 + Ut42 ) * f1 *
BR_C1;
298 const double C2Part = ( Ue42 + Umu42 + Ut42 ) * f2 *
BR_C2;
299 const double D1Part = bIsMu ? 2. *
s2w * Umu42 * f1 : 2. *
s2w * Ue42 * f1;
300 const double D2Part = bIsMu ?
s2w * Umu42 * f2 :
s2w * Ue42 * f2;
301 return preFac * ( C1Part + C2Part + D1Part + D2Part );
305 const double preFac =
GF2 * TMath::Power( M, 5. ) / ( 192. *
pi*
pi*
pi );
307 const double kinPol = 1. - 8. * x*x + 8. * TMath::Power( x, 6. ) - TMath::Power( x, 8. );
308 const double kinLn = -12. * TMath::Power( x, 4. ) * TMath::Log( x*x );
309 const double kinPart = kinPol + kinLn;
310 const double coupPart = (!IsMajorana) ? Ua42 : Ua42 + Ub42;
311 return preFac * kinPart * coupPart;
316 const double Ue42,
const double Umu42,
const double Ut42,
317 const bool isElectron)
const
324 const double Ua1 = isElectron ?
Ue1 :
Um1;
325 const double Ua2 = isElectron ?
Ue2 :
Um2;
326 const double Ua3 = isElectron ?
Ue3 :
Um3;
327 __attribute__((unused))
const double Ua4 = isElectron ? std::sqrt( Ue42 ) : std::sqrt( Umu42 );
329 const double Ue4 = std::sqrt( Ue42 );
330 const double Um4 = std::sqrt( Umu42 );
331 const double Ut4 = std::sqrt( Ut42 );
333 const double bigMats =
334 Ua1 * ( Ue4 *
Ue1 + Um4 *
Um1 + Ut4 *
Ut1 ) +
335 Ua2 * ( Ue4 *
Ue2 + Um4 *
Um2 + Ut4 *
Ut2 ) +
336 Ua3 * ( Ue4 *
Ue3 + Um4 *
Um3 + Ut4 *
Ut3 );
345 TF2 * f =
new TF2(
"fPiPi0Ell",
PiPi0EllForm,
mPi, maxPi, ml, maxMu, 4 );
346 f->SetParameter( 0, M );
347 f->SetParameter( 1, ml );
348 f->SetParameter( 2,
mPi );
349 f->SetParameter( 3,
mPi0 );
356 const int nSteps = 10000 + 1;
357 const double hEMu = ( maxMu - ml ) / ( nSteps - 1 );
358 const double hEPi = ( maxPi -
mPi ) / ( nSteps - 1 );
359 const double preSimp = hEMu * hEPi / ( 9.0 * ( nSteps - 1 ) * ( nSteps - 1 ) );
362 for(
int i = 0; i < nSteps; i++ ){
363 for(
int j = 0; j < nSteps; j++ ){
366 if( i % (nSteps - 1) == 0 ){
367 if( j % (nSteps - 1) == 0 ){ midW = 1.0; }
368 else if( j % 2 == 0 ){ midW = 2.0; }
371 else if( i % 2 == 0 ){
372 if( j % (nSteps - 1) == 0 ){ midW = 2.0; }
373 else if( j % 2 == 0 ){ midW = 4.0; }
377 if( j % (nSteps - 1) == 0 ){ midW = 4.0; }
378 else if( j % 2 == 0 ){ midW = 8.0; }
382 const double xev =
mPi + i * hEPi;
383 const double yev = ml + j * hEMu;
384 const double fev = f->Eval( xev, yev );
387 intNow += std::abs( preSimp * midW * fev );
393 intNow *= preFac * bigMats;
402 const double Ue42,
const double Umu42,
const double Ut42 )
const
406 const double Ue4 = std::sqrt( Ue42 );
407 const double Um4 = std::sqrt( Umu42 );
408 const double Ut4 = std::sqrt( Ut42 );
411 const double bigMats = std::pow( Ue4 * (
Ue1 +
Ue2 +
Ue3 ) +
414 const double smallMats = std::pow( Ue42 + Umu42 + Ut42 , 2.0 );
424 f->SetParameter( 0, M );
425 f->SetParameter( 1,
mPi0 );
429 const int nSteps = 10000 + 1;
430 const double hENu = ( maxNu - 0.0 ) / ( nSteps - 1 );
431 const double hEPi = ( maxPi -
mPi0 ) / ( nSteps - 1 );
432 const double preSimp = hENu * hEPi / ( 9.0 * ( nSteps - 1 ) * ( nSteps - 1 ) );
435 for(
int i = 0; i < nSteps; i++ ){
436 for(
int j = 0; j < nSteps; j++ ){
439 if( i % (nSteps - 1) == 0 ){
440 if( j % (nSteps - 1) == 0 ){ midW = 1.0; }
441 else if( j % 2 == 0 ){ midW = 2.0; }
444 else if( i % 2 == 0 ){
445 if( j % (nSteps - 1) == 0 ){ midW = 2.0; }
446 else if( j % 2 == 0 ){ midW = 4.0; }
450 if( j % (nSteps - 1) == 0 ){ midW = 4.0; }
451 else if( j % 2 == 0 ){ midW = 8.0; }
455 const double xev =
mPi0 + i * hEPi;
456 const double yev = 0.0 + j * hENu;
457 const double fev = f->Eval( xev, yev );
460 intNow += std::abs( preSimp * midW * fev );
466 intNow *= preFac * bigMats * smallMats;
476 double MPi0 = par[3];
481 double pi0Term = ( MN - Emu - Epi > MPi0 ) ?
482 std::sqrt( std::pow( ( MN - Emu - Epi ), 2.0 ) - MPi0 * MPi0 ) : 0.0;
485 std::sqrt( Emu*Emu - MMu*MMu ) *
486 std::sqrt( Epi*Epi - MPi*MPi ) *
487 pi0Term / ( MN - Emu - Epi );
489 double FracNum1 = MN*MN - 2.0*( MN-Emu-Epi )*MN + MPi0*MPi0;
490 double FracNum2 = MN*MN - 2.0*Emu*MN + 2.0*MMu*MMu;
491 double FracNum3 = MN*MN - MPi0*MPi0;
492 double FracNum4 = MN*MN - 2.0*( MN-Emu-Epi )*MN + MPi0*MPi0 + MMu*MMu - MPi*MPi;
493 double FracNum = FracNum1*FracNum2 - FracNum3*FracNum4;
494 double FracDen = std::pow( MN*MN - 2.0*( MN - Emu - Epi ) * MN + MPi0*MPi0 , 2.0 );
496 return ETerm * FracNum / FracDen;
502 double MPi0 = par[1];
508 std::sqrt( Epi*Epi - MPi0*MPi0 ) *
509 (Enu + MN) * Enu * Enu *
512 double Frac1 = 1.0 / ( Enu * ( MN - Enu - Epi ) + MPi0 * MPi0 - MN * MN );
513 double Frac2 = 1.0 / ( Enu * Epi + MPi0 * MPi0 - MN * MN );
515 return ETerm * std::pow( ( Frac1 + Frac2 ), 2.0 );
enum genie::hnl::t_HNLProd HNLProd_t
double DWidth_PseudoscalarToPiLepton(const double mP, const double M, const double Ua42, const double ma) const
double DWidth_PseudoscalarToLepton(const double mP, const double M, const double Ua42, const double ma) const
double DWidth_Pi0Pi0Nu(const double M, const double Ue42, const double Umu42, const double Ut42) const
int GetParamVect(const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
Handle to load vectors of parameters.
double DWidth_PiZeroAndNu(const double M, const double Ue42, const double Umu42, const double Ut42) const
std::map< double, double > kscale_K3e
static const double PARTWIDTH
double DWidth_PiPi0Ell(const double M, const double ml, const double Ue42, const double Umu42, const double Ut42, const bool isElectron=false) const
double Kallen(double x, double y, double z)
double KScale_Global(genie::hnl::HNLProd_t hnldm, const double M) const
double DWidth_PiAndLepton(const double M, const double Ua42, const double ma) const
static const double FormfactorF2[]
double KinematicScaling(genie::hnl::HNLProd_t hnlprod) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
double KScale_PseudoscalarToPiLepton(const double mP, const double M, const double ma) const
static constexpr double mb
double RhoFunc(double x, double y)
virtual void Configure(const Registry &config)
enum genie::hnl::EHNLDecayMode HNLDecayMode_t
static const double FormfactorF1[]
double DWidth_Global(genie::hnl::HNLDecayMode_t hnldm, const double M) const
double DWidth_Invisible(const double M, const double Ue42, const double Umu42, const double Ut42) const
double DWidth_SameLepton(const double M, const double Ue42, const double Umu42, const double Ut42, const double mb, bool bIsMu) const
double KScale_MuonToNuAndElectron(const double M) const
static double PiPi0EllForm(double *x, double *par)
static PDGLibrary * Instance(void)
bool IsProdKinematicallyAllowed(genie::hnl::HNLProd_t hnlprod)
static __attribute__((unused)) double fDecayGammas[]
double DecayWidth(genie::hnl::HNLDecayMode_t hnldm) const
double DWidth_DiffLepton(const double M, const double Ua42, const double Ub42, const int IsMajorana) const
A registry. Provides the container for algorithm configuration parameters.
std::map< double, double > kscale_K3mu
std::map< double, double > kscale_mu3e
double GetFormfactorF2(double x) const
Pure abstract base class. Defines the ChannelCalculatorI interface to be implemented by BRCalculator ...
TParticlePDG * Find(int pdgc, bool must_exist=true)
void Configure(const Registry &config)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
std::vector< double > fCouplings
double GetFormfactorF1(double x) const
double DWidth_MuonToNuAndElectron(const double M, const double Ue42, const double Umu42, const double Ut42) const
double KScale_PseudoscalarToLepton(const double mP, const double M, const double ma) const
double MassX(double m1, double m2)
static double Pi0Pi0NuForm(double *x, double *par)
bool IsKinematicallyAllowed(genie::hnl::HNLDecayMode_t hnldm, double Mhnl)