9 void MakeMiniMcTree(Int_t nevents=3,
10 const char* MainFile=
"hijing_b0_3/rcf0147_01*geant.root",
11 const char* outDir =
"./",
12 TString filePrefix=
"rcf")
14 gROOT->Macro(
"LoadLogger.C");
15 gSystem->Load(
"St_base");
16 gSystem->Load(
"StChain");
17 gSystem->Load(
"St_Tables");
18 gSystem->Load(
"StUtilities");
19 gSystem->Load(
"StIOMaker");
20 gSystem->Load(
"StarClassLibrary");
21 gSystem->Load(
"StDetectorDbMaker");
22 gSystem->Load(
"StTpcDb");
23 gSystem->Load(
"StEvent");
24 gSystem->Load(
"StEventMaker");
25 gSystem->Load(
"StEmcUtil");
26 gSystem->Load(
"StEEmcUtil");
27 gSystem->Load(
"StMcEvent");
28 gSystem->Load(
"StMcEventMaker");
29 gSystem->Load(
"StAssociationMaker");
30 gSystem->Load(
"StMcAnalysisMaker");
31 gSystem->Load(
"StMiniMcEvent");
32 gSystem->Load(
"StMiniMcMaker");
36 StIOMaker ioMk(
"IO",
"r",MainFile,
"bfcTree");
38 ioMk.SetBranch(
"*",0,
"0");
39 ioMk.SetBranch(
"geantBranch",0,
"r");
40 ioMk.SetBranch(
"eventBranch",0,
"r");
45 assocMk.useInTracker();
47 TString filename = MainFile;
48 int fileBeginIndex = filename.Index(filePrefix,0);
49 filename.Remove(0,fileBeginIndex);
52 miniMcMk.setOutDir(outDir);
53 miniMcMk.setPtCut(1.5);
54 miniMcMk.setFileName(filename);
55 miniMcMk.setFilePrefix(filePrefix);
58 parameterDB->setXCutTpc(.5);
59 parameterDB->setYCutTpc(.5);
60 parameterDB->setZCutTpc(.5);
61 parameterDB->setReqCommonHitsTpc(3);
72 cout <<
"done with event " << i
73 <<
"\tcpu: " << timer.CpuTime()
74 <<
"\treal: " << timer.RealTime()
75 <<
"\tratio: " << timer.CpuTime()/timer.RealTime() << endl;
77 memory.PrintMem(NULL);
84 cout <<
"my macro processed " << i <<
" events"
85 <<
"\tcpu: " << total.CpuTime()
86 <<
"\treal: " << total.RealTime()
87 <<
"\tratio: " << total.CpuTime()/total.RealTime() << endl;
virtual void Clear(Option_t *option="")
User defined functions.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...