148 void StAssociator(Int_t nevents=1,
149 const char *MainFile=
"/afs/rhic.bnl.gov/star/data/samples/*.geant.root")
153 gSystem->Load(
"St_base");
154 gSystem->Load(
"StChain");
155 gSystem->Load(
"StBFChain");
157 gSystem->Load(
"St_Tables");
158 gSystem->Load(
"StUtilities");
159 gSystem->Load(
"StIOMaker");
160 gSystem->Load(
"StarClassLibrary");
161 gSystem->Load(
"StDetectorDbMaker");
164 gSystem->Load(
"StTpcDb");
165 gSystem->Load(
"StEvent");
167 gSystem->Load(
"StEmcUtil");
168 gSystem->Load(
"StEEmcUtil");
170 gSystem->Load(
"StMcEvent");
171 gSystem->Load(
"StMcEventMaker");
172 gSystem->Load(
"StAssociationMaker");
173 gSystem->Load(
"StMcAnalysisMaker");
175 chain =
new StChain(
"StChain");
183 ioMaker->SetBranch(
"*",0,
"0");
184 ioMaker->SetBranch(
"geantBranch",0,
"r");
185 ioMaker->SetBranch(
"eventBranch",0,
"r");
202 associator->useDistanceAssoc();
214 parameterDB->setXCutTpc(.6);
215 parameterDB->setYCutTpc(.6);
216 parameterDB->setZCutTpc(.6);
217 parameterDB->setReqCommonHitsTpc(3);
219 parameterDB->setRCutFtpc(.3);
220 parameterDB->setPhiCutFtpc(5*(3.1415927/180.0));
221 parameterDB->setReqCommonHitsFtpc(3);
223 parameterDB->setXCutSvt(.08);
224 parameterDB->setYCutSvt(.08);
225 parameterDB->setZCutSvt(.08);
226 parameterDB->setReqCommonHitsSvt(1);
232 Int_t initStat = chain->Init();
233 if (initStat) chain->Fatal(initStat,
"during Init()");
236 EventLoop:
if (iev<=nevents && istat!=2) {
238 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
239 istat = chain->
Make(iev);
240 if (istat == 2) { cout <<
"Last Event Processed. Status = " << istat << endl; }
241 if (istat == 3) { cout <<
"Error Event Processed. Status = " << istat << endl; }
242 iev++;
goto EventLoop;
244 examples->
mAssociationCanvas =
new TCanvas(
"mAssociationCanvas",
"Histograms",200,10,600,600);
246 myCanvas->Divide(2,2);
250 examples->
mTrackNtuple->Draw(
"(p-prec)/p:commTpcHits",
"prec!=0");
252 TList* dList = chain->GetMaker(
"StMcAnalysisMaker")->Histograms();
253 TH2F* hitRes = dList->At(0);
254 TH1F* momRes = dList->At(1);
255 TH2F* coordRc = dList->At(2);
256 TH2F* coordMc = dList->At(3);
268 coordRc->SetMarkerStyle(20);
273 coordMc->SetMarkerColor(2);
274 coordMc->SetMarkerStyle(20);
275 coordMc->Draw(
"same");
277 if(iev>200) chain->
Finish();
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
TCanvas * mAssociationCanvas
Miscellaneous info of the TPC hit pairs.
TNtuple * mTrackNtuple
File to contain the mTrackNtuple, otherwise it is deleted!
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...