21 #include <HepMC/GenEvent.h>
22 #include <HepMC/HeavyIon.h>
37 enum {DSTNODE, RUNNODE, LAST};
39 const char *NName[] = {
45 for (
int i=0; i<LAST; i++)
50 cout <<
PHWHERE << NName[i] <<
" node is missing, no point in continuing exiting now" << endl;
58 outNode[DSTNODE]->
addNode(newNode);
63 outNode[RUNNODE]->
addNode(FlagSaveNode);
70 HepMC::GenEvent *hepmcevt = findNode::getClass<HepMC::GenEvent>(topNode,
"HEPMC");
71 PHG4EventHeader *evtheader = findNode::getClass<PHG4EventHeader>(topNode,
"EventHeader");
75 evtseq = hepmcevt->event_number();
76 HepMC::HeavyIon *hi = hepmcevt->heavy_ion();
79 evtheader->set_ImpactParameter(hi->impact_parameter());
80 evtheader->set_EventPlaneAngle(hi->event_plane_angle());
83 evtheader->set_EvtSequence(evtseq);
86 evtheader->identify();