00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #define EXAMINE_LOW_MULT_PARTICLES // this means look at protons and kaons...
00012
00013 class StChain;
00014 StChain *chain=0;
00015
00016
00017 class QvecCorrFctn;
00018 #ifdef EXAMINE_LOW_MULT_PARTICLES
00019 QvecCorrFctn* QvecCF_kp_kp;
00020 QvecCorrFctn* QvecCF_kp_km;
00021 QvecCorrFctn* QvecCF_prot_prot;
00022 #else
00023 QvecCorrFctn* QvecCF_pip_pip;
00024 QvecCorrFctn* QvecCF_pip_pim;
00025 #endif
00026
00027 void ExamineTxtFile(Int_t nevents=1,
00028 const char *MainFile="/home/scratch/lisa/blended_events.txt")
00029
00030
00031
00032 {
00033
00034
00035 gSystem->Load("St_base");
00036 gSystem->Load("StChain");
00037 gSystem->Load("St_Tables");
00038 gSystem->Load("StUtilities");
00039 gSystem->Load("StAnalysisUtilities");
00040 gSystem->Load("StMagF");
00041 gSystem->Load("StIOMaker");
00042 gSystem->Load("StarClassLibrary");
00043 gSystem->Load("StEvent");
00044 gSystem->Load("StEventMaker");
00045 gSystem->Load("StHbtMaker");
00046 gSystem->Load("StV0MiniDstMaker");
00047
00048 cout << "Dynamic loading done" << endl;
00049
00050 chain = new StChain("StChain");
00051 chain->SetDebug();
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 StHbtMaker* hbtMaker = new StHbtMaker("HBT","title");
00070 cout << "StHbtMaker instantiated"<<endl;
00071
00072
00073
00074
00075 cout << "StHbtMaker::Init - setting up Reader and Analyses..." << endl;
00076
00077 StHbtManager* TheManager = hbtMaker->HbtManager();
00078
00079
00080
00081
00082
00083
00084
00085
00086 StHbtGstarTxtReader* Reader = new StHbtGstarTxtReader;
00087 Reader->SetFileName(MainFile);
00088
00089
00090
00091
00092
00093
00094 TheManager->SetEventReader(Reader);
00095
00096 cout << "READER SET UP.... " << endl;
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 #ifdef EXAMINE_LOW_MULT_PARTICLES
00108
00109
00110
00111 StHbtAnalysis* anal = new StHbtAnalysis;
00112
00113 mikesEventCut* evcut = new mikesEventCut;
00114 evcut->SetEventMult(0,10000);
00115 evcut->SetVertZPos(-35.0,35.0);
00116 anal->SetEventCut(evcut);
00117
00118 mikesTrackCut* trkcut = new mikesTrackCut;
00119 trkcut->SetNSigmaPion(1.0,1000.0);
00120 trkcut->SetNSigmaKaon(1.0,1000.0);
00121 trkcut->SetNSigmaProton(-1.5,1.5);
00122 trkcut->SetNHits(5,50);
00123 trkcut->SetPt(0.1,0.8);
00124 trkcut->SetRapidity(-1.0,1.0);
00125 trkcut->SetDCA(-0.5,0.5);
00126 trkcut->SetCharge(1);
00127 trkcut->SetMass(0.938);
00128 anal->SetFirstParticleCut(trkcut);
00129 anal->SetSecondParticleCut(trkcut);
00130
00131 mikesPairCut* paircut = new mikesPairCut;
00132 anal->SetPairCut(paircut);
00133
00134 anal->SetNumEventsToMix(5);
00135
00136 QvecCF_prot_prot = new QvecCorrFctn("proton-proton",50,0.0,0.2);
00137 anal->AddCorrFctn(QvecCF_prot_prot);
00138
00139
00140
00141
00142 TheManager->AddAnalysis(anal);
00143
00144
00145
00146
00147 anal = new StHbtAnalysis;
00148
00149 evcut = new mikesEventCut;
00150 evcut->SetEventMult(0,10000);
00151 evcut->SetVertZPos(-35.0,35.0);
00152 anal->SetEventCut(evcut);
00153
00154 trkcut = new mikesTrackCut;
00155 trkcut->SetNSigmaPion(1.0,1000.0);
00156 trkcut->SetNSigmaKaon(-1.5,1.5);
00157 trkcut->SetNSigmaProton(-1000.0,-1.0);
00158 trkcut->SetNHits(5,50);
00159 trkcut->SetPt(0.1,0.8);
00160 trkcut->SetRapidity(-1.0,1.0);
00161 trkcut->SetDCA(-0.5,0.5);
00162 trkcut->SetCharge(1);
00163 trkcut->SetMass(0.494);
00164 anal->SetFirstParticleCut(trkcut);
00165 anal->SetSecondParticleCut(trkcut);
00166
00167 mikesPairCut* paircut = new mikesPairCut;
00168 anal->SetPairCut(paircut);
00169
00170 anal->SetNumEventsToMix(5);
00171
00172 QvecCF_kp_kp = new QvecCorrFctn("Kplus-Kplus",50,0.0,0.2);
00173 anal->AddCorrFctn(QvecCF_kp_kp);
00174
00175
00176
00177
00178 TheManager->AddAnalysis(anal);
00179
00180
00181
00182
00183 anal = new StHbtAnalysis;
00184
00185 evcut = new mikesEventCut;
00186 evcut->SetEventMult(0,10000);
00187 evcut->SetVertZPos(-35.0,35.0);
00188 anal->SetEventCut(evcut);
00189
00190 trkcut = new mikesTrackCut;
00191 trkcut->SetNSigmaPion(1.0,1000.0);
00192 trkcut->SetNSigmaKaon(-1.5,1.5);
00193 trkcut->SetNSigmaProton(-1000.0,-1.0);
00194 trkcut->SetNHits(5,50);
00195 trkcut->SetPt(0.1,0.8);
00196 trkcut->SetRapidity(-1.0,1.0);
00197 trkcut->SetDCA(-0.5,0.5);
00198 trkcut->SetCharge(1);
00199 trkcut->SetMass(0.494);
00200 anal->SetFirstParticleCut(trkcut);
00201
00202 trkcut = new mikesTrackCut;
00203 trkcut->SetNSigmaPion(1.0,1000.0);
00204 trkcut->SetNSigmaKaon(-1.5,1.5);
00205 trkcut->SetNSigmaProton(-1000.0,-1.0);
00206 trkcut->SetNHits(5,50);
00207 trkcut->SetPt(0.1,0.8);
00208 trkcut->SetRapidity(-1.0,1.0);
00209 trkcut->SetDCA(-0.5,0.5);
00210 trkcut->SetCharge(-1);
00211 trkcut->SetMass(0.494);
00212 anal->SetSecondParticleCut(trkcut);
00213
00214 mikesPairCut* paircut = new mikesPairCut;
00215 anal->SetPairCut(paircut);
00216
00217 anal->SetNumEventsToMix(5);
00218
00219 QvecCF_kp_km = new QvecCorrFctn("Kplus-Kminus",50,0.0,0.2);
00220 anal->AddCorrFctn(QvecCF_kp_km);
00221
00222
00223
00224
00225 TheManager->AddAnalysis(anal);
00226
00227
00228 #else // look at pions instead of protons and kaons
00229
00230
00231
00232
00233 StHbtAnalysis* anal = new StHbtAnalysis;
00234
00235 mikesEventCut* evcut = new mikesEventCut;
00236 evcut->SetEventMult(0,10000);
00237 evcut->SetVertZPos(-35.0,35.0);
00238 anal->SetEventCut(evcut);
00239
00240 mikesTrackCut* trkcut = new mikesTrackCut;
00241 trkcut->SetNSigmaPion(-1.5,1.5);
00242 trkcut->SetNSigmaKaon(-1000.0,-1.0);
00243 trkcut->SetNSigmaProton(-1000.0,-1.0);
00244 trkcut->SetNHits(5,50);
00245 trkcut->SetPt(0.1,0.8);
00246 trkcut->SetRapidity(-1.0,1.0);
00247 trkcut->SetDCA(-0.5,0.5);
00248 trkcut->SetCharge(1);
00249 trkcut->SetMass(0.138);
00250 anal->SetFirstParticleCut(trkcut);
00251 anal->SetSecondParticleCut(trkcut);
00252
00253 mikesPairCut* paircut = new mikesPairCut;
00254 anal->SetPairCut(paircut);
00255
00256 anal->SetNumEventsToMix(5);
00257
00258 QvecCF_pip_pip = new QvecCorrFctn("piplus-piplus",50,0.0,0.2);
00259 anal->AddCorrFctn(QvecCF_pip_pip);
00260
00261
00262
00263
00264 TheManager->AddAnalysis(anal);
00265
00266
00267
00268
00269 anal = new StHbtAnalysis;
00270
00271 evcut = new mikesEventCut;
00272 evcut->SetEventMult(0,10000);
00273 evcut->SetVertZPos(-35.0,35.0);
00274 anal->SetEventCut(evcut);
00275
00276 trkcut = new mikesTrackCut;
00277 trkcut->SetNSigmaPion(-1.5,1.5);
00278 trkcut->SetNSigmaKaon(-1000.0,-1.0);
00279 trkcut->SetNSigmaProton(-1000.0,-1.0);
00280 trkcut->SetNHits(5,50);
00281 trkcut->SetPt(0.1,0.8);
00282 trkcut->SetRapidity(-1.0,1.0);
00283 trkcut->SetDCA(-0.5,0.5);
00284 trkcut->SetCharge(1);
00285 trkcut->SetMass(0.138);
00286 anal->SetFirstParticleCut(trkcut);
00287
00288
00289 trkcut = new mikesTrackCut;
00290 trkcut->SetNSigmaPion(-1.5,1.5);
00291 trkcut->SetNSigmaKaon(-1000.0,-1.0);
00292 trkcut->SetNSigmaProton(-1000.0,-1.0);
00293 trkcut->SetNHits(5,50);
00294 trkcut->SetPt(0.1,0.8);
00295 trkcut->SetRapidity(-1.0,1.0);
00296 trkcut->SetDCA(-0.5,0.5);
00297 trkcut->SetCharge(-1);
00298 trkcut->SetMass(0.138);
00299
00300 anal->SetSecondParticleCut(trkcut);
00301
00302 mikesPairCut* paircut = new mikesPairCut;
00303 anal->SetPairCut(paircut);
00304
00305 anal->SetNumEventsToMix(5);
00306
00307 QvecCF_pip_pim = new QvecCorrFctn("piplus-piminus",50,0.0,0.2);
00308 anal->AddCorrFctn(QvecCF_pip_pim);
00309
00310
00311
00312
00313 TheManager->AddAnalysis(anal);
00314
00315 #endif // EXAMINE_LOW_MULT_PARTICLES
00316
00317
00318
00319
00320
00321
00322 if (chain->Init()){
00323 cout << "Initialization failed \n";
00324 goto TheEnd;
00325 }
00326 chain->PrintInfo();
00327
00328
00329
00330 int istat=0,iev=1;
00331 EventLoop: if (iev <= nevents && !istat) {
00332 cout << "StHbtExample -- Working on eventNumber " << iev << " of " << nevents << endl;
00333 chain->Clear();
00334 istat = chain->Make(iev);
00335 if (istat) {cout << "Last event processed. Status = " << istat << endl;}
00336 iev++; goto EventLoop;
00337 }
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352 cout << "StHbtExample -- Done with event loop" << endl;
00353
00354 chain->Finish();
00355 TheEnd:
00356 }