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
TruthConversionEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TruthConversionEval.h
1
10
#ifndef TRUTHCONVERSIONEVAL_H__
11
#define TRUTHCONVERSIONEVAL_H__
12
13
#include <
fun4all/SubsysReco.h
>
14
#include <calobase/RawClusterContainer.h>
15
#include <
g4main/PHG4Particle.h
>
16
#include <
trackbase_historic/SvtxTrack.h
>
17
#include <TLorentzVector.h>
18
#include <queue>
19
20
class
PHCompositeNode
;
21
class
PHG4TruthInfoContainer
;
22
class
PHG4VtxPoint
;
23
class
SvtxTrackEval
;
24
class
SvtxTrackMap
;
25
class
SvtxVertex
;
26
class
SvtxHitMap;
27
class
SvtxHit;
28
class
SvtxClusterMap;
29
class
SvtxCluster;
30
class
TrkrClusterContainer
;
31
class
RawClusterContainer
;
32
class
SVReco
;
33
class
VtxRegressor
;
34
class
Conversion
;
35
class
TTree;
36
class
TFile;
37
38
class
TruthConversionEval
:
public
SubsysReco
39
{
40
41
public
:
50
TruthConversionEval
(
const
std::string
&
name
,
unsigned
int
runnumber
,
51
int
particleEmbed,
int
pythiaEmbed,
bool
makeTTree,
std::string
TMVAName,
std::string
TMVAPath);
52
~TruthConversionEval
();
53
int
InitRun
(
PHCompositeNode
*);
58
int
process_event
(
PHCompositeNode
*);
59
int
End
(
PHCompositeNode
*);
61
const
RawClusterContainer
*
getClusters
()
const
;
62
63
private
:
64
//@return ownsership
65
inline
TLorentzVector
tracktoTLV
(
SvtxTrack
* track){
66
TLorentzVector
r
;
67
r.SetPtEtaPhiM(track->
get_pt
(),track->
get_eta
(),track->
get_phi
(),.0005109989461);
//assume electron
68
return
r
;
69
}
70
//@return ownsership
71
inline
TLorentzVector
particletoTLV
(
PHG4Particle
*
particle
){
72
return
TLorentzVector(particle->
get_px
(),particle->
get_py
(),particle->
get_pz
(),particle->
get_e
());
73
}
74
bool
doNodePointers
(
PHCompositeNode
* topNode);
75
SvtxVertex
*
get_primary_vertex
(
PHCompositeNode
* topNode)
const
;
79
void
numUnique
(std::map<int,Conversion>* map,
SvtxTrackEval
* trackEval,
RawClusterContainer
* mainClusterContainer,std::vector<std::pair<SvtxTrack*,SvtxTrack*>>* tightBackground);
81
void
processTrackBackground
(std::vector<SvtxTrack*>*
v
,
SvtxTrackEval
*);
82
void
recordConversion
(
Conversion
*conversion,TLorentzVector *tlv_photon,TLorentzVector *tlv_electron, TLorentzVector *tlv_positron);
83
84
int
get_embed
(
PHG4Particle
*
particle
,
PHG4TruthInfoContainer
* truthinfo)
const
;
85
float
vtoR
(
PHG4VtxPoint
* vtx)
const
;
86
87
const
static
int
s_kMAXParticles
=200;
88
const
unsigned
int
_kRunNumber
;
89
const
int
_kParticleEmbed
;
90
const
int
_kPythiaEmbed
;
91
const
bool
_kMakeTTree
;
//< if false no TTrees are output
92
int
_runNumber
;
93
TFile *
_f
=NULL;
94
TTree *
_signalCutTree
=NULL;
95
TTree *
_trackBackTree
=NULL;
96
TTree *
_pairBackTree
=NULL;
97
TTree *
_vtxBackTree
=NULL;
98
TTree *
_vtxingTree
=NULL;
99
TTree *
_observTree
=NULL;
100
RawClusterContainer
*
_mainClusterContainer
;
//< clusters from the node
101
PHG4TruthInfoContainer
*
_truthinfo
;
102
TrkrClusterContainer
*
_clusterMap
;
103
SvtxTrackMap
*
_allTracks
;
104
SvtxHitMap *
_hitMap
;
105
std::string
_foutname
;
106
SVReco
*
_vertexer
=NULL;
107
VtxRegressor
*
_regressor
=NULL;
108
114
float
_b_refitdiffx
;
115
float
_b_refitdiffy
;
116
float
_b_refitdiffz
;
117
int
_b_nCluster
;
118
int
_bb_track1_pid
;
119
int
_bb_track2_pid
;
120
int
_bb_parent_pid
;
121
float
_b_cluster_dphi
;
122
float
_b_cluster_deta
;
123
int
_bb_nCluster
;
124
float
_bb_cluster_dphi
;
125
float
_bb_cluster_deta
;
126
float
_b_track1_pt
;
127
float
_b_track1_eta
;
128
float
_b_track1_phi
;
129
float
_b_track2_pt
;
130
float
_b_track2_eta
;
131
float
_b_track2_phi
;
132
float
_b_track_deta
;
133
int
_b_track_layer
;
134
int
_b_track_dlayer
;
135
float
_b_track_pT
;
136
float
_b_track_dca
;
137
float
_b_ttrack_pT
;
138
double
_b_approach
;
139
float
_b_vtx_radius
;
140
float
_b_vtx_phi
;
141
float
_b_vtx_eta
;
142
float
_b_vtx_x
;
143
float
_b_vtx_y
;
144
float
_b_vtx_z
;
145
float
_b_tvtx_eta
;
146
float
_b_tvtx_x
;
147
float
_b_tvtx_y
;
148
float
_b_tvtx_z
;
149
float
_b_tvtx_radius
;
150
float
_b_tvtx_phi
;
151
float
_b_vtxTrackRZ_dist
;
152
float
_b_vtxTrackRPhi_dist
;
153
float
_b_vtx_chi2
;
154
float
_b_photon_m
;
155
float
_b_tphoton_m
;
156
float
_b_tphoton_pT
;
157
float
_b_photon_pT
;
158
float
_b_cluster_prob
;
159
float
_b_track_dphi
;
160
//bb stands for background branch
161
float
_bb_track_deta
;
162
float
_bb_vtx_radius
;
163
float
_bb_track_dca
;
164
int
_bb_track_layer
;
165
int
_bb_track_dlayer
;
166
float
_bb_track_pT
;
167
double
_bb_approach
;
168
float
_bb_vtxTrackRZ_dist
;
169
float
_bb_vtxTrackRPhi_dist
;
170
float
_bb_vtx_chi2
;
171
float
_bb_photon_m
;
172
float
_bb_photon_pT
;
173
float
_bb_cluster_prob
;
174
float
_bb_track_dphi
;
175
int
_bb_pid
;
176
int
_b_nMatched
=0;
177
int
_b_nUnmatched
=0;
178
std::vector<float>
_b_truth_pT
;
179
std::vector<float>
_b_reco_pT
;
180
std::vector<float>
_b_alltrack_pT
;
181
std::vector<float>
_b_allphoton_pT
;
185
RawClusterContainer
_conversionClusters
;
186
//TODO check TPC radius
187
const
static
int
s_kTPCRADIUS
=21;
//in cm there is a way to get this from the simulation I should implement?
189
float
_kRAPIDITYACCEPT
=1;
//<acceptance rapidity currently hard coded to |1|
190
float
_kTightPtMin
=2.5;
//< pt cut for making tight background
191
float
_kTightDetaMax
=.0082;
//< deta cut for making tight background
192
};
193
194
195
196
#endif // __TRUTHCONVERSIONEVAL_H__
197
198
199
analysis
blob
master
PhotonConversion
truthconversion
TruthConversionEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:55
using
1.8.2 with
sPHENIX GitHub integration