Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-08-31 08:16:59

0001 #ifndef MACRO_FUN4ALLG4SPHENIX_C
0002 #define MACRO_FUN4ALLG4SPHENIX_C
0003 
0004 #include "G4_Input.C"
0005 #include <G4_Global.C>
0006 #include <G4Setup_sPHENIX.C>
0007 
0008 #include <Trkr_RecoInit.C>
0009 #include <Trkr_Clustering.C>
0010 #include <Trkr_TruthTables.C>
0011 #include <Trkr_Reco.C>
0012 #include <Trkr_Eval.C>
0013 
0014 #include <phpythia8/PHPy8ParticleTrigger.h>
0015 
0016 #include <decayfinder/DecayFinder.h>
0017 #include <hftrackefficiency/HFTrackEfficiency.h>
0018 #include <kfparticle_sphenix/KFParticle_sPHENIX.h>
0019 
0020 #include <ffamodules/FlagHandler.h>
0021 #include <ffamodules/HeadReco.h>
0022 #include <ffamodules/SyncReco.h>
0023 #include <ffamodules/CDBInterface.h>
0024 #include <phool/PHRandomSeed.h>
0025 #include <phool/recoConsts.h>
0026 
0027 #include <fun4all/Fun4AllRunNodeInputManager.h>
0028 #include <fun4all/Fun4AllDstOutputManager.h>
0029 #include <fun4all/Fun4AllOutputManager.h>
0030 #include <fun4all/Fun4AllServer.h>
0031 
0032 #include <simqa_modules/QAG4SimulationTracking.h>
0033 #include <qautils/QAHistManagerDef.h>
0034 
0035 #include <nodedump/Dumper.h>
0036 
0037 #include "HF_selections.C"
0038 
0039 #include <geoacceptancenog4/GeoAcceptanceNoG4.h>
0040 
0041 R__LOAD_LIBRARY(libfun4all.so)
0042 R__LOAD_LIBRARY(libffamodules.so)
0043 R__LOAD_LIBRARY(libphnodedump.so)
0044 R__LOAD_LIBRARY(libGeoAcceptanceNoG4.so)
0045 //R__LOAD_LIBRARY(libdecayfinder.so)
0046 //R__LOAD_LIBRARY(libhftrackefficiency.so)
0047 //R__LOAD_LIBRARY(libsimqa_modules.so)
0048 
0049 int Fun4All_HFG_HepMC(std::string processID = "000000")
0050 {
0051   int nEvents = -1;
0052 
0053   std::string infile = "/phenix/u/pinkenbu/DST_TRUTH_G4HIT_pythia8_NONE-0000000029-000000.root";
0054 
0055   //F4A setup
0056   Fun4AllServer *se = Fun4AllServer::instance();
0057   se->Verbosity(1);
0058 
0059   PHRandomSeed::Verbosity(1);
0060   recoConsts *rc = recoConsts::instance();
0061 
0062   Input::READHITS = true;
0063   INPUTREADHITS::filename[0] = infile;
0064 
0065   //InputInit(); //does nothing in this case
0066 
0067   InputManagers();
0068 
0069   // copy HepMC records into G4
0070   HepMCNodeReader *hr = new HepMCNodeReader();
0071   hr->Verbosity(5);
0072   //se->registerSubsystem(hr);
0073 
0074   Enable::CDB = true;
0075   //rc->set_StringFlag("CDB_GLOBALTAG","MDC2");
0076   rc->set_StringFlag("CDB_GLOBALTAG",CDB::global_tag);
0077   //rc->set_StringFlag("CDB_GLOBALTAG","ProdA_2024");
0078   rc->set_uint64Flag("TIMESTAMP",CDB::timestamp);
0079   rc->set_IntFlag("RUNNUMBER",29);
0080 
0081   FlagHandler *flag = new FlagHandler();
0082   se->registerSubsystem(flag);
0083 
0084   GeoAcceptanceNoG4* geoacc = new GeoAcceptanceNoG4();
0085   //se->registerSubsystem(geoacc);
0086 
0087   Dumper* truth_dump = new Dumper("truth_dump");
0088   truth_dump->SetOutDir(".");
0089   se->registerSubsystem(truth_dump);
0090 
0091   se->run(nEvents);
0092 
0093   se->End();
0094 
0095   gSystem->Exit(0);
0096 }
0097 
0098 #endif