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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_Bbc.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_Bbc.C
1
#ifndef MACRO_G4BBC_C
2
#define MACRO_G4BBC_C
3
4
#include <
g4detectors/PHG4BbcSubsystem.h
>
5
6
#include <
g4bbc/BbcVertexFastSimReco.h
>
7
#include <
g4main/PHG4Reco.h
>
8
9
#include <
fun4all/Fun4AllServer.h
>
10
11
12
R__LOAD_LIBRARY
(libg4bbc.so)
13
R__LOAD_LIBRARY
(libg4detectors.so)
14
15
namespace Enable
16
{
17
bool
BBC
=
false
;
18
bool
BBCFAKE
=
false
;
19
int
BBC_VERBOSITY
= 0;
20
}
// namespace Enable
21
22
namespace
G4BBC
23
{
24
double
z_smearing
= 0.;
// should be 6 mm, temporarily perfect for TPC initial vertexing
25
double
t_smearing
= 0.02;
// 20ps timing resolution
26
}
// namespace G4BBC
27
28
void
BbcInit
()
29
{
30
if
(
Enable::BBC
&&
Enable::BBCFAKE
)
31
{
32
cout <<
"Enable::BBC and Enable::BBCFAKE cannot be true at the same time"
<< endl;
33
gSystem->Exit(1);
34
}
35
// Set boundary of tracked particles to include BBC (values in cm)
36
if
(
Enable::BBC
)
37
{
38
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
, 300.);
39
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -300.);
40
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
, 15.0);
41
}
42
}
43
44
void
Bbc
(
PHG4Reco
* g4Reco)
45
{
46
if
(
Enable::BBC
)
47
{
48
PHG4BbcSubsystem
* bbc =
new
PHG4BbcSubsystem
(
"BBC"
);
49
bbc->
SuperDetector
(
"BBC"
);
50
g4Reco->
registerSubsystem
(bbc);
51
}
52
return
;
53
}
54
55
void
Bbc_Reco
()
56
{
57
int
verbosity =
std::max
(
Enable::VERBOSITY
,
Enable::BBC_VERBOSITY
);
58
59
//---------------
60
// Fun4All server
61
//---------------
62
63
Fun4AllServer
* se =
Fun4AllServer::instance
();
64
65
if
(
Enable::BBCFAKE
)
66
{
67
if
(verbosity > 0)
68
{
69
cout <<
"BBCFAKE: Using smeared vtx and t0 resolutions of "
70
<<
G4BBC::z_smearing
<<
" cm and "
<<
G4BBC::t_smearing
* 1000 <<
" ps"
<< endl;
71
}
72
BbcVertexFastSimReco
* bbcvertex =
new
BbcVertexFastSimReco
();
73
bbcvertex->
set_z_smearing
(
G4BBC::z_smearing
);
74
bbcvertex->
set_t_smearing
(
G4BBC::t_smearing
);
75
se->
registerSubsystem
(bbcvertex);
76
}
77
78
return
;
79
}
80
#endif
macros
blob
master
common
G4_Bbc.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration