392 LOG(
"gevserv",
pNOTICE) <<
"Generating event - Input info : " << mesg;
396 <<
"Event server is not configured - Can not generate event";
410 assert(sv.size()==11);
411 int irun = atoi(sv[0].c_str());
412 int ievt = atoi(sv[1].c_str());
413 int ipdgnunoosc = atoi(sv[2].c_str());
414 double vtxx = atof(sv[3].c_str());
415 double vtxy = atof(sv[4].c_str());
416 double vtxz = atof(sv[5].c_str());
417 int ipdgnu = atoi(sv[6].c_str());
418 int ipdgtgt = atoi(sv[7].c_str());
419 double px = atof(sv[8].c_str());
420 double py = atof(sv[9].c_str());
421 double pz = atof(sv[10].c_str());
422 double E = TMath::Sqrt(px*px + py*py + pz*pz);
424 TLorentzVector p4(px,py,pz,E);
432 <<
"No GEVGDriver object for init state: " << init_state.AsString();
443 bool failed = (
event==0) ||
event->IsUnphysical();
446 <<
"Failed to generate the requested event";
461 else if (proc_info.
IsResonant()) int_type = 2;
463 else if (proc_info.IsCoherent()) int_type = 4;
468 if (proc_info.
IsWeakNC()) iaction = 0;
469 else if (proc_info.
IsWeakCC()) iaction = 1;
475 nucleon = hitnucl->
Pdg();
480 bool get_selected =
true;
481 double xbj_sel = kine.
x (get_selected);
482 double y_sel = kine.
y (get_selected);
483 double W2_sel = TMath::Power(kine.
W (get_selected), 2.);
484 double q2_sel = -1 * kine.
Q2(get_selected);
486 double tot_xsec =
event->XSec();
487 double diff_xsec =
event->DiffXSec();
493 ostringstream hdr1, hdr2, hdr3, hdr4, stdhep_hdr;
499 << ipdgnunoosc <<
" " 525 <<
event->GetEntriesFast();
527 gSock->Send(hdr1.str().c_str());
528 gSock->Send(hdr2.str().c_str());
529 gSock->Send(hdr3.str().c_str());
530 gSock->Send(hdr4.str().c_str());
531 gSock->Send(stdhep_hdr.str().c_str());
534 TIter event_iter(
event);
536 while ( (p = dynamic_cast<GHepParticle *>(event_iter.Next())) ) {
538 ostringstream stdhep_entry;
541 << i <<
" " << p->
Status() <<
" " << p->
Pdg() <<
" " 544 << p->
Px() <<
" " << p->
Py() <<
" " << p->
Pz() <<
" " << p->
E() <<
" " 546 << p->
Vx() <<
" " << p->
Vy() <<
" " << p->
Vz() <<
" " << p->
Vt();
548 gSock->Send(stdhep_entry.str().c_str());
558 LOG(
"gevserv",
pINFO) <<
"...done!";
bool IsResonant(void) const
double W(bool selected=false) const
bool IsWeakCC(void) const
double E(void) const
Get energy.
int FirstDaughter(void) const
int HitQrkPdg(void) const
bool IsInverseMuDecay(void) const
bool IsQuasiElastic(void) const
Generated/set kinematical variables for an event.
double x(bool selected=false) const
double Mass(void) const
Mass that corresponds to the PDG code.
GEVGDriver * FindDriver(const InitialState &init) const
const string kEvgenHdrCmdSent
double Pz(void) const
Get Pz.
GHepStatus_t Status(void) const
double Px(void) const
Get Px.
double y(bool selected=false) const
int LastMother(void) const
double Vt(void) const
Get production time.
int FirstMother(void) const
Summary information for an interaction.
int LastDaughter(void) const
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsNuElectronElastic(void) const
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
const string kEvgenStdhepCmdSent
const Kinematics & Kine(void) const
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
string TrimSpaces(string input)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
bool IsDeepInelastic(void) const
const string kEvgenCmdRecv
const string kEvgenOkMesgSent
string FilterString(string filt, string input)
vector< string > Split(string input, string delim)
double Vz(void) const
Get production z.
const InitialState & InitState(void) const
const string kErrNoDriver
const ProcessInfo & ProcInfo(void) const
double Vy(void) const
Get production y.
double Q2(bool selected=false) const
const Target & Tgt(void) const
STDHEP-like event record entry that can fit a particle or a nucleus.
Event finding and building.
double Vx(void) const
Get production x.
Initial State information.
EventRecord * GenerateEvent(const TLorentzVector &nu4p)
double Py(void) const
Get Py.