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
FastTrackingEval.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FastTrackingEval.h
1
8
#ifndef __FastTrackingEval_H__
9
#define __FastTrackingEval_H__
10
11
#include <
fun4all/SubsysReco.h
>
12
#include <string>
13
14
//Forward declerations
15
class
PHCompositeNode
;
16
class
PHG4TruthInfoContainer
;
17
class
SvtxClusterMap;
18
class
SvtxTrackMap
;
19
class
TFile;
20
class
TTree;
21
class
TH2D;
22
23
24
//Brief: basic ntuple and histogram creation for sim evaluation
25
class
FastTrackingEval
:
public
SubsysReco
26
{
27
public
:
28
//Default constructor
29
FastTrackingEval
(
const
std::string
&
name
=
"FastTrackingEval"
,
30
const
std::string
&
filename
=
"g4eval.root"
,
31
const
std::string
&trackmapname =
"SvtxTrackMap"
);
32
33
//Initialization, called for initialization
34
int
Init
(
PHCompositeNode
*);
35
36
//Process Event, called for each event
37
int
process_event
(
PHCompositeNode
*);
38
39
//End, write and close files
40
int
End
(
PHCompositeNode
*);
41
42
//Change output filename
43
void
set_filename
(
const
char
*
file
)
44
{
if
(file)
_outfile_name
=
file
; }
45
46
//Flags of different kinds of outputs
47
enum
Flag
48
{
49
//all disabled
50
NONE
= 0,
51
};
52
53
//Set the flag
54
//Flags should be set like set_flag(FastTrackingEval::TRUTH, true) from macro
55
void
set_flag
(
const
Flag
& flag,
const
bool
&
value
)
56
{
57
if
(value)
_flags
|= flag;
58
else
_flags
&= (~flag);
59
}
60
61
//User modules
62
void
fill_tree
(
PHCompositeNode
*);
63
void
reset_variables
();
64
65
private
:
66
//output filename
67
std::string
_outfile_name
;
68
69
//name of SvtxTrackMap collection
70
std::string
_trackmapname
;
71
72
//Event counter
73
int
_event
;
74
75
//Get all the nodes
76
int
GetNodes
(
PHCompositeNode
*);
77
78
//flags
79
unsigned
int
_flags
;
80
81
//TTrees
82
TTree*
_eval_tree_tracks
;
83
int
event
;
84
//-- truth
85
int
gtrackID
;
86
int
gflavor
;
87
float
gpx
;
88
float
gpy
;
89
float
gpz
;
90
float
gpt
;
91
float
gp
;
92
float
gtheta
;
93
float
geta
;
94
float
gphi
;
95
float
gvx
;
96
float
gvy
;
97
float
gvz
;
98
99
//-- reco
100
int
trackID
;
101
int
charge
;
102
int
nhits
;
103
float
px
;
104
float
py
;
105
float
pz
;
106
float
pt
;
107
float
p
;
108
float
theta
;
109
float
eta
;
110
float
phi
;
111
float
dca2d
;
112
113
//Histos
114
TH2D*
_h2d_Delta_mom_vs_truth_mom
;
115
TH2D*
_h2d_Delta_mom_vs_truth_eta
;
116
117
//Node pointers
118
PHG4TruthInfoContainer
*
_truth_container
;
119
SvtxTrackMap
*
_trackmap
;
120
121
};
122
123
#endif //* __FastTrackingEval_H__ *//
analysis
blob
master
Tracking
FastTrackingEval
FastTrackingEval.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:58
using
1.8.2 with
sPHENIX GitHub integration