Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:19

0001 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
0002 
0003 #include <GlobalVariables.C>
0004 
0005 #include <fun4all/SubsysReco.h>
0006 #include <fun4all/Fun4AllServer.h>
0007 #include <fun4all/Fun4AllInputManager.h>
0008 #include <fun4all/Fun4AllDstInputManager.h>
0009 #include <fun4all/Fun4AllDstOutputManager.h>
0010 
0011 #include </sphenix/u/weihuma/install/include/trackpidassoc/ElectronPid.h>
0012 #include </sphenix/u/weihuma/install/include/trackpidassoc/TrackPidAssoc.h>
0013 
0014 
0015 R__LOAD_LIBRARY(libfun4all.so)
0016 R__LOAD_LIBRARY(libtrackpid.so)
0017 
0018 #endif
0019 
0020 void run(
0021   const char *inputFile = "/sphenix/sim/sim01/sphnxpro/MDC1/embed/embedDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-04594.root",
0022   const string &outputroot = "/sphenix/u/weihuma/RunOutput/embedDST_sHijing_upsilon_0_20fm",
0023   bool output_ntuple = true
0024 )
0025 {
0026   gSystem->Load("libg4dst");
0027   gSystem->Load("libtrackpid");
0028 
0029   Fun4AllServer *se = Fun4AllServer::instance();
0030   se->Verbosity(1);
0031 
0032   ElectronPid *ePid = new ElectronPid("ElectronPid",outputroot+"_ElectronPid.root");
0033   ePid->set_output_ntuple(output_ntuple);
0034   ePid->Verbosity(0);
0035   ePid->setTrackcutlimits(1,1,20,10);//nmvtx, nintt, ntpc, quality
0036   ePid->setEMOPcutlimits(0.7,1.5);
0037   ePid->setHinOEMcutlimit(0.2);
0038   ePid->setPtcutlimit(2.0,30.0);
0039   ePid->setHOPcutlimit(0.3);
0040   se->registerSubsystem(ePid);
0041 
0042   Fun4AllInputManager *in = new Fun4AllDstInputManager("DST_TRACKS");
0043   in->Verbosity(1);
0044   //in->fileopen(inputFile);
0045  //in->AddListFile("filelist_0_4d88fm.txt"); //sHijing with Upsilon embeded;
0046  // in->AddListFile("filelist_0_12fm.txt"); //sHijing with Upsilon embeded;
0047   in->AddListFile("filelist_0_20fm.txt"); //sHijing with Upsilon embeded;
0048   
0049   se->registerInputManager(in);
0050 
0051   if(output_ntuple) {
0052     Fun4AllOutputManager *outePid = new Fun4AllDstOutputManager("outePid",outputroot+"_ElectronPid_DST.root");
0053     outePid->AddNode("TrackPidAssoc");
0054     se->registerOutputManager(outePid);
0055     outePid->Verbosity(1);
0056     outePid->Print();
0057   }
0058 
0059   se->run();
0060   se->End();
0061 
0062 }