30#include <TLorentzVector.h>
31#include <TClonesArray.h>
97 TClonesArray * particle_list = this->
Hadronize(interaction);
99 if(! particle_list ) {
100 LOG(
"AGKYLowW2019",
pWARN) <<
"Got an empty particle list. Hadronizer failed!";
101 LOG(
"AGKYLowW2019",
pWARN) <<
"Quitting the current event generation thread";
106 exception.
SetReason(
"Could not simulate the hadronic system");
113 int mom =
event->FinalStateHadronicSystemPosition();
123 const TLorentzVector * had_syst =
event -> Particle(mom) -> P4() ;
124 TVector3 beta = TVector3(0,0,had_syst->P()/had_syst->E());
125 TVector3 unitvq = had_syst->Vect().Unit();
128 const TLorentzVector & vtx = *(neutrino->
X4());
131 TIter particle_iter(particle_list);
132 while ((particle = (
GHepParticle *) particle_iter.Next())) {
134 int pdgc = particle -> Pdg() ;
137 particle -> P4() -> Boost (beta);
138 particle -> P4() -> RotateUz(unitvq);
150 particle -> SetStatus( ist ) ;
152 int im = mom + 1 + particle -> FirstMother() ;
156 particle -> SetFirstMother( im ) ;
158 particle -> SetPosition( vtx ) ;
160 event->AddParticle(*particle);
163 delete particle_list ;
177 LOG(
"KNOHad",
pWARN) <<
"Returning a null particle list!";
183 LOG(
"KNOHad",
pINFO) <<
"W = " << W <<
" GeV";
190 <<
"Failed selecting particles for " << *interaction;
208 TClonesArray * particle_list = 0;
212 if(use_isotropic_decay) {
215 particle_list = this->
DecayMethod2(W,*pdgcv,reweight_decays);
218 particle_list = this->
DecayMethod1(W,*pdgcv,reweight_decays);
223 <<
"Failed decaying a hadronic system @ W=" << W
224 <<
"with multiplicity=" << pdgcv->size();
235 particle_list->SetOwner(
true);
239 return particle_list;
246 LOG(
"KNOHad",
pWARN) <<
"Returning a null particle list!";
250 unsigned int min_mult = 2;
251 unsigned int mult = 0;
259 LOG(
"KNOHad",
pINFO) <<
"Hadron Shower Charge = " << maxQ;
262 LOG(
"KNOHad",
pDEBUG) <<
"Building Multiplicity Probability distribution";
264 Option_t * opt =
"+LowMultSuppr+Renormalize";
268 LOG(
"KNOHad",
pWARN) <<
"Null multiplicity probability distribution!";
271 if(mprob->Integral(
"width")<=0) {
272 LOG(
"KNOHad",
pWARN) <<
"Empty multiplicity probability distribution!";
279 bool allowed_state=
false;
280 unsigned int itry = 0;
282 while(!allowed_state)
289 <<
"Couldn't select hadronic shower particles after: "
290 << itry <<
" attempts!";
296 mult = TMath::Nint( mprob->GetRandom() );
298 LOG(
"KNOHad",
pINFO) <<
"Hadron multiplicity = " << mult;
302 if(mult < (
unsigned int) TMath::Abs(maxQ)) {
304 <<
"Multiplicity not enough to generate hadronic charge! Retrying.";
305 allowed_state =
false;
312 if(mult < min_mult) {
315 <<
"Low generated multiplicity: " << mult
316 <<
". Forcing to minimum accepted multiplicity: " << min_mult;
320 <<
"Generated multiplicity: " << mult <<
" is too low! Quitting";
330 <<
"Generated multiplicity (@ W = " << W <<
"): " << pdgcv->size();
334 mult = pdgcv->size();
338 vector<int>::const_iterator pdg_iter;
339 for(pdg_iter = pdgcv->begin(); pdg_iter != pdgcv->end(); ++pdg_iter) {
340 int pdgc = *pdg_iter;
344 LOG(
"KNOHad",
pDEBUG) <<
"- PDGC=" << pdgc <<
", m=" << m <<
" GeV";
346 bool permitted = (W > msum);
349 LOG(
"KNOHad",
pWARN) <<
"*** Decay forbidden by kinematics! ***";
350 LOG(
"KNOHad",
pWARN) <<
"sum{mass} = " << msum <<
", W = " << W;
351 LOG(
"KNOHad",
pWARN) <<
"Discarding hadronic system & re-trying!";
353 allowed_state =
false;
357 allowed_state =
true;
360 <<
"Found an allowed hadronic state @ W=" << W
361 <<
" multiplicity=" << mult;
371 const Interaction * interaction, Option_t * opt)
const
387 <<
"Returning a null multiplicity probability distribution!";
400 double avn = 1.5*avnch;
403 <<
"Average hadronic multiplicity (W=" << W <<
") = " << avn;
406 double maxmult = this->
MaxMult(interaction);
415 if(maxmult>18) maxmult=18;
417 SLOG(
"KNOHad",
pDEBUG) <<
"Computed maximum multiplicity = " << maxmult;
420 LOG(
"KNOHad",
pWARN) <<
"Low maximum multiplicity! Quiting.";
431 int nbins = mult_prob->FindBin(maxmult);
433 for(
int i = 1; i <= nbins; i++) {
435 double n = mult_prob->GetBinCenter(i);
437 double avnP = this->
KNO(nu_pdg,nuc_pdg,z);
438 double P = avnP / avn;
441 <<
"n = " << n <<
" (n/<n> = " << z
442 <<
", <n>*P = " << avnP <<
") => P = " << P;
444 mult_prob->Fill(n,P);
447 SLOG(
"KNOHad",
pDEBUG) <<
"Fixing multiplicity to 2";
448 mult_prob->Fill(2,1.);
451 double integral = mult_prob->Integral(
"width");
454 mult_prob->Scale(1.0/integral);
456 SLOG(
"KNOHad",
pWARN) <<
"probability distribution integral = 0";
462 bool apply_neugen_Rijk = option.find(
"+LowMultSuppr") != string::npos;
463 bool renormalize = option.find(
"+Renormalize") != string::npos;
466 if(apply_neugen_Rijk) {
467 SLOG(
"KNOHad",
pINFO) <<
"Applying NeuGEN scaling factors";
470 this->
ApplyRijk(interaction, renormalize, mult_prob);
473 <<
"W = " << W <<
" < Wcut = " <<
fWcut
474 <<
" - Will not apply scaling factors";
551 double diff = TMath::Abs(1.-fsum);
553 LOG(
"KNOHad",
pWARN) <<
"KNO Probabilities do not sum to unity! Renormalizing..." ;
569 "0.083*exp(-0.5*pow(x+0.385,2.)/0.131)",-1,0.5);
571 "exp(-0.214-6.625*x)",0,0.6);
654 if ( is_p && (is_nu || is_l ) ) c=
fCvp;
655 else if ( is_n && (is_nu || is_l ) ) c=
fCvn;
656 else if ( is_p && (is_nubar || is_lbar) ) c=
fCvbp;
657 else if ( is_n && (is_nubar || is_lbar) ) c=
fCvbn;
659 else if ( is_p && is_dm ) c=
fCvp;
660 else if ( is_n && is_dm ) c=
fCvn;
663 <<
"Invalid initial state (probe = " << probe_pdg <<
", "
664 <<
"hit nucleon = " << nuc_pdg <<
")";
669 double kno = 2*TMath::Exp(-c)*TMath::Power(c,x)/TMath::Gamma(x);
675 int probe_pdg,
int nuc_pdg,
double W)
const
690 if ( is_p && (is_nu || is_l ) ) {
a=
fAvp; b=
fBvp; }
691 else if ( is_n && (is_nu || is_l ) ) {
a=
fAvn; b=
fBvn; }
692 else if ( is_p && (is_nubar || is_lbar) ) {
a=
fAvbp; b=
fBvbp; }
693 else if ( is_n && (is_nubar || is_lbar) ) {
a=
fAvbn; b=
fBvbn; }
695 else if ( is_p && is_dm ) {
a=
fAvp; b=
fBvp; }
696 else if ( is_n && is_dm ) {
a=
fAvn; b=
fBvn; }
699 <<
"Invalid initial state (probe = " << probe_pdg <<
", "
700 <<
"hit nucleon = " << nuc_pdg <<
")";
704 double av_nch =
a + b * 2*TMath::Log(W);
716 int hadronShowerCharge = 0;
735 hadronShowerCharge = (int) ( qp + qnuc - ql );
737 return hadronShowerCharge;
741 double W,
const PDGCodeList & pdgv,
bool reweight_decays)
const
746 LOG(
"KNOHad",
pINFO) <<
"** Using Hadronic System Decay method 1";
748 TLorentzVector p4had(0,0,0,W);
749 TClonesArray * plist =
new TClonesArray(
"genie::GHepParticle", pdgv.size());
752 bool ok = this->
PhaseSpaceDecay(*plist, p4had, pdgv, 0, reweight_decays);
764 double W,
const PDGCodeList & pdgv,
bool reweight_decays)
const
770 LOG(
"KNOHad",
pINFO) <<
"** Using Hadronic System Decay method 2";
778 int baryon = pdgv[0];
780 double MN2 = TMath::Power(MN, 2);
786 bool allowdup =
true;
788 for(
unsigned int i=1; i<pdgv.size(); i++) pdgv_strip[i-1] = pdgv[i];
792 vector<int>::const_iterator pdg_iter = pdgv_strip.begin();
793 for( ; pdg_iter != pdgv_strip.end(); ++pdg_iter) {
794 int pdgc = *pdg_iter;
799 TClonesArray * plist =
new TClonesArray(
"genie::GHepParticle", pdgv.size());
802 TLorentzVector p4had(0,0,0,W);
803 TLorentzVector p4N (0,0,0,0);
808 bool got_baryon_4p =
false;
809 bool got_hadsyst_4p =
false;
811 while(!got_hadsyst_4p) {
813 LOG(
"KNOHad",
pINFO) <<
"Generating p4 for baryon with pdg = " << baryon;
815 while(!got_baryon_4p) {
822 double pt = TMath::Sqrt(pt2);
824 double px = pt * TMath::Cos(phi);
825 double py = pt * TMath::Sin(phi);
827 double p2 = TMath::Power(pz,2) + pt2;
828 double E = TMath::Sqrt(p2+MN2);
830 p4N.SetPxPyPzE(px,py,pz,E);
832 LOG(
"KNOHad",
pDEBUG) <<
"Trying nucleon xF= "<< xf<<
", pT2= "<< pt2;
836 double Mav = p4d.Mag();
838 got_baryon_4p = (Mav > mass_sum);
848 p4N.Px(),p4N.Py(),p4N.Pz(),p4N.Energy(), 0,0,0,0
853 <<
"Generating p4 for the remaining hadronic system";
855 <<
"Remaining system: Available mass = " << p4d.Mag()
856 <<
", Particle masses = " << mass_sum;
859 *plist, p4d, pdgv_strip, 1, reweight_decays);
861 got_hadsyst_4p = is_ok;
863 if(!got_hadsyst_4p) {
864 got_baryon_4p =
false;
871 LOG(
"KNOHad",
pERROR) <<
"*** Decay forbidden by kinematics! ***";
885 LOG(
"KNOHad",
pINFO) <<
"Generating two particles back-to-back";
887 assert(pdgv.size()==2);
892 TClonesArray * plist =
new TClonesArray(
"genie::GHepParticle", pdgv.size());
898 TLorentzVector p4(0,0,0,W);
901 bool accepted =
false;
910 LOG(
"KNOHad",
pERROR) <<
"*** Decay forbidden by kinematics! ***";
922 double px = baryon->
Px();
923 double py = baryon->
Py();
924 double pz = baryon->
Pz();
926 double pT2 = px*px + py*py;
928 double xF = pL/(W/2);
930 double pT2rnd = pT2o * rnd->
RndHadro().Rndm();
931 double xFrnd = xFo * rnd->
RndHadro().Rndm();
936 LOG(
"KNOHad",
pINFO) <<
"baryon xF = " << xF <<
", pT2 = " << pT2;
938 accepted = (xFrnd < xFpdf && pT2rnd < pT2pdf);
940 LOG(
"KNOHad",
pINFO) << ((accepted) ?
"Decay accepted":
"Decay rejected");
946 TClonesArray & plist, TLorentzVector & pd,
947 const PDGCodeList & pdgv,
int offset,
bool reweight)
const
953 LOG(
"KNOHad",
pINFO) <<
"*** Performing a Phase Space Decay";
954 LOG(
"KNOHad",
pINFO) <<
"pT reweighting is " << (reweight ?
"on" :
"off");
956 assert ( offset >= 0);
957 assert ( pdgv.size() > 1);
961 vector<int>::const_iterator pdg_iter;
963 double * mass =
new double[pdgv.size()];
965 for(pdg_iter = pdgv.begin(); pdg_iter != pdgv.end(); ++pdg_iter) {
966 int pdgc = *pdg_iter;
973 <<
"Decaying N = " << pdgv.size() <<
" particles / total mass = " << sum;
981 <<
" *** Phase space decay is not permitted \n"
982 <<
" Total particle mass = " << sum <<
"\n"
993 for(
int idec=0; idec<200; idec++) {
996 wmax = TMath::Max(wmax,w);
1001 <<
"Max phase space gen. weight @ current hadronic system: " << wmax;
1012 fWeight *= TMath::Max(w/wmax, 1.);
1018 bool accept_decay=
false;
1019 unsigned int itry=0;
1021 while(!accept_decay)
1028 <<
"Couldn't generate an unweighted phase space decay after "
1029 << itry <<
" attempts";
1038 <<
"Decay weight = " << w <<
" > max decay weight = " << wmax;
1040 double gw = wmax * rnd->
RndHadro().Rndm();
1041 accept_decay = (gw<=w);
1044 <<
"Decay weight = " << w <<
" / R = " << gw
1045 <<
" - accepted: " << accept_decay;
1047 bool return_after_not_accepted_decay =
false;
1048 if(return_after_not_accepted_decay && !accept_decay) {
1050 <<
"Was instructed to return after a not-accepted decay";
1060 for(pdg_iter = pdgv.begin(); pdg_iter != pdgv.end(); ++pdg_iter) {
1063 int pdgc = *pdg_iter;
1102 for(
unsigned int i = 0; i < pdgcv.size(); i++) {
1108 double pt2 = TMath::Power(p4->Px(),2) + TMath::Power(p4->Py(),2);
1109 double wi = TMath::Exp(-
fPhSpRwA*TMath::Sqrt(pt2));
1118 int multiplicity,
int maxQ,
double W)
const
1130 int hadrons_to_add = multiplicity;
1139 bool baryon_is_strange = (baryon_code ==
kPdgSigmaP ||
1142 bool baryon_chg_is_pos = (baryon_code ==
kPdgProton ||
1144 bool baryon_chg_is_neg = (baryon_code ==
kPdgSigmaM);
1147 if(baryon_chg_is_pos) maxQ -= 1;
1148 if(baryon_chg_is_neg) maxQ += 1;
1150 W -=
pdg->Find( (*pdgc)[0] )->Mass();
1157 if(baryon_is_strange) {
1159 <<
" Remnant baryon is strange. Conserving strangeness...";
1162 if(multiplicity == 2) {
1164 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K+";
1172 else if(maxQ == 0) {
1173 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K0";
1183 else if(multiplicity == 3 && maxQ == 2) {
1184 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K+";
1192 else if(multiplicity == 3 && maxQ == -1) {
1193 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K0";
1205 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K+";
1214 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K0";
1229 LOG(
"KNOHad",
pDEBUG) <<
"Need more negative charge -> Adding a pi-";
1238 }
else if (maxQ > 0) {
1240 LOG(
"KNOHad",
pDEBUG) <<
"Need more positive charge -> Adding a pi+";
1255 <<
"Hadronic charge balanced. Now adding only neutrals or +- pairs";
1261 double M2pi0 = 2 *
pdg -> Find (
kPdgPi0) -> Mass();
1262 double M2pic =
pdg -> Find (
kPdgPiP) -> Mass() +
1264 double M2Kc =
pdg -> Find (
kPdgKP ) -> Mass() +
1266 double M2K0 = 2 *
pdg -> Find (
kPdgK0 ) -> Mass();
1267 double M2Eta = 2 *
pdg -> Find (
kPdgEta) -> Mass();
1268 double Mpi0eta =
pdg -> Find (
kPdgPi0) -> Mass() +
1275 if( hadrons_to_add > 0 && hadrons_to_add % 2 == 1 ) {
1278 <<
"Odd number of hadrons left to add -> Adding a pi0";
1287 assert( hadrons_to_add % 2 == 0 );
1289 <<
" hadrons_to_add = "<<hadrons_to_add<<
" W= "<<W<<
" M2pi0 = "<<M2pi0<<
" M2pic = "<<M2pic<<
" M2Kc = "<<M2Kc<<
" M2K0= "<<M2K0<<
" M2Eta= "<<M2Eta;
1291 while(hadrons_to_add > 0 && W >= M2pi0) {
1294 LOG(
"KNOHad",
pDEBUG) <<
"rndm = " << x;
1296 if (x >= 0 && x <
fPpi0) {
1297 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a pi0pi0 pair";
1300 hadrons_to_add -= 2;
1307 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a pi+pi- pair";
1310 hadrons_to_add -= 2;
1314 <<
"Not enough mass for a pi+pi-: trying something else";
1321 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K+K- pair";
1324 hadrons_to_add -= 2;
1328 <<
"Not enough mass for a K+K-: trying something else";
1335 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a K0 K0bar pair";
1338 hadrons_to_add -= 2;
1342 <<
"Not enough mass for a K0 K0bar: trying something else";
1348 if( W >= Mpi0eta ) {
1349 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a Pi0-Eta pair";
1352 hadrons_to_add -= 2;
1356 <<
"Not enough mass for a Pi0-Eta pair: trying something else";
1363 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a eta-eta pair";
1366 hadrons_to_add -= 2;
1370 <<
"Not enough mass for a Eta-Eta pair: trying something else";
1375 <<
"Hadron Assignment Probabilities do not add up to 1!!";
1383 if(W < M2pi0) hadrons_to_add = 0;
1392 int multiplicity,
int maxQ,
double W)
const
1408 Pstr = TMath::Min(1.,Pstr);
1409 Pstr = TMath::Max(0.,Pstr);
1421 if(multiplicity == 2) {
1430 if(multiplicity == 2) {
1439 if(multiplicity != 2) {
1447 if(pdgc ==
kPdgProton && y < Pstr && maxQ > 0) {
1450 else if(pdgc ==
kPdgProton && y < Pstr && maxQ <= 0) {
1453 else if(pdgc ==
kPdgNeutron && y < Pstr && maxQ > 0) {
1456 else if(pdgc ==
kPdgNeutron && y < Pstr && maxQ <= 0) {
1461 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a proton";
1463 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a neutron";
1465 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a sigma+";
1467 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a lambda";
1469 LOG(
"KNOHad",
pDEBUG) <<
" -> Adding a sigma-";
1547 LOG(
"KNOHad",
pWARN) <<
"Can't hadronize charm events";
1551 if(W < this->
Wmin()) {
1552 LOG(
"KNOHad",
pWARN) <<
"Low invariant mass, W = " << W <<
" GeV!!";
1560 double W = interaction->
Kine().
W();
1569 int nbins = TMath::Nint(maxmult-minmult+1);
1571 TH1D * mult_prob =
new TH1D(
"mult_prob",
1572 "hadronic multiplicity distribution", nbins, minmult-0.5, maxmult+0.5);
1573 mult_prob->SetDirectory(0);
1579 bool norm, TH1D * mp )
const
1586 int probe_pdg = init_state.
ProbePdg();
1592 bool is_EM = proc_info.
IsEM();
1600 double R2=1., R3=1.;
1604 if(is_CC || is_NC || is_dm) {
1610 if((is_nu && is_p) || (is_dmi && is_p)) {
1614 if((is_nu && is_n) || (is_dmi && is_n)) {
1618 if(is_nubar && is_p) {
1622 if(is_nubar && is_n) {
1627 <<
"Invalid initial state: " << init_state;
1646 if(is_lbar && is_p) {
1650 if(is_lbar && is_n) {
1655 <<
"Invalid initial state: " << init_state;
1663 int nbins = mp->GetNbinsX();
1664 for(
int i = 1; i <= nbins; i++) {
1665 int n = TMath::Nint( mp->GetBinCenter(i) );
1669 else if (n==3) R=R3;
1672 double P = mp->GetBinContent(i);
1675 <<
"n=" << n <<
"/ Scaling factor R = "
1676 << R <<
"/ P " << P <<
" --> " << Psc;
1677 mp->SetBinContent(i, Psc);
1684 double histo_norm = mp->Integral(
"width");
1685 if(histo_norm>0) mp->Scale(1.0/histo_norm);
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
double fCvp
Levy function parameter for vp.
double fRvbpNCm2
Rijk: vbp, NC, multiplicity = 2.
double fRvpNCm2
Rijk: vp, NC, multiplicity = 2.
TH1D * CreateMultProbHist(double maxmult) const
bool fReWeightDecays
Reweight phase space decays?
int GenerateBaryonPdgCode(int mult, int maxQ, double W) const
double fRvbnNCm2
Rijk: vbn, NC, multiplicity = 2.
int HadronShowerCharge(const Interaction *) const
double fCvbn
Levy function parameter for vbn.
double fPpic
{pi+ pi- } production probability
TH1D * MultiplicityProb(const Interaction *, Option_t *opt="") const
bool AssertValidity(const Interaction *i) const
PDGCodeList * SelectParticles(const Interaction *) const
double fRvbnEMm2
Rijk: vbn, EM, multiplicity = 2.
double fBvbn
slope in average charged hadron multiplicity = f(W) relation for vbn
double fRvpCCm2
Rijk: vp, CC, multiplicity = 2.
bool fUseBaryonXfPt2Param
Generate baryon xF,pT2 from experimental parameterization?
double fAvn
offset in average charged hadron multiplicity = f(W) relation for vn
double fRvpCCm3
Rijk: vp, CC, multiplicity = 3.
double fRvnCCm2
Rijk: vn, CC, multiplicity = 2.
double fPKc
{K+ K- } production probability
double MaxMult(const Interaction *i) const
double fRvpNCm3
Rijk: vp, NC, multiplicity = 3.
double fRvnNCm3
Rijk: vn, NC, multiplicity = 3.
double fPK0
{K0 K0bar} production probability
double fWcut
Rijk applied for W<Wcut (see DIS/RES join scheme)
double fPhSpRwA
parameter for phase space decay reweighting
TGenPhaseSpace fPhaseSpaceGenerator
a phase space generator
double ReWeightPt2(const PDGCodeList &pdgcv) const
double fAvbp
offset in average charged hadron multiplicity = f(W) relation for vbp
double fBvp
slope in average charged hadron multiplicity = f(W) relation for vp
double fRvbnNCm3
Rijk: vbn, NC, multiplicity = 3.
TClonesArray * DecayMethod1(double W, const PDGCodeList &pdgv, bool reweight_decays) const
void Initialize(void) const
double fRvnEMm2
Rijk: vn, EM, multiplicity = 2.
double fBvn
slope in average charged hadron multiplicity = f(W) relation for vn
double fRvbpCCm2
Rijk: vbp, CC, multiplicity = 2.
double fRvbpEMm2
Rijk: vbp, EM, multiplicity = 2.
double fCvbp
Levy function parameter for vbp.
double fCvn
Levy function parameter for vn.
double fBhyperon
see above
TClonesArray * DecayBackToBack(double W, const PDGCodeList &pdgv) const
double fPeta
{eta eta} production probability
void HandleDecays(TClonesArray *particle_list) const
bool PhaseSpaceDecay(TClonesArray &pl, TLorentzVector &pd, const PDGCodeList &pdgv, int offset=0, bool reweight=false) const
double Weight(void) const
double fAvp
offset in average charged hadron multiplicity = f(W) relation for vp
TF1 * fBaryonXFpdf
baryon xF PDF
bool fForceMinMult
force minimum multiplicity if (at low W) generated less?
void ProcessEventRecord(GHepRecord *event) const
double fRvbnCCm2
Rijk: vbn, CC, multiplicity = 2.
double fAvbn
offset in average charged hadron multiplicity = f(W) relation for vbn
void ApplyRijk(const Interaction *i, bool norm, TH1D *mp) const
double fRvbnCCm3
Rijk: vbn, CC, multiplicity = 3.
double fRvbpNCm3
Rijk: vbp, NC, multiplicity = 3.
double fPpi0
{pi0 pi0 } production probability
double fRvnNCm2
Rijk: vn, NC, multiplicity = 2.
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
double fAhyperon
parameter controlling strange baryon production probability via associated production (P=a+b*lnW^2)
double fRvnEMm3
Rijk: vn, EM, multiplicity = 3.
TClonesArray * DecayMethod2(double W, const PDGCodeList &pdgv, bool reweight_decays) const
double fRvpEMm2
Rijk: vp, EM, multiplicity = 2.
double fRvnCCm3
Rijk: vn, CC, multiplicity = 3.
bool fForceNeuGenLimit
force upper hadronic multiplicity to NeuGEN limit
double KNO(int nu, int nuc, double z) const
double fRvpEMm3
Rijk: vp, EM, multiplicity = 3.
bool fGenerateWeighted
generate weighted events?
virtual void Configure(const Registry &config)
double fWeight
weight for generated event
double fRvbnEMm3
Rijk: vbn, EM, multiplicity = 3.
double fPpi0eta
{Pi0 eta} production probability
double AverageChMult(int nu, int nuc, double W) const
double fRvbpEMm3
Rijk: vbp, EM, multiplicity = 3.
bool fUseIsotropic2BDecays
force isotropic, non-reweighted 2-body decays for consistency with neugen/daikon
double fRvbpCCm3
Rijk: vbp, CC, multiplicity = 3.
double fBvbp
slope in average charged hadron multiplicity = f(W) relation for vbp
PDGCodeList * GenerateHadronCodes(int mult, int maxQ, double W) const
TClonesArray * Hadronize(const Interaction *) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
STDHEP-like event record entry that can fit a particle or a nucleus.
const TLorentzVector * X4(void) const
double Px(void) const
Get Px.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
GENIE's GHEP MC event record.
virtual double Weight(void) const
Initial State information.
const Target & Tgt(void) const
TParticlePDG * Probe(void) const
Summary information for an interaction.
const XclsTag & ExclTag(void) const
const Kinematics & Kine(void) const
const ProcessInfo & ProcInfo(void) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
double W(bool selected=false) const
void push_back(int pdg_code)
Singleton class to load & serve a TDatabasePDG.
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsWeakNC(void) const
bool IsWeakCC(void) const
bool IsDarkMatter(void) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
static RandomGen * Instance()
Access instance.
A registry. Provides the container for algorithm configuration parameters.
int HitNucPdg(void) const
bool IsNucleus(void) const
bool IsCharmEvent(void) const
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
void SwitchOnFastForward(void)
void SetReason(string reason)
static const double kNucleonMass
static const double kPionMass
static const double kNeutronMass
Misc GENIE control constants.
static const unsigned int kMaxKNOHadSystIterations
static const unsigned int kMaxUnweightDecayIterations
Utilities for improving the code readability when using PDG codes.
bool IsNegChargedLepton(int pdgc)
bool IsNeutrino(int pdgc)
bool IsPosChargedLepton(int pdgc)
bool IsChargedLepton(int pdgc)
bool IsNeutralLepton(int pdgc)
bool IsDarkMatter(int pdgc)
bool IsNeutronOrProton(int pdgc)
bool IsAntiNeutrino(int pdgc)
Simple functions for loading and reading nucleus dependent keys from config files.
double W(const Interaction *const i)
Simple printing utilities.
string P4AsString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE
@ kIStDISPreFragmHadronicState
enum genie::EGHepStatus GHepStatus_t