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
CaloRawTowerEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CaloRawTowerEval.h
1
#ifndef G4EVAL_CALORAWTOWEREVAL_H
2
#define G4EVAL_CALORAWTOWEREVAL_H
3
4
#include "
CaloTruthEval.h
"
5
6
#include <map>
7
#include <set>
8
#include <string>
9
#include <utility>
10
11
class
PHCompositeNode
;
12
13
class
PHG4CellContainer
;
14
class
PHG4Hit
;
15
class
PHG4HitContainer
;
16
class
PHG4Particle
;
17
class
PHG4Shower
;
18
class
PHG4TruthInfoContainer
;
19
20
class
RawTower
;
21
class
RawTowerContainer
;
22
23
class
CaloRawTowerEval
24
{
25
public
:
27
CaloRawTowerEval
(
PHCompositeNode
* topNode,
const
std::string
& caloname);
28
virtual
~CaloRawTowerEval
();
29
31
int
get_caloid
() {
return
get_truth_eval
()->
get_caloid
(); }
32
34
void
next_event
(
PHCompositeNode
* topNode);
35
37
void
do_caching
(
bool
do_cache)
38
{
39
_do_cache
= do_cache;
40
_trutheval
.
do_caching
(do_cache);
41
}
42
45
void
set_strict
(
bool
strict)
46
{
47
_strict
= strict;
48
_trutheval
.
set_strict
(strict);
49
}
50
52
unsigned
int
get_errors
() {
return
_errors
+
_trutheval
.
get_errors
(); }
53
55
void
set_verbosity
(
int
verbosity
)
56
{
57
_verbosity
=
verbosity
;
58
_trutheval
.
set_verbosity
(verbosity);
59
}
60
62
CaloTruthEval
*
get_truth_eval
() {
return
&
_trutheval
; }
63
64
// ---reduced sim node or better----------------------------------------------
65
67
bool
has_reduced_node_pointers
();
68
69
// shower interface
70
72
std::set<PHG4Shower*>
all_truth_primary_showers
(
RawTower
*
tower
);
73
75
PHG4Shower
*
max_truth_primary_shower_by_energy
(
RawTower
*
tower
);
76
78
std::set<RawTower*>
all_towers_from
(
PHG4Shower
* primary);
79
81
RawTower
*
best_tower_from
(
PHG4Shower
* primary);
82
84
float
get_energy_contribution
(
RawTower
*
tower
,
PHG4Shower
* primary);
85
86
// particle interface
87
89
std::set<PHG4Particle*>
all_truth_primary_particles
(
RawTower
*
tower
);
90
92
PHG4Particle
*
max_truth_primary_particle_by_energy
(
RawTower
*
tower
);
93
95
std::set<RawTower*>
all_towers_from
(
PHG4Particle
* primary);
96
98
RawTower
*
best_tower_from
(
PHG4Particle
* primary);
99
101
float
get_energy_contribution
(
RawTower
*
tower
,
PHG4Particle
* primary);
102
103
// ---full sim node required--------------------------------------------------
104
106
bool
has_full_node_pointers
();
107
109
std::set<PHG4Hit*>
all_truth_hits
(
RawTower
*
tower
);
110
111
private
:
112
void
get_node_pointers
(
PHCompositeNode
* topNode);
113
114
std::string
_caloname
;
115
CaloTruthEval
_trutheval
;
116
RawTowerContainer
*
_towers
=
nullptr
;
117
PHG4CellContainer
*
_g4cells
=
nullptr
;
118
PHG4HitContainer
*
_g4hits
=
nullptr
;
119
PHG4TruthInfoContainer
*
_truthinfo
=
nullptr
;
120
121
bool
_strict
=
false
;
122
int
_verbosity
= 1;
123
unsigned
int
_errors
= 0;
124
125
bool
_do_cache
=
true
;
126
127
std::map<RawTower*, std::set<PHG4Shower*> >
_cache_all_truth_primary_showers
;
128
std::map<RawTower*, PHG4Shower*>
_cache_max_truth_primary_shower_by_energy
;
129
std::map<PHG4Shower*, std::set<RawTower*> >
_cache_all_towers_from_primary_shower
;
130
std::map<PHG4Shower*, RawTower*>
_cache_best_tower_from_primary_shower
;
131
std::map<std::pair<RawTower*, PHG4Shower*>,
float
>
_cache_get_energy_contribution_primary_shower
;
132
133
std::map<RawTower*, std::set<PHG4Particle*> >
_cache_all_truth_primary_particles
;
134
std::map<RawTower*, PHG4Particle*>
_cache_max_truth_primary_particle_by_energy
;
135
std::map<PHG4Particle*, std::set<RawTower*> >
_cache_all_towers_from_primary_particle
;
136
std::map<PHG4Particle*, RawTower*>
_cache_best_tower_from_primary_particle
;
137
std::map<std::pair<RawTower*, PHG4Particle*>,
float
>
_cache_get_energy_contribution_primary_particle
;
138
139
std::map<RawTower*, std::set<PHG4Hit*> >
_cache_all_truth_hits
;
140
};
141
142
#endif // G4EVAL_CALORAWTOWEREVAL_H
coresoftware
blob
master
simulation
g4simulation
g4eval
CaloRawTowerEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration