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