15 #pragma GCC diagnostic push
16 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
17 #include <HepMC/GenEvent.h>
18 #include <HepMC/GenParticle.h>
19 #include <HepMC/GenVertex.h>
20 #include <HepMC/IteratorRange.h>
21 #include <HepMC/SimpleVector.h>
22 #include <HepMC/GenParticle.h>
23 #pragma GCC diagnostic pop
30 std::cout <<
"quickHIJING::quickHIJING(const std::string &name) Calling ctor" << std::endl;
35 std::cout <<
"quickHIJING::~quickHIJING() Calling dtor" << std::endl;
41 std::cout <<
"quickHIJING::Init(PHCompositeNode *topNode) Initializing" << std::endl;
43 out =
new TFile(
"qhTest.root",
"RECREATE");
45 T =
new TTree(
"T",
"T");
63 std::cout <<
"quickHIJING::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
71 CentralityInfo *cent_node = findNode::getClass<CentralityInfo>(topNode,
"CentralityInfo");
74 std::cout <<
"No cent node" << std::endl;
78 m_cent = cent_node -> get_centile(CentralityInfo::PROP::bimp);
79 m_b = cent_node -> get_quantity(CentralityInfo::PROP::bimp);
85 std::cout <<
PHWHERE <<
"hijingTruthCheck::process_event Could not find node G4TruthInfo" << std::endl;
92 PHHepMCGenEventMap *genEventMap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
95 std::cout <<
PHWHERE <<
"cemc::process_event Could not find PHHepMCGenEventMap" << std::endl;
102 std::cout <<
PHWHERE <<
"cemc::process_event Could not find PHHepMCGenEvent" << std::endl;
106 HepMC::GenEvent *evt = genEvent -> getEvent();
108 HepMC::HeavyIon *hi = evt -> heavy_ion();
110 m_psi2 = hi -> event_plane_angle();
116 for(truthIter = truthRange.first; truthIter != truthRange.second; truthIter++)
120 if(abs(truthPar -> get_pid()) >= 12 && abs(truthPar -> get_pid()) <= 16)
continue;
122 m_pid.push_back(truthPar -> get_pid());
126 m_e.push_back(truthPar -> get_e());
159 std::cout <<
"quickHIJING::EndRun(const int runnumber) Ending Run for Run " << runnumber << std::endl;
170 std::cout <<
"quickHIJING::End(PHCompositeNode *topNode) This is the End..." << std::endl;
177 std::cout <<
"quickHIJING::Reset(PHCompositeNode *topNode) being Reset" << std::endl;
184 std::cout <<
"quickHIJING::Print(const std::string &what) const Printing info for " << what << std::endl;
189 float px = particle -> get_px();
190 float py = particle -> get_py();
191 float pz = particle -> get_pz();
192 float p = sqrt(pow(px,2) + pow(py,2) + pow(pz,2));
194 return 0.5*log((p+pz)/(p-pz));
199 float phi = atan2(particle -> get_py(),particle -> get_px());
205 float px = particle -> get_px();
206 float py = particle -> get_py();
208 float pt = sqrt(pow(px,2) + pow(py,2));
214 float px = particle -> get_px();
215 float py = particle -> get_py();
216 float pz = particle -> get_pz();
217 float p = sqrt(pow(px,2) + pow(py,2) + pow(pz,2));