Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:08

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/electronid/ElectronID.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 R__LOAD_LIBRARY(libelectronid.so)
0018 
0019 #endif
0020 
0021 void run(
0022   const char *inputFile = "/sphenix/sim/sim01/sphnxpro/MDC1/embed/embedDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-04594.root",
0023   const string &outputroot = "/sphenix/user/weihuma/RunOutput/embedDST_sHijing_upsilon_0_20fm",
0024   bool output_ntuple = true
0025 )
0026 {
0027   gSystem->Load("libg4dst");
0028   gSystem->Load("libtrackpid");
0029   gSystem->Load("libelectronid");
0030 
0031   Fun4AllServer *se = Fun4AllServer::instance();
0032   se->Verbosity(1);
0033 
0034   ElectronID *eid = new ElectronID("Electronid",outputroot+"_ElectronID.root");
0035   eid->set_output_ntuple(output_ntuple);
0036   eid->Verbosity(0);
0037   eid->setTrackcutlimits(1,1,20,10);//nmvtx, nintt, ntpc, quality
0038   eid->setEMOPcutlimits(0.7,1.5);
0039   eid->setHinOEMcutlimit(0.2);
0040   eid->setPtcutlimit(2.0,30.0);
0041   eid->setHOPcutlimit(0.3);
0042   eid->setBDTcut(1,1,0.18,0.24);// (ISUSEBDT_p, ISUSEBDT_n, BDT_cut_p, BDT_cut_n)
0043   se->registerSubsystem(eid);
0044 
0045   Fun4AllInputManager *in = new Fun4AllDstInputManager("DST_TRACKS");
0046   in->Verbosity(1);
0047   //in->fileopen(inputFile);
0048  //in->AddListFile("filelist_0_4d88fm.txt"); //sHijing with Upsilon embeded;
0049  // in->AddListFile("filelist_0_12fm.txt"); //sHijing with Upsilon embeded;
0050   in->AddListFile("filelist_0_20fm.txt"); //sHijing with Upsilon embeded;
0051   
0052   se->registerInputManager(in);
0053 
0054   if(output_ntuple) {
0055     Fun4AllOutputManager *outePid = new Fun4AllDstOutputManager("outePid",outputroot+"_ElectronPid_DST.root");
0056     outePid->AddNode("TrackPidAssoc");
0057     se->registerOutputManager(outePid);
0058     outePid->Verbosity(1);
0059     outePid->Print();
0060   }
0061 
0062   se->run();
0063   se->End();
0064 
0065 }