6 #include <StEmcPool/StPhotonCommon/MyEvent.h>
7 #include <StEmcPool/StPhotonCommon/MyPoint.h>
16 cout<<
"constructing CUTS for "<<flag<<endl;
18 if(strcmp(flag,
"dAu")==0){
42 ptBinsMB.Set(nPtBinsMB+1);
43 for(Int_t i=0;i<=nPtBinsMB;i++) ptBinsMB[i]=(Double_t)0.5*i;
48 ptBinsHT1.Set(nPtBinsHT1+1);
49 for(Int_t i=0;i<=nPtBinsHT1;i++) ptBinsHT1[i]=(Double_t)1.*i;
50 ptBinsHT1[13]=(Double_t)13.5;
51 ptBinsHT1[14]=(Double_t)15.;
54 ptBinsHT2.Set(nPtBinsHT2+1);
55 for(Int_t i=0;i<=nPtBinsHT2;i++) ptBinsHT2[i]=(Double_t)1.*i;
56 ptBinsHT2[13]=(Double_t)13.5;
57 ptBinsHT2[14]=(Double_t)15.;
60 nPtBinsEffMB=nPtBinsMB;
62 nPtBinsEffHT1=nPtBinsHT1;
63 ptBinsEffHT1=ptBinsHT1;
64 nPtBinsEffHT2=nPtBinsHT2;
65 ptBinsEffHT2=ptBinsHT2;
78 ptBinsEff.Set(nPtBinsEff+1);
79 for(Int_t i=0;i<=nPtBinsEff;i++){
88 Int_t badIdsDAU[]={82, 156, 240, 264, 719, 733, 818, 853, 931, 1289, 1355, 1358, 1359, 1472,
89 1527, 1759, 1943, 1965, 2005, 2011, 2025, 2090, 2130, 2131, 2152, 2170, 2369, -1};
91 while(badIdsDAU[entryDAU]>-1) {isHot[badIdsDAU[entryDAU]-1]=1; entryDAU++;}
95 else if(strcmp(flag,
"pp05")==0 || strcmp(flag,
"pythia")==0){
119 ptBinsMB.Set(nPtBinsMB+1);
120 for(Int_t i=0;i<=nPtBinsMB;i++) ptBinsMB[i]=(Double_t)0.5*i;
126 ptBinsHT1.Set(nPtBinsHT1+1);
127 for(Int_t i=0;i<=nPtBinsHT1;i++) ptBinsHT1[i]=(Double_t)1.*i;
128 ptBinsHT1[13]=(Double_t)13.5;
129 ptBinsHT1[14]=(Double_t)15.0;
132 ptBinsHT2.Set(nPtBinsHT2+1);
133 for(Int_t i=0;i<=nPtBinsHT2;i++) ptBinsHT2[i]=(Double_t)1.*i;
134 ptBinsHT2[13]=(Double_t)13.5;
135 ptBinsHT2[14]=(Double_t)15.0;
137 nPtBinsEffMB=nPtBinsMB;
138 ptBinsEffMB=ptBinsMB;
139 nPtBinsEffHT1=nPtBinsHT1;
140 ptBinsEffHT1=ptBinsHT1;
141 nPtBinsEffHT2=nPtBinsHT2;
142 ptBinsEffHT2=ptBinsHT2;
155 ptBinsEff.Set(nPtBinsEff+1);
156 for(Int_t i=0;i<=nPtBinsEff;i++){
165 Int_t badIdsPP[]={750, 757, 762, 768, 812, -1};
167 while(badIdsPP[entryPP]>-1) {isHot[badIdsPP[entryPP]-1]=1; entryPP++;}
172 cout<<
"error constructing cuts"<<endl;
179 ptBinsEffMB.Set(nPtBinsEffMB+1);
180 for(Int_t i=0;i<=nPtBinsEffMB;i++) ptBinsEffMB[i]=(Double_t).5*i;
182 ptBinsEffHT1.Set(nPtBinsEffHT1+1);
183 for(Int_t i=0;i<=nPtBinsEffHT1;i++) ptBinsEffHT1[i]=(Double_t).5*i;
185 ptBinsEffHT2.Set(nPtBinsEffHT2+1);
186 for(Int_t i=0;i<=nPtBinsEffHT2;i++) ptBinsEffHT2[i]=(Double_t).5*i;
192 cout<<
"cuts destructed!"<<endl;
194 Bool_t AnaCuts::isPointOK(
MyPoint *p,TVector3 vpos)
196 TVector3 pos=p->position();
197 TVector3 mom=pos-vpos;
198 mom.SetMag(p->energy());
199 if(p->distanceToTrack()<neutralCUT)
return kFALSE;
200 if(!(p->nHitsEta()>=etaHitsCUT && p->nHitsPhi()>=phiHitsCUT))
202 if(!(p->nHitsEta()>=phiHitsCUT && p->nHitsPhi()>=etaHitsCUT))
207 if(pos.PseudoRapidity()<etaMinCUT)
return kFALSE;
208 if(pos.PseudoRapidity()>etaMaxCUT)
return kFALSE;
211 if((p->energyEta()+p->energyPhi())/p->energy()<energyRatioCUT)
return kFALSE;
216 Bool_t AnaCuts::isEventOK(
MyEvent *ev,
const char *flag)
218 TVector3 vPos=ev->vertex();
219 Float_t ratioE=TMath::Abs(ev->energyInBarrel()+ev->momentumInTpc())>0. ?
220 ev->energyInBarrel()/(ev->energyInBarrel()+ev->momentumInTpc()) : 0.;
222 if(strcmp(flag,
"dAu")==0){
223 if(TMath::Abs(vPos.Z())>vertexzCUT)
return kFALSE;
225 if(strcmp(flag,
"pp05")==0){
226 if(TMath::Abs(ev->bbcVertexZ())>vertexzCUT)
return kFALSE;
228 if(TMath::Abs(vPos.X())>vertexxCUT)
return kFALSE;
229 if(TMath::Abs(vPos.Y())>vertexyCUT)
return kFALSE;
231 if(ev->trigger()<1)
return kFALSE;
233 if(ev->trigger()&2 || ev->trigger()&4){
234 if(ev->highTowerId()>0 && isHot[ev->highTowerId() - 1]){
235 if(ev->trigger()&1) ev->setTrigger(1);
238 if(ev->highTowerEnergy()<0.001){
239 if(ev->trigger()&1) ev->setTrigger(1);
243 if(ev->trigger()&1) ev->setTrigger(1);
247 if(ev->trigger()&4 && ev->highTowerAdc()<=ht2AdcCUT){
248 ev->setTrigger(ev->trigger()-4);
250 if(ev->trigger()&2 && ev->highTowerAdc()<=ht1AdcCUT){
256 void AnaCuts::printCuts()
258 cout<<
"----- event cuts ------"<<endl;
259 cout<<
"vertexxCUT="<<vertexxCUT<<endl;
260 cout<<
"vertexyCUT="<<vertexyCUT<<endl;
261 cout<<
"vertexzCUT="<<vertexzCUT<<endl;
262 cout<<
"ratioCUT="<<ratioCUT<<endl<<endl;
264 cout<<
"----- point cuts ------"<<endl;
265 cout<<
"neutralCUT="<<neutralCUT<<endl;
266 cout<<
"chargedCUT="<<photonCUT<<endl;
267 cout<<
"etaHitsCUT="<<etaHitsCUT<<endl;
268 cout<<
"phiHitsCUT="<<phiHitsCUT<<endl;
269 cout<<
"etaMinCUT="<<etaMinCUT<<endl;
270 cout<<
"etaMaxCUT="<<etaMaxCUT<<endl;
271 cout<<
"rapidityMinCUT="<<rapidityMinCUT<<endl;
272 cout<<
"rapidityMaxCUT="<<rapidityMaxCUT<<endl;
273 cout<<
"rapPionMinCUT="<<rapPionMinCUT<<endl;
274 cout<<
"rapPionMaxCUT="<<rapPionMaxCUT<<endl;
275 cout<<
"asymmetryCUT="<<asymmetryCUT<<endl;
276 cout<<
"ht1AdcCUT="<<ht1AdcCUT<<endl;
277 cout<<
"ht2AdcCUT="<<ht2AdcCUT<<endl<<endl;
280 cout<<endl<<
"------ binning ------"<<endl;
284 for(Int_t i=0;i<=nPtBinsMB;i++) cout<<ptBinsMB[i]<<
",";
287 for(Int_t i=0;i<=nPtBinsHT1;i++) cout<<ptBinsHT1[i]<<
",";
290 for(Int_t i=0;i<=nPtBinsHT2;i++) cout<<ptBinsHT2[i]<<
",";
293 for(Int_t i=0;i<=nPtBinsEff;i++) cout<<ptBinsEff[i]<<
",";
296 cout<<
"inv mass bins mb: "<<nMinvBinsMB<<
" "<<mInvLowMB<<
" "<<mInvHighMB<<endl;
297 cout<<
"inv mass bins ht1: "<<nMinvBinsHT1<<
" "<<mInvLowHT1<<
" "<<mInvHighHT1<<endl;
298 cout<<
"inv mass bins ht2: "<<nMinvBinsHT2<<
" "<<mInvLowHT2<<
" "<<mInvHighHT2<<endl;
301 cout<<endl<<endl<<
"------- hot towers -------"<<endl;
302 for(Int_t k=1;k<=4800;k++)
304 if(isHot[k-1]) cout<<k<<
", ";
306 cout<<endl<<
"-----------------------"<<endl<<endl<<endl;