15 #include <calobase/RawTowerGeomContainer.h>
16 #include <calobase/RawTowerContainer.h>
17 #include <calobase/RawTowerGeom.h>
18 #include <calobase/RawTowerv1.h>
19 #include <calobase/RawTowerDefs.h>
21 #include <calobase/RawClusterContainer.h>
22 #include <calobase/RawCluster.h>
44 _tree_invariant_mass(nullptr),
45 _tree_event_reco(nullptr),
46 _tree_event_truth(nullptr),
47 _beam_electron_ptotal(10),
48 _beam_hadron_ptotal(250),
65 _tree_invariant_mass->Branch(
"event", &
_ievent,
"event/I");
67 _tree_invariant_mass->Branch(
"reco_inv", &
_vect1);
68 _tree_invariant_mass->Branch(
"true_inv", &
_vect2);
69 _tree_invariant_mass->Branch(
"reco_inv_decay", &
_vect3);
70 _tree_invariant_mass->Branch(
"reco_inv_scatter", &
_vect4);
71 _tree_invariant_mass->Branch(
"true_inv_decay", &
_vect5);
72 _tree_invariant_mass->Branch(
"true_inv_scatter", &
_vect6);
75 _tree_event_reco =
new TTree(
"event_reco",
"A tree with reco particle information");
86 _tree_event_truth =
new TTree(
"event_truth",
"A tree with truth particle information");
129 std::cout <<
PHWHERE <<
" WARNING: Can't find requested PHHepMCGenEventMap" << endl;
134 int embedding_id = 1;
138 std::cout <<
PHWHERE <<
"WARNING: Node PHHepMCGenEventMap missing subevent with embedding ID "<< embedding_id;
139 std::cout <<
". Print PHHepMCGenEventMap:";
144 HepMC::GenEvent* theEvent = genevt->
getEvent();
148 std::cout <<
PHWHERE <<
"WARNING: Missing requested GenEvent!" << endl;
157 for (HepMC::GenEvent::particle_const_iterator
p = theEvent->particles_begin();
158 p != theEvent->particles_end(); ++
p)
161 if ( (*p)->status() != 1 )
164 float mom_eta = -1 * log ( tan( (*p)->momentum().theta() / 2.0 ) );
167 true_phi.push_back( (*p)->momentum().phi() );
169 true_pid.push_back( (*p)->pdg_id() );
171 if ( particle_scattered_l &&
172 (*
p) == particle_scattered_l )
182 vector< string > v_ecals;
183 v_ecals.push_back(
"EEMC");
184 v_ecals.push_back(
"CEMC");
185 v_ecals.push_back(
"FEMC");
186 for (
unsigned idx = 0;
idx < v_ecals.size();
idx++ )
188 string clusternodename =
"CLUSTER_" + v_ecals.at(
idx );
192 cerr <<
PHWHERE <<
" ERROR: Can't find node " << clusternodename << endl;
196 cerr <<
PHWHERE <<
" ERROR: Can't find node SvtxTrackMap" << endl;
200 for (
unsigned int k = 0;
k < clusterList->
size(); ++
k)
204 float e_cluster_threshold = 0.3;
205 if ( cluster->
get_energy() < e_cluster_threshold )
218 if(strcmp(cc,
"EEMC")==0)
237 if(eta_diff<0.1&&phi_diff<0.1)
264 DVMPHelper * dvmp =
new DVMPHelper(
reco_eta,
reco_phi,
reco_ptotal,
reco_charge,
reco_cluster_e,
reco_is_scattered_lepton,
true_eta,
true_phi,
true_ptotal,
true_pid,
is_scattered_lepton);