ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_CaloAna.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_CaloAna.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
7 
8 #include <caloana/CaloAna.h>
9 
10 R__LOAD_LIBRARY(libfun4all.so)
11 R__LOAD_LIBRARY(libcaloana.so)
12 #endif
13 
14 void Fun4All_CaloAna(const char *fname = "/sphenix/sim/sim01/tutorials/CaloAna/G4sPHENIX_Pythia8.root")
15 {
16  gSystem->Load("libg4dst");
17  gSystem->Load("libcaloana");
19  CaloAna *ca = new CaloAna("CALOANA","out.root");
20  // choose CEMC, HCALIN or HCALOUT or whatever you named your
21  // calorimeter
22  ca->Detector("CEMC");
23  se->registerSubsystem(ca);
25  in->fileopen(fname);
26  se->registerInputManager(in);
27  se->run();
28  se->End();
29 }