323   HNLMakeDecay::DecayFinalState ret;
 
  325   int lep_pdg = is_muon ? 13 : 11;
 
  333   if (lep_mass + piplus_mass > flux.mass) {
 
  338   double u4 = is_muon ? flux.C2 : flux.C1;
 
  339   double lep_ratio = (lep_mass * lep_mass) / (flux.mass * flux.mass);
 
  340   double pion_ratio = (piplus_mass * piplus_mass) / (flux.mass * flux.mass);
 
  341   double Ifunc = ((1 + lep_ratio + pion_ratio)*(1.+lep_ratio) - 4*lep_ratio) * sqrt(
lambda(1., lep_ratio, pion_ratio));
 
  342   ret.width = u4 * (Gfermi * Gfermi *fpion * fpion * abs_Vud_squared * flux.mass * flux.mass * flux.mass * Ifunc) / (16 * M_PI);
 
  350     lep_pdg_sign = (
GetRandom() > 0.5) ? 1 : -1;
 
  354     lep_pdg_sign = (flux.secondary_pdg > 0) ? -1 : 1;
 
  361   double this_dalitz = 0.;
 
  367     LB = TLorentzVector(p*dir, sqrt(p*p + lep_mass*lep_mass));
 
  368     PI = TLorentzVector(-p*dir, sqrt(p*p + piplus_mass*piplus_mass));
 
  369     LB.Boost(flux.mom.BoostVector());
 
  370     PI.Boost(flux.mom.BoostVector());
 
  372     this_dalitz = ((flux.secondary_pdg > 0 ) != (lep_pdg_sign > 0)) ? \
 
  376     assert(this_dalitz < dalitz_max);
 
  377     if (this_dalitz > dalitz_max) {
 
  378       std::cerr << 
"VERY VERY BAD!!!! Incorrect dalitz max!!!\n";
 
  379       std::cout << 
"VERY VERY BAD!!!! Incorrect dalitz max!!!\n";
 
  380       std::cout << 
"PK: " << flux.kmom.E() << 
" " << flux.kmom.Px() << 
" " << flux.kmom.Py() << 
" " << flux.kmom.Pz() << std::endl;
 
  381       std::cout << 
"PA: " << flux.sec.E() << 
" " << flux.sec.Px() << 
" " << flux.sec.Py() << 
" " << flux.sec.Pz() << std::endl;
 
  382       std::cout << 
"PN: " << flux.mom.E() << 
" " << flux.mom.Px() << 
" " << flux.mom.Py() << 
" " << flux.mom.Pz() << std::endl;
 
  383       std::cout << 
"PP: " << PI.E() << 
" " << PI.Px() << 
" " << PI.Py() << 
" " << PI.Pz() << std::endl;
 
  384       std::cout << 
"PB: " << LB.E() << 
" " << LB.Px() << 
" " << LB.Py() << 
" " << LB.Pz() << std::endl;
 
  386       std::cout << 
"This Dalitz: " << this_dalitz << std::endl;
 
  387       std::cout << 
"Max Dalitz: " << dalitz_max << std::endl;
 
  388       std::cout << 
"LNC: " << ((flux.secondary_pdg > 0 ) != (lep_pdg_sign > 0)) << std::endl;
 
  392   } 
while (
GetRandom() > this_dalitz / dalitz_max);
 
  395   ret.mom.push_back(LB);
 
  396   ret.pdg.push_back(lep_pdg*lep_pdg_sign);
 
  399   ret.mom.emplace_back(PI);
 
  400   ret.pdg.push_back(211*lep_pdg_sign); 
 
BEGIN_PROLOG could also be cerr
 
double lambda(double a, double b, double c)
 
double twobody_momentum(double parent_mass, double childA_mass, double childB_mass)
 
double HNLLepPiLNVDalitz(TLorentzVector K, TLorentzVector LA, TLorentzVector N, TLorentzVector PI, TLorentzVector LB)
 
static const Constants & Instance()
 
double HNLLepPiDalitzMax(double mK, double mA, double mN, double mP, double mB)
 
TVector3 RandomUnitVector()
 
BEGIN_PROLOG could also be cout
 
double HNLLepPiLNCDalitz(TLorentzVector K, TLorentzVector LA, TLorentzVector N, TLorentzVector PI, TLorentzVector LB)