EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SvtxClusterEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SvtxClusterEval.h
1
#ifndef G4EVAL_SVTXCLUSTEREVAL_H
2
#define G4EVAL_SVTXCLUSTEREVAL_H
3
4
#include "
SvtxHitEval.h
"
5
6
#include <
trackbase/TrkrDefs.h
>
7
#include <
trackbase/ActsSurfaceMaps.h
>
8
#include <
trackbase/ActsTrackingGeometry.h
>
9
10
#include <map>
11
#include <memory>
// for shared_ptr, less
12
#include <set>
13
#include <utility>
14
15
16
class
PHCompositeNode
;
17
18
class
PHG4Hit
;
19
class
PHG4HitContainer
;
20
class
PHG4Particle
;
21
class
PHG4TruthInfoContainer
;
22
23
class
TrkrCluster
;
24
class
TrkrClusterContainer
;
25
class
TrkrHitSetContainer
;
26
class
TrkrClusterHitAssoc
;
27
class
TrkrHitTruthAssoc
;
28
class
SvtxTruthEval
;
29
30
typedef
std::multimap<float, TrkrDefs::cluskey>
innerMap
;
31
32
class
SvtxClusterEval
33
{
34
public
:
35
SvtxClusterEval
(
PHCompositeNode
* topNode);
36
virtual
~SvtxClusterEval
();
37
38
void
next_event
(
PHCompositeNode
* topNode);
39
void
do_caching
(
bool
do_cache)
40
{
41
_do_cache
= do_cache;
42
_hiteval
.
do_caching
(do_cache);
43
}
44
void
set_strict
(
bool
strict)
45
{
46
_strict
= strict;
47
_hiteval
.
set_strict
(strict);
48
}
49
void
set_verbosity
(
int
verbosity)
50
{
51
_verbosity
= verbosity;
52
_hiteval
.
set_verbosity
(verbosity);
53
}
54
55
// access the clustereval (and its cached values)
56
SvtxHitEval
*
get_hit_eval
() {
return
&
_hiteval
; }
57
SvtxTruthEval
*
get_truth_eval
() {
return
_hiteval
.
get_truth_eval
(); }
58
59
// backtrace through to PHG4Hits
60
std::set<PHG4Hit*>
all_truth_hits
(
TrkrDefs::cluskey
cluster);
61
PHG4Hit
*
max_truth_hit_by_energy
(
TrkrDefs::cluskey
);
62
63
std::set<std::shared_ptr<TrkrCluster> >
all_truth_clusters
(
TrkrDefs::cluskey
cluster_key);
64
std::shared_ptr<TrkrCluster>
max_truth_cluster_by_energy
(
TrkrDefs::cluskey
cluster_key);
65
66
PHG4Hit
*
all_truth_hits_by_nhit
(
TrkrDefs::cluskey
cluster);
67
std::pair<int, int>
gtrackid_and_layer_by_nhit
(
TrkrDefs::cluskey
cluster);
68
69
// backtrace through to PHG4Particles
70
std::set<PHG4Particle*>
all_truth_particles
(
TrkrDefs::cluskey
);
71
PHG4Particle
*
max_truth_particle_by_energy
(
TrkrDefs::cluskey
);
72
PHG4Particle
*
max_truth_particle_by_cluster_energy
(
TrkrDefs::cluskey
);
73
74
// forwardtrace through to SvtxClusters
75
std::set<TrkrDefs::cluskey>
all_clusters_from
(
PHG4Particle
* truthparticle);
76
std::set<TrkrDefs::cluskey>
all_clusters_from
(
PHG4Hit
* truthhit);
77
TrkrDefs::cluskey
best_cluster_from
(
PHG4Hit
* truthhit);
78
TrkrDefs::cluskey
best_cluster_by_nhit
(
int
gid,
int
layer
);
79
void
FillRecoClusterFromG4HitCache
();
80
// overlap calculations
81
float
get_energy_contribution
(
TrkrDefs::cluskey
cluster_key,
PHG4Particle
* truthparticle);
82
float
get_energy_contribution
(
TrkrDefs::cluskey
cluster_key,
PHG4Hit
* truthhit);
83
84
TrkrCluster
*
reco_cluster_from_truth_cluster
(std::shared_ptr<TrkrCluster> gclus);
85
86
unsigned
int
get_errors
() {
return
_errors
+
_hiteval
.
get_errors
(); }
87
88
private
:
89
void
get_node_pointers
(
PHCompositeNode
* topNode);
90
void
fill_cluster_layer_map
();
91
// void fill_g4hit_layer_map();
92
bool
has_node_pointers
();
93
96
float
fast_approx_atan2
(
float
y
,
float
x
);
97
float
fast_approx_atan2
(
float
y2x);
98
99
SvtxHitEval
_hiteval
;
100
TrkrClusterContainer
*
_clustermap
;
101
TrkrClusterHitAssoc
*
_cluster_hit_map
;
102
TrkrHitSetContainer
*
_hitsets
;
103
TrkrHitTruthAssoc
*
_hit_truth_map
;
104
PHG4TruthInfoContainer
*
_truthinfo
;
105
PHG4HitContainer
*
_g4hits_tpc
;
106
PHG4HitContainer
*
_g4hits_intt
;
107
PHG4HitContainer
*
_g4hits_mvtx
;
108
PHG4HitContainer
*
_g4hits_mms
;
109
ActsSurfaceMaps
*
_surfmaps
;
110
ActsTrackingGeometry
*
_tgeometry
;
111
112
bool
_strict
;
113
int
_verbosity
;
114
unsigned
int
_errors
;
115
116
bool
_do_cache
;
117
std::map<TrkrDefs::cluskey, std::set<PHG4Hit*> >
_cache_all_truth_hits
;
118
std::map<TrkrDefs::cluskey, std::set<std::shared_ptr<TrkrCluster> > >
_cache_all_truth_clusters
;
119
std::map<TrkrDefs::cluskey, PHG4Hit*>
_cache_max_truth_hit_by_energy
;
120
std::map<TrkrDefs::cluskey, std::shared_ptr<TrkrCluster> >
_cache_max_truth_cluster_by_energy
;
121
std::map<TrkrDefs::cluskey, std::set<PHG4Particle*> >
_cache_all_truth_particles
;
122
std::map<TrkrDefs::cluskey, PHG4Particle*>
_cache_max_truth_particle_by_energy
;
123
std::map<TrkrDefs::cluskey, PHG4Particle*>
_cache_max_truth_particle_by_cluster_energy
;
124
std::map<PHG4Particle*, std::set<TrkrDefs::cluskey> >
_cache_all_clusters_from_particle
;
125
std::map<PHG4Hit*, std::set<TrkrDefs::cluskey> >
_cache_all_clusters_from_g4hit
;
126
std::map<PHG4Hit*, TrkrDefs::cluskey>
_cache_best_cluster_from_g4hit
;
127
std::map<std::pair<int, int>,
TrkrDefs::cluskey
>
_cache_best_cluster_from_gtrackid_layer
;
128
std::map<std::pair<TrkrDefs::cluskey, PHG4Particle*>,
float
>
_cache_get_energy_contribution_g4particle
;
129
std::map<std::pair<TrkrDefs::cluskey, PHG4Hit*>,
float
>
_cache_get_energy_contribution_g4hit
;
130
std::map<std::shared_ptr<TrkrCluster>,
TrkrCluster
* >
_cache_reco_cluster_from_truth_cluster
;
131
132
// measured for low occupancy events, all in cm
133
const
float
sig_tpc_rphi_inner
= 220
e
-04;
134
const
float
sig_tpc_rphi_mid
= 155
e
-04;
135
const
float
sig_tpc_rphi_outer
= 165
e
-04;
136
const
float
sig_tpc_z
= 750
e
-04;
137
const
float
sig_intt_rphi
= 17
e
-04;
138
const
float
range_intt_z
= 0.9;
139
const
float
sig_mvtx_rphi
= 4.0e-04;
140
const
float
sig_mvtx_z
= 4.7e-04;
141
const
float
sig_mms_rphi_55
= 100
e
-04;
142
const
float
sig_mms_z_56
= 200
e
-04;
143
144
146
static
constexpr
float
_clusters_searching_window
= 0.1f;
147
std::multimap<unsigned int, innerMap>
_clusters_per_layer
;
148
// std::multimap<unsigned int, PHG4Hit*> _g4hits_per_layer;
149
};
150
151
#endif // G4EVAL_SVTXCLUSTEREVAL_H
fun4all_coresoftware
blob
master
simulation
g4simulation
g4eval
SvtxClusterEval.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:49
using
1.8.2 with
EIC GitHub integration