2#include "include/fun.h"
17 m_fdcom =
new TFolder(
"mcommon",
"common");
18 hlist ->
Add(m_fdcom);
20 m_effNtrk =
new TH1F(
"meffNtrk",
"", 43, -0.5, 42.5);
21 m_fdcom->Add(m_effNtrk);
23 m_effNtrkRecHit =
new TH1F(
"meffNtrkRecHit",
"", 43, -0.5, 42.5);
24 m_fdcom->Add(m_effNtrkRecHit);
26 m_hresAllInc =
new TH1F(
"mHResAllInc",
"", 200, -1.0, 1.0);
27 m_fdcom ->
Add(m_hresAllInc);
29 m_hresAllExc =
new TH1F(
"mHResAllExc",
"", 200, -1.0, 1.0);
30 m_fdcom ->
Add(m_hresAllExc);
32 m_hresAllAve =
new TH1F(
"mHResAllAve",
"", 200, -1.0, 1.0);
33 m_fdcom ->
Add(m_hresAllAve);
35 m_hresInnInc =
new TH1F(
"mHResInnInc",
"", 200, -1.0, 1.0);
36 m_fdcom ->
Add(m_hresInnInc);
38 m_hresInnExc =
new TH1F(
"mHResInnExc",
"", 200, -1.0, 1.0);
39 m_fdcom ->
Add(m_hresInnExc);
41 m_hresStpInc =
new TH1F(
"mHResStpInc",
"", 200, -1.0, 1.0);
42 m_fdcom ->
Add(m_hresStpInc);
44 m_hresStpExc =
new TH1F(
"mHResStpExc",
"", 200, -1.0, 1.0);
45 m_fdcom ->
Add(m_hresStpExc);
47 m_hresOutInc =
new TH1F(
"mHResOutInc",
"", 200, -1.0, 1.0);
48 m_fdcom ->
Add(m_hresOutInc);
50 m_hresOutExc =
new TH1F(
"mHResOutExc",
"", 200, -1.0, 1.0);
51 m_fdcom ->
Add(m_hresOutExc);
53 m_fdResQ =
new TFolder(
"mResQ",
"ResQ");
55 for(
int i=0; i<14; i++){
56 sprintf(hname,
"mresoAll_qbin%02d", i);
57 m_hresAveAllQ[i] =
new TH1F(hname,
"", 200, -1, 1);
58 m_fdResQ->Add(m_hresAveAllQ[i]);
60 sprintf(hname,
"mresoOut_qbin%02d", i);
61 m_hresAveOutQ[i] =
new TH1F(hname,
"", 200, -1, 1);
62 m_fdResQ->Add(m_hresAveOutQ[i]);
64 for(
int lay=0; lay<43; lay++){
65 for(
int i=0; i<14; i++){
66 sprintf(hname,
"mresoLay%02d_qbin%02d", lay, i);
67 m_hresAveLayQ[lay][i] =
new TH1F(hname,
"", 200, -1, 1);
68 m_fdResQ->Add(m_hresAveLayQ[lay][i]);
72 m_hbbTrkFlg =
new TH1F(
"mBbTrkFlg",
"", 100, 0, 6);
73 m_fdcom ->
Add(m_hbbTrkFlg);
75 m_hTesAll =
new TH1F(
"mTesAll",
"", 1000, 0, 2000);
76 m_fdcom ->
Add(m_hTesAll);
78 m_hTesGood =
new TH1F(
"mTesGood",
"", 1000, 0, 2000);
79 m_fdcom ->
Add(m_hTesGood);
81 m_hTesAllFlag =
new TH1F(
"mTesAllFlag",
"", 300, -0.5, 299.5);
82 m_fdcom ->
Add(m_hTesAllFlag);
84 m_hTesRec =
new TH1F(
"mTesRec",
"", 1000, 0, 2000);
85 m_fdcom ->
Add(m_hTesRec);
87 m_hTesCalFlag =
new TH1F(
"mTesCalFlag",
"", 1000, 0, 2000);
88 m_fdcom ->
Add(m_hTesCalFlag);
90 m_hTesCalUse =
new TH1F(
"mTesCalUse",
"", 1000, 0, 2000);
91 m_fdcom ->
Add(m_hTesCalUse);
93 m_hnRawHit =
new TH1F(
"mNRawHit",
"", 6797, -0.5, 6796.5);
94 m_fdcom ->
Add(m_hnRawHit);
96 m_hpt =
new TH1F(
"mHPt",
"", 800, 0, 3);
97 m_fdcom ->
Add(m_hpt);
99 m_hptPos =
new TH1F(
"mHPtPos",
"", 800, 0, 3);
100 m_fdcom ->
Add(m_hptPos);
102 m_hptNeg =
new TH1F(
"mHPtNeg",
"", 800, 0, 3);
103 m_fdcom ->
Add(m_hptNeg);
105 m_hp =
new TH1F(
"mHP",
"", 800, 0, 3);
106 m_fdcom ->
Add(m_hp);
108 m_hp_cms =
new TH1F(
"mHPCMS",
"", 800, 0, 3);
109 m_fdcom ->
Add(m_hp_cms);
111 m_hpMax =
new TH1F(
"mHPMax",
"", 800, 0, 3);
112 m_fdcom ->
Add(m_hpMax);
114 m_hpMaxCms =
new TH1F(
"mHPMax_Cms",
"", 800, 0, 3);
115 m_fdcom ->
Add(m_hpMaxCms);
117 m_hpPos =
new TH1F(
"mHP_Pos",
"", 800, 0, 3);
118 m_fdcom ->
Add(m_hpPos);
120 m_hpNeg =
new TH1F(
"mHP_Neg",
"", 800, 0, 3);
121 m_fdcom ->
Add(m_hpNeg);
123 m_hpPoscms =
new TH1F(
"mHP_Pos_cms",
"", 800, 0, 3);
124 m_fdcom ->
Add(m_hpPoscms);
126 m_hpNegcms =
new TH1F(
"mHP_Neg_cms",
"", 800, 0, 3);
127 m_fdcom ->
Add(m_hpNegcms);
129 m_hp_cut =
new TH1F(
"mHPCut",
"", 800, 0, 3);
130 m_fdcom ->
Add(m_hp_cut);
132 m_hchisq =
new TH1F(
"mChisq",
"", 10, 0, 100);
133 m_fdcom ->
Add(m_hchisq);
135 m_hnTrk =
new TH1F(
"mHNtrack",
"HNtrack", 10, -0.5, 9.5);
136 m_fdcom ->
Add(m_hnTrk);
138 m_hnTrkCal =
new TH1F(
"mHNtrackCal",
"HNtrackCal", 10, -0.5, 9.5);
139 m_fdcom ->
Add(m_hnTrkCal);
141 m_hnhitsRec =
new TH1F(
"mHNhitsRec",
"", 100, -0.5, 99.5);
142 m_fdcom ->
Add(m_hnhitsRec);
144 m_hnhitsRecInn =
new TH1F(
"mHNhitsInnRec",
"", 60, 0.5, 60.5);
145 m_fdcom ->
Add(m_hnhitsRecInn);
147 m_hnhitsRecStp =
new TH1F(
"mHNhitsStpRec",
"", 60, 0.5, 60.5);
148 m_fdcom ->
Add(m_hnhitsRecStp);
150 m_hnhitsRecOut =
new TH1F(
"mHNhitsOutRec",
"", 60, 0.5, 60.5);
151 m_fdcom ->
Add(m_hnhitsRecOut);
153 m_hnhitsCal =
new TH1F(
"mHNhitsCal",
"", 100, -0.5, 99.5);
154 m_fdcom ->
Add(m_hnhitsCal);
156 m_hnhitsCalInn =
new TH1F(
"mHNhitsCalInn",
"", 60, 0.5, 60.5);
157 m_fdcom ->
Add(m_hnhitsCalInn);
159 m_hnhitsCalStp =
new TH1F(
"mHNhitsCalStp",
"", 60, 0.5, 60.5);
160 m_fdcom ->
Add(m_hnhitsCalStp);
162 m_hnhitsCalOut =
new TH1F(
"mHNhitsCalOut",
"", 60, 0.5, 60.5);
163 m_fdcom ->
Add(m_hnhitsCalOut);
165 m_wirehitmap =
new TH1F(
"mWire_HitMap",
"Wire_HitMap", 6796, -0.5, 6795.5);
166 m_fdcom ->
Add(m_wirehitmap);
168 m_layerhitmap =
new TH1F(
"mLayer_HitMap",
"Layer_HitMap", 43, -0.5, 42.5);
169 m_fdcom ->
Add(m_layerhitmap);
171 m_hnoisephi =
new TH1F(
"mphi_noise",
"", 100, 0, 6.284);
172 m_fdcom ->
Add(m_hnoisephi);
174 m_hnoiselay =
new TH1F(
"mLayer_noise",
"Layer_noise", 43, -0.5, 42.5);
175 m_fdcom ->
Add(m_hnoiselay);
177 m_hnoisenhits =
new TH1F(
"mnhits_noise",
"nhits_noise", 6796, -0.5, 6795.5);
178 m_fdcom ->
Add(m_hnoisenhits);
180 m_hratio =
new TH1F(
"mratio",
"", 100, 0, 1);
181 m_fdcom ->
Add(m_hratio);
183 m_hdr =
new TH1F(
"mdr",
"", 500, -500, 500);
184 m_fdcom ->
Add(m_hdr);
186 m_hphi0 =
new TH1F(
"mphi0",
"", 100, 0, 6.284);
187 m_fdcom ->
Add(m_hphi0);
189 m_hkap =
new TH1F(
"mkappa",
"", 400, -50, 50);
190 m_fdcom ->
Add(m_hkap);
192 m_hdz =
new TH1F(
"mdz",
"", 500, -1000, 1000);
193 m_fdcom ->
Add(m_hdz);
195 m_htanl =
new TH1F(
"mtanl",
"", 200, -5, 5);
196 m_fdcom ->
Add(m_htanl);
198 m_hcosthe =
new TH1F(
"mcostheta",
"", 200, -1, 1);
199 m_fdcom ->
Add(m_hcosthe);
201 m_hcostheNeg =
new TH1F(
"mcosthetaNeg",
"", 200, -1, 1);
202 m_fdcom ->
Add(m_hcostheNeg);
204 m_hcosthePos =
new TH1F(
"mcosthetaPos",
"", 200, -1, 1);
205 m_fdcom ->
Add(m_hcosthePos);
207 m_hx0 =
new TH1F(
"mx0",
"", 100, -10, 10);
208 m_fdcom ->
Add(m_hx0);
210 m_hy0 =
new TH1F(
"my0",
"", 100, -10, 10);
211 m_fdcom ->
Add(m_hy0);
213 m_hdelZ0 =
new TH1F(
"mdelta_z0",
"", 100, -50, 50);
214 m_fdcom ->
Add(m_hdelZ0);
217 m_grX0Y0 =
new TGraph();
218 m_grX0Y0->SetName(
"mx0y0");
219 m_fdcom ->
Add(m_grX0Y0);
221 m_hitEffAll =
new TH1F(
"mhitEffAll",
"", 6800, -0.5, 6799.5);
222 m_fdcom ->
Add(m_hitEffAll);
224 m_hitEffRaw =
new TH1F(
"mhitEffRaw",
"", 6800, -0.5, 6799.5);
225 m_fdcom ->
Add(m_hitEffRaw);
227 m_hitEffRec =
new TH1F(
"mhitEffRec",
"", 6800, -0.5, 6799.5);
228 m_fdcom ->
Add(m_hitEffRec);
231 m_fdTime =
new TFolder(
"mtime",
"time");
232 hlist ->
Add(m_fdTime);
234 for(
int lay=0; lay<
NLAYER; lay++){
235 sprintf(hname,
"mTraw%02d", lay);
236 m_htraw[lay] =
new TH1F(hname,
"", 1000, 0, 2000);
237 m_fdTime ->
Add(m_htraw[lay]);
239 sprintf(hname,
"mTdr%02d", lay);
240 m_htdr[lay] =
new TH1F(hname,
"", 510, -10, 500);
241 m_fdTime ->
Add(m_htdr[lay]);
243 for(
int lr=0; lr<2; lr++){
244 sprintf(hname,
"mTdr%02d_lr%01d", lay, lr);
245 m_htdrlr[lay][lr] =
new TH1F(hname,
"", 510, -10, 500);
246 m_fdTime ->
Add(m_htdrlr[lay][lr]);
251 m_fdres =
new TFolder(
"mresolution",
"resolution");
252 hlist ->
Add(m_fdres);
254 for(
int lay=0; lay<
NLAYER; lay++){
255 sprintf(hname,
"mReso%02dInc", lay);
256 m_hresInc[lay] =
new TH1F(hname,
"", 1000, -5, 5);
257 m_fdres ->
Add(m_hresInc[lay]);
259 sprintf(hname,
"mReso%02dExc", lay);
260 m_hresExc[lay] =
new TH1F(hname,
"", 1000, -5, 5);
261 m_fdres ->
Add(m_hresExc[lay]);
263 for (
int lr=0; lr<2; lr++){
264 sprintf(hname,
"mReso%02dInc_lr%01d", lay, lr);
265 m_hreslrInc[lay][lr] =
new TH1F(hname,
"", 1000, -5, 5);
266 m_fdres->Add(m_hreslrInc[lay][lr]);
268 sprintf(hname,
"mReso%02dExc_lr%01d", lay, lr);
269 m_hreslrExc[lay][lr] =
new TH1F(hname,
"", 1000, -5, 5);
270 m_fdres->Add(m_hreslrExc[lay][lr]);
275 m_fdmomPhi =
new TFolder(
"mmomPhi",
"momPhi");
276 hlist ->
Add(m_fdmomPhi);
281 m_ppPhi[
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
282 m_fdmomPhi->Add(m_ppPhi[
bin]);
285 m_pnPhi[
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
286 m_fdmomPhi->Add(m_pnPhi[
bin]);
289 m_ppPhiCms[
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
290 m_fdmomPhi->Add(m_ppPhiCms[
bin]);
293 m_pnPhiCms[
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
294 m_fdmomPhi->Add(m_pnPhiCms[
bin]);
296 for(thbin=0; thbin<NThetaBin; thbin++){
297 sprintf(hname,
"mhPpos_theta%02d_phi%02d", thbin,
bin);
298 m_ppThePhi[thbin][
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
299 m_fdmomPhi->Add(m_ppThePhi[thbin][
bin]);
301 sprintf(hname,
"mhPneg_theta%02d_phi%02d", thbin,
bin);
302 m_pnThePhi[thbin][
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
303 m_fdmomPhi->Add(m_pnThePhi[thbin][
bin]);
305 sprintf(hname,
"mhPposCms_theta%02d_phi%02d", thbin,
bin);
306 m_ppThePhiCms[thbin][
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
307 m_fdmomPhi->Add(m_ppThePhiCms[thbin][
bin]);
309 sprintf(hname,
"mhPnegCms_theta%02d_phi%02d", thbin,
bin);
310 m_pnThePhiCms[thbin][
bin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
311 m_fdmomPhi->Add(m_pnThePhiCms[thbin][
bin]);
314 for(thbin=0; thbin<NThetaBin; thbin++){
315 sprintf(hname,
"mhPpos_the%02d", thbin);
316 m_ppThe[thbin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
317 m_fdmomPhi->Add(m_ppThe[thbin]);
319 sprintf(hname,
"mhPneg_the%02d", thbin);
320 m_pnThe[thbin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
321 m_fdmomPhi->Add(m_pnThe[thbin]);
323 sprintf(hname,
"mhPposCms_the%02d", thbin);
324 m_ppTheCms[thbin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
325 m_fdmomPhi->Add(m_ppTheCms[thbin]);
327 sprintf(hname,
"mhPnegCms_the%02d", thbin);
328 m_pnTheCms[thbin] =
new TH1F(hname,
"", 400, 1.0, 2.5);
329 m_fdmomPhi->Add(m_pnTheCms[thbin]);
332 m_fdr2d =
new TFolder(
"mres2d",
"res2d");
333 hlist ->
Add(m_fdr2d);
334 for(
int lay=0; lay<43; lay++){
335 for(
int iEntr=0; iEntr<
gNEntr[lay]; iEntr++){
336 for(
int lr=0; lr<2; lr++){
338 sprintf(hname,
"mR2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr,
bin);
339 m_hr2dInc[lay][iEntr][lr][
bin] =
new TH1F(hname,
"", 200, -1, 1);
340 m_fdr2d ->
Add(m_hr2dInc[lay][iEntr][lr][
bin]);
342 sprintf(hname,
"mR2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr,
bin);
343 m_hr2dExc[lay][iEntr][lr][
bin] =
new TH1F(hname,
"", 200, -1, 1);
344 m_fdr2d ->
Add(m_hr2dExc[lay][iEntr][lr][
bin]);
368 TFolder* fdcom = (TFolder*)fhist->Get(
"common");
369 TFolder* fdResQ = (TFolder*)fhist->Get(
"ResQ");
370 TFolder* fdTime = (TFolder*)fhist->Get(
"time");
371 TFolder* fdres = (TFolder*)fhist->Get(
"resolution");
372 TFolder* fdmomPhi = (TFolder*)fhist->Get(
"momPhi");
373 TFolder* fdres2d = (TFolder*)fhist->Get(
"res2d");
375 hist = (TH1F*)fdcom->FindObjectAny(
"effNtrk");
376 m_effNtrk->Add(hist);
378 hist = (TH1F*)fdcom->FindObjectAny(
"effNtrkRecHit");
379 m_effNtrkRecHit->Add(hist);
381 hist = (TH1F*)fdcom->FindObjectAny(
"HResAllInc");
382 m_hresAllInc->Add(hist);
384 hist = (TH1F*)fdcom->FindObjectAny(
"HResAllExc");
385 m_hresAllExc->Add(hist);
387 hist = (TH1F*)fdcom->FindObjectAny(
"HResAllAve");
388 m_hresAllAve->Add(hist);
390 hist = (TH1F*)fdcom->FindObjectAny(
"HResInnInc");
391 m_hresInnInc->Add(hist);
393 hist = (TH1F*)fdcom->FindObjectAny(
"HResInnExc");
394 m_hresInnExc->Add(hist);
396 hist = (TH1F*)fdcom->FindObjectAny(
"HResStpInc");
397 m_hresStpInc->Add(hist);
399 hist = (TH1F*)fdcom->FindObjectAny(
"HResStpExc");
400 m_hresStpExc->Add(hist);
402 hist = (TH1F*)fdcom->FindObjectAny(
"HResOutInc");
403 m_hresOutInc->Add(hist);
405 hist = (TH1F*)fdcom->FindObjectAny(
"HResOutExc");
406 m_hresOutExc->Add(hist);
408 hist = (TH1F*)fdcom->FindObjectAny(
"BbTrkFlg");
409 m_hbbTrkFlg->Add(hist);
411 hist = (TH1F*)fdcom->FindObjectAny(
"TesAll");
412 m_hTesAll->Add(hist);
414 hist = (TH1F*)fdcom->FindObjectAny(
"TesGood");
415 m_hTesGood->Add(hist);
417 hist = (TH1F*)fdcom->FindObjectAny(
"TesAllFlag");
418 m_hTesAllFlag->Add(hist);
420 hist = (TH1F*)fdcom->FindObjectAny(
"TesRec");
421 m_hTesRec->Add(hist);
423 hist = (TH1F*)fdcom->FindObjectAny(
"TesCalFlag");
424 m_hTesCalFlag->Add(hist);
426 hist = (TH1F*)fdcom->FindObjectAny(
"TesCalUse");
427 m_hTesCalUse->Add(hist);
429 hist = (TH1F*)fdcom->FindObjectAny(
"nRawHit");
430 m_hnRawHit->Add(hist);
432 hist = (TH1F*)fdcom->FindObjectAny(
"HPt");
435 hist = (TH1F*)fdcom->FindObjectAny(
"HPtPos");
438 hist = (TH1F*)fdcom->FindObjectAny(
"HPtNeg");
441 hist = (TH1F*)fdcom->FindObjectAny(
"HP");
444 hist = (TH1F*)fdcom->FindObjectAny(
"HPCMS");
447 hist = (TH1F*)fdcom->FindObjectAny(
"HPMax");
450 hist = (TH1F*)fdcom->FindObjectAny(
"HPMax_Cms");
451 m_hpMaxCms->Add(hist);
453 hist = (TH1F*)fdcom->FindObjectAny(
"HP_Pos");
456 hist = (TH1F*)fdcom->FindObjectAny(
"HP_Neg");
459 hist = (TH1F*)fdcom->FindObjectAny(
"HP_Pos_cms");
460 m_hpPoscms->Add(hist);
462 hist = (TH1F*)fdcom->FindObjectAny(
"HP_Neg_cms");
463 m_hpNegcms->Add(hist);
465 hist = (TH1F*)fdcom->FindObjectAny(
"HPCut");
468 hist = (TH1F*)fdcom->FindObjectAny(
"Chisq");
471 hist = (TH1F*)fdcom->FindObjectAny(
"HNtrack");
474 hist = (TH1F*)fdcom->FindObjectAny(
"HNtrackCal");
475 m_hnTrkCal->Add(hist);
477 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsRec");
478 m_hnhitsRec->Add(hist);
480 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsInnRec");
481 m_hnhitsRecInn->Add(hist);
483 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsStpRec");
484 m_hnhitsRecStp->Add(hist);
486 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsOutRec");
487 m_hnhitsRecOut->Add(hist);
489 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsCal");
490 m_hnhitsCal->Add(hist);
492 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsCalInn");
493 m_hnhitsCalInn->Add(hist);
495 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsCalStp");
496 m_hnhitsCalStp->Add(hist);
498 hist = (TH1F*)fdcom->FindObjectAny(
"HNhitsCalOut");
499 m_hnhitsCalOut->Add(hist);
501 hist = (TH1F*)fdcom->FindObjectAny(
"Wire_HitMap");
502 m_wirehitmap->Add(hist);
504 hist = (TH1F*)fdcom->FindObjectAny(
"Layer_HitMap");
505 m_layerhitmap->Add(hist);
507 hist = (TH1F*)fdcom->FindObjectAny(
"phi_noise");
508 m_hnoisephi->Add(hist);
510 hist = (TH1F*)fdcom->FindObjectAny(
"Layer_noise");
511 m_hnoiselay->Add(hist);
513 hist = (TH1F*)fdcom->FindObjectAny(
"nhits_noise");
514 m_hnoisenhits->Add(hist);
516 hist = (TH1F*)fdcom->FindObjectAny(
"ratio");
519 hist = (TH1F*)fdcom->FindObjectAny(
"dr");
522 hist = (TH1F*)fdcom->FindObjectAny(
"phi0");
525 hist = (TH1F*)fdcom->FindObjectAny(
"kappa");
528 hist = (TH1F*)fdcom->FindObjectAny(
"dz");
531 hist = (TH1F*)fdcom->FindObjectAny(
"tanl");
534 hist = (TH1F*)fdcom->FindObjectAny(
"costheta");
535 m_hcosthe->Add(hist);
537 hist = (TH1F*)fdcom->FindObjectAny(
"costhetaNeg");
538 m_hcostheNeg->Add(hist);
540 hist = (TH1F*)fdcom->FindObjectAny(
"costhetaPos");
541 m_hcosthePos->Add(hist);
543 hist = (TH1F*)fdcom->FindObjectAny(
"x0");
546 hist = (TH1F*)fdcom->FindObjectAny(
"y0");
549 hist = (TH1F*)fdcom->FindObjectAny(
"delta_z0");
552 hist = (TH1F*)fdcom->FindObjectAny(
"hitEffAll");
553 m_hitEffAll->Add(hist);
555 hist = (TH1F*)fdcom->FindObjectAny(
"hitEffRaw");
556 m_hitEffRaw->Add(hist);
558 hist = (TH1F*)fdcom->FindObjectAny(
"hitEffRec");
559 m_hitEffRec->Add(hist);
561 TGraph*
gr = (TGraph*)fdcom->FindObjectAny(
"x0y0");
565 for(
int i=0; i<np; i++){
566 gr->GetPoint(i, xx, yy);
567 m_grX0Y0->SetPoint(m_nGrPoint, xx, yy);
572 for(
int i=0; i<14; i++){
573 sprintf(hname,
"resoAll_qbin%02d", i);
574 hist = (TH1F*)fdResQ->FindObjectAny(hname);
575 m_hresAveAllQ[i]->Add(hist);
577 sprintf(hname,
"resoOut_qbin%02d", i);
578 hist = (TH1F*)fdResQ->FindObjectAny(hname);
579 m_hresAveOutQ[i]->Add(hist);
582 for(
int lay=0; lay<43; lay++){
583 for(
int i=0; i<14; i++){
584 sprintf(hname,
"resoLay%02d_qbin%02d", lay, i);
585 hist = (TH1F*)fdResQ->FindObjectAny(hname);
586 m_hresAveLayQ[lay][i]->Add(hist);
590 for(
int lay=0; lay<
NLAYER; lay++){
591 sprintf(hname,
"Traw%02d", lay);
592 hist = (TH1F*)fdTime->FindObjectAny(hname);
593 m_htraw[lay]->Add(hist);
595 sprintf(hname,
"Tdr%02d", lay);
596 hist = (TH1F*)fdTime->FindObjectAny(hname);
597 m_htdr[lay]->Add(hist);
599 for(
int lr=0; lr<2; lr++){
600 sprintf(hname,
"Tdr%02d_lr%01d", lay, lr);
601 hist = (TH1F*)fdTime->FindObjectAny(hname);
602 m_htdrlr[lay][lr]->Add(hist);
606 for(
int lay=0; lay<
NLAYER; lay++){
607 sprintf(hname,
"Reso%02dInc", lay);
608 hist = (TH1F*)fdres->FindObjectAny(hname);
609 m_hresInc[lay]->Add(hist);
611 sprintf(hname,
"Reso%02dExc", lay);
612 hist = (TH1F*)fdres->FindObjectAny(hname);
613 m_hresExc[lay]->Add(hist);
615 for (
int lr=0; lr<2; lr++){
616 sprintf(hname,
"Reso%02dInc_lr%01d", lay, lr);
617 hist = (TH1F*)fdres->FindObjectAny(hname);
618 m_hreslrInc[lay][lr]->Add(hist);
620 sprintf(hname,
"Reso%02dExc_lr%01d", lay, lr);
621 hist = (TH1F*)fdres->FindObjectAny(hname);
622 m_hreslrExc[lay][lr]->Add(hist);
629 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
630 m_ppPhi[
bin]->Add(hist);
633 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
634 m_pnPhi[
bin]->Add(hist);
637 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
638 m_ppPhiCms[
bin]->Add(hist);
641 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
642 m_pnPhiCms[
bin]->Add(hist);
644 for(thbin=0; thbin<NThetaBin; thbin++){
645 sprintf(hname,
"hPpos_theta%02d_phi%02d", thbin,
bin);
646 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
647 m_ppThePhi[thbin][
bin]->Add(hist);
649 sprintf(hname,
"hPneg_theta%02d_phi%02d", thbin,
bin);
650 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
651 m_pnThePhi[thbin][
bin]->Add(hist);
653 sprintf(hname,
"hPposCms_theta%02d_phi%02d", thbin,
bin);
654 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
655 m_ppThePhiCms[thbin][
bin]->Add(hist);
657 sprintf(hname,
"hPnegCms_theta%02d_phi%02d", thbin,
bin);
658 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
659 m_pnThePhiCms[thbin][
bin]->Add(hist);
663 for(thbin=0; thbin<NThetaBin; thbin++){
664 sprintf(hname,
"hPpos_the%02d", thbin);
665 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
666 m_ppThe[thbin]->Add(hist);
668 sprintf(hname,
"hPneg_the%02d", thbin);
669 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
670 m_ppThe[thbin]->Add(hist);
672 sprintf(hname,
"hPposCms_the%02d", thbin);
673 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
674 m_ppTheCms[thbin]->Add(hist);
676 sprintf(hname,
"hPnegCms_the%02d", thbin);
677 hist = (TH1F*)fdmomPhi->FindObjectAny(hname);
678 m_pnTheCms[thbin]->Add(hist);
681 for(
int lay=0; lay<43; lay++){
682 for(
int iEntr=0; iEntr<
gNEntr[lay]; iEntr++){
683 for(
int lr=0; lr<2; lr++){
685 sprintf(hname,
"r2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr,
bin);
686 hist = (TH1F*)fdres2d->FindObjectAny(hname);
687 m_hr2dInc[lay][iEntr][lr][
bin]->Add(hist);
689 sprintf(hname,
"r2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr,
bin);
690 hist = (TH1F*)fdres2d->FindObjectAny(hname);
691 m_hr2dExc[lay][iEntr][lr][
bin]->Add(hist);
720 ofstream feffi(
"MdcLayerEffi.dat");
721 for(
int lay=0; lay<
NLAYER; lay++){
722 double effNtrk = m_effNtrk->GetBinContent(lay+1);
723 double effGoodHit = m_effNtrkRecHit->GetBinContent(lay+1);
724 nGoodAll += effGoodHit;
725 if(lay < 8) nGoodInn += effGoodHit;
726 else if (lay < 20) nGoodStp += effGoodHit;
727 else nGoodOut += effGoodHit;
730 if(lay < 8) nTotInn += effNtrk;
731 else if (lay < 20) nTotStp += effNtrk;
732 else nTotOut += effNtrk;
734 double effi = (double)effGoodHit / (
double)effNtrk;
735 double effErr = sqrt(effi * (1-effi) / (
double)effNtrk);
736 feffi << setw(5) << lay << setw(15) << effi << setw(15) << effErr
737 << setw(15) << effGoodHit << setw(15) << effNtrk << endl;
739 double effiAll = (double)nGoodAll / (
double)(nTotAll);
740 double errAll = sqrt(effiAll * (1-effiAll) / (
double)(nTotAll));
741 double effiInn = (double)nGoodInn / (
double)(nTotInn);
742 double errInn = sqrt(effiInn * (1-effiInn) / (
double)(nTotInn));
743 double effiStp = (double)nGoodStp / (
double)(nTotStp);
744 double errStp = sqrt(effiStp * (1-effiStp) / (
double)(nTotStp));
745 double effiOut = (double)nGoodOut / (
double)(nTotOut);
746 double errOut = sqrt(effiOut * (1-effiOut) / (
double)(nTotOut));
747 feffi << endl <<
"EffiAll: " << setw(15) << effiAll << setw(15) << errAll
748 << setw(15) << nGoodAll << setw(15) << nTotAll << endl;
749 feffi << endl <<
"EffiInn: " << setw(15) << effiInn << setw(15) << errInn
750 << setw(15) << nGoodInn << setw(15) << nTotInn << endl;
751 feffi << endl <<
"EffiStp: " << setw(15) << effiStp << setw(15) << errStp
752 << setw(15) << nGoodStp << setw(15) << nTotStp << endl;
753 feffi << endl <<
"EffiOut: " << setw(15) << effiOut << setw(15) << errOut
754 << setw(15) << nGoodOut << setw(15) << nTotOut << endl;
760 for(
int lay=0; lay<8; lay++) nSdBin[lay] = 12;
761 for(
int lay=8; lay<43; lay++) nSdBin[lay] = 16;
764 ofstream fr2d(
"logr2d.dat");
765 for(
int lay=0; lay<43; lay++){
767 if(lay<8) nbinLim = 9;
769 for(
int iEntr=0; iEntr<
gNEntr[lay]; iEntr++){
770 for(
int lr=0; lr<2; lr++){
771 fr2d << setw(3) << lay << setw(3) << iEntr << setw(3) << lr << endl;
774 histEntry = m_hr2dExc[lay][iEntr][lr][
bin]->GetEntries();
775 double rms = m_hr2dExc[lay][iEntr][lr][
bin]->GetRMS();
776 m_hr2dExc[lay][iEntr][lr][
bin]->Fit(
"gaus",
"Q");
777 double gausSigm = m_hr2dExc[lay][iEntr][lr][
bin]->GetFunction(
"gaus")->GetParameter(2);
787 sigm[
bin] = gausSigm;
788 }
else if(histEntry>100){
797 histEntry = m_hr2dInc[lay][iEntr][lr][
bin]->GetEntries();
798 double rms = m_hr2dInc[lay][iEntr][lr][
bin]->GetRMS();
799 m_hr2dInc[lay][iEntr][lr][
bin]->Fit(
"gaus",
"Q");
800 double gausSigm = m_hr2dInc[lay][iEntr][lr][
bin]->GetFunction(
"gaus")->GetParameter(2);
803 }
else if((lay>2) && (histEntry>500) && (fabs(rms-gausSigm)<0.02)){
804 sigm[
bin] = gausSigm;
820 if(sigm[
bin] < 0.05) sigm[
bin] = 0.05;
829 }
else if(2 ==
gNEntr[lay]){
831 for(
int i=0; i<3; i++){
835 for(
int i=3; i<6; i++){
840 fr2d << setw(5) <<
bin << setw(15) << sigm[
bin] << endl;
853 for(
int lay=0; lay<
NLAYER; lay++){
854 sprintf(hname,
"r2t%02d", lay);
855 r2ttr[lay] =
new TTree(hname, hname);
856 r2ttr[lay]->Branch(
"iEntr", &entrId,
"iEntr/I");
857 r2ttr[lay]->Branch(
"lr", &lrId,
"lr/I");
858 r2ttr[lay]->Branch(
"t", &tdr,
"t/D");
859 r2ttr[lay]->Branch(
"s", &sigma,
"s/D");
860 for(
int iEntr=0; iEntr<
NENTRXT; iEntr++){
861 for(
int lr=0; lr<2; lr++){
865 tdr = (double)
bin * 10.0 + 5.0;
871 r2tList->Add(r2ttr[lay]);
877void CalibBase::renameHist(){
879 m_fdcom->SetName(
"common");
880 m_effNtrk->SetName(
"effNtrk");
881 m_effNtrkRecHit->SetName(
"effNtrkRecHit");
882 m_hresAllInc->SetName(
"HResAllInc");
883 m_hresAllExc->SetName(
"HResAllExc");
884 m_hresAllAve->SetName(
"HResAllAve");
885 m_hresInnInc->SetName(
"HResInnInc");
886 m_hresInnExc->SetName(
"HResInnExc");
887 m_hresStpInc->SetName(
"HResStpInc");
888 m_hresStpExc->SetName(
"HResStpExc");
889 m_hresOutInc->SetName(
"HResOutInc");
890 m_hresOutExc->SetName(
"HResOutExc");
891 m_fdResQ->SetName(
"ResQ");
892 m_hbbTrkFlg->SetName(
"BbTrkFlg");
893 m_hTesAll->SetName(
"TesAll");
894 m_hTesGood->SetName(
"TesGood");
895 m_hTesAllFlag->SetName(
"TesAllFlag");
896 m_hTesRec->SetName(
"TesRec");
897 m_hTesCalFlag->SetName(
"TesCalFlag");
898 m_hTesCalUse->SetName(
"TesCalUse");
899 m_hnRawHit->SetName(
"nRawHit");
900 m_hpt->SetName(
"HPt");
901 m_hptPos->SetName(
"HPtPos");
902 m_hptNeg->SetName(
"HPtNeg");
904 m_hp_cms->SetName(
"HPCMS");
905 m_hpMax->SetName(
"HPMax");
906 m_hpMaxCms->SetName(
"HPMax_Cms");
907 m_hpPos->SetName(
"HP_Pos");
908 m_hpNeg->SetName(
"HP_Neg");
909 m_hpPoscms->SetName(
"HP_Pos_cms");
910 m_hpNegcms->SetName(
"HP_Neg_cms");
911 m_hp_cut->SetName(
"HPCut");
912 m_hchisq->SetName(
"Chisq");
913 m_hnTrk->SetName(
"HNtrack");
914 m_hnTrkCal->SetName(
"HNtrackCal");
915 m_hnhitsRec->SetName(
"HNhitsRec");
916 m_hnhitsRecInn->SetName(
"HNhitsInnRec");
917 m_hnhitsRecStp->SetName(
"HNhitsStpRec");
918 m_hnhitsRecOut->SetName(
"HNhitsOutRec");
919 m_hnhitsCal->SetName(
"HNhitsCal");
920 m_hnhitsCalInn->SetName(
"HNhitsCalInn");
921 m_hnhitsCalStp->SetName(
"HNhitsCalStp");
922 m_hnhitsCalOut->SetName(
"HNhitsCalOut");
923 m_wirehitmap->SetName(
"Wire_HitMap");
924 m_layerhitmap->SetName(
"Layer_HitMap");
925 m_hnoisephi->SetName(
"phi_noise");
926 m_hnoiselay->SetName(
"Layer_noise");
927 m_hnoisenhits->SetName(
"nhits_noise");
928 m_hratio->SetName(
"ratio");
929 m_hdr->SetName(
"dr");
930 m_hphi0->SetName(
"phi0");
931 m_hkap->SetName(
"kappa");
932 m_hdz->SetName(
"dz");
933 m_htanl->SetName(
"tanl");
934 m_hcosthe->SetName(
"costheta");
935 m_hcostheNeg->SetName(
"costhetaNeg");
936 m_hcosthePos->SetName(
"costhetaPos");
937 m_hx0->SetName(
"x0");
938 m_hy0->SetName(
"y0");
939 m_hdelZ0->SetName(
"delta_z0");
940 m_hitEffAll->SetName(
"hitEffAll");
941 m_hitEffRaw->SetName(
"hitEffRaw");
942 m_hitEffRec->SetName(
"hitEffRec");
943 m_grX0Y0->SetName(
"x0y0");
944 m_fdTime->SetName(
"time");
946 for(
int i=0; i<14; i++){
947 sprintf(hname,
"resoAll_qbin%02d", i);
948 m_hresAveAllQ[i]->SetName(hname);
950 sprintf(hname,
"resoOut_qbin%02d", i);
951 m_hresAveOutQ[i]->SetName(hname);
953 for(
int lay=0; lay<43; lay++){
954 for(
int i=0; i<14; i++){
955 sprintf(hname,
"resoLay%02d_qbin%02d", lay, i);
956 m_hresAveLayQ[lay][i]->SetName(hname);
960 for(
int lay=0; lay<
NLAYER; lay++){
961 sprintf(hname,
"Traw%02d", lay);
962 m_htraw[lay]->SetName(hname);
964 sprintf(hname,
"Tdr%02d", lay);
965 m_htdr[lay]->SetName(hname);
967 for(
int lr=0; lr<2; lr++){
968 sprintf(hname,
"Tdr%02d_lr%01d", lay, lr);
969 m_htdrlr[lay][lr]->SetName(hname);
974 m_fdres->SetName(
"resolution");
975 for(
int lay=0; lay<
NLAYER; lay++){
976 sprintf(hname,
"Reso%02dInc", lay);
977 m_hresInc[lay]->SetName(hname);
979 sprintf(hname,
"Reso%02dExc", lay);
980 m_hresExc[lay]->SetName(hname);
982 for (
int lr=0; lr<2; lr++){
983 sprintf(hname,
"Reso%02dInc_lr%01d", lay, lr);
984 m_hreslrInc[lay][lr]->SetName(hname);
986 sprintf(hname,
"Reso%02dExc_lr%01d", lay, lr);
987 m_hreslrExc[lay][lr]->SetName(hname);
992 m_fdmomPhi->SetName(
"momPhi");
996 m_ppPhi[
bin]->SetName(hname);
999 m_pnPhi[
bin]->SetName(hname);
1002 m_ppPhiCms[
bin]->SetName(hname);
1005 m_pnPhiCms[
bin]->SetName(hname);
1007 for(thbin=0; thbin<NThetaBin; thbin++){
1008 sprintf(hname,
"hPpos_theta%02d_phi%02d", thbin,
bin);
1009 m_ppThePhi[thbin][
bin]->SetName(hname);
1011 sprintf(hname,
"hPneg_theta%02d_phi%02d", thbin,
bin);
1012 m_pnThePhi[thbin][
bin]->SetName(hname);
1014 sprintf(hname,
"hPposCms_theta%02d_phi%02d", thbin,
bin);
1015 m_ppThePhiCms[thbin][
bin]->SetName(hname);
1017 sprintf(hname,
"hPnegCms_theta%02d_phi%02d", thbin,
bin);
1018 m_pnThePhiCms[thbin][
bin]->SetName(hname);
1021 for(thbin=0; thbin<NThetaBin; thbin++){
1022 sprintf(hname,
"hPpos_the%02d", thbin);
1023 m_ppThe[thbin]->SetName(hname);
1025 sprintf(hname,
"hPneg_the%02d", thbin);
1026 m_pnThe[thbin]->SetName(hname);
1028 sprintf(hname,
"hPposCms_the%02d", thbin);
1029 m_ppTheCms[thbin]->SetName(hname);
1031 sprintf(hname,
"hPnegCms_the%02d", thbin);
1032 m_pnTheCms[thbin]->SetName(hname);
1035 m_fdr2d->SetName(
"res2d");
1036 for(
int lay=0; lay<43; lay++){
1037 for(
int iEntr=0; iEntr<
gNEntr[lay]; iEntr++){
1038 for(
int lr=0; lr<2; lr++){
1040 sprintf(hname,
"r2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr,
bin);
1041 m_hr2dInc[lay][iEntr][lr][
bin]->SetName(hname);
1042 sprintf(hname,
"r2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr,
bin);
1043 m_hr2dExc[lay][iEntr][lr][
bin]->SetName(hname);
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per bin
virtual void init(TObjArray *hlist, MdcCosGeom *pGeom)=0
virtual void mergeHist(TFile *fhist)=0
virtual void calib(MdcCalibConst *calconst, TObjArray *newXtList, TObjArray *r2tList)=0
void resetSdpar(int lay, int entr, int lr, int bin, double val)
double getSdpar(int lay, int entr, int lr, int bin)
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)