10 void plEtaBins(
int page=1) {
11 TString simuPath=
"8.28.12/";
12 TString dataPath=
"8.29.12/";
13 TString psPath=
"out/";
15 fdA[0]=
new TFile(dataPath+
"run12long.wana.hist.root");
16 fdA[1]=
new TFile(simuPath+
"jba310.wana.hist.root");
17 fdA[2]=
new TFile(simuPath+
"jbb330.wana.hist.root");
18 fdA[3]=
new TFile(simuPath+
"jba311.wana.hist.root");
20 TString dataNameA[mxF]={
": STAR data 2012",
"Pythia W+",
"filter Pythia QCD" ,
"Pythia W-"};
22 float lumScale[mxF]={72.,192/0.65,27*2.2,198/0.84};
23 float absLT=lumScale[0];
24 for(
int k=0;k<mxF;k++) {
25 assert(fdA[k]->IsOpen());
29 TString namePerPageB[]={
"dumm",
"muBclET24R",
"muBdist4",
"muBjetETR",
"muWET",
"musPtBalance_clust",
"musPtBalance_awayTot",
"muWcar3",
"muWeta",
"muChRecPNp",
"muWdedx"};
30 TString namePerPageE[]={
"dumm",
"muEclET24R",
"muEdist4",
"muETEMCjetETR",
"muE_WET",
"muEsPtBalance_clust",
"muEsPtBalance_awayTot",
"muE_Wcar3",
"muE_Weta",
"muEchRecPNp",
"muE_Wdedx"};
33 gStyle->SetOptStat(1001100);
36 for(
int etaBin=1; etaBin<=8;etaBin++) {
37 if(etaBin==6)
continue;
39 hName=namePerPageB[page];
40 if(etaBin==7) hName=namePerPageE[page];
41 padTit=Form(
"#eta-bin=%d, absLT=%.1f/pb : ",etaBin, absLT)+hName;
42 can=
new TCanvas(
"aa",
"aa",800,600); TPad *c=makeTitle(can,padTit,page);
55 for(
int k=0;k<mxF;k++){
56 TH1F *h=(TH1F *)fdA[k]->Get(Form(
"Eta%d/",etaBin)+hName); assert(h);
57 if(page==4 ||page==7 ) h->Rebin();
58 if(page==8) h->Rebin(4);
59 if(k==0) { yMax=1.1*h->GetMaximum(); h->SetLineWidth(2.);}
60 if(k==1 && page!=7) { h->SetFillColor(kRed); h->SetLineColor(kYellow); h->Draw(
"same"); h0->Draw(
"same");}
61 if(k==3) h->SetFillColor(kBlue);
66 if(k==0) tit+=h->GetTitle();
67 h->SetTitle(tit+dataNameA[k]);
68 h->Scale(1./lumScale[k]);
69 if(page>=4) { h->SetMaximum(yMax); }
70 if(page==4) h->SetAxisRange(0,70);
71 if(page==8) h->SetAxisRange(-1.3,1.8);
72 if(page==7){ h->Fit(
"gaus"); ln=
new TLine(0,0,0,1e4); ln->Draw();}
83 for(
int k=0;k<mxF;k++){
84 TH2F *h2=(TH2F *)fdA[k]->Get(Form(
"Eta%d/",etaBin)+hName); assert(h);
88 if(k==0) tit+=h2->GetTitle();
89 h2->SetTitle(tit+dataNameA[k]);
90 h2->Scale(1./lumScale[k]);
91 if(page==9 ||page==10 ) { h2->Rebin2D(2,2); h2->SetAxisRange(0,70);}
98 printf(
"page=%d NOT defined\n",page);
103 TString tit=psPath+Form(
"comp_page%02d_etaBin%d",page,etaBin);
106 can->Print(tit+
".ps");
115 TPad *makeTitle(TCanvas *c,
char *core,
int page) {
117 TPad *pad0 =
new TPad(
"pad0",
"apd0",0.0,0.95,1.,1.);
121 TPaveText *pt =
new TPaveText(0,0.,1,1,
"br");
134 pad =
new TPad(
"pad1",
"apd1",0.0,0.0,1,.95);