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
JetRecoEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file JetRecoEval.h
1
#ifndef G4EVAL_JETRECOEVAL_H
2
#define G4EVAL_JETRECOEVAL_H
3
4
#include "
JetTruthEval.h
"
5
6
#include <
jetbase/Jet.h
>
7
8
#include <map>
9
#include <set>
10
#include <string>
11
#include <utility>
12
13
class
CaloEvalStack
;
14
15
class
JetContainer
;
16
17
class
PHCompositeNode
;
18
19
class
PHG4Hit
;
20
class
PHG4Particle
;
21
class
PHG4Shower
;
22
23
class
RawClusterContainer
;
24
class
RawTowerContainer
;
25
26
class
SvtxEvalStack
;
27
class
SvtxTrackMap
;
28
29
class
JetRecoEval
30
{
31
public
:
34
JetRecoEval
(
PHCompositeNode
* topNode,
35
const
std::string
& recojetname,
36
const
std::string
& truthjetname);
37
virtual
~JetRecoEval
();
38
40
void
next_event
(
PHCompositeNode
* topNode);
41
43
void
do_caching
(
bool
do_cache)
44
{
45
_do_cache
= do_cache;
46
_jettrutheval
.
do_caching
(do_cache);
47
}
48
51
void
set_strict
(
bool
strict)
52
{
53
_strict
= strict;
54
_jettrutheval
.
set_strict
(strict);
55
}
56
58
unsigned
int
get_errors
() {
return
_errors
+
_jettrutheval
.
get_errors
(); }
59
61
void
set_verbosity
(
int
verbosity
)
62
{
63
_verbosity
=
verbosity
;
64
_jettrutheval
.
set_verbosity
(verbosity);
65
}
66
68
JetTruthEval
*
get_truth_eval
() {
return
&
_jettrutheval
; }
69
71
SvtxEvalStack
*
get_svtx_eval_stack
() {
return
_jettrutheval
.
get_svtx_eval_stack
(); }
72
74
CaloEvalStack
*
get_cemc_eval_stack
() {
return
_jettrutheval
.
get_cemc_eval_stack
(); }
75
77
CaloEvalStack
*
get_hcalin_eval_stack
() {
return
_jettrutheval
.
get_hcalin_eval_stack
(); }
78
80
CaloEvalStack
*
get_hcalout_eval_stack
() {
return
_jettrutheval
.
get_hcalout_eval_stack
(); }
81
83
CaloEvalStack
*
get_femc_eval_stack
() {
return
_jettrutheval
.
get_femc_eval_stack
(); }
84
86
CaloEvalStack
*
get_fhcal_eval_stack
() {
return
_jettrutheval
.
get_fhcal_eval_stack
(); }
87
89
CaloEvalStack
*
get_eemc_eval_stack
() {
return
_jettrutheval
.
get_eemc_eval_stack
(); }
90
// ---reduced sim node or better----------------------------------------------
91
93
std::set<PHG4Shower*>
all_truth_showers
(
Jet
* recojet);
94
96
std::set<PHG4Particle*>
all_truth_particles
(
Jet
* recojet);
97
99
std::set<Jet*>
all_truth_jets
(
Jet
* recojet);
100
102
Jet
*
max_truth_jet_by_energy
(
Jet
* recojet);
103
105
std::set<Jet*>
all_jets_from
(
Jet
* truthjet);
106
108
Jet
*
best_jet_from
(
Jet
* truthjet);
109
112
Jet
*
unique_reco_jet_from_truth
(
Jet
* truthjet);
113
116
Jet
*
unique_truth_jet_from_reco
(
Jet
* recojet);
117
119
float
get_energy_contribution
(
Jet
* recojet,
Jet
* truthjet);
120
122
float
get_energy_contribution
(
Jet
* recojet,
Jet::SRC
src);
123
124
void
set_track_nodename
(
const
std::string
&
name
);
125
126
// ---full sim node required--------------------------------------------------
127
129
std::set<PHG4Hit*>
all_truth_hits
(
Jet
* recojet);
130
131
private
:
132
void
get_node_pointers
(
PHCompositeNode
* topNode);
133
134
JetTruthEval
_jettrutheval
;
135
std::string
_recojetname
;
136
std::string
_truthjetname
;
137
138
JetContainer
*
_recojets
=
nullptr
;
139
JetContainer
*
_truthjets
=
nullptr
;
140
141
SvtxTrackMap
*
_trackmap
=
nullptr
;
142
RawTowerContainer
*
_cemctowers
=
nullptr
;
143
RawClusterContainer
*
_cemcclusters
=
nullptr
;
144
RawTowerContainer
*
_hcalintowers
=
nullptr
;
145
RawClusterContainer
*
_hcalinclusters
=
nullptr
;
146
RawTowerContainer
*
_hcalouttowers
=
nullptr
;
147
RawClusterContainer
*
_hcaloutclusters
=
nullptr
;
148
RawTowerContainer
*
_femctowers
=
nullptr
;
149
RawClusterContainer
*
_femcclusters
=
nullptr
;
150
RawTowerContainer
*
_fhcaltowers
=
nullptr
;
151
RawClusterContainer
*
_fhcalclusters
=
nullptr
;
152
RawTowerContainer
*
_eemctowers
=
nullptr
;
153
RawClusterContainer
*
_eemcclusters
=
nullptr
;
154
155
bool
_strict
=
false
;
156
int
_verbosity
= 1;
157
unsigned
int
_errors
= 0;
158
159
bool
_do_cache
=
true
;
160
std::map<Jet*, std::set<PHG4Shower*> >
_cache_all_truth_showers
;
161
std::map<Jet*, std::set<PHG4Particle*> >
_cache_all_truth_particles
;
162
std::map<Jet*, std::set<Jet*> >
_cache_all_truth_jets
;
163
std::map<Jet*, Jet*>
_cache_max_truth_jet_by_energy
;
164
std::map<Jet*, std::set<Jet*> >
_cache_all_jets_from
;
165
std::map<Jet*, Jet*>
_cache_best_jet_from
;
166
std::map<std::pair<Jet*, Jet*>,
float
>
_cache_get_energy_contribution
;
167
std::map<std::pair<Jet*, Jet::SRC>,
float
>
_cache_get_energy_contribution_src
;
168
std::map<Jet*, std::set<PHG4Hit*> >
_cache_all_truth_hits
;
169
std::string
m_TrackNodeName
=
"SvtxTrackMap"
;
170
};
171
172
#endif // G4EVAL_JETRECOEVAL_H
coresoftware
blob
master
simulation
g4simulation
g4eval
JetRecoEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration