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
KFParticle_truthAndDetTools.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KFParticle_truthAndDetTools.h
1
#ifndef KFPARTICLESPHENIX_KFPARTICLETRUTHANDDETTOOLS_H
2
#define KFPARTICLESPHENIX_KFPARTICLETRUTHANDDETTOOLS_H
3
4
#include <string>
5
#include <vector>
6
7
class
PHCompositeNode
;
8
class
PHG4Particle
;
9
class
PHG4VtxPoint
;
10
class
PHG4TruthInfoContainer
;
11
class
PHHepMCGenEvent
;
12
class
PHHepMCGenEventMap
;
13
class
SvtxClusterEval
;
14
class
SvtxEvalStack
;
15
class
SvtxHitEval
;
16
class
SvtxTrack
;
17
class
SvtxTrackEval
;
18
class
SvtxTrackMap
;
19
class
SvtxTruthEval
;
20
class
SvtxVertexMap
;
21
class
SvtxVertex
;
22
class
SvtxVertexEval
;
23
class
TrkrClusterContainer
;
24
class
TTree;
25
class
KFParticle
;
26
class
GlobalVertex
;
27
class
GlobalVertexMap
;
28
29
namespace
HepMC
30
{
31
class
GenParticle;
32
}
33
34
class
KFParticle_truthAndDetTools
35
{
36
public
:
37
KFParticle_truthAndDetTools
();
// Constructor
38
39
virtual
~KFParticle_truthAndDetTools
();
// Destructor
40
41
SvtxTrack
*
getTrack
(
unsigned
int
track_id,
SvtxTrackMap
*trackmap);
42
GlobalVertex
*
getVertex
(
unsigned
int
vertex_id,
GlobalVertexMap
*vertexmap);
43
PHG4Particle
*
getTruthTrack
(
SvtxTrack
*thisTrack,
PHCompositeNode
*topNode);
44
45
void
initializeTruthBranches
(TTree *m_tree,
int
daughter_id,
const
std::string
&daughter_number,
bool
m_constrain_to_vertex_truthMatch);
46
void
fillTruthBranch
(
PHCompositeNode
*topNode, TTree *m_tree,
const
KFParticle
&daughter,
int
daughter_id,
const
KFParticle
&
vertex
,
bool
m_constrain_to_vertex_truthMatch);
47
48
void
fillGeant4Branch
(
PHG4Particle
*
particle
,
int
daughter_id);
49
void
fillHepMCBranch
(HepMC::GenParticle *particle,
int
daughter_id);
50
int
getHepMCInfo
(
PHCompositeNode
*topNode, TTree *m_tree,
const
KFParticle
&daughter,
int
daughter_id);
51
52
void
initializeCaloBranches
(TTree *m_tree,
int
daughter_id,
const
std::string
&daughter_number);
53
void
fillCaloBranch
(
PHCompositeNode
*topNode, TTree *m_tree,
const
KFParticle
&daughter,
int
daughter_id);
54
55
void
initializeDetectorBranches
(TTree *m_tree,
int
daughter_id,
const
std::string
&daughter_number);
56
void
initializeSubDetectorBranches
(TTree *m_tree,
const
std::string
&detectorName,
int
daughter_id,
const
std::string
&daughter_number);
57
void
fillDetectorBranch
(
PHCompositeNode
*topNode, TTree *m_tree,
const
KFParticle
&daughter,
int
daughter_id);
58
59
void
allPVInfo
(
PHCompositeNode
*topNode, TTree *m_tree,
60
const
KFParticle
&motherParticle,
61
std::vector<KFParticle> daughters,
62
std::vector<KFParticle> intermediates);
63
64
void
clearVectors
();
65
66
protected
:
67
std::string
m_trk_map_node_name_nTuple
=
"SvtxTrackMap"
;
68
std::string
m_vtx_map_node_name_nTuple
=
"SvtxVertexMap"
;
69
70
SvtxEvalStack
*
m_svtx_evalstack
=
nullptr
;
71
SvtxClusterEval
*
clustereval
=
nullptr
;
72
SvtxHitEval
*
hiteval
=
nullptr
;
73
SvtxTrackEval
*
trackeval
=
nullptr
;
74
SvtxTruthEval
*
trutheval
=
nullptr
;
75
SvtxVertexEval
*
vertexeval
=
nullptr
;
76
77
SvtxTrackMap
*
dst_trackmap
=
nullptr
;
78
SvtxTrack
*
track
=
nullptr
;
79
80
PHG4Particle
*
g4particle
=
nullptr
;
81
PHG4VtxPoint
*
g4vertex_point
=
nullptr
;
82
83
SvtxVertexMap
*
dst_vertexmap
=
nullptr
;
84
SvtxVertex
*vertex =
nullptr
;
85
86
TrkrClusterContainer
*
dst_clustermap
=
nullptr
;
87
88
int
m_num_tracks_nTuple
= 0;
89
int
m_num_intermediate_states_nTuple
= 0;
90
91
static
const
int
max_tracks
= 20;
92
93
float
m_true_daughter_vertex_x
[
max_tracks
] = {0};
94
float
m_true_daughter_vertex_y
[
max_tracks
] = {0};
95
float
m_true_daughter_vertex_z
[
max_tracks
] = {0};
96
float
m_true_daughter_ip
[
max_tracks
] = {0};
97
float
m_true_daughter_ip_xy
[
max_tracks
] = {0};
98
float
m_true_daughter_px
[
max_tracks
] = {0};
99
float
m_true_daughter_py
[
max_tracks
] = {0};
100
float
m_true_daughter_pz
[
max_tracks
] = {0};
101
float
m_true_daughter_p
[
max_tracks
] = {0};
102
float
m_true_daughter_pt
[
max_tracks
] = {0};
103
int
m_true_daughter_id
[
max_tracks
] = {0};
104
float
m_true_daughter_pv_x
[
max_tracks
] = {0};
105
float
m_true_daughter_pv_y
[
max_tracks
] = {0};
106
float
m_true_daughter_pv_z
[
max_tracks
] = {0};
107
108
std::vector<int>
m_true_daughter_track_history_PDG_ID
[
max_tracks
];
109
std::vector<float>
m_true_daughter_track_history_PDG_mass
[
max_tracks
];
110
std::vector<float>
m_true_daughter_track_history_px
[
max_tracks
];
111
std::vector<float>
m_true_daughter_track_history_py
[
max_tracks
];
112
std::vector<float>
m_true_daughter_track_history_pz
[
max_tracks
];
113
std::vector<float>
m_true_daughter_track_history_pE
[
max_tracks
];
114
std::vector<float>
m_true_daughter_track_history_pT
[
max_tracks
];
115
116
float
detector_emcal_deltaphi
[
max_tracks
] = {0};
117
float
detector_emcal_deltaeta
[
max_tracks
] = {0};
118
float
detector_emcal_energy_3x3
[
max_tracks
] = {0};
119
float
detector_emcal_energy_5x5
[
max_tracks
] = {0};
120
float
detector_emcal_cluster_energy
[
max_tracks
] = {0};
121
float
detector_ihcal_deltaphi
[
max_tracks
] = {0};
122
float
detector_ihcal_deltaeta
[
max_tracks
] = {0};
123
float
detector_ihcal_energy_3x3
[
max_tracks
] = {0};
124
float
detector_ihcal_energy_5x5
[
max_tracks
] = {0};
125
float
detector_ihcal_cluster_energy
[
max_tracks
] = {0};
126
float
detector_ohcal_deltaphi
[
max_tracks
] = {0};
127
float
detector_ohcal_deltaeta
[
max_tracks
] = {0};
128
float
detector_ohcal_energy_3x3
[
max_tracks
] = {0};
129
float
detector_ohcal_energy_5x5
[
max_tracks
] = {0};
130
float
detector_ohcal_cluster_energy
[
max_tracks
] = {0};
131
132
std::vector<float>
detector_local_x
[
max_tracks
];
// 7 subdetector including outer and inner hcal plus 4th tracker
133
std::vector<float>
detector_local_y
[
max_tracks
];
134
std::vector<float>
detector_local_z
[
max_tracks
];
135
std::vector<int>
detector_layer
[
max_tracks
];
136
std::vector<int>
mvtx_staveID
[
max_tracks
];
137
std::vector<int>
mvtx_chipID
[
max_tracks
];
138
std::vector<int>
intt_ladderZID
[
max_tracks
];
139
std::vector<int>
intt_ladderPhiID
[
max_tracks
];
140
std::vector<int>
tpc_sectorID
[
max_tracks
];
141
std::vector<int>
tpc_side
[
max_tracks
];
142
143
std::vector<float>
allPV_x
;
144
std::vector<float>
allPV_y
;
145
std::vector<float>
allPV_z
;
146
std::vector<float>
allPV_mother_IP
;
147
std::vector<float>
allPV_mother_IPchi2
;
148
std::vector<float>
allPV_daughter_IP
[
max_tracks
];
149
std::vector<float>
allPV_daughter_IPchi2
[
max_tracks
];
150
std::vector<float>
allPV_intermediates_IP
[
max_tracks
];
151
std::vector<float>
allPV_intermediates_IPchi2
[
max_tracks
];
152
153
PHG4TruthInfoContainer
*
m_truthinfo
=
nullptr
;
154
PHHepMCGenEventMap
*
m_geneventmap
=
nullptr
;
155
PHHepMCGenEvent
*
m_genevt
=
nullptr
;
156
};
157
158
#endif // KFPARTICLESPHENIX_KFPARTICLETRUTHANDDETTOOLS_H
coresoftware
blob
master
offline
packages
KFParticle_sPHENIX
KFParticle_truthAndDetTools.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration