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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
blob
master
common
DisplayOn.C
ECCEStyle.C
ECCEStyle.h
G4_Aerogel.C
G4_AllSilicon.C
G4_B0ECAL.C
G4_B0Tracking_EIC.C
G4_Barrel_EIC.C
G4_Bbc.C
G4_BECAL.C
G4_BlackHole.C
G4_BMMG.C
G4_BToF.C
G4_BWD.C
G4_CEmc_Albedo.C
G4_CEmc_EIC.C
G4_CEmc_Spacal.C
G4_DIRC.C
G4_DRCALO.C
G4_dRICH.C
G4_DSTReader_EICDetector.C
G4_EEMC.C
G4_EEMC_hybrid.C
G4_EHCAL.C
G4_EToF.C
G4_EventEvaluator.C
G4_FEMC.C
G4_FEMC_EIC.C
G4_FHCAL.C
G4_FST_EIC.C
G4_FwdJets.C
G4_GEM_EIC.C
G4_Global.C
G4_HcalIn_ref.C
G4_HcalOut_ref.C
G4_hFarBwdBeamLine_EIC.C
G4_hFarFwdBeamLine_EIC.C
G4_HToF.C
G4_Input.C
G4_Jets.C
G4_KFParticle.C
G4_LFHCAL.C
G4_Magnet.C
G4_Micromegas.C
G4_mRICH.C
G4_mRwell_EIC.C
G4_Mvtx_EIC.C
G4_ParticleFlow.C
G4_Pipe.C
G4_Pipe_EIC.C
G4_Piston.C
G4_PlugDoor.C
G4_PlugDoor_EIC.C
G4_Production.C
G4_PSTOF.C
G4_RICH.C
G4_TopoClusterReco.C
G4_TPC_EIC.C
G4_Tracking_EIC.C
G4_TrackingSupport.C
G4_TRD.C
G4_TTL_EIC.C
G4_User.C
G4_World.C
GlobalVariables.C
QA.C
sPhenixStyle.C
sPhenixStyle.h
detectors
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_TRD.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_TRD.C
1
#ifndef MACRO_G4TRD_C
2
#define MACRO_G4TRD_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
fun4all/Fun4AllServer.h
>
7
#include <
g4main/PHG4Reco.h
>
8
#include <
g4trackfastsim/PHG4TrackFastSim.h
>
9
#include <
g4trd/PHG4TRDSubsystem.h
>
10
11
R__LOAD_LIBRARY
(libg4trd.so)
12
R__LOAD_LIBRARY
(libg4detectors.so)
13
14
namespace Enable
15
{
16
bool
TRD
=
false
;
17
//bool TRD_ABSORBER = false;
18
bool
TRD_GAS
=
false
;
19
bool
TRD_OVERLAPCHECK
=
true
;
20
int
TRD_VERBOSITY
= 0;
21
}
// namespace Enable
22
23
namespace
TRD
24
{
25
double
R_max
= 180.;
26
double
R_min
= 15.;
27
double
z_mid
= 200. + 20;
28
double
half_length
= 6.5;
// Mother volume, radiator = 10 cm
29
double
z_min
=
z_mid
-
half_length
;
30
double
z_max
=
z_mid
+
half_length
+ 10.;
31
}
// namespace TRD
32
void
TRDInit
()
33
{
34
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
TRD::R_max
);
35
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
TRD::z_max
);
36
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
,
TRD::z_min
);
37
}
38
39
void
TRDSetup
(
PHG4Reco
* g4Reco)
40
{
41
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::TRD_VERBOSITY
);
42
Fun4AllServer
* se =
Fun4AllServer::instance
();
43
se->
Verbosity
(verbosity);
44
45
//bool AbsorberActive = Enable::ABSORBER || Enable::TRD_ABSORBER;
46
bool
GasActive =
Enable::ABSORBER
||
Enable::TRD_GAS
;
47
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::TRD_OVERLAPCHECK
;
48
PHG4TRDSubsystem
* trd_hcap =
new
PHG4TRDSubsystem
(
"TRD_hcap"
, 1);
49
50
trd_hcap->
set_double_param
(
"ThicknessZ"
, 2. *
TRD::half_length
);
51
trd_hcap->
set_double_param
(
"RIn"
,
TRD::R_min
);
52
trd_hcap->
set_double_param
(
"ROut"
,
TRD::R_max
);
53
trd_hcap->
set_double_param
(
"PosZ"
,
TRD::z_mid
);
54
trd_hcap->
set_double_param
(
"det_RIn"
,
TRD::R_min
);
55
trd_hcap->
set_double_param
(
"det_ROut"
,
TRD::R_max
);
56
trd_hcap->
SetActive
(1);
57
trd_hcap->
SuperDetector
(
"TRD"
);
58
//if(AbsorberActive)
59
if
(GasActive)
60
{
61
trd_hcap->
SetAbsorberActive
(1);
62
}
63
trd_hcap->
OverlapCheck
(OverlapCheck);
64
g4Reco->
registerSubsystem
(trd_hcap);
65
66
if
(verbosity > 0)
67
{
68
cout <<
" Min Z :"
69
<<
" "
<<
TRD::z_min
<<
" Max Z :"
<<
TRD::z_max
<< endl;
70
cout <<
"=======End setting parameters to geometry : ============"
<< endl;
71
}
72
if
(
TRACKING::FastKalmanFilter
)
73
{
74
TRACKING::FastKalmanFilter
->
add_zplane_state
(
"TRD"
, 284.);
75
TRACKING::ProjectionNames
.insert(
"TRD"
);
76
77
//Use hits from absorber (Active Gas volume)
78
TRACKING::FastKalmanFilter
->
add_phg4hits
(
string
(
"G4HIT_"
) +
string
(Form(
"ACTIVEGAS_TRD"
)),
// const std::string& phg4hitsNames,
79
PHG4TrackFastSim::Vertical_Plane
,
// const DETECTOR_TYPE phg4dettype,
80
1. / sqrt(12.),
// const float radres,
81
70
e
-4,
// const float phires,
82
100
e
-4,
// const float lonres,
83
1,
// const float eff,
84
0);
85
}
86
87
return
;
88
}
89
90
void
TRD_Reco
()
91
{
92
gSystem->Load(
"libfun4all.so"
);
93
gSystem->Load(
"libg4detectors.so"
);
94
95
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::TRD_VERBOSITY
);
96
Fun4AllServer
* se =
Fun4AllServer::instance
();
97
98
return
;
99
}
100
#endif
macros
blob
master
common
G4_TRD.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration