10 #include <TLorentzVector.h>
15 #include <TDatabasePDG.h>
19 #include <HepMC/GenEvent.h>
20 #include <HepMC/GenVertex.h>
43 _tree_event =
new TNtuple(
"ntp_event",
"event information from LQ events",
44 "ievent:pt_miss:pt_miss_phi:has_tau:has_uds:tau_eta:tau_phi:tau_e:tau_p:tau_pt:tau_decay_prong:tau_decay_hcharged:tau_decay_lcharged:uds_eta:uds_phi:uds_e:uds_p:uds_pt");
54 PHHepMCGenEventMap * geneventmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
57 std::cout <<
PHWHERE<<
" - Fatal error - missing node PHHepMCGenEventMap"<<std::endl;
69 HepMC::GenParticle* particle_lq = truth.
FindParticle( pdg_lq );
76 HepMC::GenParticle* particle_quark = NULL;
77 for (
int pdg_quark = 1; pdg_quark < 7; pdg_quark++ )
91 bool tau_found =
false;
92 bool quark_found =
false;
100 uint tau_decay_prong = 0;
101 uint tau_decay_hcharged = 0;
102 uint tau_decay_lcharged = 0;
104 double quark_eta = 0;
105 double quark_phi = 0;
111 float pt_miss_phi = 0;
120 tau_eta = particle_tau->momentum().eta();
121 tau_phi = particle_tau->momentum().phi();
125 if(tau_phi>TMath::Pi()) tau_phi = tau_phi-2*TMath::Pi();
127 tau_e = particle_tau->momentum().e();
128 tau_p = sqrt( pow( particle_tau->momentum().px(), 2 ) +
129 pow( particle_tau->momentum().py(), 2 ) +
130 pow( particle_tau->momentum().pz(), 2 ) );
131 tau_pt = particle_tau->momentum().perp();
134 truth.
FindDecayParticles( particle_tau, tau_decay_prong, tau_decay_hcharged, tau_decay_lcharged );
144 quark_eta = particle_quark->momentum().eta();
145 quark_phi = particle_quark->momentum().phi();
149 if(quark_phi>TMath::Pi()) quark_phi = quark_phi-2*TMath::Pi();
151 quark_e = particle_quark->momentum().e();
152 quark_p = sqrt( pow( particle_quark->momentum().px(), 2 ) +
153 pow( particle_quark->momentum().py(), 2 ) +
154 pow( particle_quark->momentum().pz(), 2 ) );
155 quark_pt = particle_quark->momentum().perp();
160 float event_data[18] = { (float)
_ievent,
170 (float) tau_decay_prong,
171 (
float) tau_decay_hcharged,
172 (float) tau_decay_lcharged,
202 bool final_state =
false;
203 while ( !final_state )
206 for ( HepMC::GenVertex::particle_iterator
child
207 = particle->end_vertex()->particles_begin(HepMC::children);
208 child != particle->end_vertex()->particles_end(HepMC::children);
212 if ( (*child)->pdg_id() == particle->pdg_id() )