Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_Pi0MassAnalysis.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_Pi0MassAnalysis.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_FUN4ALLPI0MASSANALYSIS_C
4 #define MACRO_FUN4ALLPI0MASSANALYSIS_C
5 
6 
10 
11 #include <pi0massanalysis/Pi0MassAnalysis.h>
12 
13 R__LOAD_LIBRARY(libfun4all.so)
14 R__LOAD_LIBRARY(libPi0MassAnalysis.so)
15 
17  const int nEvents = 1000,
18  const string &clusterFile = "dst_calo_cluster.list",
19  const string &truthFile = "dst_truth.list",
20  const string &outputFile = "AuAu_minbias_output.root"
21  )
22 {
23  // this convenience library knows all our i/o objects so you don't
24  // have to figure out what is in each dst type
25  gSystem->Load("libg4dst.so");
26 
28  se->Verbosity(0); // set it to 1 if you want event printouts
29 
30  Fun4AllInputManager *inCluster = new Fun4AllDstInputManager("DSTClusters");
31  std::cout << "Adding file list " << clusterFile << std::endl;
32  inCluster->AddListFile(clusterFile,1);
33  se->registerInputManager(inCluster);
34 
35  //Fun4AllInputManager *truthTracks = new Fun4AllDstInputManager("DSTTruth");
36  //std::cout << "Adding file list " << truthFile << std::endl;
37  //truthTracks->AddListFile(truthFile,1);
38  //se->registerInputManager(truthTracks);
39 
40  Pi0MassAnalysis *analysisModule = new Pi0MassAnalysis(outputFile);
41  analysisModule->SetMinClusterEnergy(1.0);
42  se->registerSubsystem(analysisModule);
43 
44  se->run(nEvents);
45  se->End();
46 
47  delete se;
48  cout << "Analysis Completed" << endl;
49 
50  gSystem->Exit(0);
51 }
52 
53 #endif