File indexing completed on 2025-08-03 08:20:24
0001 #ifndef MACRO_G4GLOBAL_C
0002 #define MACRO_G4GLOBAL_C
0003
0004 #include <GlobalVariables.C>
0005
0006 #include <g4vertex/GlobalVertexFastSimReco.h>
0007 #include <globalvertex/GlobalVertexReco.h>
0008
0009 #include <fun4all/Fun4AllServer.h>
0010
0011 #include <TROOT.h> // for R__LOAD_LIBRARY
0012
0013 R__LOAD_LIBRARY(libg4vertex.so)
0014 R__LOAD_LIBRARY(libglobalvertex.so)
0015 namespace Enable
0016 {
0017 bool GLOBAL_RECO = false;
0018 bool GLOBAL_FASTSIM = false;
0019 int GLOBAL_VERBOSITY = 0;
0020 }
0021
0022 namespace G4GLOBAL
0023 {
0024 double x_smearing = 0.01;
0025 double y_smearing = 0.01;
0026 double z_smearing = 0.015;
0027 double t_smearing = 0.002;
0028 }
0029
0030 void GlobalInit() {}
0031
0032 void Global_Reco()
0033 {
0034 int verbosity = std::max(Enable::VERBOSITY, Enable::GLOBAL_VERBOSITY);
0035
0036 Fun4AllServer* se = Fun4AllServer::instance();
0037
0038 GlobalVertexReco* gblvertex = new GlobalVertexReco();
0039 gblvertex->Verbosity(verbosity);
0040 se->registerSubsystem(gblvertex);
0041
0042 return;
0043 }
0044
0045 void Global_FastSim()
0046 {
0047 int verbosity = std::max(Enable::VERBOSITY, Enable::GLOBAL_VERBOSITY);
0048
0049 Fun4AllServer* se = Fun4AllServer::instance();
0050
0051 GlobalVertexFastSimReco* gblvertex = new GlobalVertexFastSimReco();
0052 gblvertex->set_x_smearing(G4GLOBAL::x_smearing);
0053 gblvertex->set_y_smearing(G4GLOBAL::y_smearing);
0054 gblvertex->set_z_smearing(G4GLOBAL::z_smearing);
0055 gblvertex->set_t_smearing(G4GLOBAL::t_smearing);
0056 gblvertex->Verbosity(verbosity);
0057
0058 se->registerSubsystem(gblvertex);
0059
0060 return;
0061 }
0062 #endif