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
FillClusMatchTree.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FillClusMatchTree.h
1
#ifndef FILLCLUSMATCHTREE__H
2
#define FILLCLUSMATCHTREE__H
3
46
#include "
TrkrClusLoc.h
"
47
#include "
TrackClusEvaluator.h
"
48
49
#include <
fun4all/SubsysReco.h
>
50
#include <vector>
51
#include <string>
52
53
class
EmbRecoMatchContainer
;
54
class
PHCompositeNode
;
55
class
PHG4ParticleSvtxMap
;
56
class
SvtxPHG4ParticleMap
;
57
class
EmbRecoMatchContainer
;
58
class
PHCompositeNode
;
59
class
PHG4TpcCylinderGeom
;
60
class
PHG4TpcCylinderGeomContainer
;
61
class
PHG4TruthInfoContainer
;
62
class
SvtxTrack
;
63
class
SvtxTrackMap
;
64
class
TrackSeedContainer
;
65
class
TrkrCluster
;
66
/* class TrkrClusterContainer; */
67
class
TrkrTruthTrack
;
68
class
TrkrTruthTrackContainer
;
69
class
TTree;
70
class
TH2D;
71
class
ClusHitsVerbose
;
72
class
TrkrClusterIsMatcher
;
73
74
class
FillClusMatchTree
:
public
SubsysReco
75
{
76
public
:
77
FillClusMatchTree
(
78
TrkrClusterIsMatcher
* _ismatcher
79
,
const
std::string
& tfile_name=
"trackclusmatch.root"
80
,
bool
_fill_clusters =
true
81
,
bool
_fill_clusverbose =
true
82
,
bool
_fill_svtxnomatch =
false
83
);
84
85
virtual
~FillClusMatchTree
();
86
87
int
Init
(
PHCompositeNode
*)
override
;
88
int
InitRun
(
PHCompositeNode
*topNode)
override
;
89
int
process_event
(
PHCompositeNode
*
/*topNode*/
)
override
;
90
int
End
(
PHCompositeNode
*topNode)
override
;
91
92
void
clear_clusvecs
(
const
std::string
& tag=
""
);
93
94
void
print_mvtx_diagnostics
();
95
96
TrkrClusterIsMatcher
*
m_ismatcher
;
97
private
:
98
99
int
createNodes
(
PHCompositeNode
*topNode);
100
TrackClusEvaluator
m_TCEval
;
101
102
// contianer used to fill the other track matches
103
EmbRecoMatchContainer
*
m_EmbRecoMatchContainer
{
nullptr
};
104
PHG4TruthInfoContainer
*
m_PHG4TruthInfoContainer
{
nullptr
};
105
SvtxTrackMap
*
m_SvtxTrackMap
{
nullptr
};
106
TrkrTruthTrackContainer
*
m_TrkrTruthTrackContainer
{
nullptr
};
107
ClusHitsVerbose
*
m_PHG4ClusHitVerb
{
nullptr
};
108
ClusHitsVerbose
*
m_SvtxClusHitVerb
{
nullptr
};
109
/* TrkrClusterContainer *m_TruthClusterContainer {nullptr}; */
110
/* TrkrClusterContainer *m_RecoClusterContainer {nullptr}; */
111
/* PHG4TpcCylinderGeomContainer *m_PHG4TpcCylinderGeomContainer {nullptr}; */
112
113
114
TTree*
m_ttree
;
115
std::string
m_outfile_name
;
116
public
:
117
bool
m_fill_clusters
;
118
bool
m_fill_clusverbose
;
// unmatched Svtx tracks
119
bool
m_fill_SvUnmatched
;
// unmatched Svtx tracks
120
private
:
121
122
// Tree Branch members:
123
int
nevent
{-1};
124
int
nphg4
{0};
125
int
nsvtx
{0};
126
int
ntrackmatches
{0};
127
int
nphg4_part
{0};
128
float
centrality
{0.};
129
130
// Tracks and clustes
131
//
132
// lables:
133
// tracks:
134
// g4 : phg4track matched
135
// sv : svtx_track matched
136
// gU : phg4track not-matched
137
// sU : svtx_track not-matched
138
// clusters:
139
// M : matched
140
// U : unmatched
141
TH2D*
h2_G4_nPixelsPhi
;
142
TH2D*
h2_G4_nPixelsZ
;
143
TH2D*
h2_Sv_nPixelsPhi
;
144
TH2D*
h2_Sv_nPixelsZ
;
145
146
// Track tree
147
int
b_trackid
;
148
bool
b_is_g4track
;
149
bool
b_is_Svtrack
;
150
bool
b_is_matched
;
151
152
float
b_trkpt
;
153
float
b_trkphi
;
154
float
b_trketa
;
155
156
int
b_nclus
{};
157
int
b_nclustpc
{};
158
int
b_nclusmvtx
{};
159
int
b_nclusintt
{};
160
161
float
b_matchrat
{};
162
float
b_matchrat_intt
{};
163
float
b_matchrat_mvtx
{};
164
float
b_matchrat_tpc
{};
165
166
std::vector<bool>
b_clusmatch
{};
167
std::vector<float>
b_clus_x
{};
168
std::vector<float>
b_clus_y
{};
169
std::vector<float>
b_clus_z
{};
170
std::vector<float>
b_clus_r
{};
171
std::vector<int>
b_clus_layer
{};
172
/* std::vector<int> b_clus_nphibins {}; */
173
/* std::vector<int> b_clus_ntbins {}; */
174
175
std::vector<float>
b_clus_lphi
{};
// l for local surface
176
std::vector<float>
b_clus_lphisize
{};
// phi scaled by dphi
177
std::vector<float>
b_clus_lz
{};
178
std::vector<float>
b_clus_lzsize
{};
179
180
// Maps of hits within clusters
181
/* using BinData = std::pair<int,float>; // index + energy for a given bin (MVTX, INTT, or TPC) */
182
using
VecVecInt
= std::vector<std::vector<int>>;
183
/* using VecVecFloat = std::vector<std::vector<float>>; */
184
VecVecInt
b_phibins
;
185
VecVecInt
b_phibins_cut
;
186
VecVecInt
b_zbins
;
187
VecVecInt
b_zbins_cut
;
188
189
VecVecInt
b_phibinsE
;
190
VecVecInt
b_phibinsE_cut
;
191
VecVecInt
b_zbinsE
;
192
VecVecInt
b_zbinsE_cut
;
193
194
void
fill_cluster_branches
(
TrkrClusLoc
&,
bool
isPHG4=
true
);
195
/* void pushback_verb_bins(TrkrDefs::cluskey, bool isPHG4=true); */
196
197
};
198
199
#endif // FILLTRUTHRECOMATCHTREE_H
coresoftware
blob
master
simulation
g4simulation
g4eval
FillClusMatchTree.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration