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_HToF.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_HToF.C
1
#ifndef MACRO_G4HToF_C
2
#define MACRO_G4HToF_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
fun4all/Fun4AllServer.h
>
7
#include <
g4etof/PHG4ECAPToFSubsystem.h
>
8
9
#include <
g4main/PHG4Reco.h
>
10
#include <
g4trackfastsim/PHG4TrackFastSim.h
>
11
12
R__LOAD_LIBRARY
(libg4etof.so)
13
//R__LOAD_LIBRARY(libfun4all.so)
14
R__LOAD_LIBRARY
(libg4detectors.so)
15
16
namespace Enable
17
{
18
bool
HTOF
=
false
;
19
bool
HTOF_GAS
=
false
;
20
bool
HTOF_OVERLAPCHECK
=
true
;
21
int
HTOF_VERBOSITY
= 0;
22
}
// namespace Enable
23
24
namespace
HTOF
25
{
26
int
f_gas_lyr
= 6.;
// total number of layers
27
int
f_mrpc_lyr
= 7.;
//total number of layers
28
int
b_gas_lyr
= 6.;
// total number of layers
29
int
b_mrpc_lyr
= 7.;
//total number of layers
30
int
pcb_lyr
= 3.;
31
int
mylar_lyr
= 4.;
32
int
cu_lyr
= 4.;
33
int
carbon_lyr
= 4.;
34
int
honeycomb_lyr
= 2.;
35
double
z_start
= 287.;
//cm, starting point from left on +ve Z axis moving away from origin
36
double
R_in
= 15.0;
// cm
37
double
R_out
= 170.;
//cm
38
double
gas_gap
= 0.0220;
// 220 microns
39
double
mrpc_thick
= 0.04;
// 400 microns
40
double
pcb_thick
= 0.06;
// 600 microns
41
double
cu_thick
= 0.003;
// 30 microns, layer over pcb, (1 each on outer pcb and 2 on central pcb = 4)
42
double
carbon_thick
= 0.01;
// 100 microns , 2 layers
43
double
mylar_thick
= 0.04;
// 400 microns, 4 layers
44
double
honeycomb_thick
= 0.75;
// 7.5 mm, 2 honeycomb
45
46
double
tof_width
= (
f_gas_lyr
+
b_gas_lyr
) *
gas_gap
+ (
f_mrpc_lyr
+
b_mrpc_lyr
) *
mrpc_thick
+
carbon_lyr
*
carbon_thick
+
pcb_lyr
*
pcb_thick
+
cu_lyr
*
cu_thick
+
mylar_lyr
*
mylar_thick
+
honeycomb_lyr
*
honeycomb_thick
;
47
48
double
z_end
= (
z_start
+
tof_width
);
49
50
}
// namespace HTOF
51
52
void
HTOFInit
()
53
{
54
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
HTOF::R_out
);
55
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
HTOF::z_end
+ 5);
56
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
,
HTOF::z_start
- 5);
57
}
58
59
void
HTOFSetup
(
PHG4Reco
* g4Reco)
60
{
61
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::HTOF_VERBOSITY
);
62
bool
GasActive =
Enable::ABSORBER
||
Enable::HTOF_GAS
;
63
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::HTOF_OVERLAPCHECK
;
64
65
Fun4AllServer
* se =
Fun4AllServer::instance
();
66
se->
Verbosity
(verbosity);
67
68
PHG4ECAPToFSubsystem
* hTOF =
new
PHG4ECAPToFSubsystem
(
"hTOF"
, 1);
69
hTOF->
Verbosity
(verbosity);
70
hTOF->
set_int_param
(
"n_fgas_layer"
,
HTOF::f_gas_lyr
);
71
hTOF->
set_int_param
(
"n_bgas_layer"
,
HTOF::b_gas_lyr
);
72
hTOF->
set_double_param
(
"gas_gap"
,
HTOF::gas_gap
);
73
hTOF->
set_double_param
(
"glass_thick"
,
HTOF::mrpc_thick
);
74
hTOF->
set_double_param
(
"Carbon_thick"
,
HTOF::carbon_thick
);
75
hTOF->
set_double_param
(
"pcb_thick"
,
HTOF::pcb_thick
);
76
hTOF->
set_double_param
(
"cu_thick"
,
HTOF::cu_thick
);
77
hTOF->
set_double_param
(
"honeycomb_thick"
,
HTOF::honeycomb_thick
);
78
hTOF->
set_double_param
(
"mylar_thick"
,
HTOF::mylar_thick
);
79
hTOF->
set_double_param
(
"Rin"
,
HTOF::R_in
);
80
hTOF->
set_double_param
(
"Rout"
,
HTOF::R_out
);
81
hTOF->
set_double_param
(
"z_begin"
,
HTOF::z_start
);
82
hTOF->
set_int_param
(
"use_g4steps"
, 1);
83
hTOF->
SetActive
(1);
84
hTOF->
SuperDetector
(
"HTOF"
);
85
if
(GasActive)
86
{
87
hTOF->
SetAbsorberActive
(1);
88
}
89
hTOF->
OverlapCheck
(OverlapCheck);
90
91
g4Reco->
registerSubsystem
(hTOF);
92
93
//trd_hcap->OverlapCheck(1);
94
95
if
(verbosity > 1) cout <<
" HTOF gas layer :"
<<
HTOF::f_gas_lyr
<< endl;
96
97
if
(
TRACKING::FastKalmanFilter
)
98
{
99
/*
100
TRACKING::FastKalmanFilter->add_phg4hits(string("G4HIT_") + string(Form("ACTIVEGAS_HTOF")), // const std::string& phg4hitsNames,
101
PHG4TrackFastSim::Vertical_Plane, // const DETECTOR_TYPE phg4dettype,
102
1, //1. / sqrt(12.), // const float radres,
103
5.0e-1,//55e-4, // const float phires,
104
5.0e-1,//55e-4, // const float lonres,
105
1, // const float eff,
106
0); // const float noise
107
108
*/
109
//Reference plane projection at initial R of ToF
110
TRACKING::FastKalmanFilter
->
add_zplane_state
(
string
(
"G4HIT_"
) +
string
(Form(
"ACTIVEGAS_HTOF"
)),
HTOF::z_end
);
111
TRACKING::ProjectionNames
.insert(
string
(
"G4HIT_"
) +
string
(Form(
"ACTIVEGAS_HTOF"
)));
112
}
113
return
;
114
}
115
116
void
HTOF_Reco
()
117
{
118
gSystem->Load(
"libfun4all.so"
);
119
gSystem->Load(
"libg4detectors.so"
);
120
121
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::HTOF_VERBOSITY
);
122
Fun4AllServer
* se =
Fun4AllServer::instance
();
123
//se->Verbosity(INT_MAX-10);
124
125
return
;
126
}
127
128
#endif
macros
blob
master
common
G4_HToF.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration