Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
runmb.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file runmb.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
9 
10 //#include </gpfs/mnt/gpfs02/sphenix/user/lebedev/mdc/test/analysis/EventMix/install/include/eventmix/PairMaker.h>
11 #include </gpfs/mnt/gpfs02/sphenix/user/lebedev/mdc/test/analysis/EventMix/install/include/eventmix/PairMaker.h>
12 
13 R__LOAD_LIBRARY(libfun4all.so)
14 R__LOAD_LIBRARY(libeventmix.so)
15 #endif
16 
17 void runmb(int kkk=2000)
18 //void runmb(const char *fname = "/sphenix/sim/sim01/sphnxpro/MDC1/embed/embedDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-02990.root")
19 {
20  gSystem->Load("libg4dst");
21  gSystem->Load("libeventmix");
22 
23  char outfilename[99];
24  char infilename1[99];
25  char infilename2[99];
26  sprintf(outfilename,"/sphenix/sim/sim01/sphnxpro/MDC1/embed/eePairs_mb%d.root",kkk);
27  cout << "out: " << outfilename << endl;
28 
30  se->Verbosity(1);
31 
33  projection->Verbosity(1);
34  se->registerSubsystem(projection);
35 
36  PairMaker *pmaker = new PairMaker("PairMaker","dummy.root");
37  se->registerSubsystem(pmaker);
38 
40  se->registerInputManager(in1);
42  se->registerInputManager(in2);
43 
44  for(int i=0; i<10; i++) {
45  sprintf(infilename1,"DST_TRACKS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-0%d.root",kkk+i);
46  cout << "in1: " << infilename1 << endl;
47  in1->AddFile(infilename1);
48  sprintf(infilename2,"DST_CALO_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-0%d.root",kkk+i);
49  cout << "in2: " << infilename2 << endl;
50  in2->AddFile(infilename2);
51  }
52 
53  Fun4AllOutputManager *outee = new Fun4AllDstOutputManager("outee",oufilename);
54  outee->Verbosity(1);
55  outee->AddNode("ElectronPairs");
56  se->registerOutputManager(outee);
57  outee->Print();
58 
59  se->run();
60  se->End();
61 }
62