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