Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:24:02

0001 #ifndef MACRO_G4USER_C
0002 #define MACRO_G4USER_C
0003 
0004 #include <fun4all/Fun4AllServer.h>
0005 
0006 #include <Rtypes.h> // for R__LOAD_LIBRARY
0007 
0008 R__LOAD_LIBRARY(libfun4all.so)
0009 
0010 class PHG4Reco;
0011 
0012 namespace Enable
0013 {
0014   // if you want this to run by default, initialize this to true
0015   // Otherwise you have to use Enable::USER = true; in your macro
0016   bool USER = false;
0017   int USER_VERBOSITY = 0;
0018 }  // namespace Enable
0019 
0020 namespace G4USER
0021 {
0022   // here you can set parameters in your macro via
0023   // G4USER::myparam = 1;
0024   // add as many as you need
0025   int myparam = 0;
0026 }  // namespace G4USER
0027 
0028 // This initializes the G4 part if you have a detector implemented
0029 // You need to tell its dimensions to the surrounding black hole
0030 void UserInit()
0031 {
0032   // set the black hole dimensions surrounding the detector
0033   // XXX: maximum radius of your detector
0034   // YYY: maximum extension in z
0035   // ZZZ: maximum extension in -z (use -ZZZ)
0036   // BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, XXX);
0037   // BlackHoleGeometry::max_z = std::max(BlackHoleGeometry::max_z, YYY);
0038   // BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, ZZZ);
0039 }
0040 
0041 // If you have a detector - here goes the setup
0042 void UserDetector(PHG4Reco * /*g4Reco*/)
0043 {
0044   return;
0045 }
0046 
0047 // Any analysis goes here (registering your module with Fun4All)
0048 void UserAnalysisInit()
0049 {
0050   //  Fun4AllServer* se = Fun4AllServer::instance();
0051 
0052   return;
0053 }
0054 
0055 #endif