34#include "Framework/Conventions/GBuild.h"
61using std::ostringstream;
94 <<
"************ Running hA2025 MODE INTRANUKE ************";
96 nuclA = nuclearTarget -> A();
100 LOG(
"HAIntranuke2025",
pINFO) <<
"Done with this event";
110 LOG(
"HAIntranuke2025",
pERROR) <<
"** Null input!";
118 bool is_kaon = (pdgc==
kPdgKP);
120 bool is_handled = (is_baryon || is_pion || is_kaon || is_gamma);
122 LOG(
"HAIntranuke2025",
pERROR) <<
"** Can not handle particle: " << p->
Name();
133 LOG(
"HAIntranuke2025",
pERROR) <<
"** Couldn't select a fate";
154 <<
"Generating kinematics for " << p->
Name()
177 LOG(
"HAIntranuke2025",
pWARN) <<
"Running PreEquilibrium for kIHAFtCmp";
178 LOG(
"HAIntranuke2025",
pFATAL) <<
"The PreEquilibrium and Compound Nucleus code are experimental, should not be used";
188 <<
"Failed attempt to generate kinematics for "
194 <<
"Failed attempt to generate kinematics for "
197 <<
" attempts. Trying a new fate...";
217 <<
"Selecting hA fate for " << p->
Name() <<
" with KE = " << ke <<
" MeV";
220 unsigned int iter = 0;
248 bool apply_pi0_ratio_correction =
true;
250 if (apply_pi0_ratio_correction && pdgc ==
kPdgPi0) {
255 double ke_ratio = (ke > 1000.0) ? 1000.0 : ke;
258 double ratio_cex = 0.0008702 * ke_ratio + 1.9047;
259 double ratio_abs = 0.0003291 * ke_ratio + 0.82617;
260 double ratio_inel = -0.0003209 * ke_ratio + 0.837764;
261 double ratio_piprod = 0.0004402 * ke_ratio + 0.47418;
265 frac_cex *= ratio_cex;
266 frac_abs *= ratio_abs;
267 frac_inel *= ratio_inel;
271 frac_piprod *= ratio_piprod;
279 double frac_rescale = 1./(frac_cex + frac_inel + frac_abs + frac_piprod);
281 frac_cex *= frac_rescale;
282 frac_inel *= frac_rescale;
283 frac_abs *= frac_rescale;
284 frac_piprod *= frac_rescale;
288 double tf = frac_cex +
294 double r = tf * rnd->
RndFsi().Rndm();
295#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
296 LOG(
"HAIntranuke2025",
pDEBUG) <<
"r = " << r <<
" (max = " << tf <<
")";
299 if(r < (cf += frac_cex ))
return kIHAFtCEx;
302 if(r < (cf += frac_abs ))
return kIHAFtAbs;
306 <<
"No selection after going through all fates! "
307 <<
"Total fraction = " << tf <<
" (r = " << r <<
")";
333 double frac_rescale = 1./(frac_cex + frac_inel + frac_abs + frac_pipro);
335 frac_cex *= frac_rescale;
336 frac_inel *= frac_rescale;
337 frac_abs *= frac_rescale;
338 frac_pipro *= frac_rescale;
341 double tf = frac_cex +
348 double r = tf * rnd->
RndFsi().Rndm();
349#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
350 LOG(
"HAIntranuke2025",
pDEBUG) <<
"r = " << r <<
" (max = " << tf <<
")";
353 if(r < (cf += frac_cex ))
return kIHAFtCEx;
356 if(r < (cf += frac_abs ))
return kIHAFtAbs;
358 if(r < (cf += frac_cmp ))
return kIHAFtCmp;
361 <<
"No selection after going through all fates! "
362 <<
"Total fraction = " << tf <<
" (r = " << r <<
")";
373 double tf = frac_inel +
375 double r = tf * rnd->
RndFsi().Rndm();
376#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
377 LOG(
"HAIntranuke2025",
pDEBUG) <<
"r = " << r <<
" (max = " << tf <<
")";
381 if(r < (cf += frac_abs ))
return kIHAFtAbs;
397 const int nprob = 25;
398 double dintor = 0.0174533;
399 double denom = 47979.453;
400 double rprob[nprob] = {
401 5000., 4200., 3000., 2600., 2100., 1800., 1200., 750., 500., 230., 120.,
402 35., 9., 3., 11., 18., 29., 27., 20., 14., 10., 6., 2., 0.14, 0.19 };
404 double angles[nprob];
405 for(
int i=0; i<nprob; i++) angles[i] = 2.5*i;
408 double r = rnd->
RndFsi().Rndm();
415 for(
int i=0; i<60; i++) {
417 for(
int j=0; j < nprob-1; j++) {
421 if(binl<=theta && binh>=theta)
break;
425 double tfract = (theta-binl)/2.5;
426 double delp = rprob[itj+1] - rprob[itj];
427 xsum += (rprob[itj] + tfract*delp)/denom;
435 <<
"Generated pi+A elastic scattering angle = " << theta <<
" radians";
450 const int nprob = 20;
451 double dintor = 0.0174533;
452 double denom = 11967.0;
453 double rprob[nprob] = {
454 2400., 2350., 2200., 2000., 1728., 1261., 713., 312., 106., 35.,
455 6., 5., 10., 12., 11., 9., 6., 1., 1., 1. };
457 double angles[nprob];
458 for(
int i=0; i<nprob; i++) angles[i] = 1.0*i;
461 double r = rnd->
RndFsi().Rndm();
468 for(
int i=0; i< nprob; i++) {
470 for(
int j=0; j < nprob-1; j++) {
474 if(binl<=theta && binh>=theta)
break;
478 double tfract = (theta-binl)/2.5;
479 double delp = rprob[itj+1] - rprob[itj];
480 xsum += (rprob[itj] + tfract*delp)/denom;
488 <<
"Generated N+A elastic scattering angle = " << theta <<
" radians";
500 <<
"ElasHA() is invoked for a : " << p->
Name()
520 int pcode = p->
Pdg();
521 double Mp = p->
Mass();
529 TLorentzVector t4PpL = *p->
P4();
530 TLorentzVector t4PtL =
fRemnP4;
535 else C3CM = TMath::Cos(this->
PiBounce());
538 TLorentzVector t4P3L, t4P4L;
542 LOG(
"HAIntranuke2025",
pNOTICE) <<
"ElasHA() failed";
544 exception.
SetReason(
"TwoBodyKinematics failed in ElasHA");
555 <<
"C3cm = " << C3CM;
557 <<
"|p3| = " << t4P3L.Vect().Mag() <<
", E3 = " << t4P3L.E() <<
",Mp = " << Mp;
559 <<
"|p4| = " <<
fRemnP4.Vect().Mag() <<
", E4 = " <<
fRemnP4.E() <<
",Mt = " << Mt;
571#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
573 <<
"InelasticHA() is invoked for a : " << p->
Name()
590 int pcode = p->
Pdg();
591 int tcode, scode, s2code;
617 {
LOG(
"HAIntranuke2025",
pWARN) <<
"InelasticHA() cannot handle fate: "
619 <<
" for particle " << p->
Name();
634 LOG(
"HAIntranuke2025",
pNOTICE) <<
"InelasticHA() stops : not enough nucleons";
643 LOG(
"HAIntranuke2025",
pWARN) <<
"InelasticHA() failed : too few protons in nucleus";
654 double tM = t.
Mass();
662 double tE = TMath::Sqrt(tP3.Mag2()+ tM*tM);
672 double pM = p->
Mass();
673 double E_p = ((*p->
P4() + *t.
P4()).Mag2() - tM*tM - pM*pM)/(2.0*tM);
674 double P_p = TMath::Sqrt(E_p*E_p - pM*pM);
681 LOG(
"HAIntranuke2025",
pWARN) <<
"unphysical angle chosen in InelasicHA - put particle outside nucleus";
686 double KE1L = p->
KinE();
687 double KE2L = t.
KinE();
689 <<
" KE1L = " << KE1L <<
" " << KE1L <<
" KE2L = " << KE2L;
696 double P3L = TMath::Sqrt(cl1.
Px()*cl1.
Px() + cl1.
Py()*cl1.
Py() + cl1.
Pz()*cl1.
Pz());
697 double P4L = TMath::Sqrt(cl2.
Px()*cl2.
Px() + cl2.
Py()*cl2.
Py() + cl2.
Pz()*cl2.
Pz());
698 double E3L = cl1.
KinE();
699 double E4L = cl2.
KinE();
700 LOG (
"HAIntranuke2025",
pINFO) <<
"Successful quasielastic scattering or charge exchange";
702 <<
"C3CM = " << C3CM <<
"\n P3L, E3L = "
703 << P3L <<
" " << E3L <<
" P4L, E4L = "<< P4L <<
" " << E4L ;
705 <<
"P4L = " << P4L <<
" ;E4L= " << E4L <<
"\n probe KE = " << ev->
Probe()->
KinE() <<
"\n";
707 TParticlePDG * remn = 0;
714 <<
"NO Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
715 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
719 MassRem = remn->Mass();
721 <<
"Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
722 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
726 double MRemn = TMath::Sqrt(ERemn*ERemn - PRemn*PRemn);
727 LOG(
"HAIntranuke2025",
pINFO) <<
"PRemn = " << PRemn <<
" ;ERemn= " << ERemn;
728 LOG(
"HAIntranuke2025",
pINFO) <<
"MRemn= " << MRemn <<
" ;true Mass= " << MassRem <<
" ; excitation energy= " << (MRemn-MassRem)*1000. <<
" MeV";
735 exception.
SetReason(
"TwoBodyCollison gives KE> probe KE in hA simulation");
745 exception.
SetReason(
"TwoBodyCollison failed in hA simulation");
779#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
781 <<
"Inelastic() is invoked for a : " << p->
Name()
785 bool allow_dup =
true;
796 ev,p,&s1,&s2,&s3,
fRemnA,
fRemnZ,
fRemnP4,
fDoFermi,
fFermiFac,
fFermiMomentum,
fNuclmodel);
799 LOG (
"HAIntranuke2025",
pINFO) <<
" successful pion production fate";
814 LOG(
"HAIntranuke2025",
pNOTICE) <<
"Error: could not create pion production final state";
816 exception.
SetReason(
"PionProduction kinematics failed - retry kinematics");
834 LOG(
"HAIntranuke2025",
pNOTICE) <<
"stop propagation - could not create absorption final state: too few particles";
841 LOG(
"HAIntranuke2025",
pNOTICE) <<
"stop propagation - could not create absorption final state: Pi- or K- cannot be absorbed by only neutrons";
848 LOG(
"HAIntranuke2025",
pINFO) <<
"stop propagation - could not create absorption final state: Pi+ or K+ cannot be absorbed by only protons";
863 int t1code,t2code,scode,s2code;
869 double Prob_pipd_pp=2.*ppcnt*(1.-ppcnt);
870 double Prob_pipnn_pn=.083*(1.-ppcnt)*(1.-ppcnt);
871 if (rnd->
RndFsi().Rndm()*(Prob_pipd_pp+Prob_pipnn_pn)<Prob_pipd_pp){
879 double Prob_pimd_nn=2.*ppcnt*(1.-ppcnt);
880 double Prob_pimpp_pn=.083*ppcnt*ppcnt;
881 if (rnd->
RndFsi().Rndm()*(Prob_pimd_nn+Prob_pimpp_pn)<Prob_pimd_nn){
889 double Prob_pi0d_pn=0.88*ppcnt*(1.-ppcnt);
890 double Prob_pi0pp_pp=.14*ppcnt*ppcnt;
891 double Prob_pi0nn_nn=.14*(1.-ppcnt)*(1.-ppcnt);
892 double random_number = rnd->
RndFsi().Rndm();
893 if (random_number*(Prob_pi0d_pn+Prob_pi0pp_pp+Prob_pi0nn_nn)<Prob_pi0d_pn){
896 else if (random_number*(Prob_pi0d_pn+Prob_pi0pp_pp+Prob_pi0nn_nn)<(Prob_pi0d_pn+Prob_pi0pp_pp)){
903 LOG(
"HAIntranuke2025",
pINFO) <<
"choose 2 body absorption, probe, fs = " << pdgc <<
" "<< scode <<
" "<<s2code;
906 double M2_1 = pLib->
Find(t1code)->Mass();
907 double M2_2 = pLib->
Find(t2code)->Mass();
909 double M3 = pLib->
Find(scode) ->Mass();
910 double M4 = pLib->
Find(s2code)->Mass();
914 TVector3 tP2_1L, tP2_2L;
923 E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
928 E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
934 tP2_1L.SetXYZ(0.0, 0.0, 0.0);
937 tP2_2L.SetXYZ(0.0, 0.0, 0.0);
940 TLorentzVector dNucl_P4=TLorentzVector(tP2_1L+tP2_2L,E2_1L+E2_2L);
942 double E2L = E2_1L + E2_2L;
949 LOG(
"HAIntranuke2025",
pWARN) <<
"Inelastic() failed: IntBounce returned bad angle - try again";
951 exception.
SetReason(
"unphysical angle for hN scattering");
956 TLorentzVector t4P1L,t4P2L,t4P3L,t4P4L;
958 t4P2L=TLorentzVector(TVector3(tP2_1L+tP2_2L),E2L);
973 TParticlePDG * remn = 0;
980 <<
"NO Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
981 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
985 MassRem = remn->Mass();
987 <<
"Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
988 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
992 double MRemn = TMath::Sqrt(ERemn*ERemn - PRemn*PRemn);
993 LOG(
"HAIntranuke2025",
pINFO) <<
"PRemn = " << PRemn <<
" ;ERemn= " << ERemn;
994 LOG(
"HAIntranuke2025",
pINFO) <<
"expt MRemn= " << MRemn <<
" ;true Mass= " << MassRem <<
" ; excitation energy (>0 good)= " << (MRemn-MassRem)*1000. <<
" MeV";
1006 t1->SetPdgCode(scode);
1007 t1->SetMomentum(t4P3L);
1024 LOG(
"HAIntranuke2025",
pNOTICE) <<
"Inelastic in hA failed calling TwoBodyKineamtics";
1026 exception.
SetReason(
"Pion absorption kinematics through TwoBodyKinematics failed");
1052 nd0 = -135.227 * TMath::Exp(-7.124*
fRemnZ /
double(
fRemnA)) + 4.914;
1054 Sig_nd = 2.034 +
fRemnA * 0.007846;
1056 double c1 = 0.041 + ke * 0.0001525;
1057 double c2 = -0.003444 - ke * 0.00002324;
1060 double c3 = 0.064 - ke * 0.000015;
1061 gam_ns = c1 * TMath::Exp(c2*
fRemnA) + c3;
1062 if(gam_ns<0.002) gam_ns = 0.002;
1064 LOG(
"HAIntranuke2025",
pINFO) <<
"nucleon absorption";
1065 LOG(
"HAIntranuke2025",
pINFO) <<
"--> mean diff distr = " << nd0 <<
", stand dev = " << Sig_nd;
1067 LOG(
"HAIntranuke2025",
pINFO) <<
"--> gam_ns = " << gam_ns;
1071 ns0 = .0001*(1.+ke/250.) * (
fRemnA-10)*(
fRemnA-10) + 3.5;
1072 nd0 = (1.+ke/250.) - ((
fRemnA/200.)*(1. + 2.*ke/250.));
1073 Sig_ns = (10. + 4. * ke/250.)*TMath::Power(
fRemnA/250.,0.9);
1074 Sig_nd = 4*(1 - TMath::Exp(-0.03*ke));
1075 LOG(
"HAIntranuke2025",
pINFO) <<
"pion absorption";
1076 LOG(
"HAIntranuke2025",
pINFO) <<
"--> mean diff distr = " << nd0 <<
", stand dev = " << Sig_nd;
1077 LOG(
"HAIntranuke2025",
pINFO) <<
"--> mean sum distr = " << ns0 <<
", Stand dev = " << Sig_ns;
1081 ns0 = (rnd->
RndFsi().Rndm()>0.5?3:2);
1085 LOG(
"HAIntranuke2025",
pINFO) <<
"kaon absorption - set ns, nd later";
1091 LOG(
"HAIntranuke2025",
pWARN) <<
"Inelastic() cannot handle absorption reaction for " << p->
Name();
1101 double u1 = 0, u2 = 0;
1107 LOG(
"HAIntranuke2025",
pNOTICE) <<
"Error: could not choose absorption final state";
1108 LOG(
"HAIntranuke2025",
pNOTICE) <<
"--> mean diff distr = " << nd0 <<
", stand dev = " << Sig_nd;
1109 LOG(
"HAIntranuke2025",
pNOTICE) <<
"--> mean sum distr = " << ns0 <<
", Stand dev = " << Sig_ns;
1110 LOG(
"HAIntranuke2025",
pNOTICE) <<
"--> gam_ns = " << gam_ns;
1113 exception.
SetReason(
"Absorption choice of # of p,n failed");
1122 u1 = rnd->
RndFsi().Rndm();
1123 u2 = rnd->
RndFsi().Rndm();
1124 if (u1==0) u1 = rnd->
RndFsi().Rndm();
1125 if (u2==0) u2 = rnd->
RndFsi().Rndm();
1128 double x2 = TMath::Sqrt(-2*TMath::Log(u1))*TMath::Sin(2*
kPi*u2);
1135 ns = -TMath::Log(rnd->
RndFsi().Rndm())/gam_ns;
1140 ns = (rnd->
RndFsi().Rndm()<0.5?2:3);
1151 double max = ns0 + Sig_ns * 10;
1154 bool not_found =
true;
1162 LOG(
"HAIntranuke2025",
pNOTICE) <<
"Error: stuck in random variable loop for ns";
1163 LOG(
"HAIntranuke2025",
pNOTICE) <<
"--> mean of sum parent distr = " << ns0 <<
", Stand dev = " << Sig_ns;
1167 exception.
SetReason(
"Random number generator for choice of #p,n final state failed - unusual - redo kinematics");
1172 u1 = rnd->
RndFsi().Rndm();
1173 u2 = rnd->
RndFsi().Rndm();
1174 if (u1==0) u1 = rnd->
RndFsi().Rndm();
1175 if (u2==0) u2 = rnd->
RndFsi().Rndm();
1176 x1 = TMath::Sqrt(-2*TMath::Log(u1))*TMath::Cos(2*
kPi*u2);
1178 ns = ns0 + Sig_ns * x1;
1179 if ( ns>max || ns<0 ) {iter2++;
continue;}
1180 else if ( rnd->
RndFsi().Rndm() > (ns/max) ) {iter2++;
continue;}
1188 double nd = nd0 + Sig_nd * x2;
1193 np = int((ns+nd)/2.+.5);
1194 nn = int((ns-nd)/2.+.5);
1196 LOG(
"HAIntranuke2025",
pINFO) <<
"ns = "<<ns<<
", nd = "<<nd<<
", np = "<<np<<
", nn = "<<nn;
1202 if (np < 0 || nn < 0 ) {iter++;
continue;}
1203 else if (np + nn < 2. ) {iter++;
continue;}
1206 - ((pdgc==
kPdgPiM || pdgc==
kPdgKM)?1:0)) {iter++;
continue;}
1211 LOG(
"HAIntranuke2025",
pINFO) <<
"success, iter = " << iter <<
" np, nn = " << np <<
" " << nn;
1214 double frac = 85./double(np+nn);
1222 if (rnd->
RndFsi().Rndm()<np/(
double)(np+nn)) np--;
1226 LOG(
"HAIntranuke2025",
pNOTICE) <<
"Final state chosen; # protons : "
1227 << np <<
", # neutrons : " << nn;
1255 PDGCodeList* listar[5] = {&list0, &list1, &list2, &list3, &list4};
1260 double probM = pLib->
Find(pdgc) ->Mass();
1262 TVector3 pP3 = p->
P4()->Vect() * (1./5.);
1263 double probKE = p->
P4()->E() -probM;
1264 double clusKE = probKE * (1./5.);
1265 TLorentzVector clusP4(pP3,clusKE);
1266 LOG(
"HAIntranuke2025",
pINFO) <<
"probM = " << probM <<
" ;clusKE= " << clusKE;
1267 TLorentzVector X4(*p->
X4());
1282 for (
int i=0;i<(np+nn);i++)
1292 for (
int i=0;i<5;i++)
1294 LOG(
"HAIntranuke2025",
pINFO) <<
"List" << i <<
" size: " << listar[i]->size();
1295 if (listar[i]->size() <2)
1298 exception.
SetReason(
"too few particles for Phase Space decay - try again");
1338 if(success1 && success2 && success3 && success4 && success5)
1340 LOG(
"HAIntranuke2025",
pINFO)<<
"Successful many-body absorption - n>=18";
1342 TParticlePDG * remn = 0;
1343 double MassRem = 0.;
1349 <<
"NO Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
1350 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
1354 MassRem = remn->Mass();
1356 <<
"Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
1357 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
1361 double MRemn = TMath::Sqrt(ERemn*ERemn - PRemn*PRemn);
1362 LOG(
"HAIntranuke2025",
pINFO) <<
"PRemn = " << PRemn <<
" ;ERemn= " << ERemn;
1363 LOG(
"HAIntranuke2025",
pINFO) <<
"MRemn= " << MRemn <<
" ;true Mass= " << MassRem <<
" ; excitation energy (>0 good)= " << (MRemn-MassRem)*1000. <<
" MeV";
1369 LOG(
"HAIntranuke2025",
pWARN) <<
"PhaseSpace decay fails for HadrCluster- recovery likely incorrect - rethrow event";
1408 double probM = pLib->
Find(pdgc) ->Mass();
1409 double probBE = (np+nn)*.005;
1410 TVector3 pP3 = p->
P4()->Vect();
1411 double probKE = p->
P4()->E() - (probM - probBE);
1412 double clusKE = probKE;
1413 TLorentzVector clusP4(pP3,clusKE);
1414 LOG(
"HAIntranuke2025",
pINFO) <<
"probM = " << probM <<
" ;clusKE= " << clusKE;
1415 TLorentzVector X4(*p->
X4());
1424 for (
int i=0;i<np;i++)
1430 for (
int i=0;i<nn;i++)
1466 <<
"Remnant nucleus (A,Z) = (" <<
fRemnA <<
", " <<
fRemnZ <<
")";
1467 LOG(
"HAIntranuke2025",
pINFO) <<
" list size: " << np+nn;
1471 exception.
SetReason(
"too few particles for Phase Space decay - try again");
1480 LOG (
"HAIntranuke2025",
pINFO) <<
"Successful many-body absorption, n<=18";
1482 TParticlePDG * remn = 0;
1483 double MassRem = 0.;
1489 <<
"NO Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
1490 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
1494 MassRem = remn->Mass();
1496 <<
"Particle with [A = " <<
fRemnA <<
", Z = " <<
fRemnZ
1497 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
1501 double MRemn = TMath::Sqrt(ERemn*ERemn - PRemn*PRemn);
1502 LOG(
"HAIntranuke2025",
pINFO) <<
"PRemn = " << PRemn <<
" ;ERemn= " << ERemn;
1503 LOG(
"HAIntranuke2025",
pINFO) <<
"expt MRemn= " << MRemn <<
" ;true Mass= " << MassRem <<
" ; excitation energy (>0 good)= " << (MRemn-MassRem)*1000. <<
" MeV";
1515 exception.
SetReason(
"Phase space generation of absorption final state failed");
1584 LOG(
"HAIntranuke2025",
pINFO) <<
"R0 = " <<
fR0 <<
" fermi";
1594 LOG(
"HAIntranuke2025",
pINFO) <<
"DoFermi? = " << ((
fDoFermi)?(
true):(
false));
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Algorithm * SubAlg(const RgKey ®istry_key) const
STDHEP-like event record entry that can fit a particle or a nucleus.
string Name(void) const
Name that corresponds to the PDG code.
int FirstMother(void) const
void SetMomentum(const TLorentzVector &p4)
void SetRescatterCode(int code)
void SetFirstMother(int m)
void SetLastMother(int m)
const TLorentzVector * P4(void) const
double Mass(void) const
Mass that corresponds to the PDG code.
int LastMother(void) const
const TLorentzVector * X4(void) const
void SetStatus(GHepStatus_t s)
double Px(void) const
Get Px.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
int RescatterCode(void) const
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
GENIE's GHEP MC event record.
virtual GHepParticle * Probe(void) const
virtual GHepParticle * TargetNucleus(void) const
virtual void AddParticle(const GHepParticle &p)
virtual GHepParticle * Particle(int position) const
unsigned int fNumIterations
int nuclA
value of A for the target nucleus in hA mode
void Inelastic(GHepRecord *ev, GHepParticle *p, INukeFateHA_t fate) const
void InelasticHA(GHepRecord *ev, GHepParticle *p, INukeFateHA_t fate) const
double PiBounce(void) const
INukeFateHA_t HadronFateHA(const GHepParticle *p) const
void SimulateHadronicFinalStateKinematics(GHepRecord *ev, GHepParticle *p) const
double PnBounce(void) const
void SimulateHadronicFinalState(GHepRecord *ev, GHepParticle *p) const
void ElasHA(GHepRecord *ev, GHepParticle *p, INukeFateHA_t fate) const
void ProcessEventRecord(GHepRecord *event_rec) const
int HandleCompoundNucleus(GHepRecord *ev, GHepParticle *p, int mom) const
static INukeHadroData2025 * Instance(void)
static string AsString(INukeFateHN_t fate)
static string AsString(INukeMode_t mode)
double fChPionMFPScale
tweaking factors for tuning
double fDelRPion
factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement
int fRemnA
remnant nucleus A
double fPionFracPiProdScale
double fPionFracInelScale
double fNucleonFracAbsScale
double fNucAbsFac
absorption xsec correction factor (hN Mode)
int fRemnZ
remnant nucleus Z
double fHadStep
step size for intranuclear hadron transport
double fFermiMomentum
whether or not particle collision is pauli blocked
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...
double fNucleonFracPiProdScale
double fChPionFracAbsScale
bool fUseOset
Oset model for low energy pion in hN.
bool fAltOset
NuWro's table-based implementation (not recommended)
double fNeutralPionMFPScale
TLorentzVector fRemnP4
P4 of remnant system.
double fFermiFac
testing parameter to modify fermi momentum
double fNucleonFracCExScale
double fNeutralPionFracAbsScale
double fNucRmvE
binding energy to subtract from cascade nucleons
bool fXsecNNCorr
use nuclear medium correction for NN cross section
bool fDoCompoundNucleus
whether or not to do compound nucleus considerations
INukeHadroData2025 * fHadroData2025
a collection of h+N,h+A data & calculations
double fDelRNucleon
factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement
const NuclearModelI * fNuclmodel
nuclear model used to generate fermi momentum
virtual void ProcessEventRecord(GHepRecord *event_rec) const
double fNucleonFracInelScale
double fNucCEXFac
charge exchange xsec correction factor (hN Mode)
bool fDoFermi
whether or not to do fermi mom.
double fR0
effective nuclear size param
double fEPreEq
threshold for pre-equilibrium reaction
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
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 singleton holding random number generator classes. All random number generation in GENIE should tak...
static RandomGen * Instance()
Access instance.
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
void SetHitNucPdg(int pdgc)
An exception thrown by SimulateHadronState for kinematics problems. TwoBodyCollision/Kinematics used ...
void SetReason(string reason)
Misc GENIE control constants.
static const unsigned int kRjMaxIterations
int IonPdgCode(int A, int Z)
bool IsNeutronOrProton(int pdgc)
static constexpr double MeV
Simple functions for loading and reading nucleus dependent keys from config files.
bool PhaseSpaceDecay(GHepRecord *ev, GHepParticle *p, const PDGCodeList &pdgv, TLorentzVector &RemnP4, double NucRmvE, EINukeMode mode=kIMdHA)
general phase space decay method
void PreEquilibrium(GHepRecord *ev, GHepParticle *p, int &RemnA, int &RemnZ, TLorentzVector &RemnP4, bool DoFermi, double FermiFac, const NuclearModelI *Nuclmodel, double NucRmvE, EINukeMode mode=kIMdHN)
bool TwoBodyKinematics(double M3, double M4, TLorentzVector tP1L, TLorentzVector tP2L, TLorentzVector &tP3L, TLorentzVector &tP4L, double C3CM, TLorentzVector &RemnP4, double bindE=0)
bool TwoBodyCollision(GHepRecord *ev, int pcode, int tcode, int scode, int s2code, double C3CM, GHepParticle *p, GHepParticle *t, int &RemnA, int &RemnZ, TLorentzVector &RemnP4, EINukeMode mode=kIMdHA)
Intranuke utility functions.
bool PionProduction(GHepRecord *ev, GHepParticle *p, GHepParticle *s1, GHepParticle *s2, GHepParticle *s3, int &RemnA, int &RemnZ, TLorentzVector &RemnP4, bool DoFermi, double FermiFac, double FermiMomentum, const NuclearModelI *Nuclmodel)
Root of GENIE utility namespaces.
THE MAIN GENIE PROJECT NAMESPACE
@ kIStNucleonClusterTarget
const int kPdgCompNuclCluster
enum genie::EINukeFateHN_t INukeFateHN_t
enum genie::EGHepStatus GHepStatus_t
enum genie::EINukeFateHA_t INukeFateHA_t