ECCE @ EIC Software
Reference for
ECCE @ 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
B0TrackFastSimEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file B0TrackFastSimEval.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
9
#ifndef G4TRACKFASTSIM_B0TRACKFASTSIMEVAL_H
10
#define G4TRACKFASTSIM_B0TRACKFASTSIMEVAL_H
11
12
#include <
fun4all/SubsysReco.h
>
13
14
#include <map>
15
#include <string>
16
#include <vector>
17
18
//Forward declarations
19
class
PHCompositeNode
;
20
class
PHG4TruthInfoContainer
;
21
class
SvtxTrackMap
;
22
class
SvtxVertexMap
;
23
class
TTree;
24
class
TH2D;
25
26
//Brief: basic ntuple and histogram creation for sim evaluation
27
class
B0TrackFastSimEval
:
public
SubsysReco
28
{
29
public
:
30
//Default constructor
31
B0TrackFastSimEval
(
const
std::string&
name
=
"B0TrackFastSimEval"
,
32
const
std::string&
filename
=
"g4eval.root"
,
33
const
std::string& trackmapname =
"SvtxTrackMap"
);
34
35
//Initialization, called for initialization
36
int
Init
(
PHCompositeNode
*)
override
;
37
38
//Initialization, called for initialization
39
int
InitRun
(
PHCompositeNode
*)
override
;
40
41
//Process Event, called for each event
42
int
process_event
(
PHCompositeNode
*)
override
;
43
44
//End, write and close files
45
int
End
(
PHCompositeNode
*)
override
;
46
47
//Change output filename
48
void
set_filename
(
const
std::string&
file
)
49
{
50
m_OutFileName
=
file
;
51
}
52
53
// set the name of the node with the trackmap
54
void
set_trackmapname
(
const
std::string&
name
)
55
{
56
m_TrackMapName
=
name
;
57
}
58
59
//User modules
60
void
reset_variables
();
61
62
void
AddProjection
(
const
std::string&
name
);
63
64
private
:
65
void
fill_track_tree
(
PHCompositeNode
*);
66
void
fill_vertex_tree
(
PHCompositeNode
*);
67
68
//Get all the nodes
69
int
GetNodes
(
PHCompositeNode
*);
70
71
//Node pointers
72
PHG4TruthInfoContainer
*
m_TruthInfoContainer
;
73
SvtxTrackMap
*
m_TrackMap
;
74
SvtxVertexMap
*
m_VertexMap
;
75
76
//TTrees
77
TTree*
m_TracksEvalTree
;
78
TTree*
m_VertexEvalTree
;
79
80
//Histos
81
TH2D*
m_H2D_DeltaMomVsTruthMom
;
82
TH2D*
m_H2D_DeltaMomVsTruthEta
;
83
84
//Event counter
85
int
m_EventCounter
;
86
87
// TTree variables
88
int
m_TTree_Event
;
89
//-- truth
90
int
m_TTree_gTrackID
;
91
int
m_TTree_gFlavor
;
92
float
m_TTree_gpx
;
93
float
m_TTree_gpy
;
94
float
m_TTree_gpz
;
95
float
m_TTree_gvx
;
96
float
m_TTree_gvy
;
97
float
m_TTree_gvz
;
98
float
m_TTree_gvt
;
99
100
//-- reco
101
int
m_TTree_TrackID
;
102
int
m_TTree_Charge
;
103
int
m_TTree_nHits
;
104
float
m_TTree_px
;
105
float
m_TTree_py
;
106
float
m_TTree_pz
;
107
float
m_TTree_pcax
;
108
float
m_TTree_pcay
;
109
float
m_TTree_pcaz
;
110
float
m_TTree_dca2d
;
111
float
m_TTree_layer
[4];
112
113
std::map<int, int>
m_TTree_HitContainerID_nHits_map
;
114
115
//vertex
116
float
m_TTree_vx
;
117
float
m_TTree_vy
;
118
float
m_TTree_vz
;
119
float
m_TTree_DeltaVx
;
120
float
m_TTree_DeltaVy
;
121
float
m_TTree_DeltaVz
;
122
int
m_TTree_nTracks
;
123
int
m_TTree_nFromTruth
;
124
125
//output filename
126
std::string
m_OutFileName
;
127
128
//name of SvtxTrackMap collection
129
std::string
m_TrackMapName
;
130
131
// names and index of projections
132
std::map<std::string, unsigned int>
m_ProjectionNameMap
;
133
// projections to cylinders and planes
134
std::vector<std::vector<float>>
m_TTree_proj_vec
;
135
std::vector<std::vector<float>>
m_TTree_proj_p_vec
;
136
// hits on reference cylinders and planes
137
std::vector<std::vector<float>>
m_TTree_ref_vec
;
138
std::vector<std::vector<float>>
m_TTree_ref_p_vec
;
139
};
140
141
#endif //* G4TRACKFASTSIM_PHG4TRACKFASTSIMEVAL_H *//
fun4all_eicdetectors
blob
master
simulation
g4simulation
g4b0
B0TrackFastSimEval.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:46
using
1.8.2 with
ECCE GitHub integration