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_BMMG.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_BMMG.C
1
#ifndef MACRO_G4BMMG_C
2
#define MACRO_G4BMMG_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
fun4all/Fun4AllServer.h
>
7
#include <
g4barrelmmg/CreateCZHitContainer.h
>
8
#include <
g4barrelmmg/PHG4CylinderStripSubsystem.h
>
9
#include <
g4main/PHG4Reco.h
>
10
#include <
g4trackfastsim/PHG4TrackFastSim.h
>
11
12
R__LOAD_LIBRARY
(libg4barrelmmg.so)
13
R__LOAD_LIBRARY
(libfun4all.so)
14
R__LOAD_LIBRARY
(libg4testbench.so)
15
R__LOAD_LIBRARY
(libg4detectors.so)
16
17
namespace Enable
18
{
19
bool
BMMG
=
false
;
20
bool
use_2Dreadout
=
true
;
21
bool
BMMG_OVERLAPCHECK
=
true
;
22
int
BMMG_VERBOSITY
= 0;
23
}
// namespace Enable
24
25
namespace
BMMG
26
{
27
const
int
n_layer
= 3;
28
29
const
double
rad
[
BMMG::n_layer
] = {45., 47.4, 67.4};
// approximate radial location
30
const
double
len
[
BMMG::n_layer
] = {140, 150, 280.0};
31
}
// namespace BMMG
32
33
void
BMMGInit
(
int
verbosity = 1)
34
{
35
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
BMMG::rad
[
BMMG::n_layer
- 1] / 10. + 0.7);
36
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
BMMG::len
[
BMMG::n_layer
- 1] / 2.0 + 1.0);
37
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -
BMMG::len
[
BMMG::n_layer
- 1] / 2.0 - 10.);
38
}
39
40
void
BMMGSetup
(
PHG4Reco
* g4Reco)
41
{
42
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::BMMG_VERBOSITY
);
43
Fun4AllServer
* se =
Fun4AllServer::instance
();
44
se->
Verbosity
(verbosity);
45
46
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::BMMG_OVERLAPCHECK
;
47
48
gSystem->Load(
"libfun4all"
);
49
gSystem->Load(
"libg4detectors.so"
);
50
gSystem->Load(
"libg4testbench.so"
);
51
gSystem->Load(
"libg4trackfastsim.so"
);
52
53
PHG4CylinderStripSubsystem
* barrel_mmg;
54
double
gap_betweenCZ = 1.5;
55
double
Gap_betweenlayer = 1.5;
56
double
thickness
= 0.36499;
57
int
nCZlayer = 2;
58
if
(
Enable::use_2Dreadout
)
59
{
60
gap_betweenCZ = 0;
61
nCZlayer = 1;
62
}
63
64
const
double
prapidity = 1;
65
66
for
(
int
ilayer = 0; ilayer <
BMMG::n_layer
; ilayer++)
67
{
68
barrel_mmg =
new
PHG4CylinderStripSubsystem
(Form(
"BMT_%d"
, ilayer), ilayer);
69
barrel_mmg->
set_double_param
(
"radius"
,
BMMG::rad
[ilayer]);
70
barrel_mmg->
set_string_param
(
"gas"
,
"myMMGas"
);
71
//barrel_mmg->set_double_param("steplimits", 300e-4);
72
barrel_mmg->
set_double_param
(
"phi0"
, 15 * ilayer);
73
barrel_mmg->
set_double_param
(
"gap"
, gap_betweenCZ);
74
barrel_mmg->
SetActive
();
75
barrel_mmg->
SuperDetector
(
"BMT"
);
76
barrel_mmg->
set_int_param
(
"lengthviarapidity"
, 0);
77
barrel_mmg->
set_double_param
(
"gas1thickness"
, 0.15);
78
barrel_mmg->
set_double_param
(
"length"
,
BMMG::len
[ilayer]);
79
barrel_mmg->
set_double_param
(
"deadzone"
, 0.2);
80
barrel_mmg->
set_int_param
(
"nhit"
, 1);
81
barrel_mmg->
OverlapCheck
(
true
);
82
barrel_mmg->
set_int_param
(
"use_2Dreadout"
,
Enable::use_2Dreadout
);
83
g4Reco->
registerSubsystem
(barrel_mmg);
84
}
// ilayer loop
85
86
if
(
TRACKING::FastKalmanFilter
)
87
{
88
if
(
Enable::use_2Dreadout
)
89
{
90
TRACKING::FastKalmanFilter
->
add_phg4hits
(
91
"G4HIT_BMT"
,
// const std::string& phg4hitsNames,
92
PHG4TrackFastSim::Cylinder
,
// const DETECTOR_TYPE phg4dettype,
93
2.5 / 2 / sqrt(12),
//1./sqrt(12), // radial-resolution , only used for Vertical Plane Detector Type
94
75
e
-4,
//150e-4, // azimuthal-resolution [cm]
95
75
e
-4,
//150e-4, // z-resolution [cm]
96
1,
// efficiency,
97
0);
// noise hits
98
}
99
else
100
{
101
TRACKING::FastKalmanFilter
->
add_phg4hits
(
102
"G4HIT_CZBMT"
,
// const std::string& phg4hitsNames,
103
PHG4TrackFastSim::Cylinder
,
// const DETECTOR_TYPE phg4dettype,
104
2.5 / 2 / sqrt(12),
//1/sqrt(12), // radial-resolution [cm], only used for Vertical Plane Detector Type
105
75
e
-4,
//150e-4, // azimuthal-resolution [cm]
106
75
e
-4,
//150e-4, // z-resolution [cm]
107
1,
// efficiency,
108
0);
// noise hits
109
}
110
}
111
112
return
;
113
}
114
115
void
BMMGT_Reco
()
116
{
117
gSystem->Load(
"libfun4all.so"
);
118
gSystem->Load(
"libg4detectors.so"
);
119
120
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::BMMG_VERBOSITY
);
121
Fun4AllServer
* se =
Fun4AllServer::instance
();
122
123
return
;
124
}
125
#endif
macros
blob
master
common
G4_BMMG.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration