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_Mvtx_EIC.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_Mvtx_EIC.C
1
#ifndef MACRO_G4MVTXEIC_C
2
#define MACRO_G4MVTXEIC_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
g4mvtx/PHG4EICMvtxSubsystem.h
>
7
#include <
g4mvtx/PHG4MvtxDefs.h
>
8
9
#include <
g4main/PHG4Reco.h
>
10
11
#include <
fun4all/Fun4AllServer.h
>
12
13
#include <cmath>
14
#include <vector>
15
16
R__LOAD_LIBRARY
(libg4mvtx.so)
17
18
namespace Enable
19
{
20
bool
MVTX
=
false
;
21
bool
MVTX_OVERLAPCHECK
=
false
;
22
int
MVTX_VERBOSITY
= 0;
23
24
}
// namespace Enable
25
26
namespace
G4MVTX
27
{
28
int
n_maps_layer
= 3;
// must be 0-3, setting it to zero removes Mvtx completely, n < 3 gives the first n layers
29
vector<int>
N_staves
= {18, 24, 30};
30
vector<double>
nom_radius
= {36.4, 48.1, 59.8};
31
}
// namespace G4MVTX
32
33
void
MvtxInit
(
int
verbosity = 0)
34
{
35
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4MVTX::nom_radius
[
G4MVTX::n_maps_layer
- 1] / 10. + 0.7);
36
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
, 16.);
37
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -17.);
38
}
39
40
double
Mvtx
(
PHG4Reco
* g4Reco,
double
radius
,
41
const
int
absorberactive = 0)
42
{
43
bool
maps_overlapcheck =
Enable::OVERLAPCHECK
||
Enable::MVTX_OVERLAPCHECK
;
44
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::MVTX_VERBOSITY
);
45
46
// Update EIC MAPS layer structure based on inner two layers of U. Birmingham tracker
47
48
PHG4EICMvtxSubsystem
* mvtx =
new
PHG4EICMvtxSubsystem
(
"MVTX"
);
49
mvtx->
Verbosity
(verbosity);
50
51
// H?kan Wennl?f <hwennlof@kth.se> :
52
// Without time-stamping layer:
53
// Stave type Length Overlap Radius [mm] Tilt Radiation length Number of staves
54
// ALICE inner 270 mm 2 mm 36.4 12.0 deg 0.3 % X0 18
55
// ALICE inner 270 mm 2 mm 59.8 12.0 deg 0.3 % X0 30
56
// ALICE outer 840 mm 4 mm 133.8 6.0 deg 0.8 % X0 16
57
// ALICE outer 840 mm 4 mm 180 6.0 deg 0.8 % X0 21
58
59
// int N_staves[G4MVTX::n_maps_layer] = {18, 24, 30};
60
// double nom_radius[G4MVTX::n_maps_layer] = {36.4, 48.1, 59.8};
61
if
(
G4MVTX::N_staves
.size() <
G4MVTX::n_maps_layer
)
62
{
63
cout <<
"vector<int> N_staves too small: "
<<
G4MVTX::N_staves
.size()
64
<<
" needs to be at least of size "
<<
G4MVTX::n_maps_layer
<< endl;
65
gSystem->Exit(1);
66
}
67
if
(
G4MVTX::nom_radius
.size() <
G4MVTX::n_maps_layer
)
68
{
69
cout <<
"vector<double> nom_radius too small: "
<<
G4MVTX::nom_radius
.size()
70
<<
" needs to be at least of size "
<<
G4MVTX::n_maps_layer
<< endl;
71
gSystem->Exit(1);
72
}
73
for
(
int
ilyr = 0; ilyr <
G4MVTX::n_maps_layer
; ilyr++)
74
{
75
mvtx->
set_int_param
(ilyr,
"active"
, 1);
//non-automatic initialization in PHG4DetectorGroupSubsystem
76
mvtx->
set_int_param
(ilyr,
"layer"
, ilyr);
77
mvtx->
set_int_param
(ilyr,
"N_staves"
,
G4MVTX::N_staves
[ilyr]);
78
mvtx->
set_double_param
(ilyr,
"layer_nominal_radius"
,
G4MVTX::nom_radius
[ilyr]);
// mm
79
mvtx->
set_double_param
(ilyr,
"phitilt"
, 12.0 * 180. /
M_PI
+
M_PI
);
80
mvtx->
set_double_param
(ilyr,
"phi0"
, 0);
81
}
82
83
mvtx->
set_string_param
(
PHG4MvtxDefs::GLOBAL
,
"stave_geometry_file"
,
string
(getenv(
"CALIBRATIONROOT"
)) +
string
(
"/Tracking/geometry/mvtx_stave_v1.gdml"
));
84
mvtx->
SetActive
(1);
85
mvtx->
OverlapCheck
(maps_overlapcheck);
86
g4Reco->
registerSubsystem
(mvtx);
87
return
G4MVTX::nom_radius
[G4MVTX::n_maps_layer - 1] / 10.;
// return cm
88
}
89
#endif
macros
blob
master
common
G4_Mvtx_EIC.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration