StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHiAnalysis.cxx
1 /***************************************************************************
2  *
3  * $Id: StHiAnalysis.cxx,v 1.7 2002/06/13 01:14:25 jklay Exp $
4  *
5  * Author: Bum Choi, UT Austin, Apr 2002
6  *
7  ***************************************************************************
8  *
9  * Description: Class to perform highpt Analysis on highpt uDSTs
10  *
11  *
12  ***************************************************************************
13  *
14  * $Log: StHiAnalysis.cxx,v $
15  * Revision 1.7 2002/06/13 01:14:25 jklay
16  * Combined Spectra histos into analysis
17  *
18  * Revision 1.2 2002/04/03 00:23:27 jklay
19  * Fixed private member access bugs in analysis code
20  *
21  * Revision 1.1 2002/04/02 20:05:18 jklay
22  * Bums analysis tools for highpt uDSTs
23  *
24  *
25  * NOTE: Sector is now computed from Phi
26  *
27  **************************************************************************/
28 #include "StHiAnalysis.h"
29 
30 
31 //__________________
32 
33 StHiAnalysis::StHiAnalysis(const char* inputDir,
34  const char* outRootName)
35  : StHiBaseAnalysis(inputDir,outRootName)
36 
37 {
38 
39 
40 }
41 
42 //__________________
43 
44 StHiAnalysis::~StHiAnalysis()
45 {
46 }
47 
48 //_____________________________
49 
50 void
51 StHiAnalysis::initHistograms()
52 {
53  cout << "StHiAnalysis::initHistograms()" << endl;
54 
55  //***********************
56 
57  using namespace Bin;
58 
59  //***********************
60 
61  // gStyle->SetPalette(1,0);
62  char title[500],name[500];
63 
64  //********************************************************
65  // number of events used to scale the spectra
66 
67  h1NEvent = new TH1D("h1NEvent","h1NEvent",1,1,2);
68 
69  // eta cut
70 
71  h1EtaCut = new TH1D("h1EtaCut","h1EtaCut",2,0,2);
72 
73  //**********Event Histograms
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)");
79 
80  h2ZDCSumVsCTB = new TH2D("h2ZDCSumVsCTB","h2ZDCSumVsCTB",nCtbBin,ctbMin,ctbMax,nZdcBin,zdcMin,zdcMax);
81  h2ZDCSumVsCTB->SetYTitle("ZDCSum"); h2ZDCSumVsCTB->SetXTitle("CTB");
82 
83  //Event histos after event cuts...
84  h2NGoodGlobalsVsNch = new TH2D("h2NGoodGlobalsVsNch","h2NGoodGlobalsVsNch",nNchBin,nChMin,nChMax,nNGGBin,nGGMin,nGGMax);
85  h2NGoodGlobalsVsNch->SetXTitle("N_{ch}"); h2NGoodGlobalsVsNch->SetYTitle("N_{GoodGlobals}");
86 
87  h1FlowCent = new TH1D("h1FlowCent","h1FlowCent",nFlowCentBin,flowCentMin,flowCentMax);
88  h1FlowCent->SetXTitle("Flow Centrality");
89 
90  //--------------------------------------------------
91  //Track histograms
92  //--------------------------------------------------
93 
94  //********************************************************
95  // both charges
96 
97  strcpy(name,"h3ResPtPrGlPtPrDcaXYGl");
98  h3ResPtPrGlPtPrDcaXYGl =
99  new TH3D(name,name,
100  nResPtBin,resPtMin,resPtMax,
101  nPtBin,ptMin,ptMax,
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}");
106 
107  strcpy(name,"h3ResPtPrGlPtGlDcaXYGl");
108  h3ResPtPrGlPtGlDcaXYGl =
109  new TH3D(name,name,
110  nResPtBin,resPtMin,resPtMax,
111  nPtBin,ptMin,ptMax,
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}");
116 
117  h1FitPts = new TH1D("h1FitPts","Fit Points",51,-0.5,50.5);
118  h1FitPts->SetXTitle("Fit Points");
119 
120  h2DcaGlVsSector = new TH2D("h2DcaGlVsSector","h2DcaGlVsSector",24,0.5,24.5,60,0,3);
121  h2DcaGlVsSector->SetXTitle("Sector"); h2DcaGlVsSector->SetYTitle("Dca_{3d}");
122 
123  h2DcaXYGlVsSector = new TH2D("h2DcaXYGlVsSector","h2DcaXYGlVsSector",24,0.5,24.5,60,-3,3);
124  h2DcaXYGlVsSector->SetXTitle("Sector"); h2DcaXYGlVsSector->SetYTitle("sDca_{XY}");
125 
126  h2FitPtsVsSector = new TH2D("h2FitPtsVsSector","h2FitPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
127  h2FitPtsVsSector->SetXTitle("Sector"); h2FitPtsVsSector->SetYTitle("Fit Points");
128 
129  h2MaxPtsVsSector = new TH2D("h2MaxPtsVsSector","h2MaxPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
130  h2MaxPtsVsSector->SetXTitle("Sector"); h2MaxPtsVsSector->SetYTitle("Max Points");
131 
132  h2AllPtsVsSector = new TH2D("h2AllPtsVsSector","h2AllPtsVsSector",24,0.5,24.5,51,-0.5,50.5);
133  h2AllPtsVsSector->SetXTitle("Sector"); h2AllPtsVsSector->SetYTitle("All Points");
134 
135  h1YieldVsSector = new TH1D("h1YieldVsSector","h1YieldVsSector",24,0.5,24.5);
136  h1YieldVsSector->SetXTitle("Sector"); h1YieldVsSector->SetYTitle("Raw Yield (h^{+}+h^{-})");
137 
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)");
140 
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)");
143 
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}");
146 
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}");
149 
150  TString sPM[3] = { "Plus","Minus","Charged"};
151  TString sEW[3] = { "East","West","FullTPC"};
152 
153  //*** init var bin 0
154  TArrayD* bins0 = new TArrayD;
155  initPtAry(bins0,0);
156  //*** init var bin 0
157  TArrayD* bins1 = new TArrayD;
158  initPtAry(bins1,1);
159 
160  // east/west
161  // plus/minus
162 
163  for (Int_t i=0; i < 3; i++) {
164  for(Int_t j=0; j<3; j++){
165 
166  //******** centrality dependence of pt yields
167 // setName(title,"h2ZDCCentralityPtPr",sEW[i].Data(),sPM[j].Data());
168 // ew[i].pm[j].h2ZDCCentralityPtPr
169 // = new TH2D(title,title,
170 // nZdcCentBin,zdcCentMin,zdcCentMax,
171 // nPtBin,ptMin,ptMax);
172 // ew[i].pm[j].h2ZDCCentralityPtPr->SetXTitle("ZDC Centrality");
173 // ew[i].pm[j].h2ZDCCentralityPtPr->SetXTitle("Primary p_{T} (GeV/c)");
174 // ew[i].pm[j].h2ZDCCentralityPtPr->Sumw2();
175 
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,
180  nPtBin,ptMin,ptMax);
181  ew[i].pm[j].h2CentralityPtPr->SetXTitle("Flow Centrality");
182  ew[i].pm[j].h2CentralityPtPr->SetXTitle("Primary p_{T} (GeV/c)");
183 // ew[i].pm[j].h2CentralityPtPr->Sumw2();
184 
185  //******** sector and global dca xy
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,
191  nPtBin,ptMin,ptMax);
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)");
195 // ew[i].pm[j].h3PhiPrDcaXYGlPtPr->Sumw2();
196 
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,
202  nPtBin,ptMin,ptMax);
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)");
206 // ew[i].pm[j].h3PhiGlDcaXYGlPtGl->Sumw2();
207 
208  //********** 3d dca, dca xy ,pt
209  setName(name,"h3DcaGlDcaXYGlPtPr",sEW[i].Data(),sPM[j].Data());
210  ew[i].pm[j].h3DcaGlDcaXYGlPtPr =
211  new TH3D(name,name,
212  nDcaBin,dcaMin,dcaMax,
213  nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
214  nPtBin,ptMin,ptMax);
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)");
218 // ew[i].pm[j].h3DcaGlDcaXYGlPtPr->Sumw2();
219 
220  setName(name,"h3DcaGlDcaXYGlPtGl",sEW[i].Data(),sPM[j].Data());
221  ew[i].pm[j].h3DcaGlDcaXYGlPtGl =
222  new TH3D(name,name,
223  nDcaBin,dcaMin,dcaMax,
224  nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
225  nPtBin,ptMin,ptMax);
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)");
229 // ew[i].pm[j].h3DcaGlDcaXYGlPtGl->Sumw2();
230 
231  // for backgrounds
232  setName(name,"h2SDcaGlPtPrRebin",sEW[i].Data(),sPM[j].Data());
233  ew[i].pm[j].h2SDcaGlPtPrRebin =
234  new TH2D(name,name,
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)");
239 // ew[i].pm[j].h2SDcaGlPtPrRebin->Sumw2();
240 
241  setName(name,"h2DcaXYGlPtPrRebin",sEW[i].Data(),sPM[j].Data());
242  ew[i].pm[j].h2DcaXYGlPtPrRebin =
243  new TH2D(name,name,
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)");
248 // ew[i].pm[j].h2DcaXYGlPtPrRebin->Sumw2();
249 
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)");
257 // ew[i].pm[j].h2DcaGlPtPrRebin->Sumw2();
258 
259  //********** PhiPr , fit pts, pt
260  setName(name,"h3PhiPrFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
261  ew[i].pm[j].h3PhiPrFitPtsPtPr =
262  new TH3D(name,name,
263  nPhiBin,phiMin,phiMax,
264  nFitPtsBin,fitPtsMin,fitPtsMax,
265  nPtBin,ptMin,ptMax);
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)");
269 // ew[i].pm[j].h3PhiPrFitPtsPtPr->Sumw2();
270 
271  //********** sector , all pts, pt
272  setName(name,"h3PhiPrAllPtsPtPr",sEW[i].Data(),sPM[j].Data());
273  ew[i].pm[j].h3PhiPrAllPtsPtPr =
274  new TH3D(name,name,
275  nPhiBin,phiMin,phiMax,
276  nFitPtsBin,fitPtsMin,fitPtsMax,
277  nPtBin,ptMin,ptMax);
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)");
281 // ew[i].pm[j].h3PhiPrAllPtsPtPr->Sumw2();
282 
283  //********** sector , max pts, pt
284  setName(name,"h3PhiPrMaxPtsPtPr",sEW[i].Data(),sPM[j].Data());
285  ew[i].pm[j].h3PhiPrMaxPtsPtPr =
286  new TH3D(name,name,
287  nPhiBin,phiMin,phiMax,
288  nFitPtsBin,fitPtsMin,fitPtsMax,
289  nPtBin,ptMin,ptMax);
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)");
293 // ew[i].pm[j].h3PhiPrMaxPtsPtPr->Sumw2();
294 
295  //********** vtx z, fit pts, pt
296  setName(name,"h3VtxZFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
297  ew[i].pm[j].h3VtxZFitPtsPtPr =
298  new TH3D(name,name,
299  nVertexZWideBin,vertexZWideMin,vertexZWideMax,
300  nFitPtsBin,fitPtsMin,fitPtsMax,
301  nPtBin,ptMin,ptMax);
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)");
305 // ew[i].pm[j].h3VtxZFitPtsPtPr->Sumw2();
306 
307  //********* vtx z, fit pts, eta
308  setName(name,"h3VtxZFitPtsEtaPr",sEW[i].Data(),sPM[j].Data());
309  ew[i].pm[j].h3VtxZFitPtsEtaPr =
310  new TH3D(name,name,
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}");
317 // ew[i].pm[j].h3VtxZFitPtsEtaPr->Sumw2();
318 
319  //********** flow cent, fit pts, pt pr
320  setName(name,"h3FlowCentFitPtsPtPr",sEW[i].Data(),sPM[j].Data());
321  ew[i].pm[j].h3FlowCentFitPtsPtPr =
322  new TH3D(name,name,
323  nFlowCentBin,flowCentMin,flowCentMax,
324  nFitPtsCentBin,fitPtsCentMin,fitPtsCentMax,
325  nPtBin,ptMin,ptMax);
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)");
329 // ew[i].pm[j].h3FlowCentFitPtsPtPr->Sumw2();
330 
331  //********** vtx, eta, pt
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,
337  nPtBin,ptMin,ptMax);
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)");
341 // ew[i].pm[j].h3VtxZEtaPrPtPr->Sumw2();
342 
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,
348  nPtBin,ptMin,ptMax);
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)");
352 // ew[i].pm[j].h3VtxZEtaGlPtGl->Sumw2();
353 
354  // varying bins RAW spectra
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();
360 
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();
366 
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();
372 
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();
378 
379  // varying bins ONEOVERPT spectra
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();
385 
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();
391 
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();
397 
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();
403 
404  // varying bins WEIGHTEDMEAN spectra
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();
410 
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();
416 
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();
422 
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();
428 
429  } //PM
430  } //EW
431 
432 
433 
434 }
435 //______________________
436 
437 
438 void
439 StHiAnalysis::trackLoop()
440 {
441  //Standard event cut on vertexZ, centrality and triggerword are already done
442 
443  if(mDebug)
444  cout << "StHiAnalysis::trackLoop()" << endl;
445 
446  //Need this for EAST/WEST analysis
447  Float_t vertexZ = mHiMicroEvent->VertexZ();
448 
449  Float_t flowCent = flowCentrality(mHiMicroEvent->NUncorrectedPrimaries());
450 
451  Int_t nTrack = mHiMicroEvent->NTrack();
453 
454  for(Int_t i=0; i<nTrack; i++){
455  track =(StHiMicroTrack*) mHiMicroEvent->tracks()->At(i);
456 
457  Int_t iCharge = (track->Charge()>0) ? 0 : 1; //plus is 0
458 
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;
463 
464  Float_t etaGl = track->EtaGl();
465  Float_t etaPr = track->EtaPr();
466 
467  Float_t phiPr = track->PhiPr();
468  Float_t phiGl = track->PhiGl();
469  // Float_t phiGlDeg = phiGl*180./TMath::Pi();
470  // Float_t phiPrDeg = phiPr*180./TMath::Pi();
471 
472  Float_t sector = track->FirstSector();
473 
474  Float_t sDcaGl = (track->DcaXYGl()>0) ? track->DcaGl() : -track->DcaGl();
475  Float_t dcaXYGl = track->DcaXYGl();
476  Float_t dcaGl = track->DcaGl();
477 
478  Float_t fitPts = track->FitPts();
479  Float_t allPts = track->AllPts();
480  Float_t maxPts = track->MaxPossPts();
481 
482  h1FitPts->Fill(fitPts);
483 
484  if(CutRc::AcceptEta(track) && CutRc::AcceptFirstPadrow(track) && CutRc::AcceptSameSector(track)) {
485 
486  if(CutRc::AcceptSDcaGl(track)) {
487  h2FitPtsVsSector->Fill(sector,fitPts);
488  h2MaxPtsVsSector->Fill(sector,maxPts);
489  h2AllPtsVsSector->Fill(sector,allPts);
490  }
491  if(CutRc::AcceptFitPts(track)) {
492  h2DcaGlVsSector->Fill(sector,dcaGl);
493  h2DcaXYGlVsSector->Fill(sector,dcaXYGl);
494  }
495  }
496 
497  //Standard track cuts are |eta|<0.75,fitpts>20,SDca<1cm
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);
504  }
505 
506 //Bum's stuff
507 
508  //*********** AcceptNoeta = dca, fitpts and samesector
509 
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);
516  }
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);
522  }
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);
527  }
528 
529  //****** Eta cut
530 
531  if(CutRc::AcceptEta(track)){
532  if(CutRc::AcceptFitPts(track)){
533 
534  if(CutRc::AcceptEastSideTrack(track)) {
535  // sector,dcaxy,pt
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);
540  // dca3d, dcaxy,pt
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);
545  // rebin?
546  ew[0].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
547  ew[0].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
548  // dcaxy,pt
549  ew[0].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
550  ew[0].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
551  }
552  if(CutRc::AcceptWestSideTrack(track)) {
553  // sector,dcaxy,pt
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);
558  // dca3d, dcaxy,pt
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);
563  // rebin?
564  ew[1].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
565  ew[1].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
566  // dcaxy,pt
567  ew[1].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
568  ew[1].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
569  }
570  // sector,dcaxy,pt
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);
575  // dca3d, dcaxy,pt
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);
580  // rebin?
581  ew[2].pm[2].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
582  ew[2].pm[iCharge].h2SDcaGlPtPrRebin->Fill(sDcaGl,ptPr);
583  // dcaxy,pt
584  ew[2].pm[2].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
585  ew[2].pm[iCharge].h2DcaXYGlPtPrRebin->Fill(dcaXYGl,ptPr);
586 
587  // respt, pt,dcaxy
588  // no charge difference
589  h3ResPtPrGlPtPrDcaXYGl->Fill(resPtPrGlPr,ptPr,dcaXYGl);
590  h3ResPtPrGlPtGlDcaXYGl->Fill(resPtPrGlGl,ptGl,dcaXYGl);
591 
592  }//AcceptFitPts(track)
593 
594  //*********eta and dca cut
595  if(CutRc::AcceptSDcaGl(track)){
596  if(CutRc::AcceptEastSideTrack(track)) {
597  // sector,fit pts, pt
598  ew[0].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
599  ew[0].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
600  // sector, all pts, pt
601  ew[0].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
602  ew[0].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
603  // sector, max pts, pt
604  ew[0].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
605  ew[0].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
606  // flow, fit pts, pt
607  ew[0].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
608  ew[0].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
609  }
610  if(CutRc::AcceptWestSideTrack(track)) {
611  // sector,fit pts, pt
612  ew[1].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
613  ew[1].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
614  // sector, all pts, pt
615  ew[1].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
616  ew[1].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
617  // sector, max pts, pt
618  ew[1].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
619  ew[1].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
620  // flow, fit pts, pt
621  ew[1].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
622  ew[1].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
623  }
624  // sector,fit pts, pt
625  ew[2].pm[2].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
626  ew[2].pm[iCharge].h3PhiPrFitPtsPtPr->Fill(phiPr,fitPts,ptPr);
627  // sector, all pts, pt
628  ew[2].pm[2].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
629  ew[2].pm[iCharge].h3PhiPrAllPtsPtPr->Fill(phiPr,allPts,ptPr);
630  // sector, max pts, pt
631  ew[2].pm[2].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
632  ew[2].pm[iCharge].h3PhiPrMaxPtsPtPr->Fill(phiPr,maxPts,ptPr);
633  // flow, fit pts, pt
634  ew[2].pm[2].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
635  ew[2].pm[iCharge].h3FlowCentFitPtsPtPr->Fill(flowCent,fitPts,ptPr);
636 
637  } //dca
638  }//eta
639 
640  //******** dca and tight eta cut
641  if(CutRc::AcceptSDcaGl(track) && fabs(etaPr)<.1){
642  // vtx z, fit pts, pt
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);
646  }
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);
650  }
651  ew[2].pm[2].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
652  ew[2].pm[iCharge].h3VtxZFitPtsPtPr->Fill(vertexZ,fitPts,ptPr);
653  }
654 
655  // dca and pt
656  if(CutRc::AcceptSDcaGl(track) && ptPr>4 && ptPr<6){
657  // vtx z, fit pts, eta
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);
661  }
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);
665  }
666  ew[2].pm[2].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
667  ew[2].pm[iCharge].h3VtxZFitPtsEtaPr->Fill(vertexZ,fitPts,etaPr);
668  }
669 
670  // all cuts
671  if(CutRc::Accept(track)){
672  // count and centrality and spectra
673  if(CutRc::AcceptEastSideTrack(track)) {
674  ew[0].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
675  ew[0].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
676 
677  //Global RAW
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);
682  //Global ONEOVERPT
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);
687  //Primary RAW
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);
692  //Primary ONEOVERPT
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);
697  }
698  if(CutRc::AcceptWestSideTrack(track)) {
699  ew[1].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
700  ew[1].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
701 
702  //Global RAW
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);
707  //Global ONEOVERPT
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);
712  //Primary RAW
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);
717  //Primary ONEOVERPT
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);
722  }
723  ew[2].pm[2].h2CentralityPtPr->Fill(flowCent,ptPr);
724  ew[2].pm[iCharge].h2CentralityPtPr->Fill(flowCent,ptPr);
725 
726  //Global RAW
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);
731  //Global ONEOVERPT
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);
736  //Primary RAW
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);
741  //Primary ONEOVERPT
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);
746  }
747 
748  } // tracks
749 
750  if(mDebug)
751  cout << "\ttracks : " << nTrack << endl;
752 
753 }
754 //_____________________
755 
756 void
757 StHiAnalysis::fillEventHistograms()
758 {
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();
767 
768  //This comes before we make event cuts
769  //Except we need to make sure and do trigger word cut!!!!
770  if (CutRc::AcceptTrgWord(mHiMicroEvent)) {
771  if(CutRc::AcceptCent(mHiMicroEvent)) { //Want uncut vertex distribution for selected trgword and centrality
772  h3VertexXYZ->Fill(xvtx,yvtx,zvtx);
773  }
774  if(CutRc::AcceptVertexZ(mHiMicroEvent)) { //Want uncut centrality distributions for selected trgword and vertexZ
775  h1FlowCent->Fill(flowCent);
776  h2ZDCSumVsCTB->Fill(CTB,ZDCSum);
777  }
778 
779  if (acceptEvent(mHiMicroEvent)) {
780  h2NGoodGlobalsVsNch->Fill(Nch,NGoodGlobals);
781  }
782  } //Check Trigger Word
783 }
784 
785 //______________________
786 
787 void
788 StHiAnalysis::finishHistograms()
789 {
790  h1NEvent->SetBinContent(1,mNEventAccepted);
791  h1EtaCut->SetBinContent(1,CutRc::mEta[0]);
792  h1EtaCut->SetBinContent(2,CutRc::mEta[1]);
793 
794  //Make weighted mean distributions...
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);
801  }
802  }
803 
804 }
805 //______________
806 
807 
808 ClassImp(StHiAnalysis)
809