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
JetTruthEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file JetTruthEval.h
1
#ifndef G4EVAL_JETTRUTHEVAL_H
2
#define G4EVAL_JETTRUTHEVAL_H
3
4
#include "
CaloEvalStack.h
"
5
#include "
SvtxEvalStack.h
"
6
7
#include <map>
8
#include <set>
9
#include <string>
10
11
class
Jet
;
12
class
JetContainer
;
13
14
class
PHCompositeNode
;
15
16
class
PHG4Hit
;
17
class
PHG4Particle
;
18
class
PHG4Shower
;
19
class
PHG4TruthInfoContainer
;
20
21
class
JetTruthEval
22
{
23
public
:
25
JetTruthEval
(
PHCompositeNode
* topNode,
26
const
std::string
& truthjetname);
27
virtual
~JetTruthEval
();
28
30
void
next_event
(
PHCompositeNode
* topNode);
31
33
void
do_caching
(
bool
do_cache)
34
{
35
_do_cache
= do_cache;
36
_svtxevalstack
.
do_caching
(do_cache);
37
_cemcevalstack
.
do_caching
(do_cache);
38
_hcalinevalstack
.
do_caching
(do_cache);
39
_hcaloutevalstack
.
do_caching
(do_cache);
40
_femcevalstack
.
do_caching
(do_cache);
41
_fhcalevalstack
.
do_caching
(do_cache);
42
_eemcevalstack
.
do_caching
(do_cache);
43
}
44
47
void
set_strict
(
bool
strict)
48
{
49
_strict
= strict;
50
_svtxevalstack
.
set_strict
(strict);
51
_cemcevalstack
.
set_strict
(strict);
52
_hcalinevalstack
.
set_strict
(strict);
53
_hcaloutevalstack
.
set_strict
(strict);
54
_femcevalstack
.
set_strict
(strict);
55
_fhcalevalstack
.
set_strict
(strict);
56
_eemcevalstack
.
set_strict
(strict);
57
}
58
60
unsigned
int
get_errors
()
61
{
62
return
_errors
+
_svtxevalstack
.
get_errors
() +
_cemcevalstack
.
get_errors
() +
_hcalinevalstack
.
get_errors
() +
_hcaloutevalstack
.
get_errors
() +
_femcevalstack
.
get_errors
() +
_fhcalevalstack
.
get_errors
() +
_eemcevalstack
.
get_errors
();
63
}
64
66
void
set_verbosity
(
int
verbosity
)
67
{
68
_verbosity
=
verbosity
;
69
_svtxevalstack
.
set_verbosity
(verbosity);
70
_cemcevalstack
.
set_verbosity
(verbosity);
71
_hcalinevalstack
.
set_verbosity
(verbosity);
72
_hcaloutevalstack
.
set_verbosity
(verbosity);
73
_femcevalstack
.
set_verbosity
(verbosity);
74
_fhcalevalstack
.
set_verbosity
(verbosity);
75
_eemcevalstack
.
set_verbosity
(verbosity);
76
}
77
78
// set track node name
79
void
set_track_nodename
(
const
std::string
&
name
)
80
{
81
_svtxevalstack
.
set_track_nodename
(name);
82
}
83
85
SvtxEvalStack
*
get_svtx_eval_stack
() {
return
&
_svtxevalstack
; }
86
88
CaloEvalStack
*
get_cemc_eval_stack
() {
return
&
_cemcevalstack
; }
89
91
CaloEvalStack
*
get_hcalin_eval_stack
() {
return
&
_hcalinevalstack
; }
92
94
CaloEvalStack
*
get_hcalout_eval_stack
() {
return
&
_hcaloutevalstack
; }
95
97
CaloEvalStack
*
get_femc_eval_stack
() {
return
&
_femcevalstack
; }
98
100
CaloEvalStack
*
get_fhcal_eval_stack
() {
return
&
_fhcalevalstack
; }
101
103
CaloEvalStack
*
get_eemc_eval_stack
() {
return
&
_eemcevalstack
; }
104
105
// ---reduced sim node or better----------------------------------------------
106
108
Jet
*
get_truth_jet
(
PHG4Particle
* truthparticle);
109
111
std::set<PHG4Particle*>
all_truth_particles
(
Jet
* truthjet);
112
114
std::set<PHG4Shower*>
all_truth_showers
(
Jet
* truthjet);
115
116
// ---full sim node required--------------------------------------------------
117
119
std::set<PHG4Hit*>
all_truth_hits
(
Jet
* truthjet);
120
121
private
:
122
void
get_node_pointers
(
PHCompositeNode
* topNode);
123
124
std::string
_truthjetname
;
125
SvtxEvalStack
_svtxevalstack
;
126
CaloEvalStack
_cemcevalstack
;
127
CaloEvalStack
_hcalinevalstack
;
128
CaloEvalStack
_hcaloutevalstack
;
129
CaloEvalStack
_femcevalstack
;
130
CaloEvalStack
_fhcalevalstack
;
131
CaloEvalStack
_eemcevalstack
;
132
133
PHG4TruthInfoContainer
*
_truthinfo
=
nullptr
;
134
JetContainer
*
_truthjets
=
nullptr
;
135
136
bool
_strict
=
false
;
137
int
_verbosity
= 1;
138
unsigned
int
_errors
= 0;
139
140
bool
_do_cache
=
true
;
141
std::map<Jet*, std::set<PHG4Particle*> >
_cache_all_truth_particles
;
142
std::map<Jet*, std::set<PHG4Shower*> >
_cache_all_truth_showers
;
143
std::map<Jet*, std::set<PHG4Hit*> >
_cache_all_truth_hits
;
144
std::map<PHG4Particle*, Jet*>
_cache_get_truth_jet
;
145
};
146
147
#endif // JETTRUTHEVAL_H__
coresoftware
blob
master
simulation
g4simulation
g4eval
JetTruthEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration