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
SvtxVertexEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SvtxVertexEval.h
1
#ifndef G4EVAL_SVTXVERTEXEVAL_H
2
#define G4EVAL_SVTXVERTEXEVAL_H
3
4
#include "
SvtxTrackEval.h
"
5
6
#include <map>
7
#include <set>
8
#include <string>
// for string
9
#include <utility>
10
11
class
PHCompositeNode
;
12
13
class
PHG4Particle
;
14
class
PHG4TruthInfoContainer
;
15
class
PHG4VtxPoint
;
16
17
class
SvtxClusterEval
;
18
class
SvtxHitEval
;
19
class
SvtxTrackMap
;
20
class
SvtxTruthEval
;
21
22
class
Vertex
;
23
class
SvtxVertex
;
24
class
SvtxVertexMap
;
25
26
class
SvtxVertexEval
27
{
28
public
:
29
SvtxVertexEval
(
PHCompositeNode
* topNode);
30
virtual
~SvtxVertexEval
();
31
32
void
next_event
(
PHCompositeNode
* topNode);
33
void
do_caching
(
bool
do_cache)
34
{
35
_do_cache
= do_cache;
36
_trackeval
.
do_caching
(do_cache);
37
}
38
void
set_strict
(
bool
strict)
39
{
40
_strict
= strict;
41
_trackeval
.
set_strict
(strict);
42
}
43
void
set_verbosity
(
int
verbosity
)
44
{
45
_verbosity
=
verbosity
;
46
_trackeval
.
set_verbosity
(verbosity);
47
}
48
49
// access the sub evals (and the cached values)
50
SvtxTrackEval
*
get_track_eval
() {
return
&
_trackeval
; }
51
SvtxClusterEval
*
get_cluster_eval
() {
return
_trackeval
.
get_cluster_eval
(); }
52
SvtxHitEval
*
get_hit_eval
() {
return
_trackeval
.
get_hit_eval
(); }
53
SvtxTruthEval
*
get_truth_eval
() {
return
_trackeval
.
get_truth_eval
(); }
54
55
// backtrace through to PHG4Hits
56
std::set<PHG4Particle*>
all_truth_particles
(
const
Vertex
*
vertex
);
57
58
// backtrace through to PHG4VtxPoints
59
std::set<PHG4VtxPoint*>
all_truth_points
(
const
Vertex
*
vertex
);
60
PHG4VtxPoint
*
max_truth_point_by_ntracks
(
const
Vertex
*
vertex
);
61
62
// forwardtrace through to SvtxVertexs
63
std::set<const Vertex*>
all_vertexes_from
(
PHG4VtxPoint
* truthpoint);
64
const
Vertex
*
best_vertex_from
(
PHG4VtxPoint
* truthpoint);
65
66
// overlap calculations
67
unsigned
int
get_ntracks_contribution
(
const
Vertex
* svtxvertex,
PHG4VtxPoint
* truthpoint);
68
69
unsigned
int
get_errors
() {
return
_errors
+
_trackeval
.
get_errors
(); }
70
71
void
set_use_initial_vertex
(
bool
use_init_vertex) {
_use_initial_vertex
= use_init_vertex; }
72
void
set_use_genfit_vertex
(
bool
use_genfit_vertex) {
_use_genfit_vertex
= use_genfit_vertex; }
73
74
void
set_track_nodename
(
const
std::string
&
name
);
75
76
private
:
77
void
get_node_pointers
(
PHCompositeNode
* topNode);
78
bool
has_node_pointers
();
79
80
SvtxTrackEval
_trackeval
;
81
SvtxVertexMap
*
_vertexmap
=
nullptr
;
82
SvtxTrackMap
*
_trackmap
=
nullptr
;
83
PHG4TruthInfoContainer
*
_truthinfo
=
nullptr
;
84
85
bool
_strict
=
false
;
86
bool
_use_initial_vertex
=
true
;
87
bool
_use_genfit_vertex
=
false
;
88
int
_verbosity
= 0;
89
unsigned
int
_errors
= 0;
90
91
bool
_do_cache
=
true
;
92
std::map<const Vertex*, std::set<PHG4Particle*> >
_cache_all_truth_particles
;
93
std::map<const Vertex*, std::set<PHG4VtxPoint*> >
_cache_all_truth_points
;
94
std::map<const Vertex*, PHG4VtxPoint*>
_cache_max_truth_point_by_ntracks
;
95
std::map<PHG4VtxPoint*, std::set<const Vertex*> >
_cache_all_vertexes_from_point
;
96
std::map<PHG4VtxPoint*, const Vertex*>
_cache_best_vertex_from_point
;
97
std::map<std::pair<const Vertex*, PHG4VtxPoint*>,
unsigned
int
>
_cache_get_ntracks_contribution
;
98
std::string
m_TrackNodeName
;
99
};
100
101
#endif // G4EVAL_SVTXVERTEXEVAL_H
coresoftware
blob
master
simulation
g4simulation
g4eval
SvtxVertexEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:14
using
1.8.2 with
sPHENIX GitHub integration