127 double WR, TLorentzVector p4R,
128 unsigned int& rpos, TClonesArray * particle_list)
const
130#ifdef __GENIE_PYTHIA8_ENABLED__
136 gPythia->event.reset();
138 double m1 = gPythia->particleData.m0(qrkSyst1);
139 double m2 = gPythia->particleData.m0(qrkSyst2);
141 LOG(
"AGCharmPythia8Hadro2023",
pINFO)
142 <<
" qrkSyst1 " << qrkSyst1 <<
" m1 " << m1
143 <<
" qrkSyst2 " << qrkSyst2 <<
" m2 " << m2
146 double pz1cm = 0.5 * Pythia8::sqrtpos(
147 (WR + m1 + m2)*(WR - m1 -m2)*(WR - m1 + m2)*(WR + m1 - m2) ) / WR;
149 double pz2cm = - pz1cm;
150 double e1 = sqrt(m1*m1 + pz1cm*pz1cm);
151 double e2 = sqrt(m2*m2 + pz2cm*pz2cm);
153 LOG(
"AGCharmPythia8Hadro2023",
pINFO)
154 <<
" qrkSyst1 pz=" << pz1cm <<
", E=" << e1
155 <<
" qrkSyst2 pz=" << pz2cm <<
", E=" << e2;
159 gPythia->event.append(qrkSyst1,23,101, 0,0.,0.,pz1cm,e1,m1);
160 gPythia->event.append(qrkSyst2,23, 0,101,0.,0.,pz2cm,e2,m2);
164 <<
"Generating next PYTHIA8 event";
172 Pythia8::Event &fEvent = gPythia->event;
173 int np = fEvent.size();
177 TVector3 unitvq = p4R.Vect().Unit();
180 TVector3 beta(0,0,p4R.P()/p4R.Energy());
186 const TLorentzVector vtx(0,0,0,0);
188 for (
int i=0; i<np; ++i) {
189 if (fEvent[i].
id() == 90)
continue;
191 int particle_pdg_code = fEvent[i].id();
192 int pythia_particle_status = fEvent[i].status();
197 if (pythia_particle_status > 0 ) {
202 <<
"Hadronization failed! Bare quarks appear in final state!";
208 bool copy = (pythia_particle_status==-23) ||
209 (pythia_particle_status > 0);
216 TLorentzVector p4o(fEvent[i].px(),fEvent[i].py(),fEvent[i].pz(),fEvent[i].
e());
218 TVector3 p3 = p4o.Vect();
220 TLorentzVector p4(p3,p4o.Energy());
231 bool is_gamma = (particle_pdg_code ==
kPdgGamma);
234 bool not_hadr = is_gamma || is_nu || is_lchg;
273 <<
"calling GENIE/PYTHIA8 charm hadronization without enabling PYTHIA8"
274 <<
" qrkSyst " << qrkSyst1 <<
"," << qrkSyst2 <<
" WR " << WR;
285#ifdef __GENIE_PYTHIA8_ENABLED__
298#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
300 <<
"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.