78#ifdef __GENIE_PYTHIA8_ENABLED__
83#ifdef __GENIE_PYTHIA8_ENABLED__
84 LOG(
"Pythia8Had",
pNOTICE) <<
"Running PYTHIA8 hadronizer";
90 double W = kinematics.
W();
95 <<
", W = " << W <<
" GeV";
99 LOG(
"Pythia8Had",
pDEBUG) <<
"Reseting PYTHIA8 event";
100 gPythia->event.reset();
107 <<
"Leading quark mass = " << mA
108 <<
" GeV, remnant diqurak mass = " << mB <<
", GeV";
111 double pzAcm = 0.5 * Pythia8::sqrtpos(
112 (W + mA + mB) * (W - mA - mB) * (W - mA + mB) * (W + mA - mB) ) / W;
113 double pzBcm = -pzAcm;
114 double eA = sqrt(mA*mA + pzAcm*pzAcm);
115 double eB = sqrt(mB*mB + pzBcm*pzBcm);
118 <<
"Quark: (pz = " << pzAcm <<
", E = " << eA <<
") GeV, "
119 <<
"Diquark: (pz = " << pzBcm <<
", E = " << eB <<
") GeV";
123 LOG(
"Pythia8Had",
pDEBUG) <<
"Appending quark/diquark into the PYTHIA8 event";
124 gPythia->event.append(
fLeadingQuark, 23, 101, 0, 0., 0., pzAcm, eA, mA);
125 gPythia->event.append(
fRemnantDiquark, 23, 0, 101, 0., 0., pzBcm, eB, mB);
126 gPythia->event.list();
128 LOG(
"Pythia8Had",
pDEBUG) <<
"Generating next PYTHIA8 event";
136 LOG(
"Pythia8Had",
pDEBUG) <<
"Copying PYTHIA8 event record into GENIE's";
137 Pythia8::Event &fEvent = gPythia->event;
138 int np = fEvent.size();
141 TClonesArray * particle_list =
new TClonesArray(
"genie::GHepParticle", np);
142 particle_list->SetOwner(
true);
145 TLorentzVector p4Had = kinematics.
HadSystP4();
148 TVector3 unitvq = p4Had.Vect().Unit();
151 TVector3 beta(0,0,p4Had.P()/p4Had.Energy());
158 int mom =
event->FinalStateHadronicSystemPosition();
163 const TLorentzVector & vtx = *(neutrino->
X4());
166 for (
int i = 0; i < np; i++) {
168 if (fEvent[i].
id() == 90)
continue;
171 int particle_pdg_code = fEvent[i].id();
172 int pythia_particle_status = fEvent[i].status();
175 if(pythia_particle_status > 0) {
180 <<
"Hadronization failed! Bare quarks appear in final state!";
188 bool copy = (pythia_particle_status==-23) || (pythia_particle_status > 0);
196 fEvent[i].px(), fEvent[i].py(), fEvent[i].pz(), fEvent[i].
e());
198 TVector3 p3 = p4o.Vect();
200 TLorentzVector p4(p3,p4o.Energy());
208 bool is_gamma = (particle_pdg_code ==
kPdgGamma);
211 bool not_hadr = is_gamma || is_nu || is_lchg;
219 if(pythia_particle_status > 0) {
245 <<
"Adding final state particle pdgc = " << particle.
Pdg()
246 <<
" with status = " << particle.
Status();
249 event->AddParticle(particle);
262#ifdef __GENIE_PYTHIA8_ENABLED__
275#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
277 <<
"Original PYTHIA6 decay flags:"
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
STDHEP-like event record entry that can fit a particle or a nucleus.
const TLorentzVector * X4(void) const
GHepStatus_t Status(void) const