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
CaloTruthEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CaloTruthEval.h
1
#ifndef G4EVAL_CALOTRUTHEVAL_H
2
#define G4EVAL_CALOTRUTHEVAL_H
3
4
#include "
BaseTruthEval.h
"
5
6
#include <map>
7
#include <set>
8
#include <string>
9
10
class
PHCompositeNode
;
11
12
class
PHG4Hit
;
13
class
PHG4HitContainer
;
14
class
PHG4Particle
;
15
class
PHG4TruthInfoContainer
;
16
class
PHG4Shower
;
17
class
PHG4VtxPoint
;
18
19
class
CaloTruthEval
20
{
21
public
:
23
CaloTruthEval
(
PHCompositeNode
* topNode,
const
std::string
& caloname);
24
virtual
~CaloTruthEval
();
25
27
int
get_caloid
() {
return
_caloid
; }
28
30
void
next_event
(
PHCompositeNode
* topNode);
31
33
void
do_caching
(
bool
do_cache) {
_do_cache
= do_cache; }
34
37
void
set_strict
(
bool
strict)
38
{
39
_strict
= strict;
40
_basetrutheval
.
set_strict
(strict);
41
}
42
44
unsigned
int
get_errors
() {
return
_errors
; }
45
47
void
set_verbosity
(
int
verbosity
)
48
{
49
_verbosity
=
verbosity
;
50
_basetrutheval
.
set_verbosity
(verbosity);
51
}
52
53
// ---reduced sim node or better----------------------------------------------
54
56
bool
has_reduced_node_pointers
();
57
59
PHG4Shower
*
get_primary_shower
(
PHG4Shower
*
shower
);
60
62
PHG4Shower
*
get_primary_shower
(
PHG4Particle
*
particle
);
63
65
PHG4Particle
*
get_primary_particle
(
PHG4Shower
*
shower
);
66
68
PHG4Particle
*
get_primary_particle
(
PHG4Particle
*
particle
);
69
71
int
get_embed
(
PHG4Particle
*
particle
);
72
74
PHG4VtxPoint
*
get_vertex
(
PHG4Particle
*
particle
);
75
77
bool
are_same_shower
(
PHG4Shower
* s1,
PHG4Shower
* s2);
78
80
bool
are_same_particle
(
PHG4Particle
* p1,
PHG4Particle
* p2);
81
83
bool
are_same_vertex
(
PHG4VtxPoint
* vtx1,
PHG4VtxPoint
* vtx2);
84
86
bool
is_primary
(
PHG4Shower
*
shower
);
87
89
bool
is_primary
(
PHG4Particle
*
particle
);
90
92
float
get_shower_energy_deposit
(
PHG4Particle
* primary);
93
95
float
get_shower_eh_ratio
(
PHG4Particle
* primary);
96
97
// ---full sim node required--------------------------------------------------
98
100
bool
has_full_node_pointers
();
101
103
std::set<PHG4Hit*>
all_truth_hits
(
PHG4Shower
*
shower
);
104
106
std::set<PHG4Hit*>
all_truth_hits
(
PHG4Particle
*
particle
);
107
109
PHG4Particle
*
get_parent_particle
(
PHG4Hit
* g4hit);
110
112
PHG4Particle
*
get_primary_particle
(
PHG4Hit
* g4hit);
113
115
bool
is_g4hit_from_particle
(
PHG4Hit
* g4hit,
PHG4Particle
*
particle
);
116
118
std::set<PHG4Hit*>
get_shower_hits_from_primary
(
PHG4Particle
* primary);
119
120
private
:
121
void
get_node_pointers
(
PHCompositeNode
* topNode);
122
123
BaseTruthEval
_basetrutheval
;
124
125
std::string
_caloname
;
126
int
_caloid
;
127
PHG4TruthInfoContainer
*
_truthinfo
=
nullptr
;
128
PHG4HitContainer
*
_g4hits
=
nullptr
;
129
int
_g4hit_container_id
= -1;
130
131
bool
_strict
=
false
;
132
int
_verbosity
= 1;
133
unsigned
int
_errors
= 0;
134
135
bool
_do_cache
=
true
;
136
std::map<PHG4Particle*, float>
_cache_get_shower_energy_deposit
;
137
std::map<PHG4Shower*, std::set<PHG4Hit*> >
_cache_all_truth_hits_g4shower
;
138
std::map<PHG4Particle*, std::set<PHG4Hit*> >
_cache_all_truth_hits_g4particle
;
139
std::map<PHG4Hit*, PHG4Particle*>
_cache_get_primary_particle_g4hit
;
140
std::map<PHG4Particle*, std::set<PHG4Hit*> >
_cache_get_shower_hits_from_primary
;
141
};
142
143
#endif // G4EVAL_CALOTRUTHEVAL_H
coresoftware
blob
master
simulation
g4simulation
g4eval
CaloTruthEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration