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
SvtxHitEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SvtxHitEval.h
1
#ifndef G4EVAL_SVTXHITEVAL_H
2
#define G4EVAL_SVTXHITEVAL_H
3
4
#include "
SvtxTruthEval.h
"
5
6
#include <
trackbase/TrkrDefs.h
>
7
8
#include <map>
9
#include <set>
10
#include <utility>
11
12
class
PHCompositeNode
;
13
14
class
PHG4Hit
;
15
class
PHG4HitContainer
;
16
class
PHG4Particle
;
17
class
PHG4TruthInfoContainer
;
18
19
class
TrkrHitSetContainer
;
20
class
TrkrClusterContainer
;
21
class
TrkrHitTruthAssoc
;
22
23
class
SvtxHitEval
24
{
25
public
:
26
SvtxHitEval
(
PHCompositeNode
* topNode);
27
virtual
~SvtxHitEval
();
28
29
void
next_event
(
PHCompositeNode
* topNode);
30
void
do_caching
(
bool
do_cache)
31
{
32
_do_cache
= do_cache;
33
_trutheval
.
do_caching
(do_cache);
34
}
35
void
set_strict
(
bool
strict)
36
{
37
_strict
= strict;
38
_trutheval
.
set_strict
(strict);
39
}
40
void
set_verbosity
(
int
verbosity
)
41
{
42
_verbosity
=
verbosity
;
43
_trutheval
.
set_verbosity
(verbosity);
44
}
45
46
// access the clustereval (and its cached values)
47
SvtxTruthEval
*
get_truth_eval
() {
return
&
_trutheval
; }
48
49
// PHG4Cell* get_cell(SvtxHit* hit);
50
51
// backtrace through to PHG4Hits
52
std::set<PHG4Hit*>
all_truth_hits
(
TrkrDefs::hitkey
hit_key);
53
PHG4Hit
*
max_truth_hit_by_energy
(
TrkrDefs::hitkey
hit_key);
54
55
// backtrace through to PHG4Hits for a specific tracker
56
std::set<PHG4Hit*>
all_truth_hits
(
TrkrDefs::hitkey
hit_key,
const
TrkrDefs::TrkrId
trkrid);
57
PHG4Hit
*
max_truth_hit_by_energy
(
TrkrDefs::hitkey
hit_key,
const
TrkrDefs::TrkrId
trkrid);
58
59
// backtrace through to PHG4Particles
60
std::set<PHG4Particle*>
all_truth_particles
(
TrkrDefs::hitkey
hit_key);
61
PHG4Particle
*
max_truth_particle_by_energy
(
TrkrDefs::hitkey
hit_key);
62
63
// backtrace through to PHG4Particles for a specific tracker
64
std::set<PHG4Particle*>
all_truth_particles
(
TrkrDefs::hitkey
hit_key,
const
TrkrDefs::TrkrId
trkrid);
65
PHG4Particle
*
max_truth_particle_by_energy
(
TrkrDefs::hitkey
hit_key,
const
TrkrDefs::TrkrId
trkrid);
66
67
// forwardtrace through to SvtxHits
68
std::set<TrkrDefs::hitkey>
all_hits_from
(
PHG4Particle
* truthparticle);
69
std::set<TrkrDefs::hitkey>
all_hits_from
(
PHG4Hit
* truthhit);
70
TrkrDefs::hitkey
best_hit_from
(
PHG4Hit
* truthhit);
71
72
// overlap calculations
73
float
get_energy_contribution
(
TrkrDefs::hitkey
,
PHG4Particle
* truthparticle);
74
float
get_energy_contribution
(
TrkrDefs::hitkey
,
PHG4Hit
* truthhit);
75
76
unsigned
int
get_errors
() {
return
_errors
+
_trutheval
.
get_errors
(); }
77
78
private
:
79
void
get_node_pointers
(
PHCompositeNode
* topNode);
80
bool
has_node_pointers
();
81
82
SvtxTruthEval
_trutheval
;
83
TrkrHitSetContainer
*
_hitmap
=
nullptr
;
84
TrkrClusterContainer
*
_clustermap
{};
85
TrkrHitTruthAssoc
*
_hit_truth_map
{};
86
87
PHG4HitContainer
*
_g4hits_tpc
=
nullptr
;
88
PHG4HitContainer
*
_g4hits_intt
=
nullptr
;
89
PHG4HitContainer
*
_g4hits_mvtx
=
nullptr
;
90
PHG4HitContainer
*
_g4hits_mms
=
nullptr
;
91
92
PHG4TruthInfoContainer
*
_truthinfo
;
93
94
bool
_strict
=
false
;
95
int
_verbosity
= 0;
96
unsigned
int
_errors
= 0;
97
98
bool
_do_cache
=
true
;
99
std::map<TrkrDefs::hitkey, std::set<PHG4Hit*> >
_cache_all_truth_hits
;
100
std::map<TrkrDefs::hitkey, PHG4Hit*>
_cache_max_truth_hit_by_energy
;
101
std::map<TrkrDefs::hitkey, std::set<PHG4Particle*> >
_cache_all_truth_particles
;
102
std::map<TrkrDefs::hitkey, PHG4Particle*>
_cache_max_truth_particle_by_energy
;
103
std::map<PHG4Particle*, std::set<TrkrDefs::hitkey> >
_cache_all_hits_from_particle
;
104
std::map<PHG4Hit*, std::set<TrkrDefs::hitkey> >
_cache_all_hits_from_g4hit
;
105
std::map<PHG4Hit*, TrkrDefs::hitkey>
_cache_best_hit_from_g4hit
;
106
std::map<std::pair<TrkrDefs::hitkey, PHG4Particle*>,
float
>
_cache_get_energy_contribution_g4particle
;
107
std::map<std::pair<TrkrDefs::hitkey, PHG4Hit*>,
float
>
_cache_get_energy_contribution_g4hit
;
108
};
109
110
#endif // G4EVAL_SVTXHITEVAL_H
coresoftware
blob
master
simulation
g4simulation
g4eval
SvtxHitEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:14
using
1.8.2 with
sPHENIX GitHub integration