Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:14:59

0001 #include <fun4all/SubsysReco.h>
0002 #include <fun4all/Fun4AllServer.h>
0003 #include <fun4all/Fun4AllInputManager.h>
0004 #include <fun4all/Fun4AllDstInputManager.h>
0005 #include <fun4all/Fun4AllRunNodeInputManager.h>
0006 
0007 #include <fun4all/Fun4AllDstOutputManager.h>
0008 #include <fun4all/Fun4AllOutputManager.h>
0009 #include <fun4all/Fun4AllServer.h>
0010 #include <fun4all/Fun4AllNoSyncDstInputManager.h>
0011 #include <phool/PHRandomSeed.h>
0012 #include <phool/recoConsts.h>
0013 
0014 
0015 
0016 //#include <g4hitshift/g4hitshift.h>
0017 
0018 R__LOAD_LIBRARY(libfun4all.so)
0019 //R__LOAD_LIBRARY(libg4hitshift.so)
0020 
0021 
0022 void Fun4All_RTrack(const char *g4hitfile = "G4Hits_pythia8_pp_mb-0000000006-00000.root",
0023 const char *filefixedgeo = "updated_geo.root",
0024             const char * oufilename = "tree_test.root"
0025             )
0026 {
0027 
0028   gSystem->Load("libg4dst.so");
0029   Fun4AllServer *se = Fun4AllServer::instance();
0030   int verbosity = 0;
0031 
0032   se->Verbosity(verbosity);
0033   recoConsts *rc = recoConsts::instance();
0034 
0035  //===============
0036   // conditions DB flags
0037   //===============
0038   rc->set_StringFlag("CDB_GLOBALTAG","MDC2");
0039   rc->set_uint64Flag("TIMESTAMP",6);
0040 
0041  
0042 
0043 //  g4hitshift *myJetVal = new g4hitshift();
0044 //  se->registerSubsystem(myJetVal);
0045   
0046   
0047 
0048 
0049 
0050 
0051   Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTcalocluster");
0052   intrue->Verbosity(2);
0053   intrue->AddFile(g4hitfile);
0054   se->registerInputManager(intrue);
0055 
0056   Fun4AllInputManager *intrue2 = new Fun4AllRunNodeInputManager("DSTtruth");
0057   intrue2->Verbosity(2);
0058   intrue2->AddFile(filefixedgeo);
0059   se->registerInputManager(intrue2);
0060 
0061 
0062 
0063   Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", "crash.root");
0064   se->registerOutputManager(out);
0065 
0066   se->run(1);
0067   se->End();
0068 
0069   gSystem->Exit(0);
0070   return 0;
0071 
0072 }