14 #pragma GCC diagnostic push
15 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
16 #include <HepMC/GenEvent.h>
17 #include <HepMC/GenParticle.h>
18 #include <HepMC/GenVertex.h>
19 #include <HepMC/IteratorRange.h>
20 #include <HepMC/SimpleVector.h>
21 #include <HepMC/GenParticle.h>
22 #pragma GCC diagnostic pop
32 std::cout <<
"hijbkg_upc::hijbkg_upc(const std::string &name) Calling ctor" << std::endl;
37 std::cout <<
"hijbkg_upc::~hijbkg_upc() Calling dtor" << std::endl;
43 std::cout <<
"hijbkg_upc::Init(PHCompositeNode *topNode) Initializing" << std::endl;
45 out =
new TFile(
"hijbkg.root",
"RECREATE");
47 T =
new TTree(
"T",
"T");
70 std::cout <<
"hijbkg_upc::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
79 EventHeader *evtheader = findNode::getClass<EventHeader>(topNode,
"EventHeader");
81 if ( m_evt%1 == 0 ) std::cout <<
"Event " << m_evt << std::endl;
88 std::cout <<
PHWHERE <<
"hijingTruthCheck::process_event Could not find node G4TruthInfo" << std::endl;
98 for(truthIter = truthRange.first; truthIter != truthRange.second; truthIter++)
101 double px = truthPar->
get_px();
102 double py = truthPar->
get_py();
103 double pz = truthPar->
get_pz();
104 double e = truthPar->
get_e();
116 if ( fabs(eta) < 1.1 && pt > 0.3 )
148 if ( ntracks==2 )
T->Fill();
169 std::cout <<
"hijbkg_upc::EndRun(const int runnumber) Ending Run for Run " << runnumber << std::endl;
180 std::cout <<
"hijbkg_upc::End(PHCompositeNode *topNode) This is the End..." << std::endl;
187 std::cout <<
"hijbkg_upc::Reset(PHCompositeNode *topNode) being Reset" << std::endl;
194 std::cout <<
"hijbkg_upc::Print(const std::string &what) const Printing info for " << what << std::endl;
200 if ( abs(pid) == 211 )
return 1;
201 if ( abs(pid) == 211 )
return 1;
202 if ( abs(pid) == 321 )
return 1;
203 if ( abs(pid) == 2212 )
return 1;
204 if ( abs(pid) == 11 )
return 1;
205 if ( abs(pid) == 13 )
return 1;
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));
219 return 0.5*log((p+pz)/(p-pz));
225 float phi = atan2(particle -> get_py(),particle -> get_px());
232 float px = particle -> get_px();
233 float py = particle -> get_py();
235 float pt = sqrt(pow(px,2) + pow(py,2));
242 float px = particle -> get_px();
243 float py = particle -> get_py();
244 float pz = particle -> get_pz();
245 float p = sqrt(pow(px,2) + pow(py,2) + pow(pz,2));