Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:41

0001 void Fun4All_HCALAnalysis(int nEvents = 0, char *input_file = "G4sPHENIXCells_LC.root", const char *outFile = "outfile_LC.root")
0002 {
0003   gSystem->Load("libfun4all");
0004   gSystem->Load("libphg4hit.so");
0005   gSystem->Load("libg4detectors.so");
0006   gSystem->Load("libg4picoDst.so");
0007   gSystem->Load("libg4decayer.so");
0008   gSystem->Load("libg4eval.so");   
0009   gSystem->Load("libg4hough.so"); 
0010   gSystem->Load("libHCALAnalysis.so");
0011  
0012   ///////////////////////////////////////////
0013   //
0014   //- recoConsts setup
0015   //
0016   ///////////////////////////////////////////
0017   recoConsts *rc = recoConsts::instance();
0018 
0019   ///////////////////////////////////////////
0020   //
0021   //- Make the Server
0022   //
0023   //////////////////////////////////////////
0024   Fun4AllServer *se = Fun4AllServer::instance();
0025   se->Verbosity(0);
0026   //PHMapManager::set_verbosity(MUTOO::SOME);
0027   
0028   recoConsts *rc = recoConsts::instance();
0029 
0030   HCALAnalysis *an = new HCALAnalysis(outFile);
0031   se->registerSubsystem( an );
0032 
0033   ///////////////////////////////////////////
0034   //
0035   //- Analyze the Data.
0036   //
0037   //////////////////////////////////////////
0038 
0039   Fun4AllInputManager *hcal_dst = new Fun4AllDstInputManager( "HCAL", "DST", "TOP");
0040   se->registerInputManager( hcal_dst );
0041   se->fileopen( hcal_dst->Name(), input_file );
0042   
0043   se->run(nEvents);
0044   se->End();
0045   delete se;
0046   cout << "Completed DST spin." << endl;
0047 
0048   //gROOT->ProcessLine(".! mv test_tree_out.root calib_test_tree.root");
0049 }