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
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 <
g4eval/PHG4DSTReader.h
>
7
8
#include <
fun4all/Fun4AllServer.h
>
9
10
R__LOAD_LIBRARY
(libg4eval.so)
11
12
13
20
21
namespace Enable
22
{
23
bool
DSTREADER
=
false
;
24
int
DSTREADER_VERBOSITY
= 0;
25
}
// namespace Enable
26
27
namespace
G4DSTREADER
28
{
29
bool
save_g4_raw
=
true
;
30
double
tower_zero_supp
= 1.e-6;
31
}
// namespace G4DSTREADER
32
33
void
G4DSTreader_EICDetectorInit
() {}
34
void
G4DSTreader_EICDetector
(
const
string
&outputFile =
"G4sPHENIXCells.root"
)
35
{
37
int
verbosity =
max
(
Enable::VERBOSITY
,
Enable::DSTREADER_VERBOSITY
);
38
39
// save a comprehensive evaluation file
40
PHG4DSTReader
*ana =
new
PHG4DSTReader
(outputFile);
41
ana->
set_save_particle
(
true
);
42
ana->
set_load_all_particle
(
false
);
43
ana->
set_load_active_particle
(
true
);
44
ana->
set_save_vertex
(
true
);
45
46
ana->
Verbosity
(verbosity);
47
48
if
(
G4DSTREADER::save_g4_raw
)
49
{
50
if
(
Enable::PIPE
&&
Enable::PIPE_ABSORBER
)
51
{
52
ana->
AddNode
(
"PIPE"
);
53
}
54
if
(
Enable::EGEM
)
55
{
56
ana->
AddNode
(
"EGEM_0"
);
57
}
58
if
(
Enable::FGEM
)
59
{
60
ana->
AddNode
(
"FGEM_0"
);
61
}
62
if
(
Enable::FTTL
)
63
{
64
ana->
AddNode
(
"FTTL_0"
);
65
ana->
AddNode
(
"FTTL_1"
);
66
}
67
if
(
Enable::ETTL
)
68
{
69
ana->
AddNode
(
"ETTL_0"
);
70
ana->
AddNode
(
"ETTL_1"
);
71
}
72
if
(
Enable::CTTL
)
73
{
74
ana->
AddNode
(
"CTTL_0"
);
75
}
76
if
(
Enable::RWELL
)
77
{
78
ana->
AddNode
(
"RWELL_0"
);
79
ana->
AddNode
(
"RWELL_1"
);
80
ana->
AddNode
(
"RWELL_2"
);
81
}
82
if
(
Enable::BARREL
)
83
{
84
ana->
AddNode
(
"SVTX"
);
85
ana->
AddNode
(
"BARR"
);
86
}
87
if
(
Enable::FST
)
88
{
89
ana->
AddNode
(
"FST_0"
);
90
ana->
AddNode
(
"FST_1"
);
91
ana->
AddNode
(
"FST_2"
);
92
ana->
AddNode
(
"FST_3"
);
93
ana->
AddNode
(
"FST_4"
);
94
ana->
AddNode
(
"EFST_0"
);
95
ana->
AddNode
(
"EFST_1"
);
96
ana->
AddNode
(
"EFST_2"
);
97
ana->
AddNode
(
"EFST_3"
);
98
}
99
//
100
// if (Enable::CEMC)
101
// {
102
// ana->AddNode("CEMC");
103
// if (Enable::ABSORBER || Enable::CEMC_ABSORBER)
104
// {
105
// ana->AddNode("ABSORBER_CEMC");
106
// ana->AddNode("CEMC_ELECTRONICS_0");
107
// }
108
// }
109
//
110
// if (Enable::HCALIN)
111
// {
112
// ana->AddNode("HCALIN");
113
// if (Enable::ABSORBER || Enable::HCALIN_ABSORBER)
114
// {
115
// ana->AddNode("ABSORBER_HCALIN");
116
// ana->AddNode("HCALIN_SPT");
117
// }
118
// }
119
//
120
// if (Enable::MAGNET)
121
// {
122
// if (Enable::ABSORBER || Enable::MAGNET_ABSORBER)
123
// ana->AddNode("MAGNET");
124
// }
125
//
126
// if (Enable::HCALOUT)
127
// {
128
// ana->AddNode("HCALOUT");
129
// if (Enable::ABSORBER || Enable::HCALOUT_ABSORBER)
130
// ana->AddNode("ABSORBER_HCALOUT");
131
// }
132
//
133
// if (Enable::FHCAL)
134
// {
135
// ana->AddNode("FHCAL");
136
// if (Enable::ABSORBER || Enable::FHCAL_ABSORBER)
137
// ana->AddNode("ABSORBER_FHCAL");
138
// }
139
//
140
// if (Enable::FEMC)
141
// {
142
// ana->AddNode("FEMC");
143
// if (Enable::ABSORBER || Enable::FEMC_ABSORBER)
144
// ana->AddNode("ABSORBER_FEMC");
145
// }
146
//
147
// if (Enable::EEMC)
148
// {
149
// ana->AddNode("EEMC");
150
// }
151
if
(
Enable::DIRC
)
152
{
153
ana->
AddNode
(
"hpDIRC"
);
154
}
155
if
(
Enable::RICH
)
156
{
157
ana->
AddNode
(
"dRICh_0"
);
158
}
159
if
(
Enable::mRICH
)
160
{
161
ana->
AddNode
(
"mRICH"
);
162
ana->
AddNode
(
"ABSORBER_mRICH"
);
163
}
164
165
if
(
Enable::BLACKHOLE
)
166
{
167
ana->
AddNode
(
"BH_1"
);
168
ana->
AddNode
(
"BH_FORWARD_PLUS"
);
169
ana->
AddNode
(
"BH_FORWARD_NEG"
);
170
}
171
172
if
(
Enable::HFARFWD_VIRTUAL_DETECTORS_IP6
or
Enable::HFARFWD_VIRTUAL_DETECTORS_IP8
)
173
{
174
ana->
AddNode
(
"ZDCsurrogate"
);
175
ana->
AddNode
(
"rpTruth"
);
176
ana->
AddNode
(
"b0Truth"
);
177
ana->
AddNode
(
"offMomTruth"
);
178
}
179
}
180
181
ana->
set_tower_zero_sup
(
G4DSTREADER::tower_zero_supp
);
182
if
(
Enable::CEMC_TOWER
)
183
{
184
ana->
AddTower
(
"SIM_CEMC"
);
185
ana->
AddTower
(
"RAW_CEMC"
);
186
ana->
AddTower
(
"CALIB_CEMC"
);
187
}
188
if
(
Enable::HCALIN_TOWER
)
189
{
190
ana->
AddTower
(
"SIM_HCALIN"
);
191
ana->
AddTower
(
"RAW_HCALIN"
);
192
ana->
AddTower
(
"CALIB_HCALIN"
);
193
}
194
if
(
Enable::HCALOUT_TOWER
)
195
{
196
ana->
AddTower
(
"SIM_HCALOUT"
);
197
ana->
AddTower
(
"RAW_HCALOUT"
);
198
ana->
AddTower
(
"CALIB_HCALOUT"
);
199
}
200
if
(
Enable::FHCAL_TOWER
)
201
{
202
ana->
AddTower
(
"SIM_FHCAL"
);
203
ana->
AddTower
(
"RAW_FHCAL"
);
204
ana->
AddTower
(
"CALIB_FHCAL"
);
205
}
206
if
(
Enable::FEMC_TOWER
)
207
{
208
ana->
AddTower
(
"SIM_FEMC"
);
209
ana->
AddTower
(
"RAW_FEMC"
);
210
ana->
AddTower
(
"CALIB_FEMC"
);
211
}
212
if
(
Enable::EEMC_TOWER
or
Enable::EEMCH_TOWER
)
213
{
214
ana->
AddTower
(
"SIM_EEMC"
);
215
ana->
AddTower
(
"RAW_EEMC"
);
216
ana->
AddTower
(
"CALIB_EEMC"
);
217
}
218
219
// Jets disabled for now
220
// if (do_jet_reco)
221
// {
222
//
223
// ana->AddJet("AntiKt06JetsInPerfect");
224
// ana->AddJet("G4TowerJets_6");
225
// }
226
// if (embed_input_file && do_jet_reco)
227
// {
228
// ana->AddJet("G4TowerJets_combined_6");
229
// }
230
231
Fun4AllServer
*se =
Fun4AllServer::instance
();
232
se->
registerSubsystem
(ana);
233
}
234
#endif
macros
blob
master
common
G4_DSTReader_EICDetector.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration