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_EICDetector.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_DSTReader_EICDetector.C
1
#ifndef MACRO_G4DSTREADEREICDETECTOR_C
2
#define MACRO_G4DSTREADEREICDETECTOR_C
3
4
#include <GlobalVariables.C>
5
6
#include <
G4_Barrel_EIC.C
>
7
#include <
G4_CEmc_EIC.C
>
8
#include <
G4_DIRC.C
>
9
#include <
G4_EEMC.C
>
10
#include <
G4_FEMC_EIC.C
>
11
#include <
G4_FHCAL.C
>
12
#include <
G4_FST_EIC.C
>
13
#include <
G4_GEM_EIC.C
>
14
#include <G4_HcalIn_ref.C>
15
#include <G4_HcalOut_ref.C>
16
#include <
G4_Magnet.C
>
17
#include <
G4_Mvtx_EIC.C
>
18
#include <
G4_RICH.C
>
19
#include <
G4_TPC_EIC.C
>
20
#include <
G4_BECAL.C
>
21
22
#include <
g4eval/PHG4DSTReader.h
>
23
24
#include <
fun4all/Fun4AllServer.h
>
25
26
R__LOAD_LIBRARY
(libg4eval.so)
27
28
29
36
37
namespace Enable
38
{
39
bool
DSTREADER
=
false
;
40
int
DSTREADER_VERBOSITY
= 0;
41
}
// namespace Enable
42
43
namespace
G4DSTREADER
44
{
45
bool
save_g4_raw
=
true
;
46
double
tower_zero_supp
= 1.e-6;
47
}
// namespace G4DSTREADER
48
49
void
G4DSTreader_EICDetectorInit
() {}
50
void
G4DSTreader_EICDetector
(
const
string
&outputFile =
"G4sPHENIXCells.root"
)
51
{
53
int
verbosity =
max
(
Enable::VERBOSITY
,
Enable::DSTREADER_VERBOSITY
);
54
55
// save a comprehensive evaluation file
56
PHG4DSTReader
*ana =
new
PHG4DSTReader
(outputFile);
57
ana->
set_save_particle
(
true
);
58
ana->
set_load_all_particle
(
false
);
59
ana->
set_load_active_particle
(
true
);
60
ana->
set_save_vertex
(
true
);
61
62
ana->
Verbosity
(verbosity);
63
64
if
(
G4DSTREADER::save_g4_raw
)
65
{
66
if
(
Enable::PIPE
&&
Enable::PIPE_ABSORBER
)
67
{
68
ana->
AddNode
(
"PIPE"
);
69
}
70
if
(
Enable::BARREL
)
71
{
72
if
(
G4BARREL::SETTING::BARRELV5
||
G4BARREL::SETTING::BARRELV6
) {
73
int
nLayer1 = 3;
//barrel 1
74
int
nLayer2 = 2;
//barrel 2
75
if
(
G4BARREL::SETTING::BARRELV6
) nLayer2 = 1;
//compactible w/ TPC
76
int
nLayer[2]={nLayer1,nLayer2};
77
78
for
(
int
n
=0;
n
<2;
n
++)
79
{
80
for
(
int
i;i<nLayer[
n
];i++)
81
{
82
ana->
AddNode
(Form(
"BARREL%d_%d"
,
n
,i));
83
}
84
}
85
}
86
else
87
{
88
int
nLayer=5;
89
if
(
G4BARREL::SETTING::BARRELV4
) nLayer=6;
90
for
(
int
i;i<nLayer;i++)
91
{
92
ana->
AddNode
(Form(
"BARREL%d"
,i));
93
}
94
}
95
}
96
if
(
Enable::MVTX
)
97
{
98
ana->
AddNode
(
"MVTX"
);
99
}
100
if
(
Enable::TPC
)
101
{
102
ana->
AddNode
(
"TPC"
);
103
}
104
105
if
(
Enable::EGEM
)
106
{
107
ana->
AddNode
(
"EGEM_0"
);
108
ana->
AddNode
(
"EGEM_1"
);
109
ana->
AddNode
(
"EGEM_2"
);
110
ana->
AddNode
(
"EGEM_3"
);
111
}
112
if
(
Enable::FGEM
)
113
{
114
ana->
AddNode
(
"FGEM_2"
);
115
ana->
AddNode
(
"FGEM_3"
);
116
ana->
AddNode
(
"FGEM_4"
);
117
}
118
if
(
Enable::FST
)
119
{
120
ana->
AddNode
(
"FST_0"
);
121
ana->
AddNode
(
"FST_1"
);
122
ana->
AddNode
(
"FST_2"
);
123
ana->
AddNode
(
"FST_3"
);
124
ana->
AddNode
(
"FST_4"
);
125
if
(
G4FST::SETTING::FSTV4
||
G4FST::SETTING::FSTV5
)
126
{
127
ana->
AddNode
(
"FST_5"
);
128
}
129
}
130
131
if
(
Enable::CEMC
)
132
{
133
ana->
AddNode
(
"CEMC"
);
134
if
(
Enable::ABSORBER
||
Enable::CEMC_ABSORBER
)
135
{
136
ana->
AddNode
(
"ABSORBER_CEMC"
);
137
ana->
AddNode
(
"CEMC_ELECTRONICS_0"
);
138
}
139
}
140
141
if
(
Enable::HCALIN
)
142
{
143
ana->
AddNode
(
"HCALIN"
);
144
if
(
Enable::ABSORBER
||
Enable::HCALIN_ABSORBER
)
145
{
146
ana->
AddNode
(
"ABSORBER_HCALIN"
);
147
ana->
AddNode
(
"HCALIN_SPT"
);
148
}
149
}
150
151
if
(
Enable::MAGNET
)
152
{
153
if
(
Enable::ABSORBER
||
Enable::MAGNET_ABSORBER
)
154
ana->
AddNode
(
"MAGNET"
);
155
}
156
157
if
(
Enable::HCALOUT
)
158
{
159
ana->
AddNode
(
"HCALOUT"
);
160
if
(
Enable::ABSORBER
||
Enable::HCALOUT_ABSORBER
)
161
ana->
AddNode
(
"ABSORBER_HCALOUT"
);
162
}
163
164
if
(
Enable::FHCAL
)
165
{
166
ana->
AddNode
(
"FHCAL"
);
167
if
(
Enable::ABSORBER
||
Enable::FHCAL_ABSORBER
)
168
ana->
AddNode
(
"ABSORBER_FHCAL"
);
169
}
170
171
if
(
Enable::BECAL
)
172
{
173
ana->
AddNode
(
"BECAL"
);
174
if
(
Enable::ABSORBER
||
Enable::BECAL_ABSORBER
)
175
ana->
AddNode
(
"ABSORBER_BECAL"
);
176
}
177
178
179
if
(
Enable::FEMC
)
180
{
181
ana->
AddNode
(
"FEMC"
);
182
if
(
Enable::ABSORBER
||
Enable::FEMC_ABSORBER
)
183
ana->
AddNode
(
"ABSORBER_FEMC"
);
184
}
185
186
if
(
Enable::EEMC
)
187
{
188
ana->
AddNode
(
"EEMC"
);
189
}
190
if
(
Enable::DIRC
)
191
{
192
ana->
AddNode
(
"DIRC"
);
193
}
194
if
(
Enable::RICH
)
195
{
196
ana->
AddNode
(
"RICH"
);
197
}
198
199
if
(
Enable::BLACKHOLE
)
200
{
201
ana->
AddNode
(
"BH_1"
);
202
ana->
AddNode
(
"BH_FORWARD_PLUS"
);
203
ana->
AddNode
(
"BH_FORWARD_NEG"
);
204
}
205
}
206
207
ana->
set_tower_zero_sup
(
G4DSTREADER::tower_zero_supp
);
208
if
(
Enable::CEMC_TOWER
)
209
{
210
ana->
AddTower
(
"SIM_CEMC"
);
211
ana->
AddTower
(
"RAW_CEMC"
);
212
ana->
AddTower
(
"CALIB_CEMC"
);
213
}
214
if
(
Enable::HCALIN_TOWER
)
215
{
216
ana->
AddTower
(
"SIM_HCALIN"
);
217
ana->
AddTower
(
"RAW_HCALIN"
);
218
ana->
AddTower
(
"CALIB_HCALIN"
);
219
}
220
if
(
Enable::HCALOUT_TOWER
)
221
{
222
ana->
AddTower
(
"SIM_HCALOUT"
);
223
ana->
AddTower
(
"RAW_HCALOUT"
);
224
ana->
AddTower
(
"CALIB_HCALOUT"
);
225
}
226
if
(
Enable::FHCAL_TOWER
)
227
{
228
ana->
AddTower
(
"SIM_FHCAL"
);
229
ana->
AddTower
(
"RAW_FHCAL"
);
230
ana->
AddTower
(
"CALIB_FHCAL"
);
231
}
232
if
(
Enable::BECAL_TOWER
)
233
{
234
ana->
AddTower
(
"SIM_BECAL"
);
235
ana->
AddTower
(
"RAW_BECAL"
);
236
ana->
AddTower
(
"CALIB_BECAL"
);
237
}
238
if
(
Enable::FEMC_TOWER
)
239
{
240
ana->
AddTower
(
"SIM_FEMC"
);
241
ana->
AddTower
(
"RAW_FEMC"
);
242
ana->
AddTower
(
"CALIB_FEMC"
);
243
}
244
if
(
Enable::EEMC_TOWER
)
245
{
246
ana->
AddTower
(
"SIM_EEMC"
);
247
ana->
AddTower
(
"RAW_EEMC"
);
248
ana->
AddTower
(
"CALIB_EEMC"
);
249
}
250
251
// Jets disabled for now
252
// if (do_jet_reco)
253
// {
254
//
255
// ana->AddJet("AntiKt06JetsInPerfect");
256
// ana->AddJet("G4TowerJets_6");
257
// }
258
// if (embed_input_file && do_jet_reco)
259
// {
260
// ana->AddJet("G4TowerJets_combined_6");
261
// }
262
263
Fun4AllServer
*se =
Fun4AllServer::instance
();
264
se->
registerSubsystem
(ana);
265
}
266
#endif
fun4all_eicmacros
blob
master
common
G4_DSTReader_EICDetector.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration