24 #include <calobase/RawCluster.h>
25 #include <calobase/RawClusterContainer.h>
26 #include <calobase/RawClusterUtility.h>
27 #include <calobase/RawTower.h>
28 #include <calobase/RawTowerContainer.h>
29 #include <calobase/RawTowerGeom.h>
30 #include <calobase/RawTowerGeomContainer.h>
31 #include <calobase/RawTowerv2.h>
36 #include <HepMC/GenEvent.h>
37 #include <HepMC/GenVertex.h>
67 , _do_store_event_info(
false)
81 , _do_HITS_ABSORBER(
false)
82 , _do_HITS_CALO(
false)
86 , _do_PROJECTIONS(
false)
87 , _do_MCPARTICLES(
false)
90 , _do_BLACKHOLE(
false)
94 , _n_generator_accepted(0)
106 , _hits_lightyield(0)
107 , _hits_isAbsorber(0)
111 , _tower_FHCAL_iEta(0)
112 , _tower_FHCAL_iPhi(0)
113 , _tower_FHCAL_trueID(0)
117 , _tower_BECAL_iEta(0)
118 , _tower_BECAL_iPhi(0)
119 , _tower_BECAL_trueID(0)
123 , _tower_HCALIN_iEta(0)
124 , _tower_HCALIN_iPhi(0)
125 , _tower_HCALIN_trueID(0)
127 , _nTowers_HCALOUT(0)
128 , _tower_HCALOUT_E(0)
129 , _tower_HCALOUT_iEta(0)
130 , _tower_HCALOUT_iPhi(0)
131 , _tower_HCALOUT_trueID(0)
135 , _tower_EHCAL_iEta(0)
136 , _tower_EHCAL_iPhi(0)
137 , _tower_EHCAL_trueID(0)
141 , _tower_DRCALO_NScint(0)
142 , _tower_DRCALO_NCerenkov(0)
143 , _tower_DRCALO_iEta(0)
144 , _tower_DRCALO_iPhi(0)
145 , _tower_DRCALO_trueID(0)
149 , _tower_FOCAL_NScint(0)
150 , _tower_FOCAL_NCerenkov(0)
151 , _tower_FOCAL_iEta(0)
152 , _tower_FOCAL_iPhi(0)
153 , _tower_FOCAL_trueID(0)
157 , _tower_LFHCAL_iEta(0)
158 , _tower_LFHCAL_iPhi(0)
159 , _tower_LFHCAL_iL(0)
160 , _tower_LFHCAL_trueID(0)
164 , _tower_FEMC_iEta(0)
165 , _tower_FEMC_iPhi(0)
166 , _tower_FEMC_trueID(0)
170 , _tower_EEMC_iEta(0)
171 , _tower_EEMC_iPhi(0)
172 , _tower_EEMC_trueID(0)
176 , _tower_EEMCG_iEta(0)
177 , _tower_EEMCG_iPhi(0)
178 , _tower_EEMCG_trueID(0)
182 , _tower_CEMC_iEta(0)
183 , _tower_CEMC_iPhi(0)
184 , _tower_CEMC_trueID(0)
186 , _nclusters_FHCAL(0)
187 , _cluster_FHCAL_E(0)
188 , _cluster_FHCAL_Eta(0)
189 , _cluster_FHCAL_Phi(0)
190 , _cluster_FHCAL_NTower(0)
191 , _cluster_FHCAL_trueID(0)
193 , _nclusters_HCALIN(0)
194 , _cluster_HCALIN_E(0)
195 , _cluster_HCALIN_Eta(0)
196 , _cluster_HCALIN_Phi(0)
197 , _cluster_HCALIN_NTower(0)
198 , _cluster_HCALIN_trueID(0)
200 , _nclusters_HCALOUT(0)
201 , _cluster_HCALOUT_E(0)
202 , _cluster_HCALOUT_Eta(0)
203 , _cluster_HCALOUT_Phi(0)
204 , _cluster_HCALOUT_NTower(0)
205 , _cluster_HCALOUT_trueID(0)
207 , _nclusters_EHCAL(0)
208 , _cluster_EHCAL_E(0)
209 , _cluster_EHCAL_Eta(0)
210 , _cluster_EHCAL_Phi(0)
211 , _cluster_EHCAL_NTower(0)
212 , _cluster_EHCAL_trueID(0)
216 , _cluster_FEMC_Eta(0)
217 , _cluster_FEMC_Phi(0)
218 , _cluster_FEMC_NTower(0)
219 , _cluster_FEMC_trueID(0)
223 , _cluster_CEMC_Eta(0)
224 , _cluster_CEMC_Phi(0)
225 , _cluster_CEMC_NTower(0)
226 , _cluster_CEMC_trueID(0)
230 , _cluster_EEMC_Eta(0)
231 , _cluster_EEMC_Phi(0)
232 , _cluster_EEMC_NTower(0)
233 , _cluster_EEMC_trueID(0)
235 , _nclusters_EEMCG(0)
236 , _cluster_EEMCG_E(0)
237 , _cluster_EEMCG_Eta(0)
238 , _cluster_EEMCG_Phi(0)
239 , _cluster_EEMCG_NTower(0)
240 , _cluster_EEMCG_trueID(0)
266 , _track_ProjTrackID(0)
267 , _track_ProjLayer(0)
275 , _track_TLP_true_x(0)
276 , _track_TLP_true_y(0)
277 , _track_TLP_true_z(0)
278 , _track_TLP_true_t(0)
282 , _mcpart_ID_parent(0)
316 , _calo_towers_iEta(0)
317 , _calo_towers_iPhi(0)
319 , _calo_towers_Eta(0)
320 , _calo_towers_Phi(0)
326 , _reco_e_threshold(0)
327 , _reco_e_thresholdMC(0.001)
329 , _caloevalstackFHCAL(nullptr)
330 , _caloevalstackBECAL(nullptr)
331 , _caloevalstackHCALIN(nullptr)
332 , _caloevalstackHCALOUT(nullptr)
333 , _caloevalstackEHCAL(nullptr)
334 , _caloevalstackDRCALO(nullptr)
335 , _caloevalstackFOCAL(nullptr)
336 , _caloevalstackLFHCAL(nullptr)
337 , _caloevalstackFEMC(nullptr)
338 , _caloevalstackCEMC(nullptr)
339 , _caloevalstackEEMC(nullptr)
340 , _caloevalstackEEMCG(nullptr)
342 , _event_tree(nullptr)
343 , _geometry_tree(nullptr)
344 , _filename(filename)
346 , _tfile_geometry(nullptr)
552 _event_tree =
new TTree(
"event_tree",
"event_tree");
557 _event_tree->Branch(
"cross_section", &
_cross_section,
"cross_section/F");
558 _event_tree->Branch(
"event_weight", &
_event_weight,
"event_weight/F");
565 _event_tree->Branch(
"hits_layerID",
_hits_layerID,
"hits_layerID[nHits]/I");
566 _event_tree->Branch(
"hits_trueID",
_hits_trueID,
"hits_trueID[nHits]/I");
567 _event_tree->Branch(
"hits_x",
_hits_x,
"hits_x[nHits]/F");
568 _event_tree->Branch(
"hits_y",
_hits_y,
"hits_y[nHits]/F");
569 _event_tree->Branch(
"hits_z",
_hits_z,
"hits_z[nHits]/F");
570 _event_tree->Branch(
"hits_x2",
_hits_x2,
"hits_x2[nHits]/F");
571 _event_tree->Branch(
"hits_y2",
_hits_y2,
"hits_y2[nHits]/F");
572 _event_tree->Branch(
"hits_z2",
_hits_z2,
"hits_z2[nHits]/F");
573 _event_tree->Branch(
"hits_t",
_hits_t,
"hits_t[nHits]/F");
574 _event_tree->Branch(
"hits_edep",
_hits_edep,
"hits_edep[nHits]/F");
575 _event_tree->Branch(
"hits_lightyield",
_hits_lightyield,
"hits_lightyield[nHits]/F");
576 _event_tree->Branch(
"hits_isAbsorber",
_hits_isAbsorber,
"hits_isAbsorber[nHits]/I");
581 _event_tree->Branch(
"nTracks", &
_nTracks,
"nTracks/I");
582 _event_tree->Branch(
"tracks_ID",
_track_ID,
"tracks_ID[nTracks]/F");
583 _event_tree->Branch(
"tracks_charge",
_track_charge,
"tracks_charge[nTracks]/S");
584 _event_tree->Branch(
"tracks_px",
_track_px,
"tracks_px[nTracks]/F");
585 _event_tree->Branch(
"tracks_py",
_track_py,
"tracks_py[nTracks]/F");
586 _event_tree->Branch(
"tracks_pz",
_track_pz,
"tracks_pz[nTracks]/F");
587 _event_tree->Branch(
"tracks_x",
_track_x,
"tracks_x[nTracks]/F");
588 _event_tree->Branch(
"tracks_y",
_track_y,
"tracks_y[nTracks]/F");
589 _event_tree->Branch(
"tracks_z",
_track_z,
"tracks_z[nTracks]/F");
590 _event_tree->Branch(
"tracks_ndf",
_track_ndf,
"tracks_ndf[nTracks]/F");
591 _event_tree->Branch(
"tracks_chi2",
_track_chi2,
"tracks_chi2[nTracks]/F");
592 _event_tree->Branch(
"tracks_dca",
_track_dca,
"tracks_dca[nTracks]/F");
593 _event_tree->Branch(
"tracks_dca_2d",
_track_dca_2d,
"tracks_dca_2d[nTracks]/F");
594 _event_tree->Branch(
"tracks_trueID",
_track_trueID,
"tracks_trueID[nTracks]/F");
595 _event_tree->Branch(
"tracks_source",
_track_source,
"tracks_source[nTracks]/s");
600 _event_tree->Branch(
"track_pion_LL",
_track_pion_LL.data(),
"track_pion_LL[nTracks]/F");
601 _event_tree->Branch(
"track_kaon_LL",
_track_kaon_LL.data(),
"track_kaon_LL[nTracks]/F");
602 _event_tree->Branch(
"track_proton_LL",
_track_proton_LL.data(),
"track_proton_LL[nTracks]/F");
607 _event_tree->Branch(
"nProjections", &
_nProjections,
"nProjections/I");
608 _event_tree->Branch(
"track_ProjTrackID",
_track_ProjTrackID,
"track_ProjTrackID[nProjections]/F");
609 _event_tree->Branch(
"track_ProjLayer",
_track_ProjLayer,
"track_ProjLayer[nProjections]/I");
610 _event_tree->Branch(
"track_TLP_x",
_track_TLP_x,
"track_TLP_x[nProjections]/F");
611 _event_tree->Branch(
"track_TLP_y",
_track_TLP_y,
"track_TLP_y[nProjections]/F");
612 _event_tree->Branch(
"track_TLP_z",
_track_TLP_z,
"track_TLP_z[nProjections]/F");
613 _event_tree->Branch(
"track_TLP_t",
_track_TLP_t,
"track_TLP_t[nProjections]/F");
614 _event_tree->Branch(
"track_TLP_px",
_track_TLP_px,
"track_TLP_px[nProjections]/F");
615 _event_tree->Branch(
"track_TLP_py",
_track_TLP_py,
"track_TLP_py[nProjections]/F");
616 _event_tree->Branch(
"track_TLP_pz",
_track_TLP_pz,
"track_TLP_pz[nProjections]/F");
617 _event_tree->Branch(
"track_TLP_true_x",
_track_TLP_true_x,
"track_TLP_true_x[nProjections]/F");
618 _event_tree->Branch(
"track_TLP_true_y",
_track_TLP_true_y,
"track_TLP_true_y[nProjections]/F");
619 _event_tree->Branch(
"track_TLP_true_z",
_track_TLP_true_z,
"track_TLP_true_z[nProjections]/F");
620 _event_tree->Branch(
"track_TLP_true_t",
_track_TLP_true_t,
"track_TLP_true_t[nProjections]/F");
625 _event_tree->Branch(
"tower_FHCAL_N", &
_nTowers_FHCAL,
"tower_FHCAL_N/I");
626 _event_tree->Branch(
"tower_FHCAL_E",
_tower_FHCAL_E,
"tower_FHCAL_E[tower_FHCAL_N]/F");
627 _event_tree->Branch(
"tower_FHCAL_iEta",
_tower_FHCAL_iEta,
"tower_FHCAL_iEta[tower_FHCAL_N]/I");
628 _event_tree->Branch(
"tower_FHCAL_iPhi",
_tower_FHCAL_iPhi,
"tower_FHCAL_iPhi[tower_FHCAL_N]/I");
629 _event_tree->Branch(
"tower_FHCAL_trueID",
_tower_FHCAL_trueID,
"tower_FHCAL_trueID[tower_FHCAL_N]/I");
633 _event_tree->Branch(
"cluster_FHCAL_N", &
_nclusters_FHCAL,
"cluster_FHCAL_N/I");
634 _event_tree->Branch(
"cluster_FHCAL_E",
_cluster_FHCAL_E,
"cluster_FHCAL_E[cluster_FHCAL_N]/F");
635 _event_tree->Branch(
"cluster_FHCAL_Eta",
_cluster_FHCAL_Eta,
"cluster_FHCAL_Eta[cluster_FHCAL_N]/F");
636 _event_tree->Branch(
"cluster_FHCAL_Phi",
_cluster_FHCAL_Phi,
"cluster_FHCAL_Phi[cluster_FHCAL_N]/F");
637 _event_tree->Branch(
"cluster_FHCAL_NTower",
_cluster_FHCAL_NTower,
"cluster_FHCAL_NTower[cluster_FHCAL_N]/I");
638 _event_tree->Branch(
"cluster_FHCAL_trueID",
_cluster_FHCAL_trueID,
"cluster_FHCAL_trueID[cluster_FHCAL_N]/I");
644 _event_tree->Branch(
"tower_BECAL_N", &
_nTowers_BECAL,
"tower_BECAL_N/I");
645 _event_tree->Branch(
"tower_BECAL_E",
_tower_BECAL_E,
"tower_BECAL_E[tower_BECAL_N]/F");
646 _event_tree->Branch(
"tower_BECAL_iEta",
_tower_BECAL_iEta,
"tower_BECAL_iEta[tower_BECAL_N]/I");
647 _event_tree->Branch(
"tower_BECAL_iPhi",
_tower_BECAL_iPhi,
"tower_BECAL_iPhi[tower_BECAL_N]/I");
648 _event_tree->Branch(
"tower_BECAL_trueID",
_tower_BECAL_trueID,
"tower_BECAL_trueID[tower_BECAL_N]/I");
653 _event_tree->Branch(
"tower_HCALIN_N", &
_nTowers_HCALIN,
"tower_HCALIN_N/I");
654 _event_tree->Branch(
"tower_HCALIN_E",
_tower_HCALIN_E,
"tower_HCALIN_E[tower_HCALIN_N]/F");
655 _event_tree->Branch(
"tower_HCALIN_iEta",
_tower_HCALIN_iEta,
"tower_HCALIN_iEta[tower_HCALIN_N]/I");
656 _event_tree->Branch(
"tower_HCALIN_iPhi",
_tower_HCALIN_iPhi,
"tower_HCALIN_iPhi[tower_HCALIN_N]/I");
657 _event_tree->Branch(
"tower_HCALIN_trueID",
_tower_HCALIN_trueID,
"tower_HCALIN_trueID[tower_HCALIN_N]/I");
661 _event_tree->Branch(
"cluster_HCALIN_N", &
_nclusters_HCALIN,
"cluster_HCALIN_N/I");
662 _event_tree->Branch(
"cluster_HCALIN_E",
_cluster_HCALIN_E,
"cluster_HCALIN_E[cluster_HCALIN_N]/F");
663 _event_tree->Branch(
"cluster_HCALIN_Eta",
_cluster_HCALIN_Eta,
"cluster_HCALIN_Eta[cluster_HCALIN_N]/F");
664 _event_tree->Branch(
"cluster_HCALIN_Phi",
_cluster_HCALIN_Phi,
"cluster_HCALIN_Phi[cluster_HCALIN_N]/F");
665 _event_tree->Branch(
"cluster_HCALIN_NTower",
_cluster_HCALIN_NTower,
"cluster_HCALIN_NTower[cluster_HCALIN_N]/I");
666 _event_tree->Branch(
"cluster_HCALIN_trueID",
_cluster_HCALIN_trueID,
"cluster_HCALIN_trueID[cluster_HCALIN_N]/I");
672 _event_tree->Branch(
"tower_HCALOUT_N", &
_nTowers_HCALOUT,
"tower_HCALOUT_N/I");
673 _event_tree->Branch(
"tower_HCALOUT_E",
_tower_HCALOUT_E,
"tower_HCALOUT_E[tower_HCALOUT_N]/F");
674 _event_tree->Branch(
"tower_HCALOUT_iEta",
_tower_HCALOUT_iEta,
"tower_HCALOUT_iEta[tower_HCALOUT_N]/I");
675 _event_tree->Branch(
"tower_HCALOUT_iPhi",
_tower_HCALOUT_iPhi,
"tower_HCALOUT_iPhi[tower_HCALOUT_N]/I");
676 _event_tree->Branch(
"tower_HCALOUT_trueID",
_tower_HCALOUT_trueID,
"tower_HCALOUT_trueID[tower_HCALOUT_N]/I");
681 _event_tree->Branch(
"cluster_HCALOUT_E",
_cluster_HCALOUT_E,
"cluster_HCALOUT_E[cluster_HCALOUT_N]/F");
682 _event_tree->Branch(
"cluster_HCALOUT_Eta",
_cluster_HCALOUT_Eta,
"cluster_HCALOUT_Eta[cluster_HCALOUT_N]/F");
683 _event_tree->Branch(
"cluster_HCALOUT_Phi",
_cluster_HCALOUT_Phi,
"cluster_HCALOUT_Phi[cluster_HCALOUT_N]/F");
684 _event_tree->Branch(
"cluster_HCALOUT_NTower",
_cluster_HCALOUT_NTower,
"cluster_HCALOUT_NTower[cluster_HCALOUT_N]/I");
685 _event_tree->Branch(
"cluster_HCALOUT_trueID",
_cluster_HCALOUT_trueID,
"cluster_HCALOUT_trueID[cluster_HCALOUT_N]/I");
691 _event_tree->Branch(
"tower_EHCAL_N", &
_nTowers_EHCAL,
"tower_EHCAL_N/I");
692 _event_tree->Branch(
"tower_EHCAL_E",
_tower_EHCAL_E,
"tower_EHCAL_E[tower_EHCAL_N]/F");
693 _event_tree->Branch(
"tower_EHCAL_iEta",
_tower_EHCAL_iEta,
"tower_EHCAL_iEta[tower_EHCAL_N]/I");
694 _event_tree->Branch(
"tower_EHCAL_iPhi",
_tower_EHCAL_iPhi,
"tower_EHCAL_iPhi[tower_EHCAL_N]/I");
695 _event_tree->Branch(
"tower_EHCAL_trueID",
_tower_EHCAL_trueID,
"tower_EHCAL_trueID[tower_EHCAL_N]/I");
699 _event_tree->Branch(
"cluster_EHCAL_N", &
_nclusters_EHCAL,
"cluster_EHCAL_N/I");
700 _event_tree->Branch(
"cluster_EHCAL_E",
_cluster_EHCAL_E,
"cluster_EHCAL_E[cluster_EHCAL_N]/F");
701 _event_tree->Branch(
"cluster_EHCAL_Eta",
_cluster_EHCAL_Eta,
"cluster_EHCAL_Eta[cluster_EHCAL_N]/F");
702 _event_tree->Branch(
"cluster_EHCAL_Phi",
_cluster_EHCAL_Phi,
"cluster_EHCAL_Phi[cluster_EHCAL_N]/F");
703 _event_tree->Branch(
"cluster_EHCAL_NTower",
_cluster_EHCAL_NTower,
"cluster_EHCAL_NTower[cluster_EHCAL_N]/I");
704 _event_tree->Branch(
"cluster_EHCAL_trueID",
_cluster_EHCAL_trueID,
"cluster_EHCAL_trueID[cluster_EHCAL_N]/I");
710 _event_tree->Branch(
"tower_DRCALO_N", &
_nTowers_DRCALO,
"tower_DRCALO_N/I");
711 _event_tree->Branch(
"tower_DRCALO_E",
_tower_DRCALO_E,
"tower_DRCALO_E[tower_DRCALO_N]/F");
712 _event_tree->Branch(
"tower_DRCALO_NScint",
_tower_DRCALO_NScint,
"tower_DRCALO_NScint[tower_DRCALO_N]/I");
713 _event_tree->Branch(
"tower_DRCALO_NCerenkov",
_tower_DRCALO_NCerenkov,
"tower_DRCALO_NCerenkov[tower_DRCALO_N]/I");
714 _event_tree->Branch(
"tower_DRCALO_iEta",
_tower_DRCALO_iEta,
"tower_DRCALO_iEta[tower_DRCALO_N]/I");
715 _event_tree->Branch(
"tower_DRCALO_iPhi",
_tower_DRCALO_iPhi,
"tower_DRCALO_iPhi[tower_DRCALO_N]/I");
716 _event_tree->Branch(
"tower_DRCALO_trueID",
_tower_DRCALO_trueID,
"tower_DRCALO_trueID[tower_DRCALO_N]/I");
721 _event_tree->Branch(
"tower_FOCAL_N", &
_nTowers_FOCAL,
"tower_FOCAL_N/I");
722 _event_tree->Branch(
"tower_FOCAL_E",
_tower_FOCAL_E,
"tower_FOCAL_E[tower_FOCAL_N]/F");
723 _event_tree->Branch(
"tower_FOCAL_NScint",
_tower_FOCAL_NScint,
"tower_FOCAL_NScint[tower_FOCAL_N]/I");
724 _event_tree->Branch(
"tower_FOCAL_NCerenkov",
_tower_FOCAL_NCerenkov,
"tower_FOCAL_NCerenkov[tower_FOCAL_N]/I");
725 _event_tree->Branch(
"tower_FOCAL_iEta",
_tower_FOCAL_iEta,
"tower_FOCAL_iEta[tower_FOCAL_N]/I");
726 _event_tree->Branch(
"tower_FOCAL_iPhi",
_tower_FOCAL_iPhi,
"tower_FOCAL_iPhi[tower_FOCAL_N]/I");
727 _event_tree->Branch(
"tower_FOCAL_trueID",
_tower_FOCAL_trueID,
"tower_FOCAL_trueID[tower_FOCAL_N]/I");
732 _event_tree->Branch(
"tower_LFHCAL_N", &
_nTowers_LFHCAL,
"tower_LFHCAL_N/I");
733 _event_tree->Branch(
"tower_LFHCAL_E",
_tower_LFHCAL_E,
"tower_LFHCAL_E[tower_LFHCAL_N]/F");
734 _event_tree->Branch(
"tower_LFHCAL_iEta",
_tower_LFHCAL_iEta,
"tower_LFHCAL_iEta[tower_LFHCAL_N]/I");
735 _event_tree->Branch(
"tower_LFHCAL_iPhi",
_tower_LFHCAL_iPhi,
"tower_LFHCAL_iPhi[tower_LFHCAL_N]/I");
736 _event_tree->Branch(
"tower_LFHCAL_iL",
_tower_LFHCAL_iL,
"tower_LFHCAL_iL[tower_LFHCAL_N]/I");
737 _event_tree->Branch(
"tower_LFHCAL_trueID",
_tower_LFHCAL_trueID,
"tower_LFHCAL_trueID[tower_LFHCAL_N]/I");
742 _event_tree->Branch(
"tower_FEMC_N", &
_nTowers_FEMC,
"tower_FEMC_N/I");
743 _event_tree->Branch(
"tower_FEMC_E",
_tower_FEMC_E,
"tower_FEMC_E[tower_FEMC_N]/F");
744 _event_tree->Branch(
"tower_FEMC_iEta",
_tower_FEMC_iEta,
"tower_FEMC_iEta[tower_FEMC_N]/I");
745 _event_tree->Branch(
"tower_FEMC_iPhi",
_tower_FEMC_iPhi,
"tower_FEMC_iPhi[tower_FEMC_N]/I");
746 _event_tree->Branch(
"tower_FEMC_trueID",
_tower_FEMC_trueID,
"tower_FEMC_trueID[tower_FEMC_N]/I");
750 _event_tree->Branch(
"cluster_FEMC_N", &
_nclusters_FEMC,
"cluster_FEMC_N/I");
751 _event_tree->Branch(
"cluster_FEMC_E",
_cluster_FEMC_E,
"cluster_FEMC_E[cluster_FEMC_N]/F");
752 _event_tree->Branch(
"cluster_FEMC_Eta",
_cluster_FEMC_Eta,
"cluster_FEMC_Eta[cluster_FEMC_N]/F");
753 _event_tree->Branch(
"cluster_FEMC_Phi",
_cluster_FEMC_Phi,
"cluster_FEMC_Phi[cluster_FEMC_N]/F");
754 _event_tree->Branch(
"cluster_FEMC_NTower",
_cluster_FEMC_NTower,
"cluster_FEMC_NTower[cluster_FEMC_N]/I");
755 _event_tree->Branch(
"cluster_FEMC_trueID",
_cluster_FEMC_trueID,
"cluster_FEMC_trueID[cluster_FEMC_N]/I");
761 _event_tree->Branch(
"tower_CEMC_N", &
_nTowers_CEMC,
"tower_CEMC_N/I");
762 _event_tree->Branch(
"tower_CEMC_E",
_tower_CEMC_E,
"tower_CEMC_E[tower_CEMC_N]/F");
763 _event_tree->Branch(
"tower_CEMC_iEta",
_tower_CEMC_iEta,
"tower_CEMC_iEta[tower_CEMC_N]/I");
764 _event_tree->Branch(
"tower_CEMC_iPhi",
_tower_CEMC_iPhi,
"tower_CEMC_iPhi[tower_CEMC_N]/I");
765 _event_tree->Branch(
"tower_CEMC_trueID",
_tower_CEMC_trueID,
"tower_CEMC_trueID[tower_CEMC_N]/I");
769 _event_tree->Branch(
"cluster_CEMC_N", &
_nclusters_CEMC,
"cluster_CEMC_N/I");
770 _event_tree->Branch(
"cluster_CEMC_E",
_cluster_CEMC_E,
"cluster_CEMC_E[cluster_CEMC_N]/F");
771 _event_tree->Branch(
"cluster_CEMC_Eta",
_cluster_CEMC_Eta,
"cluster_CEMC_Eta[cluster_CEMC_N]/F");
772 _event_tree->Branch(
"cluster_CEMC_Phi",
_cluster_CEMC_Phi,
"cluster_CEMC_Phi[cluster_CEMC_N]/F");
773 _event_tree->Branch(
"cluster_CEMC_NTower",
_cluster_CEMC_NTower,
"cluster_CEMC_NTower[cluster_CEMC_N]/I");
774 _event_tree->Branch(
"cluster_CEMC_trueID",
_cluster_CEMC_trueID,
"cluster_CEMC_trueID[cluster_CEMC_N]/I");
780 _event_tree->Branch(
"tower_EEMC_N", &
_nTowers_EEMC,
"tower_EEMC_N/I");
781 _event_tree->Branch(
"tower_EEMC_E",
_tower_EEMC_E,
"tower_EEMC_E[tower_EEMC_N]/F");
782 _event_tree->Branch(
"tower_EEMC_iEta",
_tower_EEMC_iEta,
"tower_EEMC_iEta[tower_EEMC_N]/I");
783 _event_tree->Branch(
"tower_EEMC_iPhi",
_tower_EEMC_iPhi,
"tower_EEMC_iPhi[tower_EEMC_N]/I");
784 _event_tree->Branch(
"tower_EEMC_trueID",
_tower_EEMC_trueID,
"tower_EEMC_trueID[tower_EEMC_N]/I");
788 _event_tree->Branch(
"cluster_EEMC_N", &
_nclusters_EEMC,
"cluster_EEMC_N/I");
789 _event_tree->Branch(
"cluster_EEMC_E",
_cluster_EEMC_E,
"cluster_EEMC_E[cluster_EEMC_N]/F");
790 _event_tree->Branch(
"cluster_EEMC_Eta",
_cluster_EEMC_Eta,
"cluster_EEMC_Eta[cluster_EEMC_N]/F");
791 _event_tree->Branch(
"cluster_EEMC_Phi",
_cluster_EEMC_Phi,
"cluster_EEMC_Phi[cluster_EEMC_N]/F");
792 _event_tree->Branch(
"cluster_EEMC_NTower",
_cluster_EEMC_NTower,
"cluster_EEMC_NTower[cluster_EEMC_N]/I");
793 _event_tree->Branch(
"cluster_EEMC_trueID",
_cluster_EEMC_trueID,
"cluster_EEMC_trueID[cluster_EEMC_N]/I");
799 _event_tree->Branch(
"tower_EEMCG_N", &
_nTowers_EEMCG,
"tower_EEMCG_N/I");
800 _event_tree->Branch(
"tower_EEMCG_E",
_tower_EEMCG_E,
"tower_EEMCG_E[tower_EEMCG_N]/F");
801 _event_tree->Branch(
"tower_EEMCG_iEta",
_tower_EEMCG_iEta,
"tower_EEMCG_iEta[tower_EEMCG_N]/I");
802 _event_tree->Branch(
"tower_EEMCG_iPhi",
_tower_EEMCG_iPhi,
"tower_EEMCG_iPhi[tower_EEMCG_N]/I");
803 _event_tree->Branch(
"tower_EEMCG_trueID",
_tower_EEMCG_trueID,
"tower_EEMCG_trueID[tower_EEMCG_N]/I");
807 _event_tree->Branch(
"cluster_EEMCG_N", &
_nclusters_EEMCG,
"cluster_EEMCG_N/I");
808 _event_tree->Branch(
"cluster_EEMCG_E",
_cluster_EEMCG_E,
"cluster_EEMCG_E[cluster_EEMCG_N]/F");
809 _event_tree->Branch(
"cluster_EEMCG_Eta",
_cluster_EEMCG_Eta,
"cluster_EEMCG_Eta[cluster_EEMCG_N]/F");
810 _event_tree->Branch(
"cluster_EEMCG_Phi",
_cluster_EEMCG_Phi,
"cluster_EEMCG_Phi[cluster_EEMCG_N]/F");
811 _event_tree->Branch(
"cluster_EEMCG_NTower",
_cluster_EEMCG_NTower,
"cluster_EEMCG_NTower[cluster_EEMCG_N]/I");
812 _event_tree->Branch(
"cluster_EEMCG_trueID",
_cluster_EEMCG_trueID,
"cluster_EEMCG_trueID[cluster_EEMCG_N]/I");
818 _event_tree->Branch(
"vertex_x", &
_vertex_x,
"vertex_x/F");
819 _event_tree->Branch(
"vertex_y", &
_vertex_y,
"vertex_y/F");
820 _event_tree->Branch(
"vertex_z", &
_vertex_z,
"vertex_z/F");
821 _event_tree->Branch(
"vertex_NCont", &
_vertex_NCont,
"vertex_NCont/I");
822 _event_tree->Branch(
"vertex_true_x", &
_vertex_true_x,
"vertex_true_x/F");
823 _event_tree->Branch(
"vertex_true_y", &
_vertex_true_y,
"vertex_true_y/F");
824 _event_tree->Branch(
"vertex_true_z", &
_vertex_true_z,
"vertex_true_z/F");
829 _event_tree->Branch(
"nMCPart", &
_nMCPart,
"nMCPart/I");
830 _event_tree->Branch(
"mcpart_ID",
_mcpart_ID,
"mcpart_ID[nMCPart]/I");
831 _event_tree->Branch(
"mcpart_ID_parent",
_mcpart_ID_parent,
"mcpart_ID_parent[nMCPart]/I");
832 _event_tree->Branch(
"mcpart_PDG",
_mcpart_PDG,
"mcpart_PDG[nMCPart]/I");
833 _event_tree->Branch(
"mcpart_E",
_mcpart_E,
"mcpart_E[nMCPart]/F");
834 _event_tree->Branch(
"mcpart_px",
_mcpart_px,
"mcpart_px[nMCPart]/F");
835 _event_tree->Branch(
"mcpart_py",
_mcpart_py,
"mcpart_py[nMCPart]/F");
836 _event_tree->Branch(
"mcpart_pz",
_mcpart_pz,
"mcpart_pz[nMCPart]/F");
837 _event_tree->Branch(
"mcpart_x",
_mcpart_x,
"mcpart_x[nMCPart]/F");
838 _event_tree->Branch(
"mcpart_y",
_mcpart_y,
"mcpart_y[nMCPart]/F");
839 _event_tree->Branch(
"mcpart_z",
_mcpart_z,
"mcpart_z[nMCPart]/F");
840 _event_tree->Branch(
"mcpart_BCID",
_mcpart_BCID,
"mcpart_BCID[nMCPart]/I");
845 _event_tree->Branch(
"nHepmcp", &
_nHepmcp,
"nHepmcp/I");
846 _event_tree->Branch(
"hepmcp_procid", &
_hepmcp_procid,
"hepmcp_procid/I");
847 _event_tree->Branch(
"hepmcp_x1", &
_hepmcp_x1,
"hepmcp_x1/F");
848 _event_tree->Branch(
"hepmcp_x2", &
_hepmcp_x2,
"hepmcp_x2/F");
849 _event_tree->Branch(
"hepmcp_Q2", &
_hepmcp_Q2,
"hepmcp_Q2/F");
850 _event_tree->Branch(
"hepmcp_vtx_x", &
_hepmcp_vtx_x,
"hepmcp_vtx_x/F");
851 _event_tree->Branch(
"hepmcp_vtx_y", &
_hepmcp_vtx_y,
"hepmcp_vtx_y/F");
852 _event_tree->Branch(
"hepmcp_vtx_z", &
_hepmcp_vtx_z,
"hepmcp_vtx_z/F");
853 _event_tree->Branch(
"hepmcp_vtx_t", &
_hepmcp_vtx_t,
"hepmcp_vtx_t/F");
856 _event_tree->Branch(
"hepmcp_status",
_hepmcp_status,
"hepmcp_status[nHepmcp]/I");
857 _event_tree->Branch(
"hepmcp_PDG",
_hepmcp_PDG,
"hepmcp_PDG[nHepmcp]/I");
858 _event_tree->Branch(
"hepmcp_E",
_hepmcp_E,
"hepmcp_E[nHepmcp]/F");
859 _event_tree->Branch(
"hepmcp_px",
_hepmcp_px,
"hepmcp_px[nHepmcp]/F");
860 _event_tree->Branch(
"hepmcp_py",
_hepmcp_py,
"hepmcp_py[nHepmcp]/F");
861 _event_tree->Branch(
"hepmcp_pz",
_hepmcp_pz,
"hepmcp_pz[nHepmcp]/F");
862 _event_tree->Branch(
"hepmcp_BCID",
_hepmcp_BCID,
"hepmcp_BCID[nHepmcp]/I");
863 _event_tree->Branch(
"hepmcp_m1",
_hepmcp_m1,
"hepmcp_m1[nHepmcp]/I");
864 _event_tree->Branch(
"hepmcp_m2",
_hepmcp_m2,
"hepmcp_m2[nHepmcp]/I");
892 cout <<
"entered process_event" << endl;
1055 cout <<
"loaded evalstack" << endl;
1070 cout <<
"EventEvaluatorEIC::fillOutputNtuples() entered" << endl;
1083 PHHepMCGenEventMap* hepmceventmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
1088 cout <<
"saving event level info" << endl;
1092 eventIter != hepmceventmap->
end();
1099 HepMC::GenEvent* truthevent = hepmcevent->
getEvent();
1103 <<
"no evt pointer under phhepmvgeneventmap found "
1108 auto xsec = truthevent->cross_section();
1115 auto weights = truthevent->weights();
1116 if (weights.size() > 0)
1127 cout <<
PHWHERE <<
" PHHepMCGenEventMap node (for event level info) not found on node tree" << endl;
1138 cout <<
PHWHERE <<
"RUN Node missing doing nothing" << endl;
1141 auto* integralNode = findNode::getClass<PHGenIntegral>(sumNode,
"PHGenIntegral");
1150 cout <<
PHWHERE <<
" PHGenIntegral node (for n generator accepted) not found on node tree. Continuing" << endl;
1157 SvtxVertexMap* vertexmap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
1162 if (!vertexmap->
empty())
1166 cout <<
"saving vertex" << endl;
1191 cout <<
"saving hits" << endl;
1194 PHG4TruthInfoContainer* truthinfocontainerHits = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
1195 for (
int iIndex = 0; iIndex < 200; ++iIndex)
1229 cout << __PRETTY_FUNCTION__ <<
" number of hits: " << hits->
size() << endl;
1236 cout << __PRETTY_FUNCTION__ <<
" found hit with id " << hit_iter->second->get_trkid() << endl;
1240 cout << __PRETTY_FUNCTION__ <<
" exceededed maximum hit array size! Please check where these hits come from!" << endl;
1256 if (truthinfocontainerHits)
1267 if (g4particleMother == NULL)
break;
1281 if (g4particleMother2 == NULL)
1309 cout << __PRETTY_FUNCTION__ <<
" could not find " << nodename << endl;
1315 PHG4HitContainer* hitsAbs = findNode::getClass<PHG4HitContainer>(topNode, nodenameAbs);
1320 cout << __PRETTY_FUNCTION__ <<
" absorber number of hits: " << hitsAbs->
size() << endl;
1327 cout << __PRETTY_FUNCTION__ <<
" found hit with id " << hit_iter->second->get_trkid() << endl;
1331 cout << __PRETTY_FUNCTION__ <<
" exceededed maximum hit array size! Please check where these hits come from!" << endl;
1347 if (truthinfocontainerHits)
1358 if (g4particleMother == NULL)
break;
1372 if (g4particleMother2 == NULL)
1400 cout << __PRETTY_FUNCTION__ <<
" could not find " << nodename << endl;
1415 string towernodeFHCAL =
"TOWER_CALIB_FHCAL";
1416 RawTowerContainer* towersFHCAL = findNode::getClass<RawTowerContainer>(topNode, towernodeFHCAL.c_str());
1421 cout <<
"saving HCAL towers" << endl;
1423 string towergeomnodeFHCAL =
"TOWERGEOM_FHCAL";
1424 RawTowerGeomContainer* towergeomFHCAL = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeFHCAL.c_str());
1431 it != all_towers.second; ++
it)
1451 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1509 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeFHCAL << endl;
1522 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeFHCAL << endl;
1534 string towernodeBECAL =
"TOWER_CALIB_BECAL";
1535 RawTowerContainer* towersBECAL = findNode::getClass<RawTowerContainer>(topNode, towernodeBECAL.c_str());
1539 RawTowerContainer* towersBECAL1 = findNode::getClass<RawTowerContainer>(topNode,
"TOWER_RAW_BECAL");
1540 RawTowerContainer* towersBECAL2 = findNode::getClass<RawTowerContainer>(topNode,
"TOWER_SIM_BECAL");
1541 cout <<
"BECAL sim: " << towersBECAL2->
size() << endl;
1542 cout <<
"BECAL raw: " << towersBECAL1->
size() << endl;
1543 cout <<
"BECAL calib: " << towersBECAL->
size() << endl;
1549 cout <<
"saving BECAL towers" << endl;
1551 string towergeomnodeBECAL =
"TOWERGEOM_BECAL";
1552 RawTowerGeomContainer* towergeomBECAL = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeBECAL.c_str());
1563 it != all_towers.second; ++
it)
1586 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1616 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeBECAL << endl;
1629 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeBECAL << endl;
1641 string towernodeHCALIN =
"TOWER_CALIB_HCALIN";
1642 RawTowerContainer* towersHCALIN = findNode::getClass<RawTowerContainer>(topNode, towernodeHCALIN.c_str());
1647 cout <<
"saving HCAL towers" << endl;
1649 string towergeomnodeHCALIN =
"TOWERGEOM_HCALIN";
1650 RawTowerGeomContainer* towergeomHCALIN = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeHCALIN.c_str());
1651 if (towergeomHCALIN)
1657 it != all_towers.second; ++
it)
1676 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1706 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeHCALIN << endl;
1719 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeHCALIN << endl;
1731 string towernodeHCALOUT =
"TOWER_CALIB_HCALOUT";
1732 RawTowerContainer* towersHCALOUT = findNode::getClass<RawTowerContainer>(topNode, towernodeHCALOUT.c_str());
1737 cout <<
"saving HCAL towers" << endl;
1739 string towergeomnodeHCALOUT =
"TOWERGEOM_HCALOUT";
1740 RawTowerGeomContainer* towergeomHCALOUT = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeHCALOUT.c_str());
1741 if (towergeomHCALOUT)
1747 it != all_towers.second; ++
it)
1766 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1796 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeHCALOUT << endl;
1809 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeHCALOUT << endl;
1821 string towernodeEHCAL =
"TOWER_CALIB_EHCAL";
1822 RawTowerContainer* towersEHCAL = findNode::getClass<RawTowerContainer>(topNode, towernodeEHCAL.c_str());
1827 cout <<
"saving HCAL towers" << endl;
1829 string towergeomnodeEHCAL =
"TOWERGEOM_EHCAL";
1830 RawTowerGeomContainer* towergeomEHCAL = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeEHCAL.c_str());
1837 it != all_towers.second; ++
it)
1856 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1886 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeEHCAL << endl;
1899 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeEHCAL << endl;
1911 string towernodeDRCALO =
"TOWER_CALIB_DRCALO";
1912 RawTowerContainer* towersDRCALO = findNode::getClass<RawTowerContainer>(topNode, towernodeDRCALO.c_str());
1917 cout <<
"saving DRCALO towers" << endl;
1919 string towergeomnodeDRCALO =
"TOWERGEOM_DRCALO";
1920 RawTowerGeomContainer* towergeomDRCALO = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeDRCALO.c_str());
1921 if (towergeomDRCALO)
1927 it != all_towers.second; ++
it)
1946 cout <<
"found DRCALO geom" << endl;
1950 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
1989 cout <<
"finished DRCALO twr loop" << endl;
1996 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeDRCALO << endl;
2009 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeDRCALO << endl;
2021 string towernodeFOCAL =
"TOWER_CALIB_FOCAL";
2022 RawTowerContainer* towersFOCAL = findNode::getClass<RawTowerContainer>(topNode, towernodeFOCAL.c_str());
2027 cout <<
"saving FOCAL towers" << endl;
2029 string towergeomnodeFOCAL =
"TOWERGEOM_FOCAL";
2030 RawTowerGeomContainer* towergeomFOCAL = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeFOCAL.c_str());
2037 it != all_towers.second; ++
it)
2056 cout <<
"found FOCAL geom" << endl;
2060 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2088 cout <<
"finished FOCAL twr loop" << endl;
2095 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeFOCAL << endl;
2108 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeFOCAL << endl;
2120 string towernodeLFHCAL =
"TOWER_CALIB_LFHCAL";
2121 RawTowerContainer* towersLFHCAL = findNode::getClass<RawTowerContainer>(topNode, towernodeLFHCAL.c_str());
2123 std::cout <<
"reading towers: " << towersLFHCAL->
size() << std::endl;
2128 cout <<
"saving LFHCAL towers" << endl;
2130 string towergeomnodeLFHCAL =
"TOWERGEOM_LFHCAL";
2131 RawTowerGeomContainer* towergeomLFHCAL = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeLFHCAL.c_str());
2132 if (towergeomLFHCAL)
2138 it != all_towers.second; ++
it)
2157 cout <<
"found LFHCAL geom" << endl;
2163 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2194 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeLFHCAL << endl;
2207 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeLFHCAL << endl;
2220 string towernodeFEMC =
"TOWER_CALIB_FEMC";
2221 RawTowerContainer* towersFEMC = findNode::getClass<RawTowerContainer>(topNode, towernodeFEMC.c_str());
2226 cout <<
"saving EMC towers" << endl;
2228 string towergeomnodeFEMC =
"TOWERGEOM_FEMC";
2229 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeFEMC.c_str());
2236 it != all_towers.second; ++
it)
2255 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2315 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeFEMC << endl;
2321 cout <<
"saved\t" <<
_nTowers_FEMC <<
"\tFEMC towers" << endl;
2328 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeFEMC << endl;
2340 string towernodeCEMC =
"TOWER_CALIB_CEMC";
2341 RawTowerContainer* towersCEMC = findNode::getClass<RawTowerContainer>(topNode, towernodeCEMC.c_str());
2346 cout <<
"saving EMC towers" << endl;
2348 string towergeomnodeCEMC =
"TOWERGEOM_CEMC";
2349 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeCEMC.c_str());
2356 it != all_towers.second; ++
it)
2375 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2406 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeCEMC << endl;
2412 cout <<
"saved\t" <<
_nTowers_CEMC <<
"\tCEMC towers" << endl;
2419 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeCEMC << endl;
2431 string towernodeEEMC =
"TOWER_CALIB_EEMC";
2432 RawTowerContainer* towersEEMC = findNode::getClass<RawTowerContainer>(topNode, towernodeEEMC.c_str());
2437 cout <<
"saving EMC towers" << endl;
2439 string towergeomnodeEEMC =
"TOWERGEOM_EEMC";
2440 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeEEMC.c_str());
2447 it != all_towers.second; ++
it)
2466 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2497 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeEEMC << endl;
2503 cout <<
"saved\t" <<
_nTowers_EEMC <<
"\tEEMC towers" << endl;
2510 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeEEMC << endl;
2523 string towernodeEEMCG =
"TOWER_CALIB_EEMC_glass";
2524 RawTowerContainer* towersEEMCG = findNode::getClass<RawTowerContainer>(topNode, towernodeEEMCG.c_str());
2529 cout <<
"saving EMC towers" << endl;
2531 string towergeomnodeEEMCG =
"TOWERGEOM_EEMC_glass";
2532 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodeEEMCG.c_str());
2539 it != all_towers.second; ++
it)
2558 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
2589 cout <<
PHWHERE <<
" ERROR: Can't find " << towergeomnodeEEMCG << endl;
2602 cout <<
PHWHERE <<
" ERROR: Can't find " << towernodeEEMCG << endl;
2613 cout <<
"saving clusters" << endl;
2621 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2624 string clusternodeFHCAL =
"CLUSTER_FHCAL";
2625 RawClusterContainer* clustersFHCAL = findNode::getClass<RawClusterContainer>(topNode, clusternodeFHCAL.c_str());
2642 if (!vertexmap->
empty())
2670 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeFHCAL << endl;
2687 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2690 string clusternodeHCALIN =
"CLUSTER_HCALIN";
2691 RawClusterContainer* clustersHCALIN = findNode::getClass<RawClusterContainer>(topNode, clusternodeHCALIN.c_str());
2708 if (!vertexmap->
empty())
2737 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeHCALIN << endl;
2754 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2757 string clusternodeHCALOUT =
"CLUSTER_HCALOUT";
2758 RawClusterContainer* clustersHCALOUT = findNode::getClass<RawClusterContainer>(topNode, clusternodeHCALOUT.c_str());
2759 if (clustersHCALOUT)
2775 if (!vertexmap->
empty())
2804 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeHCALOUT << endl;
2821 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2824 string clusternodeEHCAL =
"CLUSTER_EHCAL";
2825 RawClusterContainer* clustersEHCAL = findNode::getClass<RawClusterContainer>(topNode, clusternodeEHCAL.c_str());
2842 if (!vertexmap->
empty())
2871 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeEHCAL << endl;
2889 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2892 string clusternodeFEMC =
"CLUSTER_FEMC";
2893 RawClusterContainer* clustersFEMC = findNode::getClass<RawClusterContainer>(topNode, clusternodeFEMC.c_str());
2910 if (!vertexmap->
empty())
2939 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeFEMC << endl;
2956 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
2959 string clusternodeCEMC =
"CLUSTER_CEMC";
2960 RawClusterContainer* clustersCEMC = findNode::getClass<RawClusterContainer>(topNode, clusternodeCEMC.c_str());
2977 if (!vertexmap->
empty())
3006 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeCEMC << endl;
3023 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
3026 string clusternodeEEMC =
"CLUSTER_EEMC";
3027 RawClusterContainer* clustersEEMC = findNode::getClass<RawClusterContainer>(topNode, clusternodeEEMC.c_str());
3044 if (!vertexmap->
empty())
3073 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeEEMC << endl;
3090 cout <<
"CaloEvaluator::filling gcluster ntuple..." << endl;
3093 string clusternodeEEMCG =
"CLUSTER_EEMC_glass";
3094 RawClusterContainer* clustersEEMCG = findNode::getClass<RawClusterContainer>(topNode, clusternodeEEMCG.c_str());
3111 if (!vertexmap->
empty())
3138 cerr <<
PHWHERE <<
" ERROR: Can't find " << clusternodeEEMCG << endl;
3159 pidcontainer = findNode::getClass<EICPIDParticleContainer>(topNode,
"EICPIDParticleMap");
3160 if (pidcontainer ==
nullptr)
3162 cout << __PRETTY_FUNCTION__ <<
" Error: missing EICPIDParticleMap while _do_PID_LogLikelihood = "
3170 std::vector<std::pair<std::string, TrackSource_t>> trackMapPairs = {
3171 {
"TrackMap", TrackSource_t::all},
3172 {
"InnerTrackMap", TrackSource_t::inner},
3173 {
"SiliconTrackMap", TrackSource_t::silicon},
3176 bool foundAtLeastOneTrackSource =
false;
3177 for (
const auto& trackMapInfo : trackMapPairs)
3181 SvtxTrackMap* trackmap = findNode::getClass<SvtxTrackMap>(topNode, trackMapInfo.first);
3184 foundAtLeastOneTrackSource =
true;
3185 int nTracksInASource = 0;
3188 cout <<
"saving tracks for track map: " << trackMapInfo.first << endl;
3222 cout << __PRETTY_FUNCTION__ <<
" processing " << trkstates->second->get_name() << endl;
3224 string trackStateName = trkstates->second->get_name();
3227 cout << __PRETTY_FUNCTION__ <<
" found " << trkstates->second->get_name() << endl;
3230 if (trackStateIndex > -1)
3243 string nodename =
"G4HIT_" + trkstates->second->get_name();
3249 cout << __PRETTY_FUNCTION__ <<
" number of hits: " << hits->
size() << endl;
3256 cout << __PRETTY_FUNCTION__ <<
" checking hit id " << hit_iter->second->get_trkid() <<
" against " << track->
get_truth_track_id() << endl;
3262 cout << __PRETTY_FUNCTION__ <<
" found hit with id " << hit_iter->second->get_trkid() << endl;
3276 cout << __PRETTY_FUNCTION__ <<
" could not find " << nodename << endl;
3291 if (trackMapInfo.second == TrackSource_t::all and pidcontainer !=
nullptr)
3301 cout << __PRETTY_FUNCTION__
3302 <<
" logical error _nTracks = " <<
_nTracks
3303 <<
" logical error _track_pion_LL.size() = " <<
_track_pion_LL.size()
3322 cout <<
"PHG4TrackFastSimEval::fill_track_tree - ignore track that is not a SvtxTrack_FastSim:";
3323 track_itr->second->identify();
3330 cout <<
"saved\t" << nTracksInASource <<
"\ttracks from track map " << trackMapInfo.first <<
". Total saved tracks: " <<
_nTracks << endl;
3337 cout <<
PHWHERE <<
"SvtxTrackMap node with name '" << trackMapInfo.first <<
"' not found on node tree" << endl;
3341 if (foundAtLeastOneTrackSource ==
false)
3343 cout <<
PHWHERE <<
"Requested tracks, but found no sources on node tree. Returning" << endl;
3353 PHG4TruthInfoContainer* truthinfocontainer = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
3354 if (truthinfocontainer)
3358 cout <<
"saving MC particles" << endl;
3366 if (!g4particle)
continue;
3375 if (g4particleMother == NULL)
break;
3423 cout <<
"saved\t" <<
_nMCPart <<
"\tMC particles" << endl;
3430 cout <<
PHWHERE <<
" PHG4TruthInfoContainer node not found on node tree" << endl;
3442 PHHepMCGenEventMap* hepmceventmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
3447 cout <<
"saving HepMC output" << endl;
3451 hepmceventmap->Print();
3455 eventIter != hepmceventmap->
end();
3462 HepMC::GenEvent* truthevent = hepmcevent->
getEvent();
3466 <<
"no evt pointer under phhepmvgeneventmap found "
3476 HepMC::PdfInfo* pdfinfo = truthevent->pdf_info();
3490 cout <<
" Iterating over an event" << endl;
3492 for (HepMC::GenEvent::particle_const_iterator iter = truthevent->particles_begin();
3493 iter != truthevent->particles_end();
3505 if ((*iter)->production_vertex())
3507 for (HepMC::GenVertex::particle_iterator mother = (*iter)->production_vertex()->particles_begin(HepMC::parents);
3508 mother != (*iter)->production_vertex()->particles_end(HepMC::parents);
3526 cout <<
PHWHERE <<
" PHHepMCGenEventMap node not found on node tree" << endl;
3536 cout <<
"Resetting buffer ..." << endl;
3541 cout <<
"EventEvaluatorEIC buffer reset" << endl;
3568 cout <<
"========================= " <<
Name() <<
"::End() ============================" << endl;
3569 cout <<
" " <<
_ievent <<
" events of output written to: " <<
_filename << endl;
3570 cout <<
"===========================================================================" << endl;
3591 if (projname.find(
"FTTL_0") != std::string::npos)
3593 else if (projname.find(
"FTTL_1") != std::string::npos)
3595 else if (projname.find(
"FTTL_2") != std::string::npos)
3597 else if (projname.find(
"ETTL_0") != std::string::npos)
3599 else if (projname.find(
"ETTL_1") != std::string::npos)
3601 else if (projname.find(
"LFHCAL") != std::string::npos)
3603 else if (projname.find(
"FEMC") != std::string::npos)
3605 else if (projname.find(
"CTTL_0") != std::string::npos)
3607 else if (projname.find(
"CTTL_1") != std::string::npos)
3610 else if (projname.find(
"LBLVTX_CENTRAL_10") != std::string::npos)
3612 else if (projname.find(
"LBLVTX_CENTRAL_11") != std::string::npos)
3614 else if (projname.find(
"LBLVTX_CENTRAL_12") != std::string::npos)
3616 else if (projname.find(
"LBLVTX_CENTRAL_13") != std::string::npos)
3618 else if (projname.find(
"LBLVTX_CENTRAL_14") != std::string::npos)
3620 else if (projname.find(
"LBLVTX_CENTRAL_15") != std::string::npos)
3623 else if (projname.find(
"LBLVTX_FORWARD_20") != std::string::npos)
3625 else if (projname.find(
"LBLVTX_FORWARD_21") != std::string::npos)
3627 else if (projname.find(
"LBLVTX_FORWARD_22") != std::string::npos)
3629 else if (projname.find(
"LBLVTX_FORWARD_23") != std::string::npos)
3631 else if (projname.find(
"LBLVTX_FORWARD_24") != std::string::npos)
3634 else if (projname.find(
"LBLVTX_BACKWARD_30") != std::string::npos)
3636 else if (projname.find(
"LBLVTX_BACKWARD_31") != std::string::npos)
3638 else if (projname.find(
"LBLVTX_BACKWARD_32") != std::string::npos)
3640 else if (projname.find(
"LBLVTX_BACKWARD_33") != std::string::npos)
3642 else if (projname.find(
"LBLVTX_BACKWARD_34") != std::string::npos)
3645 else if (projname.find(
"BARREL_0") != std::string::npos)
3647 else if (projname.find(
"BARREL_1") != std::string::npos)
3649 else if (projname.find(
"BARREL_2") != std::string::npos)
3651 else if (projname.find(
"BARREL_3") != std::string::npos)
3653 else if (projname.find(
"BARREL_4") != std::string::npos)
3655 else if (projname.find(
"BARREL_5") != std::string::npos)
3658 else if (projname.find(
"EFST_0") != std::string::npos)
3660 else if (projname.find(
"EFST_1") != std::string::npos)
3662 else if (projname.find(
"EFST_2") != std::string::npos)
3664 else if (projname.find(
"EFST_3") != std::string::npos)
3666 else if (projname.find(
"EFST_4") != std::string::npos)
3668 else if (projname.find(
"EFST_5") != std::string::npos)
3670 else if (projname.find(
"EFST_6") != std::string::npos)
3673 else if (projname.find(
"FST_0") != std::string::npos)
3675 else if (projname.find(
"FST_1") != std::string::npos)
3677 else if (projname.find(
"FST_2") != std::string::npos)
3679 else if (projname.find(
"FST_3") != std::string::npos)
3681 else if (projname.find(
"FST_4") != std::string::npos)
3683 else if (projname.find(
"FST_5") != std::string::npos)
3685 else if (projname.find(
"FST_6") != std::string::npos)
3688 else if (projname.find(
"EHCAL") != std::string::npos)
3690 else if (projname.find(
"EEMC") != std::string::npos)
3692 else if (projname.find(
"HCALIN") != std::string::npos)
3694 else if (projname.find(
"HCALOUT") != std::string::npos)
3696 else if (projname.find(
"CEMC") != std::string::npos)
3698 else if (projname.find(
"EEMC_glass_0") != std::string::npos)
3700 else if (projname.find(
"BECAL") != std::string::npos)
3705 else if (projname.find(
"ZDCsurrogate") != std::string::npos)
3707 else if (projname.find(
"rpTruth") != std::string::npos)
3709 else if (projname.find(
"b0Truth") != std::string::npos)
3711 else if (projname.find(
"rpTruth2") != std::string::npos)
3713 else if (projname.find(
"offMomTruth") != std::string::npos)
3716 else if (projname.find(
"BH_1") != std::string::npos)
3718 else if (projname.find(
"BH_FORWARD_PLUS") != std::string::npos)
3720 else if (projname.find(
"BH_FORWARD_NEG") != std::string::npos)
3723 else if (projname.find(
"RWELL_0") != std::string::npos)
3725 else if (projname.find(
"RWELL_1") != std::string::npos)
3727 else if (projname.find(
"RWELL_2") != std::string::npos)
3731 else if (projname.find(
"EST_0") != std::string::npos)
3733 else if (projname.find(
"EST_1") != std::string::npos)
3735 else if (projname.find(
"EST_2") != std::string::npos)
3737 else if (projname.find(
"EST_3") != std::string::npos)
3739 else if (projname.find(
"EST_4") != std::string::npos)
3741 else if (projname.find(
"EST_5") != std::string::npos)
3743 else if (projname.find(
"EST_6") != std::string::npos)
3746 else if (projname.find(
"FGEM_0") != std::string::npos)
3748 else if (projname.find(
"FGEM_1") != std::string::npos)
3751 else if (projname.find(
"EGEM_0") != std::string::npos)
3753 else if (projname.find(
"EGEM_1") != std::string::npos)
3757 else if (projname.find(
"LFHCAL_0") != std::string::npos)
3759 else if (projname.find(
"LFHCAL_1") != std::string::npos)
3761 else if (projname.find(
"LFHCAL_2") != std::string::npos)
3763 else if (projname.find(
"LFHCAL_3") != std::string::npos)
3765 else if (projname.find(
"LFHCAL_4") != std::string::npos)
3767 else if (projname.find(
"LFHCAL_5") != std::string::npos)
3769 else if (projname.find(
"LFHCAL_6") != std::string::npos)
3771 else if (projname.find(
"LFHCAL_7") != std::string::npos)
3774 else if (projname.find(
"BARR_0") != std::string::npos)
3776 else if (projname.find(
"BARR_1") != std::string::npos)
3778 else if (projname.find(
"BARR_2") != std::string::npos)
3780 else if (projname.find(
"BARR_3") != std::string::npos)
3782 else if (projname.find(
"BARR_4") != std::string::npos)
3784 else if (projname.find(
"SVTX_0") != std::string::npos)
3786 else if (projname.find(
"SVTX_1") != std::string::npos)
3788 else if (projname.find(
"SVTX_2") != std::string::npos)
3790 else if (projname.find(
"SVTX_3") != std::string::npos)
3792 else if (projname.find(
"SVTX_4") != std::string::npos)
3795 else if (projname.find(
"BARR") != std::string::npos)
3797 else if (projname.find(
"SVTX") != std::string::npos)
3828 return "LBLVTX_CENTRAL_10";
3830 return "LBLVTX_CENTRAL_11";
3832 return "LBLVTX_CENTRAL_12";
3834 return "LBLVTX_CENTRAL_13";
3836 return "LBLVTX_CENTRAL_14";
3838 return "LBLVTX_CENTRAL_15";
3841 return "LBLVTX_FORWARD_20";
3843 return "LBLVTX_FORWARD_21";
3845 return "LBLVTX_FORWARD_22";
3847 return "LBLVTX_FORWARD_23";
3849 return "LBLVTX_FORWARD_24";
3852 return "LBLVTX_BACKWARD_30";
3854 return "LBLVTX_BACKWARD_31";
3856 return "LBLVTX_BACKWARD_32";
3858 return "LBLVTX_BACKWARD_33";
3860 return "LBLVTX_BACKWARD_34";
3901 return "EEMC_glass";
3908 return "ZDCsurrogate";
3916 return "offMomTruth";
3921 return "BH_FORWARD_PLUS";
3923 return "BH_FORWARD_NEG";
4042 cout <<
"\t... event info variables reset" << endl;
4056 cout <<
"\t... vertex variables reset" << endl;
4079 cout <<
"\t... hit variables reset" << endl;
4106 cout <<
"\t... FHCAL variables reset" << endl;
4121 cout <<
"\t... BECAL variables reset" << endl;
4148 cout <<
"\t... FEMC variables reset" << endl;
4175 cout <<
"\t... CEMC variables reset" << endl;
4202 cout <<
"\t... HCALIN variables reset" << endl;
4209 cout <<
"\t... resetting HCALOUT variables" << endl;
4233 cout <<
"\t... HCALOUT variables reset" << endl;
4240 cout <<
"\t... resetting EEMC variables" << endl;
4264 cout <<
"\t... EEMC variables reset" << endl;
4271 cout <<
"\t... resetting EEMCG variables" << endl;
4295 cout <<
"\t... EEMCG variables reset" << endl;
4302 cout <<
"\t... resetting DRCALO variables" << endl;
4316 cout <<
"\t... DRCALO variables reset" << endl;
4323 cout <<
"\t... resetting FOCAL variables" << endl;
4337 cout <<
"\t... FOCAL variables reset" << endl;
4344 cout <<
"\t... resetting LFHCAL variables" << endl;
4357 cout <<
"\t... LFHCAL variables reset" << endl;
4364 cout <<
"\t... resetting Track variables" << endl;
4411 cout <<
"\t... track variables reset" << endl;
4454 cout <<
"\t... MC variables reset" << endl;