Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_RunPi0Efficiency.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_RunPi0Efficiency.C
1 // these include guards are not really needed, but if we ever include this
2 // file somewhere they would be missed and we will have to refurbish all macros
3 #ifndef MACRO_FUN4ALLRUNPI0EFFICIENCY_C
4 #define MACRO_FUN4ALLRUNPI0EFFICIENCY_C
5 
9 
10 #include <../src/pi0Efficiency.h>
11 
12 R__LOAD_LIBRARY(libfun4all.so)
13 R__LOAD_LIBRARY(libpi0Efficiency.so)
14 
16  const int nEvents = 1,
17  const string &clusterFile = "dst_calo_cluster.list",
18  const string &truthFile = "dst_truth.list",
19  const string &outputFile = "cemcPi0Efficiency_Out.root"
20  )
21 {
22  // this convenience library knows all our i/o objects so you don't
23  // have to figure out what is in each dst type
24  gSystem->Load("libg4dst.so");
25 
27  se->Verbosity(0); // set it to 1 if you want event printouts
28 
29  Fun4AllInputManager *inCluster = new Fun4AllDstInputManager("DSTClusters");
30  std::cout << "Adding file list " << clusterFile << std::endl;
31  inCluster -> AddListFile(clusterFile,1);
32  se->registerInputManager(inCluster);
33 
34  Fun4AllInputManager *truthCalo = new Fun4AllDstInputManager("DSTCaloTruth");
35  std::cout << "Adding file list " << truthFile << std::endl;
36  truthCalo -> AddListFile(truthFile,1);
37  se -> registerInputManager(truthCalo);
38 
39  pi0Efficiency *eval = new pi0Efficiency("dummy", outputFile);
40  se->registerSubsystem(eval);
41 
42  se->run(nEvents);
43  se->End();
44 
45  delete se;
46  cout << "Analysis Completed" << endl;
47 
48  gSystem->Exit(0);
49 }
50 
51 #endif //MACRO_FUN4ALLG4SLOPECAL_C