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
CaloEvaluator.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CaloEvaluator.h
1
#ifndef G4EVAL_CALOEVALUATOR_H
2
#define G4EVAL_CALOEVALUATOR_H
3
4
//===============================================
8
//===============================================
9
10
#include <
fun4all/SubsysReco.h
>
11
12
#include <set>
13
#include <string>
14
15
class
CaloEvalStack
;
16
class
PHCompositeNode
;
17
class
TFile;
18
class
TNtuple;
19
class
TTree;
//Added by Barak
20
29
class
CaloEvaluator
:
public
SubsysReco
30
{
31
public
:
32
CaloEvaluator
(
const
std::string &
name
=
"CALOEVALUATOR"
,
33
const
std::string &caloname =
"CEMC"
,
34
const
std::string &
filename
=
"g4eval_cemc.root"
);
35
~CaloEvaluator
()
override
{};
36
37
int
Init
(
PHCompositeNode
*topNode)
override
;
38
int
process_event
(
PHCompositeNode
*topNode)
override
;
39
int
End
(
PHCompositeNode
*topNode)
override
;
40
41
void
set_strict
(
bool
b
) {
_strict
=
b
; }
42
// funtions to limit the tracing to only part of the event ---------
43
// and speed up the evaluation
44
45
// when tracing truth showers limit the trace to showers
46
// that result from truth particles with a particular embed flag set
47
// useful if you only want to know about that electron you
48
// embedded into a central hijing event
49
// (evaluation for truth objects with matching embed flag set unaffected)
50
void
add_truth_tracing_embed_flag
(
int
flag)
51
{
52
_truth_trace_embed_flags
.insert(flag);
53
}
54
55
// limit the tracing of truth particles to those above some
56
// theshold energy. useful for tracing only high energy particles
57
// and ignoring low energy truth particles from a hijing event
58
// (evaluation for objects above threshold unaffected)
59
void
set_truth_tracing_energy_threshold
(
float
thresh)
60
{
61
_truth_e_threshold
= thresh;
62
}
63
64
// limit the tracing of towers and clusters back to the truth particles
65
// to only those reconstructed objects above a particular energy
66
// threshold (evaluation for objects above threshold unaffected)
67
void
set_reco_tracing_energy_threshold
(
float
thresh)
68
{
69
_reco_e_threshold
= thresh;
70
}
71
72
// functions to limit the output size ------------------
73
// will no evaluate or write out these particular ntuples
74
// mostly intended for size savings, but some time savings will result
75
void
set_do_gpoint_eval
(
bool
b
) {
_do_gpoint_eval
=
b
; }
76
void
set_do_gshower_eval
(
bool
b
) {
_do_gshower_eval
=
b
; }
77
void
set_do_tower_eval
(
bool
b
) {
_do_tower_eval
=
b
; }
78
void
set_do_cluster_eval
(
bool
b
) {
_do_cluster_eval
=
b
; }
79
80
private
:
81
std::string
_caloname
;
82
83
unsigned
int
_ievent
;
84
85
//Added by Barak
86
unsigned
int
_towerID_debug
;
87
int
_ieta_debug
;
88
int
_iphi_debug
;
89
float
_eta_debug
;
90
float
_phi_debug
;
91
float
_e_debug
;
92
float
_x_debug
;
93
float
_y_debug
;
94
float
_z_debug
;
95
96
std::set<int>
_truth_trace_embed_flags
;
97
float
_truth_e_threshold
;
98
float
_reco_e_threshold
;
99
100
CaloEvalStack
*
_caloevalstack
;
101
102
//----------------------------------
103
// evaluator output ntuples
104
105
bool
_strict
;
106
107
bool
_do_gpoint_eval
;
108
bool
_do_gshower_eval
;
109
bool
_do_tower_eval
;
110
bool
_do_cluster_eval
;
111
112
TNtuple *
_ntp_gpoint
;
113
TNtuple *
_ntp_gshower
;
114
TNtuple *
_ntp_tower
;
115
TTree *
_tower_debug
;
//Added by Barak
116
TNtuple *
_ntp_cluster
;
117
118
// evaluator output file
119
std::string
_filename
;
120
TFile *
_tfile
;
121
122
// subroutines
123
void
printInputInfo
(
PHCompositeNode
*topNode);
124
void
fillOutputNtuples
(
PHCompositeNode
*topNode);
125
void
printOutputInfo
(
PHCompositeNode
*topNode);
126
};
127
128
#endif // G4EVAL_CALOEVALUATOR_H
coresoftware
blob
master
simulation
g4simulation
g4eval
CaloEvaluator.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:42
using
1.8.2 with
ECCE GitHub integration