00001
00002
00003
00004 class StChain;
00005 StChain *chain=0;
00006
00007
00008
00009 class QinvCorrFctn;
00010 QinvCorrFctn* QinvCF;
00011
00012 void StHbtSectoredExample(Int_t nevents=100, const char *MainFile="/direct/star+data01/pwg/hbt/MDC3/MicroDst/Lanny/Peripheral/rcf0106_80_120evts.dst.root.pion.microDst")
00013
00014 {
00015
00016
00017 gSystem->Load("St_base");
00018 gSystem->Load("StChain");
00019 gSystem->Load("St_Tables");
00020 gSystem->Load("StUtilities");
00021 gSystem->Load("StAnalysisUtilities");
00022 gSystem->Load("StMagF");
00023 gSystem->Load("StIOMaker");
00024 gSystem->Load("StarClassLibrary");
00025 gSystem->Load("StEvent");
00026 gSystem->Load("StEventMaker");
00027 gSystem->Load("StHbtMaker");
00028
00029 cout << "Dynamic loading done" << endl;
00030
00031 chain = new StChain("StChain");
00032 chain->SetDebug();
00033
00034
00035
00036
00037 StHbtMaker* hbtMaker = new StHbtMaker("HBT","title");
00038 cout << "StHbtMaker instantiated"<<endl;
00039
00040
00041
00042
00043 cout << "StHbtMaker::Init - setting up Reader and Analyses..." << endl;
00044
00045 StHbtManager* TheManager = hbtMaker->HbtManager();
00046
00047
00048
00049
00050 StHbtBinaryReader* Reader = new StHbtBinaryReader;
00051 Reader->SetFileName(MainFile);
00052
00053
00054 TheManager->SetEventReader(Reader);
00055
00056 cout << "READER SET UP.... " << endl;
00057
00058
00059
00060
00061
00062
00063
00064 StHbtSectoredAnalysis* anal = new StHbtSectoredAnalysis;
00065
00066 mikesEventCut* evcut = new mikesEventCut;
00067 evcut->SetEventMult(0,10000);
00068 evcut->SetVertZPos(-35.0,35.0);
00069 anal->SetEventCut(evcut);
00070
00071 mikesTrackCut* trkcut = new mikesTrackCut;
00072 trkcut->SetNSigmaPion(-1.5,1.5);
00073 trkcut->SetNSigmaKaon(-1000.0,1000.0);
00074 trkcut->SetNSigmaProton(-1000.0,1000.0);
00075 trkcut->SetNHits(5,50);
00076 trkcut->SetPt(0.1,1.0);
00077 trkcut->SetRapidity(-1.0,1.0);
00078 trkcut->SetDCA(0.0,0.5);
00079 trkcut->SetCharge(-1);
00080 trkcut->SetMass(0.139);
00081 anal->SetFirstParticleCut(trkcut);
00082 anal->SetSecondParticleCut(trkcut);
00083
00084 mikesPairCut* paircut = new mikesPairCut;
00085 anal->SetPairCut(paircut);
00086
00087 anal->SetNumEventsToMix(5);
00088
00089
00090 QinvCF = new QinvCorrFctn("mikesQinvCF - SectoredAnalysis",50,0.0,0.2);
00091 anal->AddCorrFctn(QinvCF);
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 anal->SetDeltaP(0.15);
00107 anal->SetPXmax(1.05);
00108 anal->SetPXmin(-1.05);
00109 anal->SetPYmax(1.05);
00110 anal->SetPYmin(-1.05);
00111 anal->SetPZmax(1.05);
00112 anal->SetPZmin(-1.05);
00113
00114
00115 TheManager->AddAnalysis(anal);
00116
00117
00118
00119
00120
00121
00122
00123 if (chain->Init()){
00124 cout << "Initialization failed \n";
00125 goto TheEnd;
00126 }
00127 chain->PrintInfo();
00128
00129
00130
00131 int istat=0,iev=1;
00132 EventLoop: if (iev <= nevents && !istat) {
00133 cout << "StHbtExample -- Working on eventNumber " << iev << " of " << nevents << endl;
00134 chain->Clear();
00135 istat = chain->Make(iev);
00136 if (istat) {cout << "Last event processed. Status = " << istat << endl;}
00137 iev++; goto EventLoop;
00138 }
00139
00140
00141 cout << "StHbtExample -- Done with event loop" << endl;
00142
00143 chain->Finish();
00144
00145 TheEnd:
00146 }