File indexing completed on 2025-08-05 08:10:55
0001 void Fun4All_Ana(int nEvents = 1000,
0002 char *input_file = "/gpfs02/phenix/prod/sPHENIX/sunyrefnewinnerhcal/fieldmap/G4Hits_sPHENIX_mu-_eta0.30_40GeV.root",
0003
0004 const char *outFile = "outfile.root")
0005 {
0006 gSystem->Load("libfun4all");
0007 gSystem->Load("libphg4hit.so");
0008 gSystem->Load("libg4detectors.so");
0009 gSystem->Load("libg4picoDst.so");
0010 gSystem->Load("libg4decayer.so");
0011 gSystem->Load("libg4eval.so");
0012 gSystem->Load("libg4hough.so");
0013 gSystem->Load("libPHAna.so");
0014
0015
0016
0017
0018
0019
0020 recoConsts *rc = recoConsts::instance();
0021
0022
0023
0024
0025
0026
0027 Fun4AllServer *se = Fun4AllServer::instance();
0028 se->Verbosity(0);
0029 recoConsts *rc = recoConsts::instance();
0030
0031 PHAna *ana = new PHAna();
0032
0033
0034
0035 ana->set_flag( PHAna::ALL, true);
0036 ana->set_filename( outFile );
0037 se->registerSubsystem( ana );
0038
0039
0040
0041
0042
0043
0044
0045 Fun4AllInputManager *hcal_dst = new Fun4AllDstInputManager( "HCAL", "DST", "TOP");
0046 se->registerInputManager( hcal_dst );
0047 se->fileopen( hcal_dst->Name(), input_file );
0048
0049
0050
0051 se->run(nEvents);
0052 se->End();
0053 delete se;
0054 }