2 const float PI=2*acos(0);
12 void plEana(
int page=-1,
int pl=2,
char *core0=
"sumR12P13ib",
char *iPath=
"/star/u/jlzhang/run12-dev/",
char *oPath=
"/star/u/jlzhang/run12-dev/movies/",
int isMC=0,
char *etaBin=
"Eta7"){
14 cout<<iPath<<core0<<endl;
17 doAll(core0,iPath,isMC,oPath,etaBin);
26 char *nameA[]={
"muEStatEve",
"muEStatTrk"};
27 char *nameB[]={
"muEVRf",
"muEZv",
"muENV",
"muEbX48"};
28 char *nameC[]={
"muEbX7",
"muEbX7v"};
29 char *nameD[]={
"muEDsm1",
"muEDsm2",
"muEDsm3",
"muEDsm4"};
30 char *nameE[]={
"muETrNfit",
"muETrFitFrac",
"muETrch2",
"muETrRxyIn",
"muETrRxyOut",
"muETrch2b"};
31 char *nameF[]={
"muETr2D1",
"muETrPt1",
"muETrPt1N",
"muETrPt1Pr",
"muETrPt1NPr"};
32 char *nameG[]={
"muEeXY",
"muEmaxAdc",
"muEtotAdc",
"muEclAdcPt",
"muEclET"};
33 char *nameH[]={
"muEclET24",
"muEclE242D",
"muEclET24R"};
35 char *nameJ[]={
"muEdist1",
"muEdist2",
"muEdist3",
"muEdist4"};
36 char *nameK[]={
"muETEMCjetETR",
"muETjetEMCjet2D",
"muETEMCjetET"};
37 char *nameL[]={
"muEEMCjetET",
"muEclEMCjetE2D",
"muETjetET"};
38 char *nameM[]={
"muETwayET",
"muEBwayET",
"muEEclETPt",
"muEEwayET"};
40 char *nameW[]={
"muETotwayET2D",
"muEsPtBalance_clust",
"muE_WET",
"muE_W2D1"};
41 char *namePB[]={
"muEsPtBalance_clust",
"muEsPtBalance_awayTot",
"muE_Weta",
"muE_WXY"};
42 char *nameN[]={
"muETrdEdX",
"muE_Wdedx"};
43 char *nameO[]={
"muE_WglDcaSP",
"muE_WglDcaSN"};
45 char *nameP[]={
"muE_ETlive0",
"muE_ETlive1",
"muE_ETlive2",
"muE_ETlive3",
"muE_Wcar1",
"muE_Wcar2",
"muE_Wcar3"};
48 char *nameR2[]={
"muEchRecPNg",
"muEchRecPNp"};
49 char *nameR3[]={
"muEchRecHypCorrPNg" ,
"muEchRecHypCorrPNp"};
51 char *nameSMD[]={
"muE_UoffStr",
"muE_VoffStr"};
54 char *nameS1[]={
"spinEStatEve",
"spinEs4mon",
"spinEbX48",
"spinEbX7",
"spinEbX48c",
"spinEbX7c"};
55 char *nameS5[]={
"spinE_ET_P",
"spinE_ET_N",
"spinEQpT",
"spinEQpT2"};
56 char *nameS6[]={
"spinEQpT_hits",
"spinEQpT_hitF",
"spinEHitsFit_Frac"};
57 char *nameS2[]={
"spinEY0",
"spinEY1",
"spinEY2_P",
"spinEY2_N"};
58 char *nameS3[]={,
"spinEY3_P",
"spinEY3_N",
"spinEY4_P",
"spinEY4_N"};
59 char *nameS4[]={
"spinEY5_P",
"spinEY5_N",
"spinELepEta_P",
"spinELepEta_N"};
61 char *nameEsmd1[]={
"muEsmdNhit",
"muEsmdEne",
"muEsmdRatioUV",
"muEclustET_esmdNhit",
"muEclustET_esmdEne",
"muEclustET_esmdRatio"};
62 char *nameEsmd2[]={
"muEclustET_esmdEneSum7",
"muEsPtBalance_clustPassSMD",
"muEsPtBalance_clustFailSMD",
"muEsPtBalance_esmdRatio_ET25",
"muEsPtBalance2_clustPassSMD",
"muEsPtBalance2_clustFailSMD"};
67 TString fullInpName=iPath; fullInpName+=core0;
68 fullInpName+=
".wana.hist.root";
69 fd=
new TFile(fullInpName);
71 printf(
"EROR: input histo file not found, quit\n",fullInpName.Data());
74 printf(
"Opened: %s\n",fullInpName.Data());
78 if(fd->Get(
"muEStatEve")==0) {
79 cout<<
"Switching to etaBin="<<etaBin<<
" now have to use gDirectory"<<endl;
82 cout<<
"Missing TDirectory of interest, no plots!"<<endl;
87 if(page==1||page==13){
89 h0=(TH1*)gDirectory->Get(
"muEStatEve"); assert(h0);
90 printf(
"%s: ",h0->GetName());
91 for(
int k=1;k<=16;k++) printf(
"%.0f, ",h0->GetBinContent(k));
97 if( ((page>=2 && page<=6) || (page>=31 && page<=43)) && !fd->cd(
"tpc"))
return;
99 gStyle->SetPalette(1,0);
100 gStyle->SetOptStat(0);
102 sprintf(padTit,
"%s",core0);
107 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
108 c->Divide(1,2);gStyle->SetOptStat(0);
110 for(
int i=0;i<2;i++) {
111 printf(
"->%s<\n",nameX[i]);
112 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
113 c->cd(i+1); h->Draw();
114 if(i==0) h->Draw(
"h text");
116 c->GetPad(1)->SetLogy();
117 c->GetPad(2)->SetLogy();
121 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
122 c->Divide(2,2);gStyle->SetOptStat(1110);
124 for(
int i=0;i<4;i++) {
125 printf(
"->%s<\n",nameX[i]);
126 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
127 c->cd(i+1); h->Draw();
128 if(i==1) h->Fit(
"gaus",
"",
"hR",-50,50);
130 c->GetPad(1)->SetLogy();
131 c->GetPad(3)->SetLogy();
136 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
137 c->Divide(1,2);gStyle->SetOptStat(10);
141 for(
int i=0;i<2;i++) {
142 printf(
"->%s<\n",nameX[i]);
143 hA[i]=(TH1F*)gDirectory->Get(nameX[i]); assert(hA[i]);
144 if(i==0) hA[i]->Draw();
145 else hA[i]->Draw(
"same");
150 hA[0]->SetFillColor(0);
152 TH1 *hEf=(TH1F*) hA[1]->Clone();
153 hEf->SetTitle(
"Vertex effi vs. bXing");
154 hEf->SetName(
"muVefbx");
155 hEf->SetFillColor(0); hEf->SetLineColor(kMagenta);
158 hEf->Draw(); hEf->SetMaximum(1.1);
159 hEf->Fit(
"pol0",
"",
"Rh",50,100);
164 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
165 c->Divide(2,2);gStyle->SetOptStat(1001111);
167 for(
int i=0;i<4;i++) {
168 printf(
"->%s<\n",nameX[i]);
169 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
170 c->cd(i+1); h->Draw();
172 h->SetFillColor(kBlue);
177 c->GetPad(1)->SetLogy();
178 c->GetPad(2)->SetLogy();
179 c->GetPad(3)->SetLogy();
182 case 5:{ sprintf(padTit,
"Track selection cuts, %s",core0);
183 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
184 c->Divide(3,2);gStyle->SetOptStat(110);
186 for(
int i=0;i<6;i++) {
187 printf(
"->%s<\n",nameX[i]);
188 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
189 c->cd(i+1); h->Draw();
190 if(i==5) h->Draw(
"colz");
198 case 6:{ sprintf(padTit,
"Selected high PT tracks, %s",core0);
199 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c0=makeTitle(can,padTit,page);
200 TPad *cL,*cR; splitPadX(0.4,&cL,&cR);
202 cR->Divide(2,2);gStyle->SetOptStat(10);
205 for(
int i=0;i<5;i++) {
206 printf(
"->%s<\n",nameX[i]);
207 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
210 for(
float eta=-0.8; eta<.6; eta+=1.4)
211 for(
float x=-PI-.1; x<PI; x+=PI/6) {
212 int sec=tpcSec(x, eta);;
214 sprintf(txt,
"sec %d",sec);
215 tx=
new TText(eta,x,txt); tx->Draw();
219 if(i==1 || i==3) {cR->cd(1+i/2); h1=h; h->Draw(); h->SetMinimum(.1);}
220 if(i==4) h->SetFillColor(9);
221 if(i==2 || i==4) { h2=h; h->Draw(
"same"); cR->cd(2+i/2);
222 h=(TH1F*) h2->Clone(); h->SetTitle(
"Ratio Negtive/all");h->Divide(h1); h->Draw();
223 h->SetMinimum(0.2); h->SetMaximum(0.7);
225 if(i>0) h->SetAxisRange(0,50);
227 cR->GetPad(1)->SetLogy();
228 cR->GetPad(2)->SetLogy();
231 case 7:{ sprintf(padTit,
"ETOW response, %s",core0);
232 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
233 c->Divide(3,2);gStyle->SetOptStat(1000110);
235 for(
int i=0;i<5;i++) {
236 printf(
"->%s<\n",nameX[i]);
237 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
238 c->cd(i+1); h->Draw();
239 if(i==3 || i==0) h->Draw(
"colz");
240 if(i==3) h->SetMaximum(0.6* h->GetMaximum());
242 c->GetPad(2)->SetLogy();
243 c->GetPad(3)->SetLogy();
245 c->GetPad(5)->SetLogy();
248 case 8:{ sprintf(padTit,
"2x1 / 4x4 cluster isolation cut, %s",core0);
249 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
250 c->Divide(2,2);gStyle->SetOptStat(10);
252 for(
int i=0;i<3;i++) {
253 printf(
"->%s<\n",nameX[i]);
254 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
255 c->cd(i+1); h->Draw();
256 if(i==1 ) h->Draw(
"colz");
258 c->GetPad(1)->SetLogy();
259 c->GetPad(2)->SetLogz();
262 case 9:{ sprintf(padTit,
"3D distance between track & cluster, %s",core0);
263 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
264 c->Divide(2,2);gStyle->SetOptStat(10);
266 for(
int i=0;i<4;i++) {
267 printf(
"->%s<\n",nameX[i]);
268 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
271 else h->Draw(
"colz");
275 case 10:{ sprintf(padTit,
"separted near jet in BOW & TPC, %s",core0);
276 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
277 c->Divide(2,2);gStyle->SetOptStat(10);
279 for(
int i=0;i<3;i++) {
280 printf(
"->%s<\n",nameX[i]);
281 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
282 c->cd(i+1); h->Draw();
283 if(i==1 ) h->Draw(
"colz");
285 c->GetPad(1)->SetLogy();
286 c->GetPad(2)->SetLogz();
287 c->GetPad(3)->SetLogy();
291 case 11:{ sprintf(padTit,
"TPC+BTOW near jet ET, %s",core0);
292 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
293 c->Divide(2,2);gStyle->SetOptStat(10);
295 for(
int i=0;i<3;i++) {
296 printf(
"->%s<\n",nameX[i]);
297 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
298 c->cd(i+1); h->Draw();
299 if(i==1 ) h->Draw(
"colz");
302 c->GetPad(2)->SetLogz();
306 case 12:{ sprintf(padTit,
"away ET veto, %s",core0);
307 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
308 c->Divide(2,2);gStyle->SetOptStat(10);
310 for(
int i=0;i<4;i++) {
311 printf(
"->%s<\n",nameX[i]);
312 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
313 c->cd(i+1); h->Draw();
314 if(i==2) h->SetAxisRange(0,60);
319 c->GetPad(1)->SetLogy();
320 c->GetPad(2)->SetLogy();
321 c->GetPad(4)->SetLogy();
326 case 13:{ sprintf(padTit,
"best W selection, %s",core0);
327 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
328 c->Divide(2,2);gStyle->SetOptStat(10);
330 for(
int i=0;i<4;i++) {
332 printf(
"->%s<\n",nameX[i]);
333 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
335 float sum=h->GetEntries();
336 sprintf(txt,
"%.0f eve >thres",sum);
337 tx=
new TText(30,52,txt); tx->Draw();
340 c->cd(i+1); h->Draw();
341 if(i<3) h->SetAxisRange(0,60);
342 if(i!=2 ) h->Draw(
"colz");
343 if(i==0 ) h->SetAxisRange(0,60,
"y");
344 if(i==1 ) {h->SetAxisRange(0,60,
"x");h->SetAxisRange(-40,60,
"y");}
346 h->Draw(
"eh"); h->SetAxisRange(0,60);
354 case 14: { sprintf(padTit,
"pT-Balance plots (out of order) %s",core0);
355 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
356 c->Divide(2,2);gStyle->SetOptStat(10);
358 for(
int i=0;i<4;i++) {
359 printf(
"->%s<\n",nameX[i]);
360 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
362 if(i==2) {h->Rebin(8); h->GetXaxis()->SetRangeUser(0.5,2.0);}
363 if(i<2) h->Draw(
"colz");
365 if(i==3) h->Draw(
"colz");
370 case 15:{ sprintf(padTit,
"TPC dEdx for all & W tracks, %s",core0);
371 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
372 c->Divide(2,1);gStyle->SetOptStat(10);
374 for(
int i=0;i<2;i++) {
375 printf(
"->%s<\n",nameX[i]);
376 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
377 c->cd(i+1); h->Draw(
"colz");
379 c->GetPad(1)->SetLogz();
382 case 16:{ sprintf(padTit,
"TRack-SMD peak offset , %s",core0);
383 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
384 c->Divide(1,2);gStyle->SetOptStat(10);
385 char **nameX=nameSMD;
386 for(
int i=0;i<2;i++) {
387 printf(
"->%s<\n",nameX[i]);
388 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
389 c->cd(i+1); h->Draw(
"colz");
390 for(
int sec=1;sec<=12;sec++) {
391 float phiC= (3-sec)*30;
392 if(phiC<-179) phiC+=360;
393 float phiL= (phiC-15.)/180*3.1416;
395 ln=
new TLine(phiL,-7,phiL,7); ln->Draw(); ln->SetLineColor(8);
396 tx=
new TText(phiL+0.05,5,Form(
"sec %d",sec)); tx->Draw();
401 case 17:{ sprintf(padTit,
"TPC global DCA to Vertex for W tracks, %s",core0);
402 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
403 c->Divide(2,2);gStyle->SetOptStat(10);
405 for(
int i=0;i<2;i++) {
406 printf(
"->%s<\n",nameX[i]);
407 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
408 c->cd(i+1); h->Draw(
"colz");
409 h->SetAxisRange(0,60); h->SetAxisRange(-2.,2.,
"y");
415 case 18:{ sprintf(padTit,
"electron candidate ET vs. condition, %s",core0);
416 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
417 gStyle->SetOptStat(10);
419 c->cd(); TPad *cL,*cR; splitPadX(0.5,&cL,&cR);
420 cL->cd(); cR->Divide(1,3);
421 for(
int i=0;i<7;i++) {
422 printf(
"->%s<\n",nameX[i]);
423 h=(TH1*)gDirectory->Get(nameX[i]); assert(h);
424 if(i==0) { h->Draw(); h->SetAxisRange(0,60);}
425 if(i>0 && i<4) h->Draw(
"same");
426 if(i==1) h->SetFillColor(kBlue);
427 if(i==2) h->SetFillColor(8);
428 if(i==3) h->SetFillColor(kRed);
429 if(i==4) { cR->cd(1); h->Draw(); h->SetAxisRange(0,5); }
430 if(i==5) { cR->cd(2); h->Draw();}
431 if(i==6) { cR->cd(3); h->Draw(); h->Fit(
"gaus",
"",
"Rh",-100,80); h->GetXaxis()->SetTitle(
"Z (cm)");}
433 h->GetXaxis()->SetTitleOffset(0.9);
434 h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);}
437 cL->GetPad(0)->SetLogy();
438 cR->GetPad(1)->SetLogy();
442 case 19:{ sprintf(padTit,
"charge separation, %s",core0);
443 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
444 c->Divide(2,1);gStyle->SetOptStat(110110);
445 ln=
new TLine(0,0,80,0); ln->SetLineColor(kMagenta);
447 for(
int i=0;i<2;i++) {
448 printf(
"->%s<\n",nameX[i]);
449 h=(TH2*)gDirectory->Get(nameX[i]); assert(h); h->Rebin2D(3,3);
450 c->cd(i+1); h->Draw(
"colz");
451 h->SetAxisRange(0,70); ln->Draw();
455 case 20:{ sprintf(padTit,
"Charge Separation Hyperbola Corrected, %s",core0);
456 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
457 c->Divide(2,1);gStyle->SetOptStat(110110);
458 ln=
new TLine(0,0,70,0); ln->SetLineColor(kMagenta);
460 for(
int i=0;i<2;i++) {
461 printf(
"->%s<\n",nameX[i]);
462 h=(TH2*)gDirectory->Get(nameX[i]); assert(h); h->Rebin2D(3,3);
463 c->cd(i+1); h->Draw(
"colz");
464 h->SetAxisRange(0,70); ln->Draw();
468 case 23:{ sprintf(padTit,
"bXing & spin QA, %s",core0);
469 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,spinPre+padTit,page);
470 c->Divide(2,3);gStyle->SetOptStat(1000010);
472 for(
int i=0;i<6;i++) {
473 printf(
"->%s<\n",nameX[i]);
474 h=(TH1*)gDirectory->Get(spinPre+nameX[i]); assert(h);
475 c->cd(i+1); h->Draw();
476 if(i==1) { h->Draw(
"colz");}
478 c->GetPad(1)->SetLogy();
483 case 24:{ sprintf(padTit,
"Final Endcap Ws for spin analysis, %s",core0);
484 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,spinPre+padTit,page);
485 c->Divide(2,2);gStyle->SetOptStat(10);
487 for(
int i=0;i<4;i++) {
488 printf(
"->%s<\n",nameX[i]);
489 h=(TH1*)gDirectory->Get(spinPre+nameX[i]); assert(h);
490 c->cd(i+1); h->Draw();
491 if(i==2) { hx=(TH1*) h->Clone(); h->SetFillColor(9); hx->SetFillColor(46);
492 hx->SetAxisRange(0,1); hx->Draw(
"same");
495 if(i==3) { h->Draw(
"colz"); ((TH2F*)h)->Rebin2D(1,2);}
497 if(i<2||i==3) h->SetAxisRange(0,70);
501 case 25:{ sprintf(padTit,
"Charge separation vs. track quality, %s", core0);
502 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,spinPre+padTit,page);
503 c->Divide(2,2);gStyle->SetOptStat(10);
505 for(
int i=0;i<3;i++) {
506 printf(
"->%s<\n",nameX[i]);
507 h=(TH1*)gDirectory->Get(spinPre+nameX[i]); assert(h);
508 c->cd(i+1); h->Draw(
"colz"); ((TH2F*)h)->Rebin2D(2,2);
515 { sprintf(padTit,
"spin sorting: lumi & Ws, %s",core0);
517 if(page==26) { nameX=nameS3;sprintf(padTit,
"spin sorting: QCD background, %s",core0);}
518 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,spinPre+padTit,page);
519 c->Divide(2,2);gStyle->SetOptStat(1000010);
521 for(
int i=0;i<4;i++) {
522 printf(
"->%s<\n",nameX[i]);
523 cout<<spinPre+nameX[i]<<endl;
524 h=(TH1*)gDirectory->Get(spinPre+nameX[i]); assert(h);
525 c->cd(i+1); h->Draw(
"h text");
529 case 28:{ sprintf(padTit,
"charge & ET vs. spin state, %s",core0);
530 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,spinPre+padTit,page);
531 c->Divide(2,2);gStyle->SetOptStat(10);
533 for(
int i=0;i<4;i++) {
534 printf(
"->%s<\n",nameX[i]);
535 h=(TH1*)gDirectory->Get(spinPre+nameX[i]); assert(h);
536 c->cd(i+1); h->Draw(
"colz");
541 case 29:{ sprintf(padTit,
"ESMD 1, %s",core0);
542 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
543 c->Divide(3,2);gStyle->SetOptStat(10);
544 char **nameX=nameEsmd1;
545 for(
int i=0;i<6;i++) {
546 printf(
"->%s<\n",nameX[i]);
547 h=(TH2F*)gDirectory->Get(nameX[i]); assert(h);
548 if(i==1) h->Rebin2D(4,4);
549 if(i==3) h->Rebin2D(4,2);
550 if(i==4) h->Rebin2D(4,10);
551 if(i==5) h->Rebin2D(4,2);
552 if(i>2) h->GetXaxis()->SetRangeUser(0,70);
554 c->cd(i+1); h->Draw(
"colz");
558 case 30:{ sprintf(padTit,
"ESMD 2, %s",core0);
559 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
560 c->Divide(3,2);gStyle->SetOptStat(10);
561 char **nameX=nameEsmd2;
562 for(
int i=0;i<6;i++) {
563 printf(
"->%s<\n",nameX[i]);
564 h=(TH2F*)gDirectory->Get(nameX[i]); assert(h);
567 h->GetXaxis()->SetRangeUser(0,70);
570 h->GetXaxis()->SetRangeUser(0,70);
571 h->GetYaxis()->SetRangeUser(-60,60);
573 c->cd(i+1); h->Draw(
"colz");
593 int iCut=(page-31)/2;
594 int sec1=1, sec2=12;
if(iew) {sec1=13, sec2=24;
return;}
595 char *titA[]={
"stats",
"nFitPoints",
" nFit/nPossible",
"1st hit Rxy",
"last hit Rxy",
"dE/dX"};
596 char *titB[]={
"Stat",
"TrNfit",
"TrFitFrac",
"TrRxyIn",
"TrRxyOut",
"TrdEdX"};
597 sprintf(padTit,
"TPC %s sectors[%d,%d], %s",titA[iCut],sec1,sec2,core0);
598 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
599 c->Divide(4,3);gStyle->SetOptStat(10);
600 for(
int i=0;i<12;i++) {
602 sprintf(name,
"secEemcTr%d_%s",i+sec1,titB[iCut]);
603 printf(
"->%s<\n",name);
604 h=(TH1*)gDirectory->Get(name); assert(h);
611 h->SetFillColor(col);
617 case 43:{ sprintf(padTit,
"TPC accepted tracks, %s",core0);
619 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
620 c->Divide(2,1);gStyle->SetOptStat(10);
622 c->cd(1); h2->Draw(
"colz");
626 for(
int i=0;i<24;i++) {
628 sprintf(name,
"secEemcTr%d_Tr2D1",i+1);
629 printf(
"->%s<\n",name);
630 h=(TH1*)gDirectory->Get(name); assert(h); h->SetLineColor(30+i);
631 if(i==0) h->Draw(
"box");
632 else h->Draw(
"box same");
638 printf(
"page=%d NOT defined\n",page);
643 sprintf(text,
"%s%s_page%03d",oPath,core0,page);
649 if(pl&1) can->Print(tit+
".gif");
650 if(pl&2) can->Print(tit+spinPre+
".ps");
655 void splitPadX(
float x, TPad **cL, TPad **cR) {
656 (*cL) =
new TPad(
"padL",
"apdL",0.0,0.,x,0.95);
658 (*cR) =
new TPad(
"padL",
"apdL",x+0.005,0.,1.0,0.95);
663 void splitPadY(
float y, TPad **cU, TPad **cD) {
664 (*cU) =
new TPad(
"padD",
"apdD",0,y+0.005,1.0,1.);
666 (*cD) =
new TPad(
"padU",
"apdU",0.0,0.,1.,y);
676 int tpcSec(
float phiRad,
float etaDet){
678 float phi=phiRad/PI*180;
686 sec=13+(int)( x/30.);
693 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
695 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
699 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
712 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);
718 void doAll(
char *core0=
"",
char *iPath=
"",
int isMC=0,
char* oPath=
"",
char* etaBin=
""){
719 for(
int i=1;i<=28;i++) {
721 if( isMC && i==3)
continue;
722 if( isMC &&i==4)
continue;
723 if( isMC && i>=20)
continue;
725 plEana(i,2,core0,iPath,oPath,isMC,etaBin);
730 for(
int i = 29; i<=30; i++) plEana(i,2,core0,iPath,oPath,isMC,etaBin);
733 for(
int i=31;i<=43;i++) plEana(i,2,core0,iPath,oPath,isMC,etaBin);
738 void doAllMC(
char *core0=
"",
char *iPath=
""){
739 for(
int i=1;i<=22;i++){
744 if(i==20 || i==22)
continue;
745 plEana(i,2,core0,iPath);
749 for(
int i=31;i<=43;i++) plEana(i,2,core0,iPath);