EIC Software
Reference for
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
G4_DSTReader_fsPHENIX.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_DSTReader_fsPHENIX.C
1
#ifndef MACRO_G4DSTREADERFSPHENIX_C
2
#define MACRO_G4DSTREADERFSPHENIX_C
3
4
#include <GlobalVariables.C>
5
6
#include <
G4_CEmc_Spacal.C
>
7
#include <
G4_FEMC.C
>
8
#include <
G4_FGEM_fsPHENIX.C
>
9
#include <
G4_FHCAL.C
>
10
#include <G4_HcalIn_ref.C>
11
#include <G4_HcalOut_ref.C>
12
#include <
G4_Intt.C
>
13
#include <
G4_Magnet.C
>
14
#include <
G4_Mvtx.C
>
15
#include <
G4_TPC.C
>
16
17
#include <
g4eval/PHG4DSTReader.h
>
18
19
#include <
fun4all/Fun4AllServer.h
>
20
21
R__LOAD_LIBRARY
(libg4eval.so)
22
23
24
31
32
33
namespace Enable
34
{
35
bool
DSTREADER
=
false
;
36
int
DSTREADER_VERBOSITY
= 0;
37
}
// namespace Enable
38
39
namespace
G4DSTREADER
40
{
41
bool
save_g4_raw
=
true
;
42
double
tower_zero_supp
= 1.e-6;
43
}
// namespace G4DSTREADER
44
45
void
G4DSTreader_fsPHENIXInit
() {}
46
47
void
G4DSTreader_fsPHENIX
(
const
string
&outputFile =
"G4sPHENIXCells.root"
)
48
{
50
int
verbosity =
max
(
Enable::VERBOSITY
,
Enable::DSTREADER_VERBOSITY
);
51
52
// save a comprehensive evaluation file
53
PHG4DSTReader
*ana =
new
PHG4DSTReader
(outputFile);
54
ana->
set_save_particle
(
true
);
55
ana->
set_load_all_particle
(
false
);
56
ana->
set_load_active_particle
(
true
);
57
ana->
set_save_vertex
(
true
);
58
59
ana->
Verbosity
(verbosity);
60
61
if
(
G4DSTREADER::save_g4_raw
)
62
{
63
if
(
Enable::MVTX
)
64
{
65
ana->
AddNode
(
"MVTX"
);
66
}
67
if
(
Enable::INTT
)
68
{
69
ana->
AddNode
(
"INTT"
);
70
}
71
if
(
Enable::TPC
)
72
{
73
ana->
AddNode
(
"TPC"
);
74
}
75
76
if
(
Enable::CEMC
)
77
{
78
ana->
AddNode
(
"CEMC"
);
79
if
(
Enable::ABSORBER
||
Enable::CEMC_ABSORBER
)
80
{
81
ana->
AddNode
(
"ABSORBER_CEMC"
);
82
ana->
AddNode
(
"CEMC_ELECTRONICS"
);
83
ana->
AddNode
(
"CEMC_SPT"
);
84
}
85
}
86
87
if
(
Enable::HCALIN
)
88
{
89
ana->
AddNode
(
"HCALIN"
);
90
if
(
Enable::ABSORBER
||
Enable::HCALIN_ABSORBER
)
91
ana->
AddNode
(
"ABSORBER_HCALIN"
);
92
}
93
94
if
(
Enable::MAGNET
)
95
{
96
if
(
Enable::ABSORBER
||
Enable::MAGNET_ABSORBER
)
97
ana->
AddNode
(
"MAGNET"
);
98
}
99
100
if
(
Enable::HCALOUT
)
101
{
102
ana->
AddNode
(
"HCALOUT"
);
103
if
(
Enable::ABSORBER
||
Enable::HCALOUT_ABSORBER
)
104
ana->
AddNode
(
"ABSORBER_HCALOUT"
);
105
}
106
107
if
(
Enable::FHCAL
)
108
{
109
ana->
AddNode
(
"FHCAL"
);
110
if
(
Enable::ABSORBER
||
Enable::FHCAL_ABSORBER
)
111
ana->
AddNode
(
"ABSORBER_FHCAL"
);
112
}
113
114
if
(
Enable::FEMC
)
115
{
116
ana->
AddNode
(
"FEMC"
);
117
if
(
Enable::ABSORBER
||
Enable::FEMC_ABSORBER
)
118
ana->
AddNode
(
"ABSORBER_FEMC"
);
119
}
120
121
if
(
Enable::FGEM
)
122
{
123
ana->
AddNode
(
"FGEM_0"
);
124
ana->
AddNode
(
"FGEM_1"
);
125
ana->
AddNode
(
"FGEM_2"
);
126
ana->
AddNode
(
"FGEM_3"
);
127
ana->
AddNode
(
"FGEM_4"
);
128
}
129
if
(
Enable::BLACKHOLE
)
130
{
131
ana->
AddNode
(
"BH_1"
);
132
ana->
AddNode
(
"BH_FORWARD_PLUS"
);
133
ana->
AddNode
(
"BH_FORWARD_NEG"
);
134
}
135
}
136
137
ana->
set_tower_zero_sup
(
G4DSTREADER::tower_zero_supp
);
138
if
(
Enable::CEMC_TOWER
)
139
{
140
ana->
AddTower
(
"SIM_CEMC"
);
141
ana->
AddTower
(
"RAW_CEMC"
);
142
ana->
AddTower
(
"CALIB_CEMC"
);
143
}
144
if
(
Enable::HCALIN_TOWER
)
145
{
146
ana->
AddTower
(
"SIM_HCALIN"
);
147
ana->
AddTower
(
"RAW_HCALIN"
);
148
ana->
AddTower
(
"CALIB_HCALIN"
);
149
}
150
if
(
Enable::HCALOUT_TOWER
)
151
{
152
ana->
AddTower
(
"SIM_HCALOUT"
);
153
ana->
AddTower
(
"RAW_HCALOUT"
);
154
ana->
AddTower
(
"CALIB_HCALOUT"
);
155
}
156
if
(
Enable::FHCAL_TOWER
)
157
{
158
ana->
AddTower
(
"SIM_FHCAL"
);
159
ana->
AddTower
(
"RAW_FHCAL"
);
160
ana->
AddTower
(
"CALIB_FHCAL"
);
161
}
162
if
(
Enable::FEMC_TOWER
)
163
{
164
ana->
AddTower
(
"SIM_FEMC"
);
165
ana->
AddTower
(
"RAW_FEMC"
);
166
ana->
AddTower
(
"CALIB_FEMC"
);
167
}
168
169
// Jets disabled for now
170
// if (Enable::JETS)
171
// {
172
//
173
// ana->AddJet("AntiKt06JetsInPerfect");
174
// ana->AddJet("G4TowerJets_6");
175
// }
176
// if (embed_input_file && do_jet_reco)
177
// {
178
// ana->AddJet("G4TowerJets_combined_6");
179
// }
180
181
Fun4AllServer
*se =
Fun4AllServer::instance
();
182
se->
registerSubsystem
(ana);
183
}
184
#endif
fun4all_eicmacros
blob
master
common
G4_DSTReader_fsPHENIX.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration