Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:36

0001 #ifndef MACRO_FUN4ALL_CALOANA_C
0002 #define MACRO_FUN4ALL_CALOANA_C
0003 
0004 #include <fun4all/SubsysReco.h>
0005 #include <fun4all/Fun4AllServer.h>
0006 #include <fun4all/Fun4AllInputManager.h>
0007 #include <fun4all/Fun4AllDstInputManager.h>
0008 
0009 #include <caloana/CaloAna.h>
0010 
0011 R__LOAD_LIBRARY(libfun4all.so)
0012 R__LOAD_LIBRARY(libcaloana.so)
0013 
0014 void Fun4All_CaloAna(const char *fname = "/sphenix/sim/sim01/tutorials/CaloAna/G4sPHENIX_Pythia8.root")
0015 {
0016   gSystem->Load("libg4dst");
0017   Fun4AllServer *se = Fun4AllServer::instance();
0018   CaloAna *ca = new CaloAna("CALOANA","out.root");
0019   // choose CEMC, HCALIN or HCALOUT or whatever you named your
0020   // calorimeter
0021   ca->Detector("CEMC");
0022   se->registerSubsystem(ca);
0023   Fun4AllInputManager *in = new Fun4AllDstInputManager("in");
0024   in->fileopen(fname);
0025   se->registerInputManager(in);
0026   se->run();
0027   se->End();
0028 }
0029 
0030 #endif