forked from ECCE-EIC/macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
G4_Global.C
58 lines (44 loc) · 1.21 KB
/
G4_Global.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef MACRO_G4GLOBAL_C
#define MACRO_G4GLOBAL_C
#include <g4vertex/GlobalVertexFastSimReco.h>
#include <g4vertex/GlobalVertexReco.h>
#include <fun4all/Fun4AllServer.h>
R__LOAD_LIBRARY(libg4vertex.so)
namespace Enable
{
bool GLOBAL_RECO = false;
bool GLOBAL_FASTSIM = false;
} // namespace Enable
namespace G4GLOBAL
{
double x_smearing = 0.01; // 100 um
double y_smearing = 0.01; // 100 um
double z_smearing = 0.015; // 150um
double t_smearing = 0.002; // 20ps
} // namespace G4GLOBAL
void GlobalInit() {}
void Global_Reco()
{
//---------------
// Fun4All server
//---------------
Fun4AllServer* se = Fun4AllServer::instance();
GlobalVertexReco* gblvertex = new GlobalVertexReco();
se->registerSubsystem(gblvertex);
return;
}
void Global_FastSim()
{
//---------------
// Fun4All server
//---------------
Fun4AllServer* se = Fun4AllServer::instance();
GlobalVertexFastSimReco* gblvertex = new GlobalVertexFastSimReco();
gblvertex->set_x_smearing(G4GLOBAL::x_smearing);
gblvertex->set_y_smearing(G4GLOBAL::y_smearing);
gblvertex->set_z_smearing(G4GLOBAL::z_smearing);
gblvertex->set_t_smearing(G4GLOBAL::t_smearing);
se->registerSubsystem(gblvertex);
return;
}
#endif