Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run.C
1 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
2 
3 #include <GlobalVariables.C>
4 
5 #include <fun4all/SubsysReco.h>
10 
11 #include </sphenix/u/weihuma/install/include/trackpidassoc/ElectronPid.h>
12 #include </sphenix/u/weihuma/install/include/trackpidassoc/TrackPidAssoc.h>
13 
14 
15 R__LOAD_LIBRARY(libfun4all.so)
16 R__LOAD_LIBRARY(libtrackpid.so)
17 
18 #endif
19 
20 void run(
21  const char *inputFile = "/sphenix/sim/sim01/sphnxpro/MDC1/embed/embedDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-04594.root",
22  const string &outputroot = "/sphenix/u/weihuma/RunOutput/embedDST_sHijing_upsilon_0_20fm",
23  bool output_ntuple = true
24 )
25 {
26  gSystem->Load("libg4dst");
27  gSystem->Load("libtrackpid");
28 
30  se->Verbosity(1);
31 
32  ElectronPid *ePid = new ElectronPid("ElectronPid",outputroot+"_ElectronPid.root");
33  ePid->set_output_ntuple(output_ntuple);
34  ePid->Verbosity(0);
35  ePid->setTrackcutlimits(1,1,20,10);//nmvtx, nintt, ntpc, quality
36  ePid->setEMOPcutlimits(0.7,1.5);
37  ePid->setHinOEMcutlimit(0.2);
38  ePid->setPtcutlimit(2.0,30.0);
39  ePid->setHOPcutlimit(0.3);
40  se->registerSubsystem(ePid);
41 
42  Fun4AllInputManager *in = new Fun4AllDstInputManager("DST_TRACKS");
43  in->Verbosity(1);
44  //in->fileopen(inputFile);
45  //in->AddListFile("filelist_0_4d88fm.txt"); //sHijing with Upsilon embeded;
46  // in->AddListFile("filelist_0_12fm.txt"); //sHijing with Upsilon embeded;
47  in->AddListFile("filelist_0_20fm.txt"); //sHijing with Upsilon embeded;
48 
49  se->registerInputManager(in);
50 
51  if(output_ntuple) {
52  Fun4AllOutputManager *outePid = new Fun4AllDstOutputManager("outePid",outputroot+"_ElectronPid_DST.root");
53  outePid->AddNode("TrackPidAssoc");
54  se->registerOutputManager(outePid);
55  outePid->Verbosity(1);
56  outePid->Print();
57  }
58 
59  se->run();
60  se->End();
61 
62 }