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.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_DSTReader.C
1
#ifndef MACRO_G4DSTREADER_C
2
#define MACRO_G4DSTREADER_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
G4_Bbc.C
>
7
#include <
G4_BlackHole.C
>
8
#include <
G4_CEmc_Spacal.C
>
9
#include <
G4_EPD.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
G4DSTreaderInit
() {}
46
47
void
G4DSTreader
(
const
string
&outputFile =
"G4sPHENIXCells.root"
)
48
{
49
int
verbosity =
max
(
Enable::VERBOSITY
,
Enable::DSTREADER_VERBOSITY
);
50
51
// save a comprehensive evaluation file
52
PHG4DSTReader
*ana =
new
PHG4DSTReader
(outputFile);
53
ana->
set_save_particle
(
true
);
54
ana->
set_load_all_particle
(
false
);
55
ana->
set_load_active_particle
(
true
);
56
ana->
set_save_vertex
(
true
);
57
58
ana->
Verbosity
(verbosity);
59
60
if
(
G4DSTREADER::save_g4_raw
)
61
{
62
if
(
Enable::MVTX
)
63
{
64
ana->
AddNode
(
"MVTX"
);
65
}
66
if
(
Enable::INTT
)
67
{
68
ana->
AddNode
(
"INTT"
);
69
}
70
if
(
Enable::TPC
)
71
{
72
ana->
AddNode
(
"TPC"
);
73
}
74
75
if
(
Enable::BBC
)
76
{
77
ana->
AddNode
(
"BBC"
);
78
}
79
80
if
(
Enable::CEMC
)
81
{
82
ana->
AddNode
(
"CEMC"
);
83
if
(
Enable::ABSORBER
||
Enable::CEMC_ABSORBER
)
84
{
85
ana->
AddNode
(
"ABSORBER_CEMC"
);
86
ana->
AddNode
(
"CEMC_ELECTRONICS"
);
87
ana->
AddNode
(
"CEMC_SPT"
);
88
}
89
}
90
91
if
(
Enable::HCALIN
)
92
{
93
ana->
AddNode
(
"HCALIN"
);
94
if
(
Enable::ABSORBER
||
Enable::HCALIN_ABSORBER
)
95
{
96
ana->
AddNode
(
"ABSORBER_HCALIN"
);
97
}
98
}
99
100
if
(
Enable::MAGNET
)
101
{
102
if
(
Enable::ABSORBER
||
Enable::MAGNET_ABSORBER
)
103
{
104
ana->
AddNode
(
"MAGNET"
);
105
}
106
}
107
108
if
(
Enable::HCALOUT
)
109
{
110
ana->
AddNode
(
"HCALOUT"
);
111
if
(
Enable::ABSORBER
||
Enable::HCALOUT_ABSORBER
)
112
{
113
ana->
AddNode
(
"ABSORBER_HCALOUT"
);
114
}
115
}
116
117
if
(
Enable::EPD
)
118
{
119
ana->
AddNode
(
"EPD"
);
120
}
121
122
if
(
Enable::BLACKHOLE
)
123
{
124
ana->
AddNode
(
"BH_1"
);
125
ana->
AddNode
(
"BH_FORWARD_PLUS"
);
126
ana->
AddNode
(
"BH_FORWARD_NEG"
);
127
}
128
}
129
130
ana->
set_tower_zero_sup
(
G4DSTREADER::tower_zero_supp
);
131
if
(
Enable::CEMC_TOWER
)
132
{
133
ana->
AddTower
(
"SIM_CEMC"
);
134
ana->
AddTower
(
"RAW_CEMC"
);
135
ana->
AddTower
(
"CALIB_CEMC"
);
136
}
137
if
(
Enable::HCALIN_TOWER
)
138
{
139
ana->
AddTower
(
"SIM_HCALIN"
);
140
ana->
AddTower
(
"RAW_HCALIN"
);
141
ana->
AddTower
(
"CALIB_HCALIN"
);
142
}
143
if
(
Enable::HCALOUT_TOWER
)
144
{
145
ana->
AddTower
(
"SIM_HCALOUT"
);
146
ana->
AddTower
(
"RAW_HCALOUT"
);
147
ana->
AddTower
(
"CALIB_HCALOUT"
);
148
}
149
// Jets disabled for now
150
// if (do_jet_reco)
151
// {
152
//
153
// ana->AddJet("AntiKt06JetsInPerfect");
154
// ana->AddJet("G4TowerJets_6");
155
// }
156
// if (embed_input_file && do_jet_reco)
157
// {
158
// ana->AddJet("G4TowerJets_combined_6");
159
// }
160
161
Fun4AllServer
*se =
Fun4AllServer::instance
();
162
se->
registerSubsystem
(ana);
163
}
164
#endif
fun4all_macros
blob
master
common
G4_DSTReader.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:54
using
1.8.2 with
EIC GitHub integration