Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:13:39

0001 
0002 void RunBDiJetModule(
0003     const int nEvents = 0,
0004     // const char* input = "/phenix/plhf/dcm07e/sPHENIX/bjetsims/dst/pythia8_bjets_10_0.root",
0005     // const char* input = "/gpfs/mnt/gpfs04/sphenix/user/shlim/01.Tracking/jobdir_SVReco_all_6th_ana45/DST_PYTHIA_run001874.root",
0006     const char* input = "/gpfs/mnt/gpfs02/phenix/hhj/hhj3/dcm07e/sPHENIX/macros/macros/g4simulations/G4sPHENIX.root",
0007     const char* output = "test/test.root"
0008         ) 
0009 {
0010 
0011   //---------------
0012   // Load libraries
0013   //---------------
0014 
0015   gSystem->Load("libfun4all.so");
0016   gSystem->Load("libg4detectors.so");
0017   gSystem->Load("libphhepmc.so");
0018   gSystem->Load("libg4testbench.so");
0019   gSystem->Load("libg4hough.so");
0020   gSystem->Load("libg4calo.so");
0021   gSystem->Load("libg4eval.so");
0022 
0023   gSystem->Load("libBDiJetModule.so");
0024 
0025   //---------------
0026   // Fun4All server
0027   //---------------
0028 
0029   Fun4AllServer *se = Fun4AllServer::instance();
0030   se->Verbosity(0); 
0031 
0032   //--------
0033   // Modules
0034   //--------
0035 
0036   BDiJetModule *tm = new BDiJetModule( "BDiJetModule", output );
0037   se->registerSubsystem( tm );
0038 
0039   //------
0040   // Input
0041   //------
0042 
0043   Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0044 
0045     TString tstr_input(input);
0046     if (tstr_input.EndsWith(".root"))
0047         in->AddFile( input );
0048     else 
0049         in->AddListFile( input );
0050 
0051     se->registerInputManager(in);
0052 
0053   //----
0054   // Run
0055   //----
0056 
0057     se->run( nEvents );
0058 
0059   //-----
0060   // Exit
0061   //-----
0062 
0063     se->End();
0064   std::cout << "All done" << std::endl;
0065   delete se;
0066   gSystem->Exit(0);
0067 
0068 }