10 void StTofAssociator(Int_t nevents=1,
11 const char *MainFile=
"/afs/rhic/star/data/samples/*.geant.root",
12 const char* histoFile=
"embedTOFp.root",
13 const char* dirHistoFile=
"/auto/u/geurts/Embedding/tofp")
17 gSystem->Load(
"St_base");
18 gSystem->Load(
"StChain");
20 gSystem->Load(
"St_Tables");
21 gSystem->Load(
"StUtilities");
22 gSystem->Load(
"StIOMaker");
23 gSystem->Load(
"StarClassLibrary");
24 gSystem->Load(
"StDetectorDbMaker");
26 gSystem->Load(
"StTpcDb");
27 gSystem->Load(
"StEvent");
28 gSystem->Load(
"StEventMaker");
29 gSystem->Load(
"StEmcUtil");
31 gSystem->Load(
"StMcEvent");
32 gSystem->Load(
"StMcEventMaker");
33 gSystem->Load(
"StAssociationMaker");
34 gSystem->Load(
"StTofpMcAnalysisMaker");
37 gSystem->Load(
"StTofUtil");
38 gSystem->Load(
"StDbLib");
39 gSystem->Load(
"StDbBroker");
40 gSystem->Load(
"St_db_Maker");
52 ioMaker->SetBranch(
"*",0,
"0");
53 ioMaker->SetBranch(
"geantBranch",0,
"r");
55 ioMaker->SetBranch(
"dstBranch",0,
"r");
56 ioMaker->SetBranch(
"runcoBranch",0,
"r");
64 mcEventReader->doUseTpc =
true;
65 mcEventReader->doUseSvt =
false;
66 mcEventReader->doUseFtpc =
false;
67 mcEventReader->doUseRich =
false;
68 mcEventReader->doUseBemc =
false;
69 mcEventReader->doUseBsmd =
false;
72 associator->doPrintMemoryInfo =
false;
85 parameterDB->setXCutTpc(.5);
86 parameterDB->setYCutTpc(.5);
87 parameterDB->setZCutTpc(.5);
88 parameterDB->setReqCommonHitsTpc(3);
90 parameterDB->setRCutFtpc(.3);
91 parameterDB->setPhiCutFtpc(5*(3.1415927/180.0));
92 parameterDB->setReqCommonHitsFtpc(3);
94 parameterDB->setXCutSvt(.08);
95 parameterDB->setYCutSvt(.08);
96 parameterDB->setZCutSvt(.08);
97 parameterDB->setReqCommonHitsSvt(1);
100 char *db2 =
"StarDb";
101 if (gSystem->AccessPathName(db2) !=0) {
102 printf(
"File %s does not exist\n",db2);
106 dbMk->SetDateTime(010102,000);
112 Int_t initStat = chain->Init();
113 if (initStat) chain->Fatal(initStat,
"during Init()");
116 EventLoop:
if (iev<=nevents && istat!=2) {
118 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
119 istat = chain->
Make(iev);
120 if (istat == 2) { cout <<
"Last Event Processed. Status = " << istat << endl; }
121 if (istat == 3) { cout <<
"Error Event Processed. Status = " << istat << endl; }
122 iev++;
goto EventLoop;
127 sprintf(histfile,
"%s%s",dirHistoFile,histoFile);
128 TFile file(histfile,
"RECREATE");
130 TOrdCollection *histograms =
new TOrdCollection;
135 histograms->AddLast(examples->
hMultRef);
136 histograms->AddLast(examples->hMcPionPlus);
148 histograms->AddLast(examples->
hMcProton);
149 histograms->AddLast(examples->
hRcProton);
173 if(iev>200) chain->
Finish();
TH1D * hTofpSlatIdE4
recovered from ss
TH1D * hTofpSlatIdA0
2D tray hit positions (F)
TH1D * hTofpSlatIdB1
valid slat
TH2F * hRcElectron
TPC reconstructed pbar.
TH1F * hMultRef
MC/RC momentum resolution.
TH2F * hRcKaonMin
TPC reconstructed K+.
TH2F * hRcAntiProton
TPC reconstructed p+.
TH2F * hMatchKaonMin
TOF matched K+.
TH1D * hTofpSlatIdE2
one slat for one track match
TH1D * hTofpSlatIdE5
recovered from closest hitplane
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
TH1D * hTofpSlatIdA1
events per slat
TH2F * hMcKaonMin
montecarlo K+
virtual void Clear(Option_t *option="")
User defined functions.
TH2F * hMatchPionMin
TOF matched pi+.
TH1D * hTofpSlatHitVecSize
primary track match per slat
TH2F * hMcKaonPlus
montecarlo pi-
TH1D * hTofpSlatIdE1
single track match per slat
TH2F * hMcPionMin
montecarlo pi+
TH1D * hTofpSlatIdD1
#tracks match valid slat
TH2F * hMatchProton
TOF matched K-.
TH2F * hMatchPionPlus
TPC reconstructed e-.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
TH2F * hMatchKaonPlus
TOF matched pi-.
TH2F * hRcProton
TPC reconstructed K-.
TH2F * hMatchElectron
TOF matched pbar.
TH2F * hMcAntiProton
montecarlo p+
TH1D * hTofpSlatIdE3
recovered from hitprof-weight
TH2F * hMomResPtPion
TOF matched e-.
Bool_t doPrintMemoryInfo
lots of screen output
TH2F * hRcPionPlus
montecarlo e-
TH2F * hRcPionMin
TPC reconstructed pi+.
TH2F * hMcElectron
montecarlo pbar
TH1D * hTofpSlatIdF1
total recovered slat per track match
TH1D * hTofpSlatIdD2
track match per valid slat
TH2F * hRcKaonPlus
TPC reconstructed pi-.
TH2F * hMatchAntiProton
TOF matched p+.
Bool_t doPrintMemoryInfo
lots of screen output
TH2F * hMcProton
montecarlo K-