13 #include <TLorentzVector.h>
18 #include <TDatabasePDG.h>
23 #include <g4jets/JetMap.h>
24 #include <g4jets/Jet.h>
28 #include <HepMC/GenEvent.h>
29 #include <HepMC/GenVertex.h>
60 _h1 =
new TH1D(
"h1",
"", 100, 0, 100.0);
61 _h2 =
new TH2D(
"h2",
"", 100, 0, 100.0, 40, -2, +2);
62 _h2_b =
new TH2D(
"h2_b",
"", 100, 0, 100.0, 40, -2, +2);
63 _h2_c =
new TH2D(
"h2_c",
"", 100, 0, 100.0, 40, -2, +2);
64 _h2all =
new TH2D(
"h2all",
"", 100, 0, 100.0, 40, -2, +2);
66 _ntp_gamma =
new TNtuple(
"ntp_gamma",
"truth shower => best cluster",
"ev:px:py:pz:pt:eta:phi");
77 PHHepMCGenEventMap * geneventmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
80 std::cout <<
PHWHERE<<
" - Fatal error - missing node PHHepMCGenEventMap"<<std::endl;
87 std::cout <<
PHWHERE<<
" - Fatal error - node PHHepMCGenEventMap missing subevent with embedding ID "<<
_embedding_id;
88 std::cout <<
". Print PHHepMCGenEventMap:";
93 HepMC::GenEvent* theEvent = genevt->
getEvent();
96 for (HepMC::GenEvent::particle_const_iterator
p = theEvent->particles_begin();
97 p != theEvent->particles_end(); ++
p)
99 TParticlePDG * pdg_p = TDatabasePDG::Instance()->GetParticle(
103 if (TString(pdg_p->GetName()) ==
"gamma")
107 if((*p)->momentum().perp()>5.)
_h2->Fill((*p)->momentum().perp(), (*p)->momentum().pseudoRapidity());
108 if((*p)->momentum().perp()>5.)
_h1->Fill((*p)->momentum().perp());
110 if((*p)->momentum().perp()>5.) {
111 const float px = (*p)->momentum().x(),
112 py = (*p)->momentum().y(),
113 pz = (*p)->momentum().z(),
114 pt = (*p)->momentum().perp(),
115 eta = (*p)->momentum().pseudoRapidity(),
116 phi = (*p)->momentum().phi();
133 std::cout << __PRETTY_FUNCTION__ <<
" DVP PASSED " <<
_total_pass
134 <<
" events" << std::endl;