13 #define STEVENTREADER 1
14 #define MCEVENTREADER 0
15 #define ASSOCIATIONREADER 0
26 #define STEVENTREADER 0
27 #define MCEVENTREADER 0
28 #define ASSOCIATIONREADER 0
54 class MinvCorrFctnM_vs_P;
55 MinvCorrFctnM_vs_P* MinvCFM_vs_P;
57 class p1_vs_p2CorrFctn;
58 p1_vs_p2CorrFctn* p1_vs_p2_CF;
64 pDiffCorrFctn* pDiffCF;
66 class p_vs_angleCorrFctn;
67 p_vs_angleCorrFctn* p_vs_angleCF;
69 class phiMeas_vs_phiCalcCorrFctn;
70 phiMeas_vs_phiCalcCorrFctn* phiMeas_vs_phiCalcCF;
91 const char *venusFile =
"*geant.root";
92 const char *venusPath =
"/disk00001/star/auau200/venus412/default/b0_3/year_1b/hadronic_on/tfs_4/";
93 const char *dstFile =
"/disk00001/star/auau200/two_photon/starlight/twogam/year_1b/hadronic_on/tfs/ric0022_01_14552evts.dst.root";
94 const char *xdfFile =
"/afs/rhic.bnl.gov/star/data/samples/psc0054_07_40evts_dst.xdf";
95 const char *mdcFile =
"/disk00001/star/auau200/venus412/default/b0_3/year_1b/hadronic_on/tss/psc0081_07_40evts.root";
96 const char *geantFile =
"/disk00000/star/auau200/hijing135/jetq_off/b0_3/year_1b/hadronic_on/tfsr/set0041_01_53evts.geant.root";
97 const char *fileList[] = {dstFile,xdfFile,mdcFile,0};
100 for (
int i=0; i<n*1e6; i++) { }
102 void mess(
const char* c=
"alive") {
103 for (
int i=0; i<10; i++) { cout << c << endl; }
107 void StHbtExampleQQ(
const Int_t nevents,
const Char_t **fileList);
112 void rho(
const Int_t nevents=9999,
113 const Char_t *path=venusPath,
114 const Char_t *file=venusFile)
116 const char *fileListQQ[]={0,0};
120 fileListQQ[0] = gSystem->ConcatFileName(path,file);
122 StHbtExampleQQ(nevents,fileListQQ);
126 void StHbtExampleQQ(
const Int_t nevents,
const Char_t **fileList)
130 gSystem->Load(
"St_base");
131 gSystem->Load(
"StChain");
132 gSystem->Load(
"St_Tables");
133 gSystem->Load(
"StMagF");
134 gSystem->Load(
"StUtilities");
136 gSystem->Load(
"StIOMaker");
137 gSystem->Load(
"StarClassLibrary");
138 gSystem->Load(
"StEvent");
140 gSystem->Load(
"StEventMaker");
141 gSystem->Load(
"StMcEvent");
142 gSystem->Load(
"StMcEventMaker");
143 gSystem->Load(
"StAssociationMaker");
144 gSystem->Load(
"StMcAnalysisMaker");
146 gSystem->Load(
"StHbtMaker");
148 cout <<
" loading done " << endl;
150 chain =
new StChain(
"StChain");
155 for (
int ifil=0; fileList[ifil]; ifil++)
156 setFiles->AddFile(fileList[ifil]);
172 ioMaker->SetBranch(
"*",0,
"0");
173 ioMaker->SetBranch(
"dstBranch",0,
"r");
181 ioMaker->SetBranch(
"*",0,
"0");
182 ioMaker->SetBranch(
"geantBranch",0,
"r");
190 ioMaker->SetBranch(
"*",0,
"0");
191 cout <<
" files open" << endl;
192 ioMaker->SetBranch(
"geantBranch",0,
"r");
193 cout <<
" files open" << endl;
194 ioMaker->SetBranch(
"dstBranch",0,
"r");
195 cout <<
" files open" << endl;
203 cout <<
"Just instantiated StEventMaker... lets go StHbtMaker!" << endl;
207 cout <<
"StMcEventMaker instantiated"<<endl;
211 cout <<
"Just instantiated StEventMaker... lets go StHbtMaker!" << endl;
213 cout <<
"StMcEventMaker instantiated"<<endl;
215 cout <<
"StAssociationMaker instantiated"<<endl;
223 cout <<
"StHbtMaker instantiated"<<endl;
225 cout <<
"StHbtMaker::Init - setting up Reader and Analyses..." << endl;
239 Reader->SetTheEventMaker(eventMaker);
240 TheManager->SetEventReader(Reader);
241 cout <<
"READER SET UP.... " << endl;
248 Reader->SetTheMcEventMaker(mcEventMaker);
249 TheManager->SetEventReader(Reader);
250 cout <<
"READER SET UP.... " << endl;
252 #if ASSOCIATIONREADER
258 Reader->SetTheEventMaker(eventMaker);
259 Reader->SetTheMcEventMaker(mcEventMaker);
260 Reader->SetTheAssociationMaker(associationMaker);
261 Reader->SetTheMcEventMaker(mcEventMaker);
262 TheManager->SetEventReader(Reader);
265 parameterDB->setXCut(0.1);
266 parameterDB->setZCut(0.2);
267 parameterDB->setReqCommonHits(10);
268 cout <<
"READER SET UP.... " << endl;
274 frontLoadedEventCut->SetEventMult(0,100000);
275 frontLoadedEventCut->SetVertZPos(-35.0,35.0);
276 Reader->SetEventCut(frontLoadedEventCut);
278 frontLoadedParticleCut->SetNSigmaPion(-1000.0,1000.0);
279 frontLoadedParticleCut->SetNSigmaKaon(-3.,3.);
280 frontLoadedParticleCut->SetNSigmaProton(-1000.0,1000.0);
281 frontLoadedParticleCut->SetNHits(5,1000);
282 frontLoadedParticleCut->SetP(0.0,1.0);
283 frontLoadedParticleCut->SetPt(0.0,1.0);
284 frontLoadedParticleCut->SetRapidity(-1.5,1.5);
285 frontLoadedParticleCut->SetDCA(0.0,2.);
286 frontLoadedParticleCut->SetCharge(0);
287 frontLoadedParticleCut->SetMass(0.494);
288 Reader->SetParticleCut(frontLoadedParticleCut);
291 Writer->SetFileName(
"/scr22/laue/test.asc");
292 TheManager->SetEventWriter(Writer);
293 cout <<
"WRITER SET UP.... " << endl;
299 Reader->SetFileName(*fileList);
300 TheManager->SetEventReader(Reader);
302 cout <<
"READER SET UP.... " << endl;
309 aParticleCut->SetNSigmaPion(3.0,1000.0);
310 aParticleCut->SetNSigmaKaon(-3.,3.);
311 aParticleCut->SetNSigmaProton(-1000.,-1.0);
312 aParticleCut->SetNHits(10,50);
313 aParticleCut->SetP(0.0,1.0);
314 aParticleCut->SetPt(0.1,2.0);
315 aParticleCut->SetRapidity(-1.5,1.5);
316 aParticleCut->SetDCA(0.0,2.);
317 aParticleCut->SetCharge(+1);
318 aParticleCut->SetMass(0.494);
321 100,0.,1.2,100,0.,1e-5);
323 100,0.,1.2,100,0.,1e-5);
335 phiEvcut->SetEventMult(0,100000);
336 phiEvcut->SetVertZPos(-35.0,35.0);
339 phiEvcut->AddCutMonitor(multMoniPass, multMoniFail);
340 phiAnal->SetEventCut(phiEvcut);
347 kaonTrkcut->AddCutMonitor( dedxMoniPosPass, dedxMoniPosFail);
353 kaonTrkcut->AddCutMonitor( pMoni1, pMoni2);
358 kaonTrkcut->AddCutMonitor( ptMoni1, ptMoni2);
362 kaonTrkcut->AddCutMonitor( yptMoni1, yptMoni2);
366 kaonTrkcut->AddCutMonitor( DCAMoni1, DCAMoni2 );
367 phiAnal->SetFirstParticleCut(kaonTrkcut);
371 antikaonTrkcut->SetCharge(-1);
372 phiAnal->SetSecondParticleCut(antikaonTrkcut);
376 antikaonTrkcut->AddCutMonitor( dedxMoniNegPass, dedxMoniNegFail);
379 phiPairCut->SetPDiff(0.,1000.);
381 phiAnal->SetPairCut(phiPairCut);
383 phiAnal->SetNumEventsToMix(5);
390 MinvCF->SetEventCut(phiEvcut);
391 phiAnal->AddCorrFctn(MinvCF);
394 phiAnal->AddCorrFctn(MinvCFY_vs_Pt);
396 MinvCFM_vs_Pt =
new MinvCorrFctnM_vs_Pt(
"MinvCM dn/d(M_vs_Pt)",50, 1.0, 1.04, 20, 0., 1. );
397 phiAnal->AddCorrFctn(MinvCFM_vs_Pt);
400 MinvCFM_vs_P =
new MinvCorrFctnM_vs_P(
"Mass (GeV/c^2) vs Momentum (GeV/c)",50,0.98,1.08,20,0.,2.);
401 phiAnal->AddCorrFctn(MinvCFM_vs_P);
403 p1_vs_p2CF =
new p1_vs_p2CorrFctn(
"K+ momentum (GeV/c^) vs K- momentum (GeV/c)",20,0.,2., 20,0.,2.);
404 phiAnal->AddCorrFctn(p1_vs_p2CF);
406 YCF =
new YCorrFctn(
"Rapidity",20,-2.,2.);
407 phiAnal->AddCorrFctn(YCF);
409 pDiffCF =
new pDiffCorrFctn(
" p1-p2 (GeV/c)",100,0.,.1);
410 phiAnal->AddCorrFctn(pDiffCF);
412 p_vs_angleCF =
new p_vs_angleCorrFctn(
"K+/- momentum (GeV/c^) vs opening angle",20,0.,2., 20,0.,2.*3.1415927);
413 phiAnal->AddCorrFctn(p_vs_angleCF);
415 phiMeas_vs_phiCalcCF =
new phiMeas_vs_phiCalcCorrFctn(
" phiMeas vs phiCalc",20,-1.,1.,20,-1.,1.);
416 phiAnal->AddCorrFctn(phiMeas_vs_phiCalcCF);
420 TheManager->AddAnalysis(phiAnal);
429 phiEvcut2->SetEventMult(0,10000);
430 phiEvcut2->SetVertZPos(-35.0,35.0);
431 phiAnal2->SetEventCut(phiEvcut2);
435 kaonTrkcut2->SetNSigmaKaon(-2.,2.);
438 kaonTrkcut2->AddCutMonitor( dedxMoniPosPass2, dedxMoniPosFail2);
439 phiAnal2->SetFirstParticleCut(kaonTrkcut2);
442 antikaonTrkcut2->SetCharge(-1);
445 antikaonTrkcut2->AddCutMonitor( dedxMoniNegPass2, dedxMoniNegFail2);
446 phiAnal2->SetSecondParticleCut(antikaonTrkcut2);
448 phiAnal2->SetPairCut(phiPairCut);
450 phiAnal2->SetNumEventsToMix(10);
453 MinvCF2->SetEventCut(phiEvcut);
454 phiAnal2->AddCorrFctn(MinvCF2);
465 phiEvcut3->SetEventMult(0,10000);
466 phiEvcut3->SetVertZPos(-35.0,35.0);
467 phiAnal3->SetEventCut(phiEvcut3);
471 kaonTrkcut3->SetNSigmaKaon(-1.,1.);
474 kaonTrkcut3->AddCutMonitor( dedxMoniPosPass3, dedxMoniPosFail3);
475 phiAnal3->SetFirstParticleCut(kaonTrkcut3);
478 antikaonTrkcut3->SetCharge(-1);
481 antikaonTrkcut3->AddCutMonitor( dedxMoniNegPass3, dedxMoniNegFail3);
482 phiAnal3->SetSecondParticleCut(antikaonTrkcut3);
484 phiAnal3->SetPairCut(phiPairCut);
486 phiAnal3->SetNumEventsToMix(10);
489 MinvCF3->SetEventCut(phiEvcut);
490 phiAnal3->AddCorrFctn(MinvCF3);
504 rhoEvcut->SetEventMult(0,100000);
505 rhoEvcut->SetVertZPos(-35.0,35.0);
506 rhoAnal->SetEventCut(rhoEvcut);
509 piPosTrkcut->SetNSigmaPion(-2.0,+2.0);
510 piPosTrkcut->SetNSigmaKaon(-1000.,+1000.);
511 piPosTrkcut->SetNSigmaProton(-1000.,+1000.0);
512 piPosTrkcut->SetNHits(10,50);
513 piPosTrkcut->SetP(0.1,0.5);
514 piPosTrkcut->SetPt(0.1,2.0);
515 piPosTrkcut->SetRapidity(-1.5,1.5);
516 piPosTrkcut->SetDCA(0.0,2.);
517 piPosTrkcut->SetCharge(+1);
518 piPosTrkcut->SetMass(0.139);
519 rhoAnal->SetFirstParticleCut(piPosTrkcut);
522 piNegTrkCut->SetCharge(-1);
523 rhoAnal->SetSecondParticleCut(piNegTrkCut);
526 rhoPairCut->SetPDiff(0.,1000.);
528 rhoAnal->SetPairCut(rhoPairCut);
530 rhoAnal->SetNumEventsToMix(3);
536 MinvCFrho->SetEventCut(rhoEvcut);
537 rhoAnal->AddCorrFctn(MinvCFrho);
541 TheManager->AddAnalysis(rhoAnal);
548 for (Int_t iev=0;iev<nevents; iev++) {
549 cout <<
"StHbtExample -- Working on eventNumber " << iev << endl;
551 int iret = chain->
Make(iev);
553 cout <<
"Bad return code!" << endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
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...