ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
EventEvaluatorEIC.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EventEvaluatorEIC.h
1
#ifndef G4EVAL_EVENTEVALUATOREIC_H
2
#define G4EVAL_EVENTEVALUATOREIC_H
3
4
//===============================================
8
//===============================================
9
10
#include <
fun4all/SubsysReco.h
>
11
12
#include <set>
13
#include <string>
14
#include <vector>
15
16
class
CaloEvalStack
;
17
class
PHCompositeNode
;
18
class
PHHepMCGenEventMap
;
19
class
PHHepMCGenEvent
;
20
class
TFile;
21
class
TNtuple;
22
class
TTree;
//Added by Barak
23
32
class
EventEvaluatorEIC
:
public
SubsysReco
33
{
34
public
:
35
enum class
TrackSource_t
: unsigned short
36
{
37
all = 0,
38
inner = 1,
39
silicon = 2,
40
ttl
= 3
41
};
42
43
EventEvaluatorEIC
(
const
std::string&
name
=
"EventEvaluatorEIC"
,
44
const
std::string&
filename
=
"g4eval_cemc.root"
);
45
~EventEvaluatorEIC
()
override
{};
46
47
int
Init
(
PHCompositeNode
* topNode)
override
;
48
int
process_event
(
PHCompositeNode
* topNode)
override
;
49
int
End
(
PHCompositeNode
* topNode)
override
;
50
51
void
set_strict
(
bool
b
) {
_strict
=
b
; }
52
53
void
set_do_store_event_level_info
(
bool
b
) {
_do_store_event_info
=
b
; }
54
void
set_do_FHCAL
(
bool
b
) {
_do_FHCAL
=
b
; }
55
void
set_do_BECAL
(
bool
b
) {
_do_BECAL
=
b
; }
56
void
set_do_HCALIN
(
bool
b
) {
_do_HCALIN
=
b
; }
57
void
set_do_HCALOUT
(
bool
b
) {
_do_HCALOUT
=
b
; }
58
void
set_do_EHCAL
(
bool
b
) {
_do_EHCAL
=
b
; }
59
void
set_do_FEMC
(
bool
b
) {
_do_FEMC
=
b
; }
60
void
set_do_CEMC
(
bool
b
) {
_do_CEMC
=
b
; }
61
void
set_do_EEMC
(
bool
b
) {
_do_EEMC
=
b
; }
62
void
set_do_EEMCG
(
bool
b
) {
_do_EEMCG
=
b
; }
63
void
set_do_DRCALO
(
bool
b
) {
_do_DRCALO
=
b
; }
64
void
set_do_FOCAL
(
bool
b
) {
_do_FOCAL
=
b
; }
65
void
set_do_LFHCAL
(
bool
b
) {
_do_LFHCAL
=
b
; }
66
void
set_do_HITS
(
bool
b
) {
_do_HITS
=
b
; }
67
void
set_do_HITS_ABSORBER
(
bool
b
) {
_do_HITS_ABSORBER
=
b
; }
68
void
set_do_HITS_CALO
(
bool
b
) {
_do_HITS_CALO
=
b
; }
69
void
set_do_TRACKS
(
bool
b
) {
_do_TRACKS
=
b
; }
70
void
set_do_PID_LogLikelihood
(
bool
b
) {
_do_PID_LogLikelihood
=
b
; }
71
void
set_do_CLUSTERS
(
bool
b
) {
_do_CLUSTERS
=
b
; }
72
void
set_do_VERTEX
(
bool
b
) {
_do_VERTEX
=
b
; }
73
void
set_do_PROJECTIONS
(
bool
b
) {
_do_PROJECTIONS
=
b
; }
74
void
set_do_MCPARTICLES
(
bool
b
) {
_do_MCPARTICLES
=
b
; }
75
void
set_do_HEPMC
(
bool
b
) {
_do_HEPMC
=
b
; }
76
void
set_do_GEOMETRY
(
bool
b
) {
_do_GEOMETRY
=
b
; }
77
void
set_do_BLACKHOLE
(
bool
b
) {
_do_BLACKHOLE
=
b
; }
78
79
// limit the tracing of towers and clusters back to the truth particles
80
// to only those reconstructed objects above a particular energy
81
// threshold (evaluation for objects above threshold unaffected)
82
void
set_reco_tracing_energy_threshold
(
float
thresh,
int
caloid)
83
{
84
_reco_e_threshold
[caloid] = thresh;
85
}
86
void
set_reco_tracing_energy_thresholdMC
(
float
thresh)
87
{
88
_reco_e_thresholdMC
= thresh;
89
}
90
92
void
set_depth_MCstack
(
int
d
)
93
{
94
_depth_MCstack
=
d
;
95
}
96
97
private
:
98
bool
_do_store_event_info
;
99
bool
_do_FHCAL
;
100
bool
_do_BECAL
;
101
bool
_do_HCALIN
;
102
bool
_do_HCALOUT
;
103
bool
_do_EHCAL
;
104
bool
_do_FEMC
;
105
bool
_do_CEMC
;
106
bool
_do_EEMC
;
107
bool
_do_EEMCG
;
108
bool
_do_DRCALO
;
109
bool
_do_FOCAL
;
110
bool
_do_LFHCAL
;
111
bool
_do_HITS
;
112
bool
_do_HITS_ABSORBER
;
113
bool
_do_HITS_CALO
;
114
bool
_do_TRACKS
;
115
bool
_do_CLUSTERS
;
116
bool
_do_VERTEX
;
117
bool
_do_PROJECTIONS
;
118
bool
_do_PID_LogLikelihood
=
false
;
119
bool
_do_MCPARTICLES
;
120
bool
_do_HEPMC
;
121
bool
_do_GEOMETRY
;
122
bool
_do_BLACKHOLE
;
123
unsigned
int
_ievent
;
124
125
// Event level info
126
float
_cross_section
;
127
float
_event_weight
;
128
int
_n_generator_accepted
;
129
130
// track hits
131
int
_nHitsLayers
;
132
int
*
_hits_layerID
;
133
int
*
_hits_trueID
;
134
float
*
_hits_x
;
135
float
*
_hits_y
;
136
float
*
_hits_z
;
137
float
*
_hits_x2
;
138
float
*
_hits_y2
;
139
float
*
_hits_z2
;
140
float
*
_hits_t
;
141
float
*
_hits_edep
;
142
float
*
_hits_lightyield
;
143
int
*
_hits_isAbsorber
;
144
145
// towers
146
int
_nTowers_FHCAL
;
147
float
*
_tower_FHCAL_E
;
148
int
*
_tower_FHCAL_iEta
;
149
int
*
_tower_FHCAL_iPhi
;
150
int
*
_tower_FHCAL_trueID
;
151
152
// towers
153
int
_nTowers_BECAL
;
154
float
*
_tower_BECAL_E
;
155
int
*
_tower_BECAL_iEta
;
156
int
*
_tower_BECAL_iPhi
;
157
int
*
_tower_BECAL_trueID
;
158
159
// towers
160
int
_nTowers_HCALIN
;
161
float
*
_tower_HCALIN_E
;
162
int
*
_tower_HCALIN_iEta
;
163
int
*
_tower_HCALIN_iPhi
;
164
int
*
_tower_HCALIN_trueID
;
165
166
// towers
167
int
_nTowers_HCALOUT
;
168
float
*
_tower_HCALOUT_E
;
169
int
*
_tower_HCALOUT_iEta
;
170
int
*
_tower_HCALOUT_iPhi
;
171
int
*
_tower_HCALOUT_trueID
;
172
173
int
_nTowers_EHCAL
;
174
float
*
_tower_EHCAL_E
;
175
int
*
_tower_EHCAL_iEta
;
176
int
*
_tower_EHCAL_iPhi
;
177
int
*
_tower_EHCAL_trueID
;
178
179
int
_nTowers_DRCALO
;
180
float
*
_tower_DRCALO_E
;
181
int
*
_tower_DRCALO_NScint
;
182
int
*
_tower_DRCALO_NCerenkov
;
183
int
*
_tower_DRCALO_iEta
;
184
int
*
_tower_DRCALO_iPhi
;
185
int
*
_tower_DRCALO_trueID
;
186
187
int
_nTowers_FOCAL
;
188
float
*
_tower_FOCAL_E
;
189
int
*
_tower_FOCAL_NScint
;
190
int
*
_tower_FOCAL_NCerenkov
;
191
int
*
_tower_FOCAL_iEta
;
192
int
*
_tower_FOCAL_iPhi
;
193
int
*
_tower_FOCAL_trueID
;
194
195
int
_nTowers_LFHCAL
;
196
float
*
_tower_LFHCAL_E
;
197
int
*
_tower_LFHCAL_iEta
;
198
int
*
_tower_LFHCAL_iPhi
;
199
int
*
_tower_LFHCAL_iL
;
200
int
*
_tower_LFHCAL_trueID
;
201
202
int
_nTowers_FEMC
;
203
float
*
_tower_FEMC_E
;
204
int
*
_tower_FEMC_iEta
;
205
int
*
_tower_FEMC_iPhi
;
206
int
*
_tower_FEMC_trueID
;
207
208
int
_nTowers_EEMC
;
209
float
*
_tower_EEMC_E
;
210
int
*
_tower_EEMC_iEta
;
211
int
*
_tower_EEMC_iPhi
;
212
int
*
_tower_EEMC_trueID
;
213
214
int
_nTowers_EEMCG
;
215
float
*
_tower_EEMCG_E
;
216
int
*
_tower_EEMCG_iEta
;
217
int
*
_tower_EEMCG_iPhi
;
218
int
*
_tower_EEMCG_trueID
;
219
220
int
_nTowers_CEMC
;
221
float
*
_tower_CEMC_E
;
222
int
*
_tower_CEMC_iEta
;
223
int
*
_tower_CEMC_iPhi
;
224
int
*
_tower_CEMC_trueID
;
225
226
// clusters
227
int
_nclusters_FHCAL
;
228
float
*
_cluster_FHCAL_E
;
229
float
*
_cluster_FHCAL_Eta
;
230
float
*
_cluster_FHCAL_Phi
;
231
int
*
_cluster_FHCAL_NTower
;
232
int
*
_cluster_FHCAL_trueID
;
233
234
int
_nclusters_HCALIN
;
235
float
*
_cluster_HCALIN_E
;
236
float
*
_cluster_HCALIN_Eta
;
237
float
*
_cluster_HCALIN_Phi
;
238
int
*
_cluster_HCALIN_NTower
;
239
int
*
_cluster_HCALIN_trueID
;
240
241
int
_nclusters_HCALOUT
;
242
float
*
_cluster_HCALOUT_E
;
243
float
*
_cluster_HCALOUT_Eta
;
244
float
*
_cluster_HCALOUT_Phi
;
245
int
*
_cluster_HCALOUT_NTower
;
246
int
*
_cluster_HCALOUT_trueID
;
247
248
int
_nclusters_EHCAL
;
249
float
*
_cluster_EHCAL_E
;
250
float
*
_cluster_EHCAL_Eta
;
251
float
*
_cluster_EHCAL_Phi
;
252
int
*
_cluster_EHCAL_NTower
;
253
int
*
_cluster_EHCAL_trueID
;
254
255
int
_nclusters_FEMC
;
256
float
*
_cluster_FEMC_E
;
257
float
*
_cluster_FEMC_Eta
;
258
float
*
_cluster_FEMC_Phi
;
259
int
*
_cluster_FEMC_NTower
;
260
int
*
_cluster_FEMC_trueID
;
261
262
int
_nclusters_CEMC
;
263
float
*
_cluster_CEMC_E
;
264
float
*
_cluster_CEMC_Eta
;
265
float
*
_cluster_CEMC_Phi
;
266
int
*
_cluster_CEMC_NTower
;
267
int
*
_cluster_CEMC_trueID
;
268
269
int
_nclusters_EEMC
;
270
float
*
_cluster_EEMC_E
;
271
float
*
_cluster_EEMC_Eta
;
272
float
*
_cluster_EEMC_Phi
;
273
int
*
_cluster_EEMC_NTower
;
274
int
*
_cluster_EEMC_trueID
;
275
276
int
_nclusters_EEMCG
;
277
float
*
_cluster_EEMCG_E
;
278
float
*
_cluster_EEMCG_Eta
;
279
float
*
_cluster_EEMCG_Phi
;
280
int
*
_cluster_EEMCG_NTower
;
281
int
*
_cluster_EEMCG_trueID
;
282
283
// vertex
284
float
_vertex_x
;
285
float
_vertex_y
;
286
float
_vertex_z
;
287
int
_vertex_NCont
;
288
float
_vertex_true_x
;
289
float
_vertex_true_y
;
290
float
_vertex_true_z
;
291
292
// tracks
293
int
_nTracks
;
294
float
*
_track_ID
;
295
short
*
_track_charge
;
296
float
*
_track_px
;
297
float
*
_track_py
;
298
float
*
_track_pz
;
299
float
*
_track_x
;
300
float
*
_track_y
;
301
float
*
_track_z
;
302
float
*
_track_ndf
;
303
float
*
_track_chi2
;
304
float
*
_track_dca
;
305
float
*
_track_dca_2d
;
306
float
*
_track_trueID
;
307
unsigned
short
*
_track_source
;
308
309
// log likelihood summary for PID detectors, per track information
310
std::vector<float>
_track_pion_LL
;
311
std::vector<float>
_track_kaon_LL
;
312
std::vector<float>
_track_proton_LL
;
313
314
int
_nProjections
;
315
float
*
_track_ProjTrackID
;
316
int
*
_track_ProjLayer
;
317
float
*
_track_TLP_x
;
318
float
*
_track_TLP_y
;
319
float
*
_track_TLP_z
;
320
float
*
_track_TLP_t
;
321
float
*
_track_TLP_px
;
322
float
*
_track_TLP_py
;
323
float
*
_track_TLP_pz
;
324
float
*
_track_TLP_true_x
;
325
float
*
_track_TLP_true_y
;
326
float
*
_track_TLP_true_z
;
327
float
*
_track_TLP_true_t
;
328
329
// MC particles
330
int
_nMCPart
;
331
int
*
_mcpart_ID
;
332
int
*
_mcpart_ID_parent
;
333
int
*
_mcpart_PDG
;
334
float
*
_mcpart_E
;
335
float
*
_mcpart_px
;
336
float
*
_mcpart_py
;
337
float
*
_mcpart_pz
;
338
float
*
_mcpart_x
;
339
float
*
_mcpart_y
;
340
float
*
_mcpart_z
;
341
int
*
_mcpart_BCID
;
342
343
// MC particles
344
int
_nHepmcp
;
345
int
_hepmcp_procid
;
346
float
_hepmcp_x1
;
347
float
_hepmcp_x2
;
348
float
_hepmcp_Q2
;
349
float
_hepmcp_vtx_x
;
350
float
_hepmcp_vtx_y
;
351
float
_hepmcp_vtx_z
;
352
float
_hepmcp_vtx_t
;
353
// float* _hepmcp_ID_parent;
354
int
*
_hepmcp_status
;
355
int
*
_hepmcp_PDG
;
356
float
*
_hepmcp_E
;
357
float
*
_hepmcp_px
;
358
float
*
_hepmcp_py
;
359
float
*
_hepmcp_pz
;
360
int
*
_hepmcp_m1
;
361
int
*
_hepmcp_m2
;
362
int
*
_hepmcp_BCID
;
363
364
int
_calo_ID
;
365
int
_calo_towers_N
;
366
int
*
_calo_towers_iEta
;
367
int
*
_calo_towers_iPhi
;
368
int
*
_calo_towers_iL
;
369
float
*
_calo_towers_Eta
;
370
float
*
_calo_towers_Phi
;
371
float
*
_calo_towers_x
;
372
float
*
_calo_towers_y
;
373
float
*
_calo_towers_z
;
374
int
*
_geometry_done
;
375
376
float
*
_reco_e_threshold
;
377
float
_reco_e_thresholdMC
;
378
int
_depth_MCstack
;
379
380
CaloEvalStack
*
_caloevalstackFHCAL
;
381
CaloEvalStack
*
_caloevalstackBECAL
;
382
CaloEvalStack
*
_caloevalstackHCALIN
;
383
CaloEvalStack
*
_caloevalstackHCALOUT
;
384
CaloEvalStack
*
_caloevalstackEHCAL
;
385
CaloEvalStack
*
_caloevalstackDRCALO
;
386
CaloEvalStack
*
_caloevalstackFOCAL
;
387
CaloEvalStack
*
_caloevalstackLFHCAL
;
388
CaloEvalStack
*
_caloevalstackFEMC
;
389
CaloEvalStack
*
_caloevalstackCEMC
;
390
CaloEvalStack
*
_caloevalstackEEMC
;
391
CaloEvalStack
*
_caloevalstackEEMCG
;
392
393
//----------------------------------
394
// evaluator output ntuples
395
396
bool
_strict
;
397
398
TTree*
_event_tree
;
//Added by Barak
399
TTree*
_geometry_tree
;
//Added by Barak
400
401
// evaluator output file
402
std::string
_filename
;
403
TFile*
_tfile
;
404
TFile*
_tfile_geometry
;
405
406
// subroutines
407
int
GetProjectionIndex
(std::string projname);
408
std::string
GetProjectionNameFromIndex
(
int
projindex);
409
void
fillOutputNtuples
(
PHCompositeNode
* topNode);
410
void
resetGeometryArrays
();
411
void
resetBuffer
();
412
413
const
int
_maxNHits
= 1000000;
414
const
int
_maxNTowers
= 50 * 50;
415
const
int
_maxNTowersCentral
= 2000;
416
const
int
_maxNTowersDR
= 3000 * 3000;
417
const
int
_maxNTowersCalo
= 5000000;
418
const
int
_maxNclusters
= 100;
419
const
int
_maxNclustersCentral
= 2000;
420
const
int
_maxNTracks
= 200;
421
const
int
_maxNProjections
= 2000;
422
const
int
_maxNMCPart
= 100000;
423
const
int
_maxNHepmcp
= 1000;
424
const
int
_maxNCalo
= 15;
425
426
enum
calotype
427
{
428
kFHCAL
= 0,
429
kFEMC
= 1,
430
kDRCALO
= 2,
431
kEEMC
= 3,
432
kCEMC
= 4,
433
kEHCAL
= 5,
434
kHCALIN
= 6,
435
kHCALOUT
= 7,
436
kLFHCAL
= 8,
437
kEEMCG
= 9,
438
kBECAL
= 10,
439
kFOCAL
= 11
440
};
441
};
442
443
#endif // G4EVAL_EVENTEVALUATOR_H
fun4all_eicdetectors
blob
master
analysis
eicevaluator
EventEvaluatorEIC.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:45
using
1.8.2 with
ECCE GitHub integration