StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Bin.h
1 /*
2  standard histogram bins and ranges
3 */
4 
5 #ifndef Bin_H
6 #define Bin_H
7 
8 #include "TObject.h"
9 #include "TArrayD.h"
10 #include <cmath>
11 #include <cstdlib>
12 
13 namespace Bin
14 {
15  //
16  // event stuff
17  //
18 
19  const float vertexZEvtMin = -100;
20  const float vertexZEvtMax = 100;
21  const int nVertexZEvtBin =
22  (int) ceil((vertexZEvtMax-vertexZEvtMin)/5);
23  const int nVertexZEvtThinBin = (int)ceil((vertexZEvtMax-vertexZEvtMin)/1);
24 
25  const float vertexXMin = -1;
26  const float vertexXMax = 1;
27  const int nVertexXBin = (int)ceil((vertexXMax-vertexXMin)/.05);
28 
29  const float vertexREvtMin = 0;
30  const float vertexREvtMax = 5;
31  const int nVertexREvtBin = (int)ceil((vertexREvtMax-vertexREvtMin)/.1);
32 
33  // 0-9 9 is overflow(most central)
34  const float flowCentMin = -0.5;
35  const float flowCentMax = 9.5;
36  const int nFlowCentBin = 10;
37 
38  // 0-9 0 is most central (kFive)
39  const float zdcCentMin = -0.5;
40  const float zdcCentMax = 9.5;
41  const int nZdcCentBin = 10;
42 
43  const float ctbMin = -0.5;
44  const float ctbMax = 50000.5;
45  const int nCtbBin=(int)ceil((ctbMax-ctbMin)/100);
46 
47  const float zdcMin=-0.5;
48  const float zdcMax=200.5;
49  const int nZdcBin=(int)ceil((zdcMax-zdcMin));
50 
51  const float hMinusMin=-0.5;
52  const float hMinusMax=400.5;
53  const int nHMinusBin=(int)ceil((hMinusMax-hMinusMin));
54 
55  const float nChMin=-0.5;
56  const float nChMax=800.5;
57  const int nNchBin=(int)ceil((nChMax-nChMin));
58 
59  const float nGGMin=-0.5;
60  const float nGGMax=2000.5;
61  const int nNGGBin=(int)ceil((nGGMax-nGGMin));
62 
63  //
64  //****** track stuff
65  //
66  void initPtAry(TArrayD* a, int type);
67 
68  const float lowPtMin = 0;
69  const float lowPtMax = 3;
70  const int nLowPtBin = (int)ceil((lowPtMax-lowPtMin)/.1);
71 
72  const float lowPtThinMin = 0;
73  const float lowPtThinMax = 2;
74  const int nLowPtThinBin = (int)ceil((lowPtThinMax-lowPtThinMin)/.05);
75 
76  const float mtMin = 0;
77  const float mtMax = 6;
78  const int nMtBin = (int)ceil((mtMax-mtMin)/.2);
79 
80  const float ptMin = 0.5;
81  const float ptMax = 12.0;
82  const int nPtBin = (int)ceil((ptMax-ptMin)/.5);
83 
84  const float ptThinMin = 1.0;
85  const float ptThinMax = 12.0;
86  const int nPtThinBin = (int)ceil((ptThinMax-ptThinMin)/.1);
87 
88  const float ptTinyMin = 0;
89  const float ptTinyMax = 12;
90  const int nPtTinyBin = (int)ceil((ptTinyMax-ptTinyMin)/.1);
91 
92  // will rebin with these
93  const double ptRebinMin = 1;
94  const double ptRebinMax = 12;
95  const int nPtRebinBin = (int)ceil((ptRebinMax-ptRebinMin)/.05);
96 
97 
98  const float resPtMin = -1.5;
99  const float resPtMax = 1.5;
100  const int nResPtBin = (int)ceil((resPtMax-resPtMin)/.005);
101 
102  const float resPtWideMin = -5;
103  const float resPtWideMax = 1.0;
104  const int nResPtWideBin = (int)ceil((resPtMax-resPtMin)/.01);
105 
106  const float resEtaMin = -.5;
107  const float resEtaMax = .5;
108  const int nResEtaBin = (int)ceil((resEtaMax-resEtaMin)/.02);
109 
110  const float resCurvMin = -2;
111  const float resCurvMax = 1;
112  const int nResCurvBin = (int)ceil((resCurvMax-resCurvMin)/.02);
113 
114  const float etaWideMin=-2;
115  const float etaWideMax=2;
116  const int nEtaWideBin = (int)ceil((etaWideMax-etaWideMin)/.1);
117 
118  const float etaMin = -1.0;
119  const float etaMax = 1.0;
120  const int nEtaBin = (int)ceil((etaMax-etaMin)/.1);
121 
122  const float etaBigMin = -1.0;
123  const float etaBigMax = 1.0;
124  const int nEtaBigBin = (int)ceil((etaBigMax-etaBigMin)/.25);
125 
126  const float etaThinMin = -1.;
127  const float etaThinMax = 1;
128  const int nEtaThinBin = (int)ceil((etaThinMax-etaThinMin)/.025);
129 
130  const float etaSmallMin = -1.0;
131  const float etaSmallMax = 1.0;
132  const int nEtaSmallBin = (int)ceil((etaSmallMax-etaSmallMin)/.05);
133 
134  const float sDcaMin = -3;
135  const float sDcaMax = 3;
136  const int nSDcaBin = (int)ceil((sDcaMax-sDcaMin)/.1);
137 
138  const float dcaXYGlMin = -3;
139  const float dcaXYGlMax = 3;
140  const int nDcaXYGlBin =(int)ceil((dcaXYGlMax-dcaXYGlMin)/.05);
141 
142  const float dcaXYGlWideMin = -3;
143  const float dcaXYGlWideMax = 3;
144  const int nDcaXYGlWideBin =(int)ceil((dcaXYGlMax-dcaXYGlMin)/.1);
145 
146  const float dcaMin = 0;
147  const float dcaMax = 3;
148  const int nDcaBin = (int)ceil((dcaMax-dcaMin)/.05);
149 
150  const float dcaThinMin = 0;
151  const float dcaThinMax = 3;
152  const int nDcaThinBin = (int)ceil((dcaThinMax-dcaThinMin)/.05);
153 
154  const float commonFracMin = 0;
155  const float commonFracMax = 1;
156  const int nCommonFracBin = (int)ceil((commonFracMax-commonFracMin)/.02);
157 
158  const float fitPtsMin = -0.5;
159  const float fitPtsMax = 50.5;
160  const int nFitPtsBin = 51;
161 
162  const float fitPtsWideMin=25.5; // 26-29,30-33,34-37,38-41,42-45
163  const float fitPtsWideMax=45.5;
164  const int nFitPtsWideBin=5;
165 
166  const float fitPtsCentMin = -0.5;
167  const float fitPtsCentMax = 50.5;
168  const int nFitPtsCentBin = 51;
169 
170  const float fitHitMin = 0.5;
171  const float fitHitMax = 45.5;
172  const int nFitHitBin = 1;
173 
174  const float fracHitMin = 0;
175  const float fracHitMax = 1;
176  const int nFracHitBin = (int)ceil((fracHitMax-fracHitMin)/.02);
177 
178  const float fitHitThinMin = 0.5;
179  const float fitHitThinMax = 45.5;
180  const int nFitHitThinBin = 45;
181 
182  const float vertexZMin = -100;
183  const float vertexZMax = 100;
184  const int nVertexZBin = (int)ceil((vertexZMax-vertexZMin)/10);
185  const int nEnterZBin = (int)ceil((vertexZMax-vertexZMin)/10);
186 
187  const float vertexZWideMin = -100;
188  const float vertexZWideMax = 100;
189  const int nVertexZWideBin = (int)ceil((vertexZWideMax-vertexZWideMin)/25);
190 
191  const float vertexZBigMin = -100;
192  const float vertexZBigMax = 100;
193  const int nVertexZBigBin = (int) ceil((vertexZBigMax-vertexZBigMin)/50);
194 
195  const float midZBigMin = -100;
196  const float midZBigMax = 100;
197  const int nMidZBigBin = (int) ceil((midZBigMax-midZBigMin)/50);
198 
199  const float absZBigMin = 0;
200  const float absZBigMax = 100;
201  const int nAbsZBigBin = 4;
202 
203  const float sectorWestMin = 0.5;
204  const float sectorWestMax = 12.5;
205 
206  const float sectorEastMin = 12.5;
207  const float sectorEastMax = 24.5;
208 
209  const float sectorMin = 0.5;
210  const float sectorMax = 24.5;
211 
212  const int nSectorEWBin = 12;
213  const int nSectorBin = 24;
214 
215 
216  const float dPhiMin = -.02;
217  const float dPhiMax = .02;
218  const int nDPhiBin = (int)ceil((dPhiMax-dPhiMin)/.001);
219 
220  const float dEtaMin = -.1;
221  const float dEtaMax = .1;
222  const int nDEtaBin = (int)ceil((dEtaMax-dEtaMin)/.001);
223 
224  // const float dPtMin = -6;
225  // const float dPtMax = 6;
226  // const int nDPtBin = (int)ceil((dPtMax-dPtMin)/.2);
227 
228  const float phiMin = -3.14159;
229  const float phiMax = 3.14159;
230  const float phiDegMin = -165;
231  const float phiDegMax = 195;
232  const int nPhiBin = 12;
233  const int nPhiSmallBin = 24;
234  const int nPhiThinBin = 24*5;
235 
236  const float dipMin = -.5;
237  const float dipMax = .5;
238  const int nDipBin = (int)ceil((dipMax-dipMin)/.02);
239 
240  const float dipWideMin = -.5;
241  const float dipWideMax = .5;
242  const int nDipWideBin = (int)ceil((dipMax-dipMin)/.1);
243 
244  const float pzMin = 5;
245  const float pzMax = -5;
246  const int nPzBin = (int)ceil((pzMax-pzMin)/1);
247 
248  const float dcaZGlMin = -.5;
249  const float dcaZGlMax = .5;
250  const int nDcaZGlBin = (int)ceil((dcaZGlMax-dcaZGlMin)/.02);
251 
252  const float dcaZGlWideMin = -.5;
253  const float dcaZGlWideMax = .5;
254  const int nDcaZGlWideBin = (int)ceil((dcaZGlWideMax-dcaZGlWideMin)/.1);
255 
256  const float dDipMin = -.003;
257  const float dDipMax = .003;
258  const int nDDipBin = (int)ceil((dDipMax-dDipMin)/.0001);
259 
260  const float dcaXYPrMin = -.2;
261  const float dcaXYPrMax = .2;
262  const int nDcaXYPrBin = (int)ceil((dcaXYPrMax-dcaXYPrMin)/.01);
263 
264  const float dedxMin = 0;
265  const float dedxMax = 1e-5;
266  const int nDedxBin = (int)ceil((dedxMax-dedxMin)/.2e-6);
267 
268 }
269 
270 
271 
272 
273 
274 
275 #endif