00001
00002
00003
00004
00005
00006
00007
00008
00009 class StChain;
00010 StChain *chain=0;
00011
00012
00013 class StHbtSplitEvalAnalysis;
00014 StHbtSplitEvalAnalysis* anal;
00015
00016
00017
00018
00019 Int_t usePath = 0;
00020 Int_t nFile = 0;
00021 TString thePath;
00022 TString theFileName;
00023 TString originalPath;
00024
00025
00026
00027
00028 void StHbtSplittingEstimate(const Int_t nevents=9999,
00029 const Char_t *path="/star/data01/pwg/hbt/RandTheMan/uDSTs/P01hi/minbias/08/",
00030 const Char_t *fileName="",
00031 const Char_t *extention=".hbtTTreeMuDst",
00032 const Char_t *filter=".",
00033 const int maxFiles=10) {
00034
00035 gStyle->SetTextFont(41);
00036 gStyle->SetStatH(.3);
00037 gStyle->SetStatW(.3);
00038
00039
00040 gSystem->Load("St_base");
00041 gSystem->Load("StChain");
00042 gSystem->Load("St_Tables");
00043 gSystem->Load("StMagF");
00044 gSystem->Load("StUtilities");
00045 gSystem->Load("StTreeMaker");
00046 gSystem->Load("StIOMaker");
00047 gSystem->Load("StarClassLibrary");
00048 gSystem->Load("StTpcDb");
00049 gSystem->Load("StDbUtilities");
00050 gSystem->Load("StEvent");
00051 gSystem->Load("StEventMaker");
00052 gSystem->Load("StEventUtilities");
00053 gSystem->Load("StEmcUtil");
00054 gSystem->Load("St_emc_Maker");
00055 gSystem->Load("StMcEvent");
00056 gSystem->Load("StMcEventMaker");
00057 gSystem->Load("StAssociationMaker");
00058 gSystem->Load("StMcAnalysisMaker");
00059
00060
00061
00062 gSystem->Load("StStrangeMuDstMaker");
00063 gSystem->Load("StHbtMaker");
00064
00065
00066
00067 chain = new StChain("StChain");
00068 chain->SetDebug(1);
00069
00070
00071
00072
00073
00074
00075 StHbtMaker* hbtMaker = new StHbtMaker("HBT","title");
00076 StHbtManager* TheManager = hbtMaker->HbtManager();
00077
00078 StHbtTTreeReader* Reader = new StHbtTTreeReader(0,0,path,fileName,extention,filter,maxFiles);
00079 TheManager->SetEventReader(Reader);
00080
00081
00082
00083 franksTrackCut* aTrackCut = new franksTrackCut;
00084 aTrackCut->SetPidProbPion(0.3,10);
00085 aTrackCut->SetNHits(10,50);
00086 aTrackCut->SetP(0.1,4.);
00087 aTrackCut->SetPt(0.1,2.);
00088 aTrackCut->SetEta(-1.1,+1.1);
00089
00090 aTrackCut->SetDCA(0.0,3.);
00091 aTrackCut->SetCharge(-1);
00092 aTrackCut->SetMass(0.138);
00093
00094
00095
00096
00097
00098
00099 anal = new StHbtSplitEvalAnalysis;
00100 anal->SetQinvCut(0.03);
00101
00102 mikesEventCut* evcut = new mikesEventCut;
00103 evcut->SetEventMult(30,10000);
00104 evcut->SetVertZPos(-70.0,70.0);
00105 anal->SetEventCut(evcut);
00106
00107 anal->SetFirstParticleCut(aTrackCut);
00108 anal->SetSecondParticleCut(aTrackCut);
00109
00110
00111 qualityPairCut* qpc = new qualityPairCut;
00112 qpc->SetQualityCut(-0.5,0.65);
00113 anal->SetPairCut(qpc);
00114
00115
00116 anal->SetNumEventsToMix(1);
00117
00118
00119
00120 TheManager->AddAnalysis(anal);
00121
00122 cout << " StHbt Analysis - setup done " << endl;
00123
00124
00125 chain->Init();
00126 chain->PrintInfo();
00127
00128 for (Int_t iev=0;iev<nevents; iev++) {
00129 cout << "StHbtExample -- Working on eventNumber " << iev << endl;
00130 chain->Clear();
00131 int iret = chain->Make(iev);
00132 if (iret) {
00133
00134 break;
00135 }
00136 }
00137 chain->Finish();
00138
00139 TFile file("SplittingHistos.root","RECREATE");
00140 anal->mRealSplits->Write();
00141 anal->mRealAll->Write();
00142 anal->mMixedSplits->Write();
00143 anal->mMixedAll->Write();
00144 anal->mSplitFractionUpperLimit->Write();
00145 anal->mSplitFractionLowerLimit->Write();
00146 file.Close();
00147
00148
00149
00150 TCanvas can;
00151 can->Divide(2,3);
00152 can->cd(1);
00153 anal->mRealAll->Draw();
00154 can->cd(2);
00155 anal->mRealSplits->Draw();
00156 can->cd(3);
00157 anal->mMixedAll->Draw();
00158 can->cd(4);
00159 anal->mMixedSplits->Draw();
00160 can->cd(5);
00161 anal->mSplitFractionUpperLimit->Draw();
00162 can->cd(6);
00163 anal->mSplitFractionLowerLimit->Draw();
00164
00165
00166
00167 }
00168
00169
00170
00171
00172