Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:26

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