28 #include "StHiAnalysis.h"
33 StHiAnalysis::StHiAnalysis(
const char* inputDir,
34 const char* outRootName)
44 StHiAnalysis::~StHiAnalysis()
51 StHiAnalysis::initHistograms()
53 cout <<
"StHiAnalysis::initHistograms()" << endl;
62 char title[500],name[500];
67 h1NEvent =
new TH1D(
"h1NEvent",
"h1NEvent",1,1,2);
71 h1EtaCut =
new TH1D(
"h1EtaCut",
"h1EtaCut",2,0,2);
74 h3VertexXYZ =
new TH3D(
"h3VertexXYZ",
"h3VertexXYZ",nVertexXBin,vertexXMin,vertexXMax,
75 nVertexXBin,vertexXMin,vertexXMax,
76 nVertexZEvtThinBin,vertexZEvtMin,vertexZEvtMax);
77 h3VertexXYZ->SetXTitle(
"Xvtx (cm)"); h3VertexXYZ->SetYTitle(
"Yvtx (cm)");
78 h3VertexXYZ->SetZTitle(
"Zvtx (cm)");
80 h2ZDCSumVsCTB =
new TH2D(
"h2ZDCSumVsCTB",
"h2ZDCSumVsCTB",nCtbBin,ctbMin,ctbMax,nZdcBin,zdcMin,zdcMax);
81 h2ZDCSumVsCTB->SetYTitle(
"ZDCSum"); h2ZDCSumVsCTB->SetXTitle(
"CTB");
84 h2NGoodGlobalsVsNch =
new TH2D(
"h2NGoodGlobalsVsNch",
"h2NGoodGlobalsVsNch",nNchBin,nChMin,nChMax,nNGGBin,nGGMin,nGGMax);
85 h2NGoodGlobalsVsNch->SetXTitle(
"N_{ch}"); h2NGoodGlobalsVsNch->SetYTitle(
"N_{GoodGlobals}");
87 h1FlowCent =
new TH1D(
"h1FlowCent",
"h1FlowCent",nFlowCentBin,flowCentMin,flowCentMax);
88 h1FlowCent->SetXTitle(
"Flow Centrality");
97 strcpy(name,
"h3ResPtPrGlPtPrDcaXYGl");
98 h3ResPtPrGlPtPrDcaXYGl =
100 nResPtBin,resPtMin,resPtMax,
102 nDcaXYGlWideBin,dcaXYGlWideMin,dcaXYGlWideMax);
103 h3ResPtPrGlPtPrDcaXYGl->SetXTitle(
"(Pr p_{T} - Gl p_{T})/Pr p_{T}");
104 h3ResPtPrGlPtPrDcaXYGl->SetYTitle(
"Primary p_{T} (GeV/c)");
105 h3ResPtPrGlPtPrDcaXYGl->SetZTitle(
"sDca_{XY}");
107 strcpy(name,
"h3ResPtPrGlPtGlDcaXYGl");
108 h3ResPtPrGlPtGlDcaXYGl =
110 nResPtBin,resPtMin,resPtMax,
112 nDcaXYGlWideBin,dcaXYGlWideMin,dcaXYGlWideMax);
113 h3ResPtPrGlPtGlDcaXYGl->SetXTitle(
"(Pr p_{T} - Gl p_{T})/Gl p_{T}");
114 h3ResPtPrGlPtGlDcaXYGl->SetYTitle(
"Global p_{T} (GeV/c)");
115 h3ResPtPrGlPtGlDcaXYGl->SetZTitle(
"sDca_{XY}");
117 h1FitPts =
new TH1D(
"h1FitPts",
"Fit Points",51,-0.5,50.5);
118 h1FitPts->SetXTitle(
"Fit Points");
120 h2DcaGlVsSector =
new TH2D(
"h2DcaGlVsSector",
"h2DcaGlVsSector",24,0.5,24.5,60,0,3);
121 h2DcaGlVsSector->SetXTitle(
"Sector"); h2DcaGlVsSector->SetYTitle(
"Dca_{3d}");
123 h2DcaXYGlVsSector =
new TH2D(
"h2DcaXYGlVsSector",
"h2DcaXYGlVsSector",24,0.5,24.5,60,-3,3);
124 h2DcaXYGlVsSector->SetXTitle(
"Sector"); h2DcaXYGlVsSector->SetYTitle(
"sDca_{XY}");
126 h2FitPtsVsSector =
new TH2D(
"h2FitPtsVsSector",
"h2FitPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
127 h2FitPtsVsSector->SetXTitle(
"Sector"); h2FitPtsVsSector->SetYTitle(
"Fit Points");
129 h2MaxPtsVsSector =
new TH2D(
"h2MaxPtsVsSector",
"h2MaxPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
130 h2MaxPtsVsSector->SetXTitle(
"Sector"); h2MaxPtsVsSector->SetYTitle(
"Max Points");
132 h2AllPtsVsSector =
new TH2D(
"h2AllPtsVsSector",
"h2AllPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
133 h2AllPtsVsSector->SetXTitle(
"Sector"); h2AllPtsVsSector->SetYTitle(
"All Points");
135 h1YieldVsSector =
new TH1D(
"h1YieldVsSector",
"h1YieldVsSector",24,0.5,24.5);
136 h1YieldVsSector->SetXTitle(
"Sector"); h1YieldVsSector->SetYTitle(
"Raw Yield (h^{+}+h^{-})");
138 h2PrPtVsSector =
new TH2D(
"h2PrPtVsSector",
"h2PrPtVsSector",24,0.5,24.5,20,1.5,21.5);
139 h2PrPtVsSector->SetXTitle(
"Sector"); h2PrPtVsSector->SetYTitle(
"Primary p_{T} (GeV/c)");
141 h2GlPtVsSector =
new TH2D(
"h2GlPtVsSector",
"h2GlPtVsSector",24,0.5,24.5,20,1.5,21.5);
142 h2GlPtVsSector->SetXTitle(
"Sector"); h2GlPtVsSector->SetYTitle(
"Global p_{T} (GeV/c)");
144 h2ResPrPtVsSector =
new TH2D(
"h2ResPrPtVsSector",
"h2ResPrPtVsSector",24,0.5,24.5,60,-3,3);
145 h2ResPrPtVsSector->SetXTitle(
"Sector"); h2ResPrPtVsSector->SetYTitle(
"(Pr p_{T} - Gl p_{T})/Pr p_{T}");
147 h2ResGlPtVsSector =
new TH2D(
"h2ResGlPtVsSector",
"h2ResGlPtVsSector",24,0.5,24.5,60,-3,3);
148 h2ResGlPtVsSector->SetXTitle(
"Sector"); h2ResGlPtVsSector->SetYTitle(
"(Gl p_{T} - Pr p_{T})/Gl p_{T}");
150 TString sPM[3] = {
"Plus",
"Minus",
"Charged"};
151 TString sEW[3] = {
"East",
"West",
"FullTPC"};
154 TArrayD* bins0 =
new TArrayD;
157 TArrayD* bins1 =
new TArrayD;
163 for (Int_t i=0; i < 3; i++) {
164 for(Int_t j=0; j<3; j++){
176 setName(title,
"h2CentralityPtPr",sEW[i].Data(),sPM[j].Data());
177 ew[i].pm[j].h2CentralityPtPr
178 =
new TH2D(title,title,
179 nFlowCentBin,flowCentMin,flowCentMax,
181 ew[i].pm[j].h2CentralityPtPr->SetXTitle(
"Flow Centrality");
182 ew[i].pm[j].h2CentralityPtPr->SetXTitle(
"Primary p_{T} (GeV/c)");
186 setName(name,
"h3PhiPrDcaXYGlPtPr",sEW[i].Data(),sPM[j].Data());
187 ew[i].pm[j].h3PhiPrDcaXYGlPtPr
188 =
new TH3D(name,name,
189 nPhiBin,phiMin,phiMax,
190 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
192 ew[i].pm[j].h3PhiPrDcaXYGlPtPr->SetXTitle(
"#phi_{primary}");
193 ew[i].pm[j].h3PhiPrDcaXYGlPtPr->SetYTitle(
"sDca_{XY}");
194 ew[i].pm[j].h3PhiPrDcaXYGlPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
197 setName(name,
"h3PhiGlDcaXYGlPtGl",sEW[i],sPM[j].Data());
198 ew[i].pm[j].h3PhiGlDcaXYGlPtGl
199 =
new TH3D(name,name,
200 nPhiBin,phiMin,phiMax,
201 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
203 ew[i].pm[j].h3PhiGlDcaXYGlPtGl->SetXTitle(
"#phi_{Global}");
204 ew[i].pm[j].h3PhiGlDcaXYGlPtGl->SetYTitle(
"sDca_{XY}");
205 ew[i].pm[j].h3PhiGlDcaXYGlPtGl->SetZTitle(
"Global p_{T} (GeV/c)");
209 setName(name,
"h3DcaGlDcaXYGlPtPr",sEW[i].Data(),sPM[j].Data());
210 ew[i].pm[j].h3DcaGlDcaXYGlPtPr =
212 nDcaBin,dcaMin,dcaMax,
213 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
215 ew[i].pm[j].h3DcaGlDcaXYGlPtPr->SetXTitle(
"dca_{3d}");
216 ew[i].pm[j].h3DcaGlDcaXYGlPtPr->SetYTitle(
"sDca_{XY}");
217 ew[i].pm[j].h3DcaGlDcaXYGlPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
220 setName(name,
"h3DcaGlDcaXYGlPtGl",sEW[i].Data(),sPM[j].Data());
221 ew[i].pm[j].h3DcaGlDcaXYGlPtGl =
223 nDcaBin,dcaMin,dcaMax,
224 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
226 ew[i].pm[j].h3DcaGlDcaXYGlPtGl->SetXTitle(
"sDca_{3d}");
227 ew[i].pm[j].h3DcaGlDcaXYGlPtGl->SetYTitle(
"Dca_{XY}");
228 ew[i].pm[j].h3DcaGlDcaXYGlPtGl->SetZTitle(
"Global p_{T} (GeV/c)");
232 setName(name,
"h2SDcaGlPtPrRebin",sEW[i].Data(),sPM[j].Data());
233 ew[i].pm[j].h2SDcaGlPtPrRebin =
235 nSDcaBin,sDcaMin,sDcaMax,
236 nPtRebinBin,ptRebinMin,ptRebinMax);
237 ew[i].pm[j].h2SDcaGlPtPrRebin->SetXTitle(
"Dca_{3d}");
238 ew[i].pm[j].h2SDcaGlPtPrRebin->SetYTitle(
"Primary p_{T} (GeV/c)");
241 setName(name,
"h2DcaXYGlPtPrRebin",sEW[i].Data(),sPM[j].Data());
242 ew[i].pm[j].h2DcaXYGlPtPrRebin =
244 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
245 nPtRebinBin,ptRebinMin,ptRebinMax);
246 ew[i].pm[j].h2DcaXYGlPtPrRebin->SetXTitle(
"Dca_{3d}");
247 ew[i].pm[j].h2DcaXYGlPtPrRebin->SetYTitle(
"Primary p_{T} (GeV/c)");
250 setName(name,
"h2DcaGlPtPrRebin",sEW[i].Data(),sPM[j].Data());
251 ew[i].pm[j].h2DcaGlPtPrRebin
252 =
new TH2D(name,name,
253 nDcaBin,dcaMin,dcaMax,
254 nPtRebinBin,ptRebinMin,ptRebinMax);
255 ew[i].pm[j].h2DcaGlPtPrRebin->SetXTitle(
"Dca_{3d}");
256 ew[i].pm[j].h2DcaGlPtPrRebin->SetYTitle(
"Primary p_{T} (GeV/c)");
260 setName(name,
"h3PhiPrFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
261 ew[i].pm[j].h3PhiPrFitPtsPtPr =
263 nPhiBin,phiMin,phiMax,
264 nFitPtsBin,fitPtsMin,fitPtsMax,
266 ew[i].pm[j].h3PhiPrFitPtsPtPr->SetXTitle(
"#phi_{Primary}");
267 ew[i].pm[j].h3PhiPrFitPtsPtPr->SetYTitle(
"Fit Points");
268 ew[i].pm[j].h3PhiPrFitPtsPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
272 setName(name,
"h3PhiPrAllPtsPtPr",sEW[i].Data(),sPM[j].Data());
273 ew[i].pm[j].h3PhiPrAllPtsPtPr =
275 nPhiBin,phiMin,phiMax,
276 nFitPtsBin,fitPtsMin,fitPtsMax,
278 ew[i].pm[j].h3PhiPrAllPtsPtPr->SetXTitle(
"#phi_{Primary}");
279 ew[i].pm[j].h3PhiPrAllPtsPtPr->SetYTitle(
"All Points");
280 ew[i].pm[j].h3PhiPrAllPtsPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
284 setName(name,
"h3PhiPrMaxPtsPtPr",sEW[i].Data(),sPM[j].Data());
285 ew[i].pm[j].h3PhiPrMaxPtsPtPr =
287 nPhiBin,phiMin,phiMax,
288 nFitPtsBin,fitPtsMin,fitPtsMax,
290 ew[i].pm[j].h3PhiPrMaxPtsPtPr->SetXTitle(
"#phi_{Primary}");
291 ew[i].pm[j].h3PhiPrMaxPtsPtPr->SetYTitle(
"Max Points");
292 ew[i].pm[j].h3PhiPrMaxPtsPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
296 setName(name,
"h3VtxZFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
297 ew[i].pm[j].h3VtxZFitPtsPtPr =
299 nVertexZWideBin,vertexZWideMin,vertexZWideMax,
300 nFitPtsBin,fitPtsMin,fitPtsMax,
302 ew[i].pm[j].h3VtxZFitPtsPtPr->SetXTitle(
"Z_{vtx} (cm)");
303 ew[i].pm[j].h3VtxZFitPtsPtPr->SetYTitle(
"Fit Points");
304 ew[i].pm[j].h3VtxZFitPtsPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
308 setName(name,
"h3VtxZFitPtsEtaPr",sEW[i].Data(),sPM[j].Data());
309 ew[i].pm[j].h3VtxZFitPtsEtaPr =
311 nVertexZWideBin,vertexZWideMin,vertexZWideMax,
312 nFitPtsBin,fitPtsMin,fitPtsMax,
313 nEtaBin,etaMin,etaMax);
314 ew[i].pm[j].h3VtxZFitPtsEtaPr->SetXTitle(
"Zvtx (cm)");
315 ew[i].pm[j].h3VtxZFitPtsEtaPr->SetYTitle(
"Fit Points");
316 ew[i].pm[j].h3VtxZFitPtsEtaPr->SetZTitle(
"#eta_{Primary}");
320 setName(name,
"h3FlowCentFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
321 ew[i].pm[j].h3FlowCentFitPtsPtPr =
323 nFlowCentBin,flowCentMin,flowCentMax,
324 nFitPtsCentBin,fitPtsCentMin,fitPtsCentMax,
326 ew[i].pm[j].h3FlowCentFitPtsPtPr->SetXTitle(
"Flow Centrality");
327 ew[i].pm[j].h3FlowCentFitPtsPtPr->SetYTitle(
"Fit Points");
328 ew[i].pm[j].h3FlowCentFitPtsPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
332 setName(name,
"h3VtxZEtaPrPtPr",sEW[i].Data(),sPM[j].Data());
333 ew[i].pm[j].h3VtxZEtaPrPtPr
334 =
new TH3D(name,name,
335 nVertexZBin,vertexZMin,vertexZMax,
336 nEtaSmallBin,etaSmallMin,etaSmallMax,
338 ew[i].pm[j].h3VtxZEtaPrPtPr->SetXTitle(
"Zvtx (cm)");
339 ew[i].pm[j].h3VtxZEtaPrPtPr->SetYTitle(
"#eta_{Primary}");
340 ew[i].pm[j].h3VtxZEtaPrPtPr->SetZTitle(
"Primary p_{T} (GeV/c)");
343 setName(name,
"h3VtxZEtaGlPtGl",sEW[i].Data(),sPM[j].Data());
344 ew[i].pm[j].h3VtxZEtaGlPtGl
345 =
new TH3D(name,name,
346 nVertexZBin,vertexZMin,vertexZMax,
347 nEtaSmallBin,etaSmallMin,etaSmallMax,
349 ew[i].pm[j].h3VtxZEtaGlPtGl->SetXTitle(
"Zvtx (cm)");
350 ew[i].pm[j].h3VtxZEtaGlPtGl->SetYTitle(
"#eta_{Global}");
351 ew[i].pm[j].h3VtxZEtaGlPtGl->SetZTitle(
"Global p_{T} (GeV/c)");
355 setName(name,
"RawPtGlVarBin0",sEW[i].Data(),sPM[j].Data());
356 ew[i].pm[j].h1RawPtGlVarBin0
357 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
358 ew[i].pm[j].h1RawPtGlVarBin0->SetXTitle(
"Global p_{T} (GeV/c)");
359 ew[i].pm[j].h1RawPtGlVarBin0->Sumw2();
361 setName(name,
"RawPtGlVarBin1",sEW[i].Data(),sPM[j].Data());
362 ew[i].pm[j].h1RawPtGlVarBin1
363 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
364 ew[i].pm[j].h1RawPtGlVarBin1->SetXTitle(
"Global p_{T} (GeV/c)");
365 ew[i].pm[j].h1RawPtGlVarBin1->Sumw2();
367 setName(name,
"RawPtPrVarBin0",sEW[i].Data(),sPM[j].Data());
368 ew[i].pm[j].h1RawPtPrVarBin0
369 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
370 ew[i].pm[j].h1RawPtPrVarBin0->SetXTitle(
"Primary p_{T} (GeV/c)");
371 ew[i].pm[j].h1RawPtPrVarBin0->Sumw2();
373 setName(name,
"RawPtPrVarBin1",sEW[i].Data(),sPM[j].Data());
374 ew[i].pm[j].h1RawPtPrVarBin1
375 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
376 ew[i].pm[j].h1RawPtPrVarBin1->SetXTitle(
"Primary p_{T} (GeV/c)");
377 ew[i].pm[j].h1RawPtPrVarBin1->Sumw2();
380 setName(name,
"OneOverPtGlVarBin0",sEW[i].Data(),sPM[j].Data());
381 ew[i].pm[j].h1OneOverPtGlVarBin0
382 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
383 ew[i].pm[j].h1OneOverPtGlVarBin0->SetXTitle(
"Global p_{T} (GeV/c)");
384 ew[i].pm[j].h1OneOverPtGlVarBin0->Sumw2();
386 setName(name,
"OneOverPtGlVarBin1",sEW[i].Data(),sPM[j].Data());
387 ew[i].pm[j].h1OneOverPtGlVarBin1
388 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
389 ew[i].pm[j].h1OneOverPtGlVarBin1->SetXTitle(
"Global p_{T} (GeV/c)");
390 ew[i].pm[j].h1OneOverPtGlVarBin1->Sumw2();
392 setName(name,
"OneOverPtPrVarBin0",sEW[i].Data(),sPM[j].Data());
393 ew[i].pm[j].h1OneOverPtPrVarBin0
394 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
395 ew[i].pm[j].h1OneOverPtPrVarBin0->SetXTitle(
"Primary p_{T} (GeV/c)");
396 ew[i].pm[j].h1OneOverPtPrVarBin0->Sumw2();
398 setName(name,
"OneOverPtPrVarBin1",sEW[i].Data(),sPM[j].Data());
399 ew[i].pm[j].h1OneOverPtPrVarBin1
400 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
401 ew[i].pm[j].h1OneOverPtPrVarBin1->SetXTitle(
"Primary p_{T} (GeV/c)");
402 ew[i].pm[j].h1OneOverPtPrVarBin1->Sumw2();
405 setName(name,
"WeightedMeanPtGlVarBin0",sEW[i].Data(),sPM[j].Data());
406 ew[i].pm[j].h1WeightedMeanPtGlVarBin0
407 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
408 ew[i].pm[j].h1WeightedMeanPtGlVarBin0->SetXTitle(
"Global p_{T} (GeV/c)");
409 ew[i].pm[j].h1WeightedMeanPtGlVarBin0->Sumw2();
411 setName(name,
"WeightedMeanPtGlVarBin1",sEW[i].Data(),sPM[j].Data());
412 ew[i].pm[j].h1WeightedMeanPtGlVarBin1
413 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
414 ew[i].pm[j].h1WeightedMeanPtGlVarBin1->SetXTitle(
"Global p_{T} (GeV/c)");
415 ew[i].pm[j].h1WeightedMeanPtGlVarBin1->Sumw2();
417 setName(name,
"WeightedMeanPtPrVarBin0",sEW[i].Data(),sPM[j].Data());
418 ew[i].pm[j].h1WeightedMeanPtPrVarBin0
419 =
new TH1D(name,name,bins0->GetSize()-1,bins0->GetArray());
420 ew[i].pm[j].h1WeightedMeanPtPrVarBin0->SetXTitle(
"Primary p_{T} (GeV/c)");
421 ew[i].pm[j].h1WeightedMeanPtPrVarBin0->Sumw2();
423 setName(name,
"WeightedMeanPtPrVarBin1",sEW[i].Data(),sPM[j].Data());
424 ew[i].pm[j].h1WeightedMeanPtPrVarBin1
425 =
new TH1D(name,name,bins1->GetSize()-1,bins1->GetArray());
426 ew[i].pm[j].h1WeightedMeanPtPrVarBin1->SetXTitle(
"Primary p_{T} (GeV/c)");
427 ew[i].pm[j].h1WeightedMeanPtPrVarBin1->Sumw2();
439 StHiAnalysis::trackLoop()
444 cout <<
"StHiAnalysis::trackLoop()" << endl;
447 Float_t vertexZ = mHiMicroEvent->VertexZ();
449 Float_t flowCent = flowCentrality(mHiMicroEvent->NUncorrectedPrimaries());
451 Int_t nTrack = mHiMicroEvent->NTrack();
454 for(Int_t i=0; i<nTrack; i++){
457 Int_t iCharge = (track->Charge()>0) ? 0 : 1;
459 Float_t ptPr = track->PtPr();
460 Float_t ptGl = track->PtGl();
461 Float_t resPtPrGlPr = (ptPr-ptGl)/ptPr;
462 Float_t resPtPrGlGl = (ptPr-ptGl)/ptGl;
464 Float_t etaGl = track->EtaGl();
465 Float_t etaPr = track->EtaPr();
467 Float_t phiPr = track->PhiPr();
468 Float_t phiGl = track->PhiGl();
472 Float_t sector = track->FirstSector();
474 Float_t sDcaGl = (track->DcaXYGl()>0) ? track->DcaGl() : -track->DcaGl();
475 Float_t dcaXYGl = track->DcaXYGl();
476 Float_t dcaGl = track->DcaGl();
478 Float_t fitPts = track->FitPts();
479 Float_t allPts = track->AllPts();
480 Float_t maxPts = track->MaxPossPts();
482 h1FitPts->Fill(fitPts);
484 if(CutRc::AcceptEta(track) && CutRc::AcceptFirstPadrow(track) && CutRc::AcceptSameSector(track)) {
486 if(CutRc::AcceptSDcaGl(track)) {
487 h2FitPtsVsSector->Fill(sector,fitPts);
488 h2MaxPtsVsSector->Fill(sector,maxPts);
489 h2AllPtsVsSector->Fill(sector,allPts);
491 if(CutRc::AcceptFitPts(track)) {
492 h2DcaGlVsSector->Fill(sector,dcaGl);
493 h2DcaXYGlVsSector->Fill(sector,dcaXYGl);
498 if(CutRc::Accept(track)) {
499 h1YieldVsSector->Fill(sector);
500 h2PrPtVsSector->Fill(sector,ptPr);
501 h2GlPtVsSector->Fill(sector,ptGl);
502 h2ResPrPtVsSector->Fill(sector,resPtPrGlPr);
503 h2ResGlPtVsSector->Fill(sector,resPtPrGlGl);
510 if(CutRc::AcceptNoEta(track)){
511 if(CutRc::AcceptEastSideTrack(track)) {
512 ew[0].pm[iCharge].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
513 ew[0].pm[iCharge].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
514 ew[0].pm[2].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
515 ew[0].pm[2].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
517 if(CutRc::AcceptWestSideTrack(track)) {
518 ew[1].pm[iCharge].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
519 ew[1].pm[iCharge].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
520 ew[1].pm[2].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
521 ew[1].pm[2].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
523 ew[2].pm[2].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
524 ew[2].pm[2].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
525 ew[2].pm[iCharge].h3VtxZEtaPrPtPr->Fill(vertexZ,etaPr,ptPr);
526 ew[2].pm[iCharge].h3VtxZEtaGlPtGl->Fill(vertexZ,etaGl,ptGl);
531 if(CutRc::AcceptEta(track)){
532 if(CutRc::AcceptFitPts(track)){
534 if(CutRc::AcceptEastSideTrack(track)) {
536 ew[0].pm[iCharge].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
537 ew[0].pm[iCharge].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
538 ew[0].pm[2].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
539 ew[0].pm[2].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
541 ew[0].pm[iCharge].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
542 ew[0].pm[iCharge].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
543 ew[0].pm[2].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
544 ew[0].pm[2].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
546 ew[0].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
547 ew[0].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
549 ew[0].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
550 ew[0].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
552 if(CutRc::AcceptWestSideTrack(track)) {
554 ew[1].pm[iCharge].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
555 ew[1].pm[iCharge].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
556 ew[1].pm[2].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
557 ew[1].pm[2].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
559 ew[1].pm[iCharge].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
560 ew[1].pm[iCharge].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
561 ew[1].pm[2].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
562 ew[1].pm[2].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
564 ew[1].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
565 ew[1].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
567 ew[1].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
568 ew[1].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
571 ew[2].pm[2].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
572 ew[2].pm[2].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
573 ew[2].pm[iCharge].h3PhiPrDcaXYGlPtPr->Fill(phiPr,dcaXYGl,ptPr);
574 ew[2].pm[iCharge].h3PhiGlDcaXYGlPtGl->Fill(phiGl,dcaXYGl,ptGl);
576 ew[2].pm[2].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
577 ew[2].pm[2].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
578 ew[2].pm[iCharge].h3DcaGlDcaXYGlPtPr->Fill(dcaGl,dcaXYGl,ptPr);
579 ew[2].pm[iCharge].h3DcaGlDcaXYGlPtGl->Fill(dcaGl,dcaXYGl,ptGl);
581 ew[2].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
582 ew[2].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
584 ew[2].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
585 ew[2].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
589 h3ResPtPrGlPtPrDcaXYGl->Fill(resPtPrGlPr,ptPr,dcaXYGl);
590 h3ResPtPrGlPtGlDcaXYGl->Fill(resPtPrGlGl,ptGl,dcaXYGl);
595 if(CutRc::AcceptSDcaGl(track)){
596 if(CutRc::AcceptEastSideTrack(track)) {
598 ew[0].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
599 ew[0].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
601 ew[0].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
602 ew[0].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
604 ew[0].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
605 ew[0].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
607 ew[0].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
608 ew[0].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
610 if(CutRc::AcceptWestSideTrack(track)) {
612 ew[1].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
613 ew[1].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
615 ew[1].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
616 ew[1].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
618 ew[1].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
619 ew[1].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
621 ew[1].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
622 ew[1].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
625 ew[2].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
626 ew[2].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
628 ew[2].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
629 ew[2].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
631 ew[2].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
632 ew[2].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
634 ew[2].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
635 ew[2].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
641 if(CutRc::AcceptSDcaGl(track) && fabs(etaPr)<.1){
643 if(CutRc::AcceptEastSideTrack(track)) {
644 ew[0].pm[iCharge].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
645 ew[0].pm[2].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
647 if(CutRc::AcceptWestSideTrack(track)) {
648 ew[1].pm[iCharge].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
649 ew[1].pm[2].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
651 ew[2].pm[2].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
652 ew[2].pm[iCharge].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
656 if(CutRc::AcceptSDcaGl(track) && ptPr>4 && ptPr<6){
658 if(CutRc::AcceptEastSideTrack(track)) {
659 ew[0].pm[iCharge].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
660 ew[0].pm[2].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
662 if(CutRc::AcceptWestSideTrack(track)) {
663 ew[1].pm[iCharge].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
664 ew[1].pm[2].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
666 ew[2].pm[2].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
667 ew[2].pm[iCharge].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
671 if(CutRc::Accept(track)){
673 if(CutRc::AcceptEastSideTrack(track)) {
674 ew[0].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
675 ew[0].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
678 ew[0].pm[iCharge].h1RawPtGlVarBin0->Fill(ptGl);
679 ew[0].pm[iCharge].h1RawPtGlVarBin1->Fill(ptGl);
680 ew[0].pm[2].h1RawPtGlVarBin0->Fill(ptGl);
681 ew[0].pm[2].h1RawPtGlVarBin1->Fill(ptGl);
683 ew[0].pm[iCharge].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
684 ew[0].pm[iCharge].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
685 ew[0].pm[2].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
686 ew[0].pm[2].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
688 ew[0].pm[iCharge].h1RawPtPrVarBin0->Fill(ptPr);
689 ew[0].pm[iCharge].h1RawPtPrVarBin1->Fill(ptPr);
690 ew[0].pm[2].h1RawPtPrVarBin0->Fill(ptPr);
691 ew[0].pm[2].h1RawPtPrVarBin1->Fill(ptPr);
693 ew[0].pm[iCharge].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
694 ew[0].pm[iCharge].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
695 ew[0].pm[2].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
696 ew[0].pm[2].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
698 if(CutRc::AcceptWestSideTrack(track)) {
699 ew[1].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
700 ew[1].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
703 ew[1].pm[iCharge].h1RawPtGlVarBin0->Fill(ptGl);
704 ew[1].pm[iCharge].h1RawPtGlVarBin1->Fill(ptGl);
705 ew[1].pm[2].h1RawPtGlVarBin0->Fill(ptGl);
706 ew[1].pm[2].h1RawPtGlVarBin1->Fill(ptGl);
708 ew[1].pm[iCharge].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
709 ew[1].pm[iCharge].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
710 ew[1].pm[2].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
711 ew[1].pm[2].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
713 ew[1].pm[iCharge].h1RawPtPrVarBin0->Fill(ptPr);
714 ew[1].pm[iCharge].h1RawPtPrVarBin1->Fill(ptPr);
715 ew[1].pm[2].h1RawPtPrVarBin0->Fill(ptPr);
716 ew[1].pm[2].h1RawPtPrVarBin1->Fill(ptPr);
718 ew[1].pm[iCharge].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
719 ew[1].pm[iCharge].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
720 ew[1].pm[2].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
721 ew[1].pm[2].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
723 ew[2].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
724 ew[2].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
727 ew[2].pm[2].h1RawPtGlVarBin0->Fill(ptGl);
728 ew[2].pm[2].h1RawPtGlVarBin1->Fill(ptGl);
729 ew[2].pm[iCharge].h1RawPtGlVarBin0->Fill(ptGl);
730 ew[2].pm[iCharge].h1RawPtGlVarBin1->Fill(ptGl);
732 ew[2].pm[2].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
733 ew[2].pm[2].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
734 ew[2].pm[iCharge].h1OneOverPtGlVarBin0->Fill(ptGl,1./ptGl);
735 ew[2].pm[iCharge].h1OneOverPtGlVarBin1->Fill(ptGl,1./ptGl);
737 ew[2].pm[2].h1RawPtPrVarBin0->Fill(ptPr);
738 ew[2].pm[2].h1RawPtPrVarBin1->Fill(ptPr);
739 ew[2].pm[iCharge].h1RawPtPrVarBin0->Fill(ptPr);
740 ew[2].pm[iCharge].h1RawPtPrVarBin1->Fill(ptPr);
742 ew[2].pm[2].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
743 ew[2].pm[2].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
744 ew[2].pm[iCharge].h1OneOverPtPrVarBin0->Fill(ptPr,1./ptPr);
745 ew[2].pm[iCharge].h1OneOverPtPrVarBin1->Fill(ptPr,1./ptPr);
751 cout <<
"\ttracks : " << nTrack << endl;
757 StHiAnalysis::fillEventHistograms()
759 Float_t flowCent = flowCentrality(mHiMicroEvent->NUncorrectedPrimaries());
760 Float_t Nch = mHiMicroEvent->NUncorrectedPrimaries();
761 Float_t NGoodGlobals = mHiMicroEvent->NGoodGlobals();
762 Float_t ZDCSum = mHiMicroEvent->ZDCe() + mHiMicroEvent->ZDCw();
763 Float_t CTB = mHiMicroEvent->CTB();
764 Float_t zvtx = mHiMicroEvent->VertexZ();
765 Float_t yvtx = mHiMicroEvent->VertexY();
766 Float_t xvtx = mHiMicroEvent->VertexX();
770 if (CutRc::AcceptTrgWord(mHiMicroEvent)) {
771 if(CutRc::AcceptCent(mHiMicroEvent)) {
772 h3VertexXYZ->Fill(xvtx,yvtx,zvtx);
774 if(CutRc::AcceptVertexZ(mHiMicroEvent)) {
775 h1FlowCent->Fill(flowCent);
776 h2ZDCSumVsCTB->Fill(CTB,ZDCSum);
779 if (acceptEvent(mHiMicroEvent)) {
780 h2NGoodGlobalsVsNch->Fill(Nch,NGoodGlobals);
788 StHiAnalysis::finishHistograms()
790 h1NEvent->SetBinContent(1,mNEventAccepted);
791 h1EtaCut->SetBinContent(1,CutRc::mEta[0]);
792 h1EtaCut->SetBinContent(2,CutRc::mEta[1]);
795 for (
int iEW = 0; iEW < 3; iEW++) {
796 for (
int iPM = 0; iPM < 3; iPM++) {
797 ew[iEW].pm[iPM].h1WeightedMeanPtGlVarBin0->Divide(ew[iEW].pm[iPM].h1RawPtGlVarBin0,ew[iEW].pm[iPM].h1OneOverPtGlVarBin0);
798 ew[iEW].pm[iPM].h1WeightedMeanPtGlVarBin1->Divide(ew[iEW].pm[iPM].h1RawPtGlVarBin1,ew[iEW].pm[iPM].h1OneOverPtGlVarBin1);
799 ew[iEW].pm[iPM].h1WeightedMeanPtPrVarBin0->Divide(ew[iEW].pm[iPM].h1RawPtPrVarBin0,ew[iEW].pm[iPM].h1OneOverPtPrVarBin0);
800 ew[iEW].pm[iPM].h1WeightedMeanPtPrVarBin1->Divide(ew[iEW].pm[iPM].h1RawPtPrVarBin1,ew[iEW].pm[iPM].h1OneOverPtPrVarBin1);