Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_ActsGeom.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_ActsGeom.C
1
#ifndef MACRO_G4ACTSGEOM_C
2
#define MACRO_G4ACTSGEOM_C
3
4
R__LOAD_LIBRARY(libg4eval.so)
5
R__LOAD_LIBRARY(libtrack_reco.so)
6
R__LOAD_LIBRARY(libtpccalib.so)
7
R__LOAD_LIBRARY(libqa_modules.so)
8
9
#include <GlobalVariables.C>
10
11
#include <
G4_Magnet.C
>
12
13
#pragma GCC diagnostic push
14
#pragma GCC diagnostic ignored "-Wundefined-internal"
15
#include <
trackreco/MakeActsGeometry.h
>
16
#pragma GCC diagnostic pop
17
18
#include <
fun4all/Fun4AllServer.h
>
19
20
21
namespace
ACTSGEOM
22
{
23
24
unsigned
int
mvtxMisalignment
= 1;
25
unsigned
int
inttMisalignment
= 1;
26
unsigned
int
tpcMisalignment
= 1;
27
unsigned
int
tpotMisalignment
= 1;
28
29
void
ActsGeomInit
()
30
{
31
static
bool
wasCalled =
false
;
32
if
(wasCalled)
33
{
34
return
;
35
}
36
wasCalled =
true
;
37
38
if
(!
Enable::MICROMEGAS
)
39
{
40
G4MICROMEGAS::n_micromegas_layer
= 0;
41
}
42
43
// Build the Acts geometry
44
auto
se =
Fun4AllServer::instance
();
45
int
verbosity
=
Enable::VERBOSITY
;
46
47
// Geometry must be built before any Acts modules
48
MakeActsGeometry
* geom =
new
MakeActsGeometry
();
49
geom->
set_drift_velocity
(
G4TPC::tpc_drift_velocity_reco
);
50
geom->
Verbosity
(verbosity);
51
for
(
int
i
= 0;
i
< 57;
i
++)
52
{
53
if
(
i
<3) {
54
geom->
misalignmentFactor
(
i
,
ACTSGEOM::mvtxMisalignment
);
55
}
else
if
(
i
< 7) {
56
geom->
misalignmentFactor
(
i
,
ACTSGEOM::inttMisalignment
);
57
}
else
if
(
i
< 55) {
58
geom->
misalignmentFactor
(
i
,
ACTSGEOM::tpcMisalignment
);
59
}
else
{
60
geom->
misalignmentFactor
(
i
,
ACTSGEOM::tpotMisalignment
);
61
}
62
}
63
64
geom->
loadMagField
(
G4TRACKING::init_acts_magfield
);
65
geom->
setMagField
(
G4MAGNET::magfield
);
66
geom->
setMagFieldRescale
(
G4MAGNET::magfield_rescale
);
67
se->registerSubsystem(geom);
68
}
69
}
// namespace ACTSGEOM
70
71
#endif
macros
blob
master
common
G4_ActsGeom.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration