void plot_golfcourse_Graviton(){ bool useNewStyle=true; if(useNewStyle) setFPStyle(); TFile *fFREQ=new TFile("higgsCombineGrav2L2Q_MCMC.RSGrav05.root","READ"); // TFile *fFREQ=new TFile("higgsCombineGrav2L2Q_Asymptotic.RSGrav05.root","READ"); TTree *t=(TTree*)fFREQ->Get("limit"); double mh,limit; double quant; t->SetBranchAddress("mh",&mh); t->SetBranchAddress("limit",&limit); t->SetBranchAddress("quantileExpected",&quant); vector<double> v_mh, v_median,v_68l,v_68h,v_95l,v_95h, v_obs; for(int i=0;i<t->GetEntries();i++){ // int i=j; // if(j==t->GetEntries())i=0; t->GetEntry(i); //cout<<"i "<<i<<flush<<" m = "<<mh<<endl; // if(mh==600)cout<<"$$$$$$$$$ TREE 600 $$$$$$$$$$$$$$"<<endl; if(quant>-1.01&&quant<-0.99){ v_obs.push_back(limit); v_mh.push_back(mh); } else if(quant>0.02&&quant<0.03)v_95l.push_back(limit); else if(quant>0.15&&quant<0.17)v_68l.push_back(limit); else if(quant>0.49&&quant<0.51)v_median.push_back(limit); else if(quant>0.83&&quant<0.85)v_68h.push_back(limit); else if(quant>0.965&&quant<0.98){ // cout<<"95% -> at M="<<mh<<" I found "<<limit<<endl; v_95h.push_back(limit); } else {cout<<"Error! Quantile = "<<quant<<endl;} } cout<<"Out of the loop !"<<endl; //////////////////////////////////////// /// //read in theoretical values from text files // bool applyExtraTherUnc=true; string xsect_file_th="./RSGravXSectTimesBRToZZ_Pythia_c05.txt"; string xsect_file_interpol="./RSGravXSectTimesBRToZZ_Pythia_c05_EXPOINTERP.txt"; // make_interpolated_xsect(xsect_file_th, xsect_file_interpol); // ifstream xsect_file("./RSGravXSectTimesBRToZZ_Pythia_c05.txt",ios::in); ifstream xsect_file(xsect_file_interpol.c_str(),ios::in); if (! xsect_file.is_open()){ cout<<"Failed to open file with xsections"<<endl;} float mH, CS; vector<float> v_mhxs, v_xs, v_brzz2l2q,v_toterrh,v_toterrl; while(xsect_file.good()){ xsect_file >> mH>> CS; if(mH==600)cout<<"~~~~~ 600 theor ~~~~~~~~~~~~~"<<endl; if(mH<300.0)continue; v_mhxs.push_back(mH); v_xs.push_back(CS/1000.0);//*BRZZ2l2q //unavailable theor errors for graviton float tot_err_p=0.0; float tot_err_m=0.0; v_toterrh.push_back(1.0+(tot_err_p)); v_toterrl.push_back(1.0-(tot_err_m)); } cout<<"Size of theor "<<v_mhxs.size()<<endl; xsect_file.close(); string xsect_file_interpol2="./RSGravXSectTimesBRToZZ_Pythia_c10_EXPOINTERP.txt"; ifstream xsect_file2(xsect_file_interpol2.c_str(),ios::in); if (! xsect_file2.is_open()){ cout<<"Failed to open file with xsections (c=0.10)"<<endl;} float mH2,CS10; vector<float> v_xs10; while(xsect_file2.good()){ xsect_file2 >> mH2>> CS10; if(mH2==975)cout<<"~~~~~ 975 theor ~~~~~~~~~~~~~"<<endl; if(mH2<300.0)continue; v_xs10.push_back(CS10);//*BRZZ2l2q //unavailable theor errors for graviton float tot_err_p=0.0; float tot_err_m=0.0; // v_toterrh.push_back(1.0+(tot_err_p)); // v_toterrl.push_back(1.0-(tot_err_m)); } cout<<"Size of theor "<<v_xs10.size()<<endl; xsect_file2.close(); // //END THEOR INPUT PART /////////////// const int nMass= v_mh.size(); double mass[nMass],mass1[nMass],obs_lim_cls[nMass]; double medianD[nMass]; double up68err[nMass],down68err[nMass],up95err[nMass],down95err[nMass]; double xs[nMass], xs_uperr[nMass], xs_downerr[nMass]; double xs10[nMass], xs10_uperr[nMass], xs10_downerr[nMass]; int nMassEff=0,nMassEff1=0; int nM95=0; double mass95[nMass],median95[nMass]; int nexcluded=0; bool excl; for(int im=0;im<nMass;im++){ // if( mass[nMassEff-1]>490.) cout<<"Array "<<im<<flush<<" m = "<<v_mh.at(im)<<endl;; //protection against messed up jobs excl=false; if(v_68h.at(im)>=v_95h.at(im) || v_68l.at(im)<=v_95l.at(im) ){ cout<<"Point at M = "<<v_mh.at(im) <<" excluded"<<endl; nexcluded++; // continue; excl=true; } // if(im%2==1)excl=true;//sample only one half of the points //search for right index in theor vectors bool found=false; int indtmp=0,ind=-1; while(!found){ if(v_mhxs.at(indtmp)==v_mh.at(im)){found=true;ind=indtmp;} indtmp++; if(indtmp==v_mhxs.size()){ cout<<"!!! m="<<flush<<v_mh.at(im)<<" NOT found in theor matrix."<<endl; break; } }//end while if(!found){ cout<<"(2) m="<<v_mh.at(im)<<" NOT found in theor matrix."<<endl; continue; } double fl_xs=double(v_xs.at(ind)); double fl_xs10=double(v_xs10.at(ind)); mass[nMassEff]=v_mh.at(im); //if( mass[nMassEff]==600.0)cout<<"=============> 600 !!!"<<endl; obs_lim_cls[nMassEff]=v_obs.at(im)*fl_xs; nMassEff++; if(!excl){ mass1[nMassEff1]=v_mh.at(im); medianD[nMassEff1]=v_median.at(im)*fl_xs; up68err[nMassEff1]=(v_68h.at(im)-v_median.at(im))*fl_xs; down68err[nMassEff1]=(v_median.at(im)-v_68l.at(im))*fl_xs; xs[nMassEff1]=fl_xs; xs_uperr[nMassEff1]=double( v_toterrh.at(ind))*xs[nMassEff1]- xs[nMassEff1]; xs_downerr[nMassEff1]= xs[nMassEff1]- double( v_toterrl.at(ind))* xs[nMassEff1]; xs10[nMassEff1]=fl_xs10; xs10_uperr[nMassEff1]=double( v_toterrh.at(ind))*xs10[nMassEff1]- xs10[nMassEff1]; xs10_downerr[nMassEff1]= xs10[nMassEff1]- double( v_toterrl.at(ind))* xs10[nMassEff1]; //cout<<"Theor err on 4g for M="<<mass[nMassEff]<<" "<< ggxs4g_downerr[nMassEff] << " "<<ggxs4g_uperr[nMassEff]<<endl; nMassEff1++; bool skip95= false;// // skip95=v_mh.at(im)==204||v_mh.at(im)==208||v_mh.at(im)==212||v_mh.at(im)==214|| v_mh.at(im)==232 || v_mh.at(im)==240 || v_mh.at(im)==240 || v_mh.at(im)==244 || v_mh.at(im)==252 || v_mh.at(im)==264 || v_mh.at(im)==272 || v_mh.at(im)==288 ; // skip95=false; if(skip95 )continue; mass95[nM95]=v_mh.at(im); median95[nM95]=v_median.at(im)*fl_xs; up95err[nM95]=(v_95h.at(im)-v_median.at(im))*fl_xs; down95err[nM95]=(v_median.at(im)-v_95l.at(im))*fl_xs; // cout<<"M95: "<< mass95[nM95]<<" "<<median95[nM95]<<" +"<<up95err[nM95]<<" -"<< down95err[nM95]<< // " ("<<v_95h.at(im) <<" - "<<v_median.at(im) <<")"<<endl; nM95++; }//end if not excluded mass point }//end loop over im (mass points) cout<<"Excluded "<<nexcluded<<" sick mass points."<<endl; // cout<<"Working on TGraph"<<endl; TGraph *grobslim_cls=new TGraphAsymmErrors(nMassEff,mass,obs_lim_cls); grobslim_cls->SetName("LimitObservedCLs"); TGraph *grmedian_cls=new TGraphAsymmErrors(nMassEff1,mass1,medianD); grmedian_cls->SetName("LimitExpectedCLs"); TGraphAsymmErrors *gr68_cls=new TGraphAsymmErrors(nMassEff1,mass1,medianD,0,0,down68err,up68err); gr68_cls->SetName("Limit68CLs"); TGraphAsymmErrors *gr95_cls=new TGraphAsymmErrors(nM95,mass95,median95,0,0,down95err,up95err); gr95_cls->SetName("Limit95CLs"); TGraphAsymmErrors *grthSM=new TGraphAsymmErrors(nMassEff1,mass1,xs,0,0,0,0);//xs_downerr,xs_uperr); grthSM->SetName("SMXSection"); TGraphAsymmErrors *grthSM10=new TGraphAsymmErrors(nMassEff1,mass1,xs10,0,0,0,0); grthSM10->SetName("SMXSection_c.10"); // cout<<"Plotting"<<endl; double fr_left=390.0, fr_down=0.01,fr_right=1010.0,fr_up=10.0; TCanvas *cMCMC=new TCanvas("c_lim_Asymp","canvas with limits for Asymptotic CLs",630,600); cMCMC->cd(); cMCMC->SetGridx(1); cMCMC->SetGridy(1); // draw a frame to define the range TH1F *hr = cMCMC->DrawFrame(fr_left,fr_down,fr_right,fr_up,""); hr->SetXTitle("m_{G} [GeV]"); hr->SetYTitle("#sigma_{95%} #times BR(G #rightarrow ZZ) [pb]");// #rightarrow 2l2q // cMCMC->GetFrame()->SetFillColor(21); //cMCMC->GetFrame()->SetBorderSize(12); gr95_cls->SetFillColor(kYellow); gr95_cls->SetFillStyle(1001);//solid gr95_cls->SetLineStyle(kDashed); gr95_cls->SetLineWidth(3); gr95_cls->GetXaxis()->SetTitle("m_{G} [GeV]"); gr95_cls->GetYaxis()->SetTitle("#sigma_{95%} #times BR(G #rightarrow ZZ) [pb]");// #rightarrow 2l2q gr95_cls->GetXaxis()->SetRangeUser(fr_left,fr_right); gr95_cls->Draw("3"); gr68_cls->SetFillColor(kGreen); gr68_cls->SetFillStyle(1001);//solid gr68_cls->SetLineStyle(kDashed); gr68_cls->SetLineWidth(3); gr68_cls->Draw("3same"); grmedian_cls->GetXaxis()->SetTitle("m_{G} [GeV]"); grmedian_cls->GetYaxis()->SetTitle("#sigma_{95%} #times BR(G #rightarrow ZZ) [pb]");// #rightarrow 2l2q grmedian_cls->SetMarkerStyle(24);//25=hollow squre grmedian_cls->SetMarkerColor(kBlack); grmedian_cls->SetLineStyle(2); grmedian_cls->SetLineWidth(3); grmedian_cls->SetMinimum(0.0); grmedian_cls->SetMaximum(8.0); grobslim_cls->SetMarkerColor(kBlack); grobslim_cls->SetMarkerStyle(21);//24=hollow circle grobslim_cls->SetMarkerSize(1.0); grobslim_cls->SetLineStyle(1); grobslim_cls->SetLineWidth(3); grthSM->SetLineColor(kRed); grthSM->SetLineWidth(2); grthSM->SetLineStyle(kDashed); grthSM->SetFillColor(kRed); grthSM->SetFillStyle(3344); grthSM10->SetLineColor(kRed); grthSM10->SetLineWidth(2); grthSM10->SetLineStyle(1); grthSM10->SetFillColor(kRed); grthSM10->SetFillStyle(3344); grthSM->Draw("L3"); grthSM10->Draw("L3"); grmedian_cls->Draw("L"); grobslim_cls->Draw("LP"); //draw grid on top of limits gStyle->SetOptStat(0); TH1D* postGrid = new TH1D("postGrid","",1,fr_left,fr_right); postGrid->GetYaxis()->SetRangeUser(fr_down,fr_up); postGrid->Draw("AXIGSAME"); TLine *l1=new TLine(); l1->SetLineStyle(1); l1->SetLineWidth(2.0); l1->SetLineColor(kRed); // l1->DrawLine(200.0,1.0,600.0,1.0); // cMCMC->Update(); cMCMC->RedrawAxis(""); gPad->RedrawAxis(""); // hr->GetYaxis()->DrawClone(); cMCMC->Update(); //more graphics TLegend *leg = new TLegend(.50,.75,.94,.90); // TLegend *leg = new TLegend(.35,.71,.90,.90); leg->SetFillColor(0); leg->SetShadowColor(0); leg->SetTextFont(42); leg->SetTextSize(0.027); // leg->SetBorderMode(0); leg->AddEntry(grobslim_cls, "Bayesian MCMC Observed", "LP"); leg->AddEntry(gr68_cls, "Bayesian MCMC Expected #pm 1#sigma", "LF"); leg->AddEntry(gr95_cls, "Bayesian MCMC Expected #pm 2#sigma", "LF"); // leg->AddEntry(grthSM, "#sigma(pp#rightarrow RSG) x BR(G #rightarrow ZZ), c=0.05", "LF");// #rightarrow 2l2q // leg->AddEntry(grthSM10, "#sigma(pp#rightarrow RSG) x BR(G #rightarrow ZZ), c=0.10", "LF");// #rightarrow 2l2q leg->AddEntry(grthSM, "#sigma_{th} x BR, c=0.05", "LF");// #rightarrow 2l2q leg->AddEntry(grthSM10, "#sigma_{th} x BR, c=0.10", "LF");// #rightarrow 2l2q leg->Draw(); if(useNewStyle){ TPaveText* cmslabel = new TPaveText( 0.145, 0.953, 0.6, 0.975, "brNDC"); cmslabel->SetFillColor(kWhite); cmslabel->SetTextSize(0.038); cmslabel->SetTextAlign(11); cmslabel->SetTextFont(62); cmslabel->SetBorderSize(0); // std::string leftText = "CMS Preliminary 2011"; std::string leftText = "CMS"; std::string units = "fb ^{-1}"; char lumiText[300]; sprintf( lumiText, "%.1f %s", intLumi, units.c_str()); cmslabel->AddText(Form("%s, #sqrt{s} = 7 TeV, %s", leftText.c_str(), lumiText)); //cmslabel->Draw(); TPaveText* label_sqrt = new TPaveText(0.4,0.953,0.96,0.975, "brNDC"); label_sqrt->SetFillColor(kWhite); label_sqrt->SetBorderSize(0); label_sqrt->SetTextSize(0.038); label_sqrt->SetTextFont(62); label_sqrt->SetTextAlign(31); // align right // label_sqrt->AddText("#sqrt{s} = 7 TeV"); label_sqrt->AddText(Form("%s, L = %s at #sqrt{s} = 7 TeV", leftText.c_str(), lumiText)); label_sqrt->Draw(); } else{ TLatex * latex = new TLatex(); latex->SetNDC(); latex->SetTextSize(0.04); latex->SetTextAlign(31); latex->SetTextAlign(11); // align left latex->DrawLatex(0.18, 0.96, "CMS preliminary 2011"); latex->DrawLatex(0.60,0.96,Form("%.1f fb^{-1} at #sqrt{s} = 7 TeV",intLumi)); } TLine *l1b=new TLine(); l1b->SetLineStyle(1); l1b->SetLineWidth(2.0); l1b->SetLineColor(kRed); //l1b->DrawLine(200.0,1.0,600.0,1.0); cMCMC->Update(); // cMCMC->RedrawAxis(""); gPad->RedrawAxis(""); // hr->GetYaxis()->DrawClone(); cMCMC->Update(); cMCMC->SaveAs("Grav2l2q_UL_MCMC.root"); cMCMC->SaveAs("Grav2l2q_UL_MCMC.eps"); cMCMC->SaveAs("Grav2l2q_UL_MCMC.pdf"); cMCMC->SaveAs("Grav2l2q_UL_MCMC.png"); gPad->SetLogy(); cMCMC->SaveAs("Grav2l2q_UL_MCMC_log.eps"); cMCMC->SaveAs("Grav2l2q_UL_MCMC_log.pdf"); cMCMC->SaveAs("Grav2l2q_UL_MCMC_log.png"); // cMCMC->SaveAs("ClsLimit_1fb.png"); TFile *fout=new TFile("MCMC_graph.root","RECREATE"); fout->cd(); grobslim_cls->Write(); fout->Close(); }//end main
void draw_obj(std::string var="ptTau1", std::string cut="(ptTau2>45 && abs(etaTau1)<4.0 && abs(etaTau2)<4.0)", int chan_cat=1, int yTau=0, int yB=1, int nbins=10, double xmin=0, double xmax=500,std::string xtitle="leading #tau p_{T}", std::string ytitle="Events") { SetStyle(); gStyle->SetLineStyleString(11,"20 10"); TH1::SetDefaultSumw2(1); std::string dir = "/afs/cern.ch/work/j/jlawhorn/public/comb_ntuples/"; double sigscale = 1000; double sigscale1 = 10; std::stringstream scale; scale << sigscale; std::stringstream scale1; scale1 << sigscale1; //Cut definitions double luminosity = 3000; std::stringstream lumi; lumi << luminosity; std::string ttcut = "(tauCat1==1 && tauCat2==1 && bTag1>0 && bTag2>0 && ptTau1>45 && ptTau2>45)"; std::string mtcut = "((tauCat1==1 && tauCat2==3)||(tauCat2==1 && tauCat1==3))*(bTag1>0 && bTag2>0 && ptTau1>30 && ptTau2>30)"; std::string etcut = "((tauCat1==1 && tauCat2==2)||(tauCat2==1 && tauCat1==2))*(bTag1>0 && bTag2>0 && ptTau1>30 && ptTau2>30)"; std::string emcut = "((tauCat1==3 && tauCat2==2)||(tauCat2==3 && tauCat1==2))*(bTag1>0 && bTag2>0 && ptTau1>30 && ptTau2>30)"; std::string taucut = "(abs(etaTau1)<4.0 && abs(etaTau2)<4.0)"; std::string bcut = "(ptB1>30 && ptB2>30 && abs(etaB1)<4.0 && abs(etaB2)<4.0)"; std::string optcut = cut; if (chan_cat==0) { //tt optcut = cut+"*"+ttcut; if (yTau==1) optcut+="*"+taucut+"*(ptTau1>45 && ptTau2>45)"; } else if (chan_cat==1) { //mt optcut = cut+"*"+mtcut; if (yTau==1) optcut+="*"+taucut+"*(ptTau1>30 && ptTau2>30)"; } else if (chan_cat==2) { //et optcut = cut+"*"+etcut; if (yTau==1) optcut+="*"+taucut+"*(ptTau1>30 && ptTau2>30)"; } else if (chan_cat==3) { //em optcut = cut+"*"+emcut; if (yTau==1) optcut+="*"+taucut+"*(ptTau1>30 && ptTau2>30)"; } if (yB==1) optcut+="*"+bcut; //cout << optcut << endl; //signal region std::string hhcut = optcut+"*"+scale.str()+"*eventWeight*(1)*"+lumi.str(); std::string ttbarcut = optcut+"*eventWeight*(1)*"+lumi.str(); std::string hcut = optcut+"*eventWeight*(1)*"+lumi.str(); std::string zjetcut = optcut+"*eventWeight*(eventType==4)*"+lumi.str(); std::string ewkcut = optcut+"*eventWeight*(eventType!=4)*"+lumi.str(); //-------------------------------------------------------------------------- //Get the trees TTree *ttbartree = load(dir+"tt.root"); TTree *htree = load(dir+"H.root"); TTree *ewktree = load(dir+"EWK.root"); TTree *sigtree = load(dir+"HHToTTBB_14TeV.root"); //------------------------------------------------------------------------- //Get histograms TCanvas *canv0 = MakeCanvas("canv", "histograms", 600, 600); canv0->cd(); std::string vardraw; TH1F *sig = new TH1F("HH","",nbins,xmin,xmax); vardraw = var+">>"+"HH"; sigtree->Draw(vardraw.c_str(),hhcut.c_str()); InitSignal(sig); sig->SetLineColor(kBlack); TH1F *ttbar = new TH1F("TTbar","",nbins,xmin,xmax); vardraw = var+">>"+"TTbar"; ttbartree->Draw(vardraw.c_str(),ttbarcut.c_str()); InitHist(ttbar, xtitle.c_str(), ytitle.c_str(), TColor::GetColor(155,152,204), 1001); TH1F *hbg = new TH1F("H","",nbins,xmin,xmax); vardraw = var+">>"+"H"; htree->Draw(vardraw.c_str(),hcut.c_str()); InitHist(hbg, xtitle.c_str(), ytitle.c_str(), TColor::GetColor(141,201,159), 1001); TH1F *zjet = new TH1F("Zjets","",nbins,xmin,xmax); vardraw = var+">>"+"Zjets"; ewktree->Draw(vardraw.c_str(),zjetcut.c_str()); InitHist(zjet, xtitle.c_str(), ytitle.c_str(), TColor::GetColor(222,90,106), 1001); TH1F *ewk = new TH1F("EWK","",nbins,xmin,xmax); vardraw = var+">>"+"EWK"; ewktree->Draw(vardraw.c_str(),ewkcut.c_str()); InitHist(ewk, xtitle.c_str(), ytitle.c_str(), TColor::GetColor(248,206,104), 1001); cout << sig->GetEntries() << endl; cout << ttbar->GetEntries() << endl; cout << hbg->GetEntries() << endl; cout << zjet->GetEntries() << endl; cout << ewk->GetEntries() << endl; delete canv0; //----------------------------------------------------------------------- //Draw the histograms TCanvas *canv = MakeCanvas("canv", "histograms", 600, 600); canv->cd(); zjet->Add(ewk); hbg->Add(zjet); ttbar->Add(hbg); //Error band stat TH1F* errorBand = (TH1F*)sig ->Clone("errorBand"); errorBand ->SetMarkerSize(0); errorBand ->SetFillColor(13); errorBand ->SetFillStyle(3013); errorBand ->SetLineWidth(1); // for(int idx=0; idx<errorBand->GetNbinsX(); ++idx){ // if(errorBand->GetBinContent(idx)>0){ // std::cout << "Uncertainties on summed background samples: " << errorBand->GetBinError(idx)/errorBand->GetBinContent(idx) << std::endl; // break; // } //} ttbar->SetMaximum(1.2*std::max(maximum(ttbar, 0), maximum(ewk, 0))); //blind(sig,75,150); ttbar->Draw("hist"); hbg->Draw("histsame"); zjet->Draw("histsame"); ewk->Draw("histsame"); sig->Draw("histsame"); //errorBand->Draw("e2same"); canv->RedrawAxis(); //--------------------------------------------------------------------------- //Adding a legend TLegend* leg = new TLegend(0.53, 0.73, 0.95, 0.90); SetLegendStyle(leg); leg->AddEntry(sig , TString::Format("%.0f#timeshh#rightarrow#tau#tau bb", sigscale) , "L"); leg->AddEntry(ttbar, "t#bar{t}" , "F" ); leg->AddEntry(hbg , "H" , "F" ); leg->AddEntry(zjet , "Z+jets" , "F" ); leg->AddEntry(ewk , "EWK" , "F" ); //leg->AddEntry(errorBand,"bkg. uncertainty","F"); leg->Draw(); //--------------------------------------------------------------------------- //CMS preliminary const char* dataset = "CMS Preliminary, HH#rightarrow bb#tau#tau, 3.0 ab^{-1} at 14 TeV"; char category[50]; if (chan_cat==0) sprintf(category,"#tau_{h}#tau_{h}"); if (chan_cat==1) sprintf(category,"#mu#tau_{h}"); if (chan_cat==2) sprintf(category,"e#tau_{h}"); if (chan_cat==3) sprintf(category,"e#mu"); //CMSPrelim(dataset, "#tau_{h}#tau_{h}", 0.17, 0.835); //CMSPrelim(dataset, "#tau_{h}#tau_{h}", 0.17, 0.835); CMSPrelim(dataset, "", 0.16, 0.835); TPaveText* chan = new TPaveText(0.26, 0.77, 0.37, 0.85, "tlbrNDC"); chan->SetBorderSize( 0 ); chan->SetFillStyle( 0 ); chan->SetTextAlign( 12 ); chan->SetTextSize ( 0.05 ); chan->SetTextColor( 1 ); chan->SetTextFont ( 62 ); chan->AddText(category); chan->Draw(); //------------------------------------------------------------------------- //Save histograms char outfile[50]; if (chan_cat==0) sprintf(outfile, "%s_tt.png", var.c_str()); if (chan_cat==1) sprintf(outfile, "%s_mt.png", var.c_str()); if (chan_cat==2) sprintf(outfile, "%s_et.png", var.c_str()); if (chan_cat==3) sprintf(outfile, "%s_em.png", var.c_str()); canv->Print(outfile); }
void METopt() { //=========Macro generated from canvas: METopt/METopt //========= (Mon Nov 23 12:45:00 2015) by ROOT version6.02/05 TCanvas *METopt = new TCanvas("METopt", "METopt",140,162,700,700); METopt->Range(-0.375,-6.432596,3.375,0.05191559); METopt->SetFillColor(0); METopt->SetBorderMode(0); METopt->SetBorderSize(2); METopt->SetLogy(); METopt->SetFrameBorderMode(0); METopt->SetFrameBorderMode(0); THStack *METopt = new THStack(); METopt->SetName("METopt"); METopt->SetTitle("METopt"); TH1F *METopt_stack_8 = new TH1F("METopt_stack_8","METopt",15,0,3); METopt_stack_8->SetMinimum(1.643823e-06); METopt_stack_8->SetMaximum(0.2532004); METopt_stack_8->SetDirectory(0); METopt_stack_8->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); METopt_stack_8->SetLineColor(ci); METopt_stack_8->GetXaxis()->SetTitle("METopt"); METopt_stack_8->GetXaxis()->SetLabelFont(42); METopt_stack_8->GetXaxis()->SetLabelSize(0.035); METopt_stack_8->GetXaxis()->SetTitleSize(0.035); METopt_stack_8->GetXaxis()->SetTitleFont(42); METopt_stack_8->GetYaxis()->SetTitle("Events/pb"); METopt_stack_8->GetYaxis()->SetLabelFont(42); METopt_stack_8->GetYaxis()->SetLabelSize(0.035); METopt_stack_8->GetYaxis()->SetTitleSize(0.035); METopt_stack_8->GetYaxis()->SetTitleFont(42); METopt_stack_8->GetZaxis()->SetLabelFont(42); METopt_stack_8->GetZaxis()->SetLabelSize(0.035); METopt_stack_8->GetZaxis()->SetTitleSize(0.035); METopt_stack_8->GetZaxis()->SetTitleFont(42); METopt->SetHistogram(METopt_stack_8); TH1D *METopt36 = new TH1D("METopt36","MET/p_{T}^{lead jet}",15,0,3); METopt36->SetBinContent(1,0.00068069); METopt36->SetBinContent(2,0.00952966); METopt36->SetBinContent(3,0.06912243); METopt36->SetBinContent(4,0.01104153); METopt36->SetBinContent(5,0.01663754); METopt36->SetBinContent(6,0.02495631); METopt36->SetBinError(1,0.00068069); METopt36->SetBinError(2,0.002546909); METopt36->SetBinError(3,0.02217717); METopt36->SetBinError(4,0.00842943); METopt36->SetBinError(5,0.01176452); METopt36->SetBinError(6,0.01440853); METopt36->SetEntries(48); ci = TColor::GetColor("#00cc00"); METopt36->SetFillColor(ci); ci = TColor::GetColor("#00cc00"); METopt36->SetLineColor(ci); ci = TColor::GetColor("#00cc00"); METopt36->SetMarkerColor(ci); METopt36->SetMarkerStyle(22); METopt36->GetXaxis()->SetTitle("METopt"); METopt36->GetXaxis()->SetLabelFont(42); METopt36->GetXaxis()->SetLabelSize(0.035); METopt36->GetXaxis()->SetTitleSize(0.035); METopt36->GetXaxis()->SetTitleFont(42); METopt36->GetYaxis()->SetTitle("Events/pb"); METopt36->GetYaxis()->SetLabelFont(42); METopt36->GetYaxis()->SetLabelSize(0.035); METopt36->GetYaxis()->SetTitleSize(0.035); METopt36->GetYaxis()->SetTitleFont(42); METopt36->GetZaxis()->SetLabelFont(42); METopt36->GetZaxis()->SetLabelSize(0.035); METopt36->GetZaxis()->SetTitleSize(0.035); METopt36->GetZaxis()->SetTitleFont(42); METopt->Add(METopt,""); TH1D *METopt37 = new TH1D("METopt37","MET/p_{T}^{lead jet}",15,0,3); METopt37->SetBinContent(1,1.392893e-05); METopt37->SetBinContent(2,0.001351916); METopt37->SetBinContent(3,0.009267276); METopt37->SetBinContent(4,0.04333138); METopt37->SetBinContent(5,0.1226104); METopt37->SetBinContent(6,0.1345744); METopt37->SetBinContent(7,0.1072757); METopt37->SetBinContent(8,0.0786938); METopt37->SetBinContent(9,0.04683283); METopt37->SetBinContent(10,0.0271465); METopt37->SetBinContent(11,0.0117321); METopt37->SetBinContent(12,0.007680578); METopt37->SetBinContent(13,0.003504385); METopt37->SetBinContent(14,0.002544782); METopt37->SetBinContent(15,0.001871985); METopt37->SetBinContent(16,0.002029317); METopt37->SetBinError(1,1.392893e-05); METopt37->SetBinError(2,0.0001372687); METopt37->SetBinError(3,0.0003814526); METopt37->SetBinError(4,0.001364947); METopt37->SetBinError(5,0.003448717); METopt37->SetBinError(6,0.004099139); METopt37->SetBinError(7,0.004180275); METopt37->SetBinError(8,0.004584045); METopt37->SetBinError(9,0.003621192); METopt37->SetBinError(10,0.002726748); METopt37->SetBinError(11,0.001513075); METopt37->SetBinError(12,0.001337888); METopt37->SetBinError(13,0.001122201); METopt37->SetBinError(14,0.001068918); METopt37->SetBinError(15,0.001029262); METopt37->SetBinError(16,0.001037471); METopt37->SetEntries(12325); ci = TColor::GetColor("#00ffff"); METopt37->SetFillColor(ci); ci = TColor::GetColor("#00ffff"); METopt37->SetLineColor(ci); ci = TColor::GetColor("#00ffff"); METopt37->SetMarkerColor(ci); METopt37->SetMarkerStyle(20); METopt37->GetXaxis()->SetTitle("METopt"); METopt37->GetXaxis()->SetLabelFont(42); METopt37->GetXaxis()->SetLabelSize(0.035); METopt37->GetXaxis()->SetTitleSize(0.035); METopt37->GetXaxis()->SetTitleFont(42); METopt37->GetYaxis()->SetTitle("Events/pb"); METopt37->GetYaxis()->SetLabelFont(42); METopt37->GetYaxis()->SetLabelSize(0.035); METopt37->GetYaxis()->SetTitleSize(0.035); METopt37->GetYaxis()->SetTitleFont(42); METopt37->GetZaxis()->SetLabelFont(42); METopt37->GetZaxis()->SetLabelSize(0.035); METopt37->GetZaxis()->SetTitleSize(0.035); METopt37->GetZaxis()->SetTitleFont(42); METopt->Add(METopt,""); TH1D *METopt38 = new TH1D("METopt38","MET/p_{T}^{lead jet}",15,0,3); METopt38->SetBinContent(1,5.851509e-06); METopt38->SetBinContent(2,0.0002960863); METopt38->SetBinContent(3,0.002055587); METopt38->SetBinContent(4,0.009485694); METopt38->SetBinContent(5,0.02637833); METopt38->SetBinContent(6,0.03542185); METopt38->SetBinContent(7,0.02902985); METopt38->SetBinContent(8,0.01931192); METopt38->SetBinContent(9,0.01045294); METopt38->SetBinContent(10,0.006260894); METopt38->SetBinContent(11,0.004006631); METopt38->SetBinContent(12,0.001811275); METopt38->SetBinContent(13,0.001055017); METopt38->SetBinContent(14,0.0003970447); METopt38->SetBinContent(15,0.0002648587); METopt38->SetBinContent(16,0.0002425362); METopt38->SetBinError(1,2.616874e-06); METopt38->SetBinError(2,1.861479e-05); METopt38->SetBinError(3,5.431574e-05); METopt38->SetBinError(4,0.0002770452); METopt38->SetBinError(5,0.000680549); METopt38->SetBinError(6,0.0009013724); METopt38->SetBinError(7,0.0009115706); METopt38->SetBinError(8,0.0007784417); METopt38->SetBinError(9,0.0005631055); METopt38->SetBinError(10,0.000447395); METopt38->SetBinError(11,0.0003988073); METopt38->SetBinError(12,0.0002844883); METopt38->SetBinError(13,0.0002045993); METopt38->SetBinError(14,0.0001303943); METopt38->SetBinError(15,8.467851e-05); METopt38->SetBinError(16,0.0001139839); METopt38->SetEntries(19290); ci = TColor::GetColor("#ffcc00"); METopt38->SetFillColor(ci); ci = TColor::GetColor("#ffcc00"); METopt38->SetLineColor(ci); ci = TColor::GetColor("#ffcc00"); METopt38->SetMarkerColor(ci); METopt38->SetMarkerStyle(21); METopt38->GetXaxis()->SetTitle("METopt"); METopt38->GetXaxis()->SetLabelFont(42); METopt38->GetXaxis()->SetLabelSize(0.035); METopt38->GetXaxis()->SetTitleSize(0.035); METopt38->GetXaxis()->SetTitleFont(42); METopt38->GetYaxis()->SetTitle("Events/pb"); METopt38->GetYaxis()->SetLabelFont(42); METopt38->GetYaxis()->SetLabelSize(0.035); METopt38->GetYaxis()->SetTitleSize(0.035); METopt38->GetYaxis()->SetTitleFont(42); METopt38->GetZaxis()->SetLabelFont(42); METopt38->GetZaxis()->SetLabelSize(0.035); METopt38->GetZaxis()->SetTitleSize(0.035); METopt38->GetZaxis()->SetTitleFont(42); METopt->Add(METopt,""); TH1D *METopt39 = new TH1D("METopt39","MET/p_{T}^{lead jet}",15,0,3); METopt39->SetBinContent(2,1.542458e-05); METopt39->SetBinContent(3,9.254746e-05); METopt39->SetBinContent(4,0.0009717483); METopt39->SetBinContent(5,0.003146613); METopt39->SetBinContent(6,0.003840719); METopt39->SetBinContent(7,0.002637602); METopt39->SetBinContent(8,0.001758402); METopt39->SetBinContent(9,0.001326514); METopt39->SetBinContent(10,0.0007866534); METopt39->SetBinContent(11,0.0004781619); METopt39->SetBinContent(12,0.0003084915); METopt39->SetBinContent(13,0.0002159441); METopt39->SetBinContent(14,0.0001233966); METopt39->SetBinContent(15,0.0001233966); METopt39->SetBinContent(16,0.000107972); METopt39->SetBinError(2,1.542458e-05); METopt39->SetBinError(3,3.778234e-05); METopt39->SetBinError(4,0.0001224288); METopt39->SetBinError(5,0.000220307); METopt39->SetBinError(6,0.0002433957); METopt39->SetBinError(7,0.0002017025); METopt39->SetBinError(8,0.0001646894); METopt39->SetBinError(9,0.0001430416); METopt39->SetBinError(10,0.0001101535); METopt39->SetBinError(11,8.58804e-05); METopt39->SetBinError(12,6.89808e-05); METopt39->SetBinError(13,5.771348e-05); METopt39->SetBinError(14,4.362729e-05); METopt39->SetBinError(15,4.362729e-05); METopt39->SetBinError(16,4.080959e-05); METopt39->SetEntries(1033); ci = TColor::GetColor("#ff0000"); METopt39->SetFillColor(ci); ci = TColor::GetColor("#ff0000"); METopt39->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); METopt39->SetMarkerColor(ci); METopt39->SetMarkerStyle(20); METopt39->GetXaxis()->SetTitle("METopt"); METopt39->GetXaxis()->SetLabelFont(42); METopt39->GetXaxis()->SetLabelSize(0.035); METopt39->GetXaxis()->SetTitleSize(0.035); METopt39->GetXaxis()->SetTitleFont(42); METopt39->GetYaxis()->SetTitle("Events/pb"); METopt39->GetYaxis()->SetLabelFont(42); METopt39->GetYaxis()->SetLabelSize(0.035); METopt39->GetYaxis()->SetTitleSize(0.035); METopt39->GetYaxis()->SetTitleFont(42); METopt39->GetZaxis()->SetLabelFont(42); METopt39->GetZaxis()->SetLabelSize(0.035); METopt39->GetZaxis()->SetTitleSize(0.035); METopt39->GetZaxis()->SetTitleFont(42); METopt->Add(METopt,""); TH1D *METopt40 = new TH1D("METopt40","MET/p_{T}^{lead jet}",15,0,3); METopt40->SetBinContent(4,1.677165e-05); METopt40->SetBinError(4,1.677165e-05); METopt40->SetEntries(1); ci = TColor::GetColor("#0000ff"); METopt40->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); METopt40->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); METopt40->SetMarkerColor(ci); METopt40->SetMarkerStyle(21); METopt40->GetXaxis()->SetTitle("METopt"); METopt40->GetXaxis()->SetLabelFont(42); METopt40->GetXaxis()->SetLabelSize(0.035); METopt40->GetXaxis()->SetTitleSize(0.035); METopt40->GetXaxis()->SetTitleFont(42); METopt40->GetYaxis()->SetTitle("Events/pb"); METopt40->GetYaxis()->SetLabelFont(42); METopt40->GetYaxis()->SetLabelSize(0.035); METopt40->GetYaxis()->SetTitleSize(0.035); METopt40->GetYaxis()->SetTitleFont(42); METopt40->GetZaxis()->SetLabelFont(42); METopt40->GetZaxis()->SetLabelSize(0.035); METopt40->GetZaxis()->SetTitleSize(0.035); METopt40->GetZaxis()->SetTitleFont(42); METopt->Add(METopt,""); METopt->Draw("nostack"); TPaveText *pt = new TPaveText(0.398046,0.9342857,0.601954,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *AText = pt->AddText("METopt"); pt->Draw(); TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC"); leg->SetBorderSize(1); leg->SetTextSize(0.034965); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("METopt","METopt_QCD","lp"); ci = TColor::GetColor("#00cc00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00cc00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(22); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METopt","METopt_WJetsToLNu","lp"); ci = TColor::GetColor("#00ffff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00ffff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METopt","METopt_ZJetsToNuNu","lp"); ci = TColor::GetColor("#ffcc00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ffcc00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METopt","METopt_signal","lp"); ci = TColor::GetColor("#ff0000"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff0000"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METopt","METopt_ttbar","lp"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#0000ff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); METopt->Modified(); METopt->cd(); METopt->SetSelected(METopt); }
void MultiHistoOverlap(TString namesandlabels, Int_t nOfFiles, const TString& outDir="./") { gROOT->Reset(); gROOT->ProcessLine(".L tdrstyle.C"); gROOT->ProcessLine("setTDRStyle()"); // gSystem->Load("libRooFit"); // using namespace RooFit; // preamble TPaveText *cmsprel = new TPaveText(0.19, 0.95, 0.95, 0.99, "NDC"); cmsprel->SetTextSize(0.03); cmsprel->SetTextFont(42); cmsprel->SetFillColor(0); cmsprel->SetBorderSize(0); cmsprel->SetMargin(0.01); cmsprel->SetTextAlign(12); // align left TString text = "CMS Preliminary 2011"; cmsprel->AddText(0.0, 0.5,text); TString text2 = "#sqrt{s} = 7 TeV |#eta_{#mu}|<2.4"; cmsprel->AddText(0.8, 0.5, text2); TList* FileList = new TList(); TList* LabelList = new TList(); TObjArray *nameandlabelpairs = namesandlabels.Tokenize(","); for (Int_t i = 0; i < nameandlabelpairs->GetEntries(); ++i) { TObjArray *aFileLegPair = TString(nameandlabelpairs->At(i)->GetName()).Tokenize("="); if(aFileLegPair->GetEntries() == 2) { FileList->Add( TFile::Open(aFileLegPair->At(0)->GetName()) ); LabelList->Add( aFileLegPair->At(1) ); } else { std::cout << "Please give file name and legend entry in the following form:\n" << " filename1=legendentry1,filename2=legendentry2\n"; } } Int_t NOfFiles = FileList->GetSize(); if ( NOfFiles!=nOfFiles ) { std::cout<<"&MSG-e: NOfFiles = "<<nOfFiles<<std::endl; return; } TString LegLabels[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TObjString* legend = (TObjString*)LabelList->At(j); LegLabels[j] = legend->String(); std::cout<<"LegLabels["<<j<<"]"<<LegLabels[j]<<std::endl; } TLegend *leg=0; TCanvas* c0 = new TCanvas("c0", "c0",50, 20, 800,600); TCanvas* c1 = new TCanvas("c1", "c1",50, 20, 800,600); TCanvas* c2 = new TCanvas("c2", "c2",50, 20, 800,600); TCanvas* c3 = new TCanvas("c3", "c3",50, 20, 800,600); TCanvas* c4 = new TCanvas("c4", "c4",50, 20, 800,600); TCanvas* c5 = new TCanvas("c5", "c5",50, 20, 1200,800); TCanvas* c6 = new TCanvas("c6", "c6",50, 20, 1200,800); TCanvas* c0s = new TCanvas("c0s", "c0s",50, 20, 800,600); TCanvas* c1s = new TCanvas("c1s", "c1s",50, 20, 800,600); TCanvas* c2s = new TCanvas("c2s", "c2s",50, 20, 800,600); TCanvas* c3s = new TCanvas("c3s", "c3s",50, 20, 800,600); TCanvas* cFit = new TCanvas("cFit", "cFit",50, 20, 1600, 800); //----------------- CANVAS C0 --------------// c0->SetFillColor(0); c0->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon phi plus ------------------------------- TH1D *histoMassVsPhiPlus[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsPhiPlus[j] = (TH1D*)fin->Get("MassVsPhiPlus/allHistos/meanHisto")) { histoMassVsPhiPlus[j]->SetLineStyle(linestylelist[j]); histoMassVsPhiPlus[j]->SetMarkerColor(colorlist[j]); histoMassVsPhiPlus[j]->SetLineColor(colorlist[j]); histoMassVsPhiPlus[j]->SetMarkerStyle(markerstylelist[j]); // histoMassVsPhiPlus[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoMassVsPhiPlus[j]->GetXaxis()->SetTitle("positive muon #phi (rad)"); histoMassVsPhiPlus[j]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); // histoMassVsPhiPlus[j]->GetYaxis()->SetRangeUser(88.5,93.5); histoMassVsPhiPlus[j]->GetYaxis()->SetRangeUser(90.0,91.5); histoMassVsPhiPlus[j]->GetXaxis()->SetRangeUser(-3.14,3.14); histoMassVsPhiPlus[j]->Draw(); } else { histoMassVsPhiPlus[j]->Draw("SAME"); } leg->AddEntry(histoMassVsPhiPlus[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c0->SaveAs(outDir+"MassVsPhiPlus.png"); //----------------- CANVAS C1 --------------// c1->SetFillColor(0); c1->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon eta plus ------------------------------- TH1D *histoMassVsEtaPlus[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsEtaPlus[j] = (TH1D*)fin->Get("MassVsEtaPlus/allHistos/meanHisto")) { histoMassVsEtaPlus[j]->SetLineStyle(linestylelist[j]); histoMassVsEtaPlus[j]->SetMarkerColor(colorlist[j]); histoMassVsEtaPlus[j]->SetLineColor(colorlist[j]); histoMassVsEtaPlus[j]->SetMarkerStyle(markerstylelist[j]); // histoMassVsEtaPlus[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoMassVsEtaPlus[j]->GetXaxis()->SetTitle("positive muon #eta"); histoMassVsEtaPlus[j]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); // histoMassVsEtaPlus[j]->GetYaxis()->SetRangeUser(88.5,93.5); histoMassVsEtaPlus[j]->GetYaxis()->SetRangeUser(90.0,91.5); histoMassVsEtaPlus[j]->GetXaxis()->SetRangeUser(-2.41,2.41); histoMassVsEtaPlus[j]->Draw(); } else { histoMassVsEtaPlus[j]->Draw("SAME"); } leg->AddEntry(histoMassVsEtaPlus[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c1->SaveAs(outDir+"MassVsEtaPlus.png"); //----------------- CANVAS C2 --------------// c2->SetFillColor(0); c2->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon eta plus - eta minus ------------------------------- TH1D *histoMassVsEtaPlusMinusDiff[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsEtaPlusMinusDiff[j] = (TH1D*)fin->Get("MassVsEtaPlusMinusDiff/allHistos/meanHisto")) { histoMassVsEtaPlusMinusDiff[j]->SetLineStyle(linestylelist[j]); histoMassVsEtaPlusMinusDiff[j]->SetMarkerColor(colorlist[j]); histoMassVsEtaPlusMinusDiff[j]->SetLineColor(colorlist[j]); histoMassVsEtaPlusMinusDiff[j]->SetMarkerStyle(markerstylelist[j]); // histoMassVsEtaPlusMinusDiff[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoMassVsEtaPlusMinusDiff[j]->GetXaxis()->SetTitle("#eta pos. muon #eta neg. muon"); histoMassVsEtaPlusMinusDiff[j]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); // histoMassVsEtaPlusMinusDiff[j]->GetYaxis()->SetRangeUser(88.0,96.0); histoMassVsEtaPlusMinusDiff[j]->GetYaxis()->SetRangeUser(90.0,91.5); histoMassVsEtaPlusMinusDiff[j]->GetXaxis()->SetRangeUser(-3,3); histoMassVsEtaPlusMinusDiff[j]->Draw(); } else { histoMassVsEtaPlusMinusDiff[j]->Draw("SAME"); } leg->AddEntry(histoMassVsEtaPlusMinusDiff[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c2->SaveAs(outDir+"MassVsEtaPlusMinusDiff.png"); //----------------- CANVAS C3 --------------// c3->SetFillColor(0); c3->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon phi minus ------------------------------- TH1D *histoMassVsPhiMinus[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsPhiMinus[j] = (TH1D*)fin->Get("MassVsPhiMinus/allHistos/meanHisto")) { histoMassVsPhiMinus[j]->SetLineStyle(linestylelist[j]); histoMassVsPhiMinus[j]->SetMarkerColor(colorlist[j]); histoMassVsPhiMinus[j]->SetLineColor(colorlist[j]); histoMassVsPhiMinus[j]->SetMarkerStyle(markerstylelist[j]); // histoMassVsPhiMinus[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoMassVsPhiMinus[j]->GetXaxis()->SetTitle("negative muon #phi (rad)"); histoMassVsPhiMinus[j]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); // histoMassVsPhiMinus[j]->GetYaxis()->SetRangeUser(88.5,93.5); histoMassVsPhiMinus[j]->GetYaxis()->SetRangeUser(90.0,91.5); histoMassVsPhiMinus[j]->GetXaxis()->SetRangeUser(-3.14,3.14); histoMassVsPhiMinus[j]->Draw(); } else { histoMassVsPhiMinus[j]->Draw("SAME"); } leg->AddEntry(histoMassVsPhiMinus[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c3->SaveAs(outDir+"MassVsPhiMinus.png"); //----------------- CANVAS C4 --------------// c4->SetFillColor(0); c4->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon eta minus ------------------------------- TH1D *histoMassVsEtaMinus[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsEtaMinus[j] = (TH1D*)fin->Get("MassVsEtaMinus/allHistos/meanHisto")) { histoMassVsEtaMinus[j]->SetLineStyle(linestylelist[j]); histoMassVsEtaMinus[j]->SetMarkerColor(colorlist[j]); histoMassVsEtaMinus[j]->SetLineColor(colorlist[j]); histoMassVsEtaMinus[j]->SetMarkerStyle(markerstylelist[j]); // histoMassVsEtaMinus[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoMassVsEtaMinus[j]->GetXaxis()->SetTitle("negative muon #eta"); histoMassVsEtaMinus[j]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); // histoMassVsEtaMinus[j]->GetYaxis()->SetRangeUser(88.5,93.5); histoMassVsEtaMinus[j]->GetYaxis()->SetRangeUser(90.0,91.5); histoMassVsEtaMinus[j]->GetXaxis()->SetRangeUser(-2.41,2.41); histoMassVsEtaMinus[j]->Draw(); } else { histoMassVsEtaMinus[j]->Draw("SAME"); } leg->AddEntry(histoMassVsEtaMinus[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c4->SaveAs(outDir+"MassVsEtaMinus.png"); //----------------- CANVAS C5 --------------// c5->SetFillColor(0); c5->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Mass VS muon phi plus ------------------------------- TH2D *histoMassVsEtaPhiPlus[nOfFiles]; TStyle *newStyle; newStyle->SetPalette(1); // newStyle->SetOptTitle(1); Double_t zMin(82.); Double_t zMax(96.); for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoMassVsEtaPhiPlus[j] = (TH2D*)fin->Get("MassVsEtaPhiPlus/allHistos/meanHisto")) { if ( j == 0 ) { histoMassVsEtaPhiPlus[j]->SetTitle(LegLabels[j]); histoMassVsEtaPhiPlus[j]->GetXaxis()->SetTitle("positive muon #phi (rad)"); histoMassVsEtaPhiPlus[j]->GetYaxis()->SetTitle("positive muon #eta"); zMin = histoMassVsEtaPhiPlus[j]->GetMinimum(); zMax = histoMassVsEtaPhiPlus[j]->GetMaximum(); histoMassVsEtaPhiPlus[j]->Draw("COLZ"); c5->SaveAs(outDir+"MassVsEtaPhiPlus_file0.png"); } else { histoMassVsEtaPhiPlus[j]->SetTitle(LegLabels[j]); histoMassVsEtaPhiPlus[j]->SetMinimum(zMin); histoMassVsEtaPhiPlus[j]->SetMaximum(zMax); histoMassVsEtaPhiPlus[j]->Draw("COLZ"); c5->SaveAs(outDir+"MassVsEtaPhiPlus_file"+(TString)Form("%d",(Int_t)j)+".png"); } } } //cmsprel->Draw("same"); // //----------------- CANVAS C6 --------------// // c6->SetFillColor(0); // c6->cd(); // leg = new TLegend(0.50,0.25,0.90,0.40); // leg->SetBorderSize(1); // leg->SetFillColor(0); // leg->SetTextFont(42); // // Mass VS muon phi minus ------------------------------- // TH2D *histoMassVsEtaPhiMinus[nOfFiles]; // for(Int_t j=0; j < nOfFiles; j++) { // TFile *fin = (TFile*)FileList->At(j); // if ( histoMassVsEtaPhiMinus[j] = (TH2D*)fin->Get("MassVsEtaPhiMinus/allHistos/meanHisto")){ // if ( j == 0 ) { // histoMassVsEtaPhiMinus[j]->GetXaxis()->SetTitle("negative muon #phi (rad)"); // histoMassVsEtaPhiMinus[j]->GetYaxis()->SetTitle("negative muon #eta"); // zMin = histoMassVsEtaPhiMinus[j]->GetMinimum(); // zMax = histoMassVsEtaPhiMinus[j]->GetMaximum(); // histoMassVsEtaPhiMinus[j]->Draw(); // } else { // histoMassVsEtaPhiMinus[j]->SetMinimum(zMin); // histoMassVsEtaPhiMinus[j]->SetMaximum(zMax); // histoMassVsEtaPhiMinus[j]->Draw("SAME"); // } // leg->AddEntry(histoMassVsEtaPhiMinus[j],LegLabels[j],"PL"); // } // } // //cmsprel->Draw("same"); // leg->Draw("same"); // c6->SaveAs(outDir+"MassVsEtaPhiMinus.png"); // newStyle->SetOptTitle(0); const Color_t colorlist_resol[7]= {kBlack,kGreen,kBlue,kMagenta,kCyan,kTeal,kRed}; const Int_t linestylelist_resol[7]= {1,1,1,1,1,1,1}; const Int_t stylelist_resol[7]= {1,1,1,1,1,1,1}; const Style_t markerstylelist_resol[7]= {kOpenCircle,kOpenTriangleUp,kOpenTriangleUp,kOpenCircle,kOpenTriangleUp,kOpenCircle,kOpenTriangleUp}; // //----------------- CANVAS C0S --------------// // c0s->SetFillColor(0); // c0s->cd(); // leg = new TLegend(0.50,0.25,0.90,0.40); // leg->SetBorderSize(1); // leg->SetFillColor(0); // leg->SetTextFont(42); // // Sigma VS muon phi plus ------------------------------- // TH1D *histoSigmaVsPhiPlus[nOfFiles]; // for(Int_t j=0; j < nOfFiles; j++) { // TFile *fin = (TFile*)FileList->At(j); // if ( histoSigmaVsPhiPlus[j] = (TH1D*)fin->Get("MassVsPhiPlus/allHistos/sigmaHisto")){ // histoSigmaVsPhiPlus[j]->SetLineStyle(linestylelist_resol[j]); // histoSigmaVsPhiPlus[j]->SetMarkerColor(colorlist_resol[j]); // histoSigmaVsPhiPlus[j]->SetLineColor(colorlist_resol[j]); // histoSigmaVsPhiPlus[j]->SetMarkerStyle(markerstylelist_resol[j]); // // histoSigmaVsPhiPlus[j]->SetMarkerSize(0.75); // if ( j == 0 ) { // histoSigmaVsPhiPlus[j]->GetXaxis()->SetTitle("positive muon #phi (rad)"); // histoSigmaVsPhiPlus[j]->GetYaxis()->SetTitle("#sigma(M_{#mu#mu}) (GeV)"); // // histoSigmaVsPhiPlus[j]->GetYaxis()->SetRangeUser(88.5,93.5); // histoSigmaVsPhiPlus[j]->GetYaxis()->SetRangeUser(0.,3.); // histoSigmaVsPhiPlus[j]->GetXaxis()->SetRangeUser(-3.14,3.14); // histoSigmaVsPhiPlus[j]->Draw(); // } else { // histoSigmaVsPhiPlus[j]->Draw("SAME"); // } // leg->AddEntry(histoSigmaVsPhiPlus[j],LegLabels[j],"PL"); // } // } // //cmsprel->Draw("same"); // leg->Draw("same"); // c0s->SaveAs(outDir+"SigmaVsPhiPlus.png"); //----------------- CANVAS C1S --------------// c1s->SetFillColor(0); c1s->cd(); leg = new TLegend(0.50,0.25,0.90,0.40); leg->SetBorderSize(1); leg->SetFillColor(0); leg->SetTextFont(42); // Sigma VS muon eta plus ------------------------------- TH1D *histoSigmaVsEtaPlus[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoSigmaVsEtaPlus[j] = (TH1D*)fin->Get("MassVsEtaPlus/allHistos/sigmaHisto")) { histoSigmaVsEtaPlus[j]->SetLineStyle(linestylelist_resol[j]); histoSigmaVsEtaPlus[j]->SetMarkerColor(colorlist_resol[j]); histoSigmaVsEtaPlus[j]->SetLineColor(colorlist_resol[j]); histoSigmaVsEtaPlus[j]->SetMarkerStyle(markerstylelist_resol[j]); // histoSigmaVsEtaPlus[j]->SetMarkerSize(0.75); if ( j == 0 ) { histoSigmaVsEtaPlus[j]->GetXaxis()->SetTitle("positive muon #eta"); histoSigmaVsEtaPlus[j]->GetYaxis()->SetTitle("#sigma(M_{#mu#mu}) (GeV)"); // histoSigmaVsEtaPlus[j]->GetYaxis()->SetRangeUser(88.5,93.5); histoSigmaVsEtaPlus[j]->GetYaxis()->SetRangeUser(0.,3.); histoSigmaVsEtaPlus[j]->GetXaxis()->SetRangeUser(-2.41,2.41); histoSigmaVsEtaPlus[j]->Draw(); } else { histoSigmaVsEtaPlus[j]->Draw("SAME"); } leg->AddEntry(histoSigmaVsEtaPlus[j],LegLabels[j],"PL"); } } //cmsprel->Draw("same"); leg->Draw("same"); c1s->SaveAs(outDir+"SigmaVsEtaPlus.png"); // //----------------- CANVAS C2S --------------// // c2s->SetFillColor(0); // c2s->cd(); // leg = new TLegend(0.50,0.25,0.90,0.40); // leg->SetBorderSize(1); // leg->SetFillColor(0); // leg->SetTextFont(42); // // Sigma VS muon eta plus - eta minus ------------------------------- // TH1D *histoSigmaVsEtaPlusMinusDiff[nOfFiles]; // for(Int_t j=0; j < nOfFiles; j++) { // TFile *fin = (TFile*)FileList->At(j); // if ( histoSigmaVsEtaPlusMinusDiff[j] = (TH1D*)fin->Get("MassVsEtaPlusMinusDiff/allHistos/sigmaHisto")){ // histoSigmaVsEtaPlusMinusDiff[j]->SetLineStyle(linestylelist_resol[j]); // histoSigmaVsEtaPlusMinusDiff[j]->SetMarkerColor(colorlist_resol[j]); // histoSigmaVsEtaPlusMinusDiff[j]->SetLineColor(colorlist_resol[j]); // histoSigmaVsEtaPlusMinusDiff[j]->SetMarkerStyle(markerstylelist_resol[j]); // // histoSigmaVsEtaPlusMinusDiff[j]->SetMarkerSize(0.75); // if ( j == 0 ) { // histoSigmaVsEtaPlusMinusDiff[j]->GetXaxis()->SetTitle("#eta pos. muon - #eta neg. muon"); // histoSigmaVsEtaPlusMinusDiff[j]->GetYaxis()->SetTitle("#sigma(M_{#mu#mu}) (GeV)"); // // histoSigmaVsEtaPlusMinusDiff[j]->GetYaxis()->SetRangeUser(88.0,96.0); // histoSigmaVsEtaPlusMinusDiff[j]->GetYaxis()->SetRangeUser(0.,3.); // //histoSigmaVsEtaPlusMinusDiff[j]->GetYaxis()->SetRangeUser(90.60,90.75); // histoSigmaVsEtaPlusMinusDiff[j]->GetXaxis()->SetRangeUser(-3.2,3.2); // histoSigmaVsEtaPlusMinusDiff[j]->Draw(); // } else { // histoSigmaVsEtaPlusMinusDiff[j]->Draw("SAME"); // } // leg->AddEntry(histoSigmaVsEtaPlusMinusDiff[j],LegLabels[j],"PL"); // } // } // //cmsprel->Draw("same"); // leg->Draw("same"); // c2s->SaveAs(outDir+"SigmaVsEtaPlusMinusDiff.png"); // //----------------- CANVAS C3S --------------// // c3s->SetFillColor(0); // c3s->cd(); // leg = new TLegend(0.35,0.15,0.55,0.35); // leg->SetBorderSize(1); // leg->SetFillColor(0); // leg->SetTextFont(42); // // Sigma VS muon pT ------------------------------- // TH1D *histoSigmaVsPt[nOfFiles]; // for(Int_t j=0; j < nOfFiles; j++) { // TFile *fin = (TFile*)FileList->At(j); // if ( histoSigmaVsPt[j] = (TH1D*)fin->Get("MassVsPt/allHistos/sigmaHisto")){ // histoSigmaVsPt[j]->SetLineStyle(linestylelist_resol[j]); // histoSigmaVsPt[j]->SetMarkerColor(colorlist_resol[j]); // histoSigmaVsPt[j]->SetLineColor(colorlist_resol[j]); // histoSigmaVsPt[j]->SetMarkerStyle(markerstylelist_resol[j]); // // histoSigmaVsPt[j]->SetMarkerSize(0.75); // if ( j == 0 ) { // histoSigmaVsPt[j]->GetXaxis()->SetTitle("muon p_T (GeV)"); // histoSigmaVsPt[j]->GetYaxis()->SetTitle("#sigma(M_{#mu#mu}) (GeV)"); // // histoSigmaVsPt[j]->GetYaxis()->SetRangeUser(88.0,96.0); // histoSigmaVsPt[j]->GetYaxis()->SetRangeUser(0.,3.); // //histoSigmaVsPt[j]->GetYaxis()->SetRangeUser(90.60,90.75); // histoSigmaVsPt[j]->GetXaxis()->SetRangeUser(15.,105.); // histoSigmaVsPt[j]->Draw(); // } else { // histoSigmaVsPt[j]->Draw("SAME"); // } // leg->AddEntry(histoSigmaVsPt[j],LegLabels[j],"PL"); // } // } // //cmsprel->Draw("same"); // leg->Draw("same"); // c3s->SaveAs(outDir+"SigmaVsPt.png"); //----------------- CANVAS CFIT --------------// cFit->SetFillColor(0); cFit->cd(); Float_t nN = TMath::Sqrt(nOfFiles); Int_t nX = (Int_t)nN; if ( nN-nX > 0.5 ) nX++; Int_t nY = (Int_t)(nOfFiles/nX); std::cout << nX << " ," << nY << std::endl; cFit->Divide(nOfFiles,1); // Mass VS muon phi plus ------------------------------- TFile *ZFitFile = new TFile("ZFitFile.root","RECREATE"); RooPlot *histoLineShape[nOfFiles]; for(Int_t j=0; j < nOfFiles; j++) { TFile *fin = (TFile*)FileList->At(j); if ( histoLineShape[j] = (RooPlot*)fin->Get("hRecBestResAllEvents_Mass_frame")) { std::cout<<"Writing fit histogrem file n. "<<j<<std::endl; histoLineShape[j]->Write(); cFit->cd(j+1); histoLineShape[j]->SetTitle(LegLabels[j]); histoLineShape[j]->Draw(); histoLineShape[j]->GetXaxis()->SetTitle("M_{#mu#mu} (GeV)"); // TPaveText *cmsprel2 = new TPaveText(0.19, 0.95, 0.95, 0.99, "NDC"); // cmsprel2->SetTextSize(0.03); // cmsprel2->SetTextFont(42); // cmsprel2->SetFillColor(0); // cmsprel2->SetBorderSize(0); // cmsprel2->SetMargin(0.01); // cmsprel2->SetTextAlign(12); // align left // cmsprel2->AddText(0.666666, 0.5, LegLabels[j]); } } ZFitFile->Close(); // cmsprel2->Draw("same"); cFit->SaveAs("ZFitFile.root"); return; };
// examples macro void mutauAfterFit_novbf(bool scaled = true, bool log = true) { // defining the common canvas, axes pad styles SetStyle(); // open example histogram file TFile* exampleFile = new TFile("root/muTau_sm.root"); //load example histograms TH1F* data = (TH1F*)exampleFile->Get("muTau_SM0/data_obs"); if(data) {InitHist(data, "#bf{m_{vis} [GeV]}", "#bf{Events}"); InitData(data);} else{std::cout << "can't find hitogram " << "muTau_SM0/data_obs" << std::endl;} TH1F* Fakes = refill((TH1F*)exampleFile->Get("muTau_SM0/QCD")) ; InitHist(Fakes, "", "", kMagenta-10, 1001); TH1F* EWK1 = refill((TH1F*)exampleFile->Get("muTau_SM0/W" )) ; InitHist(EWK1 , "", "", kRed + 2, 1001); TH1F* EWK2 = refill((TH1F*)exampleFile->Get("muTau_SM0/ZJ" )) ; InitHist(EWK2 , "", "", kRed + 2, 1001); TH1F* EWK3 = refill((TH1F*)exampleFile->Get("muTau_SM0/ZL" )) ; InitHist(EWK3 , "", "", kRed + 2, 1001); TH1F* EWK = refill((TH1F*)exampleFile->Get("muTau_SM0/VV" )) ; InitHist(EWK , "", "", kRed + 2, 1001); TH1F* ttbar = refill((TH1F*)exampleFile->Get("muTau_SM0/TT" )) ; InitHist(ttbar, "", "", kBlue - 8, 1001); TH1F* Ztt = refill((TH1F*)exampleFile->Get("muTau_SM0/ZTT")) ; InitHist(Ztt , "", "", kOrange - 4, 1001); TH1F* ggH = refill((TH1F*)exampleFile->Get("muTau_SM0/SM120" )) ; InitSignal(ggH); ggH ->Scale(10*1); TH1F* qqH = refill((TH1F*)exampleFile->Get("muTau_SM0/VBF120")) ; InitSignal(qqH); qqH ->Scale(10*1); if(scaled){ rescale(Fakes, 2); rescale(EWK1 , 3); rescale(EWK2 , 4); rescale(EWK3 , 5); rescale(EWK , 7); rescale(ttbar, 6); rescale(Ztt , 1); rescale(ggH , 8); rescale(qqH , 9); } if(log){ qqH ->Add(ggH ); Fakes->Add(qqH ); EWK1 ->Add(Fakes); EWK2 ->Add(EWK1 ); EWK3 ->Add(EWK2 ); EWK ->Add(EWK3 ); ttbar->Add(EWK ); Ztt ->Add(ttbar); } else{ EWK1 ->Add(Fakes); EWK2 ->Add(EWK1 ); EWK3 ->Add(EWK2 ); EWK ->Add(EWK3 ); ttbar->Add(EWK ); Ztt ->Add(ttbar); ggH ->Add(Ztt ); qqH ->Add(ggH ); } // define canvas TCanvas *canv = MakeCanvas("canv", "histograms", 600, 600); canv->cd(); if(log){ canv->SetLogy(1); data->SetMinimum(5.0); data->SetMaximum(10000000.); } else{ data->SetMaximum(14000.); } data->SetNdivisions(505); data->Draw("e"); if(log){ Ztt->Draw("same"); ttbar->Draw("same"); EWK->Draw("same"); Fakes->Draw("same"); qqH->Draw("same"); } else{ qqH->Draw("same"); Ztt->Draw("same"); ttbar->Draw("same"); EWK->Draw("same"); Fakes->Draw("same"); } data->Draw("esame"); canv->RedrawAxis(); CMSPrelim("#tau_{#mu}#tau_{h}", 0.45, 0.75); TLegend* leg = new TLegend(0.45, 0.45, 0.9, 0.75); SetLegendStyle(leg); leg->AddEntry(qqH , "(10x) H#rightarrow#tau#tau" , "L" ); leg->AddEntry(data , "Observed" , "LP"); leg->AddEntry(Ztt , "Z#rightarrow#tau#tau" , "F" ); leg->AddEntry(ttbar, "t#bar{t}" , "F" ); leg->AddEntry(EWK , "Electroweak" , "F" ); leg->AddEntry(Fakes, "QCD" , "F" ); leg->Draw(); TPaveText* mssm = new TPaveText(0.78, 0.70, 0.90, 0.74, "NDC"); mssm->SetBorderSize( 0 ); mssm->SetFillStyle( 0 ); mssm->SetTextAlign( 12 ); mssm->SetTextSize ( 0.04 ); mssm->SetTextColor( 1 ); mssm->SetTextFont ( 62 ); mssm->AddText("m_{H}=120"); mssm->Draw(); if(log){ if(scaled) canv->Print("mutau_rescaled_novbf_LOG.pdf"); else canv->Print("mutau_unscaled_novbf_LOG.pdf"); if(scaled) canv->Print("mutau_rescaled_novbf_LOG.png"); else canv->Print("mutau_unscaled_novbf_LOG.png"); } else{ if(scaled) canv->Print("mutau_rescaled_novbf.pdf"); else canv->Print("mutau_unscaled_novbf.pdf"); if(scaled) canv->Print("mutau_rescaled_novbf.png"); else canv->Print("mutau_unscaled_novbf.png"); } }
void HTT_MT_X(bool scaled=true, bool log=true, float min=0.1, float max=-1., const char* inputfile="root/$HISTFILE", const char* directory="muTau_$CATEGORY") { // defining the common canvas, axes pad styles SetStyle(); gStyle->SetLineStyleString(11,"20 10"); // determine category tag const char* category_extra = ""; if(std::string(directory) == std::string("muTau_0jet_low" )){ category_extra = "0 jet, low p_{T}"; } if(std::string(directory) == std::string("muTau_0jet_high" )){ category_extra = "0 jet, high p_{T}"; } if(std::string(directory) == std::string("muTau_boost_low" )){ category_extra = "1 jet, low p_{T}"; } if(std::string(directory) == std::string("muTau_boost_high")){ category_extra = "1 jet, high p_{T}"; } if(std::string(directory) == std::string("muTau_vbf" )){ category_extra = "2 jet (VBF)"; } if(std::string(directory) == std::string("muTau_nobtag" )){ category_extra = "No B-Tag"; } if(std::string(directory) == std::string("muTau_btag" )){ category_extra = "B-Tag"; } const char* dataset; if(std::string(inputfile).find("7TeV")!=std::string::npos){dataset = "CMS Preliminary, H#rightarrow#tau#tau, 4.9 fb^{-1} at 7 TeV";} if(std::string(inputfile).find("8TeV")!=std::string::npos){dataset = "CMS Preliminary, H#rightarrow#tau#tau, 19.4 fb^{-1} at 8 TeV";} #ifdef MSSM if(std::string(inputfile).find("8TeV")!=std::string::npos){dataset = "CMS Preliminary, H#rightarrow#tau#tau, 12.1 fb^{-1} at 8 TeV";} #endif // open example histogram file TFile* input = new TFile(inputfile); TH1F* Fakes = refill((TH1F*)input->Get(TString::Format("%s/QCD" , directory)), "QCD"); InitHist(Fakes, "", "", kMagenta-10, 1001); TH1F* EWK1 = refill((TH1F*)input->Get(TString::Format("%s/W" , directory)), "W" ); InitHist(EWK1 , "", "", kRed + 2, 1001); #ifdef EXTRA_SAMPLES TH1F* EWK2 = refill((TH1F*)input->Get(TString::Format("%s/ZJ" , directory)), "ZJ" ); InitHist(EWK2 , "", "", kRed + 2, 1001); TH1F* EWK3 = refill((TH1F*)input->Get(TString::Format("%s/ZL" , directory)), "ZL" ); InitHist(EWK3 , "", "", kRed + 2, 1001); #else TH1F* EWK2 = refill((TH1F*)input->Get(TString::Format("%s/ZLL" , directory)), "ZLL"); InitHist(EWK2 , "", "", kRed + 2, 1001); #endif TH1F* EWK = refill((TH1F*)input->Get(TString::Format("%s/VV" , directory)), "VV" ); InitHist(EWK , "", "", kRed + 2, 1001); TH1F* ttbar = refill((TH1F*)input->Get(TString::Format("%s/TT" , directory)), "TT" ); InitHist(ttbar, "", "", kBlue - 8, 1001); TH1F* Ztt = refill((TH1F*)input->Get(TString::Format("%s/ZTT" , directory)), "ZTT"); InitHist(Ztt , "", "", kOrange - 4, 1001); #ifdef MSSM float ggHScale = 1., bbHScale = 1.; ggHScale = ($MSSM_SIGNAL_ggH_xseff_A + $MSSM_SIGNAL_ggH_xseff_hH); bbHScale = ($MSSM_SIGNAL_bbH_xseff_A + $MSSM_SIGNAL_bbH_xseff_hH); // float ggHScale = 1., bbHScale = 1.; // scenario for MSSM, mhmax, mA=160, tanb=20, A + H for the time being // if(std::string(inputfile).find("7TeV")!=std::string::npos){ ggHScale = ( 9157.9*0.119 + 10180.7*0.120)/1000.; // bbHScale = (23314.3*0.119 + 21999.3*0.120)/1000.; } // if(std::string(inputfile).find("8TeV")!=std::string::npos){ ggHScale = (11815.3*0.119 + 13124.9*0.120)/1000.; // bbHScale = (31087.9*0.119 + 29317.8*0.120)/1000.; } // float ggHScale = 1., bbHScale = 1.; // scenario for MSSM, mhmax, mA=160, tanb=10, A + H for the time being // if(std::string(inputfile).find("7TeV")!=std::string::npos){ ggHScale = (2111.4*0.11 + 4022.9*0.11)/1000.; // bbHScale = (6211.6*0.11 + 5147.0*0.11)/1000.; } // if(std::string(inputfile).find("8TeV")!=std::string::npos){ ggHScale = (2729.9*0.11 + 5193.2*0.11)/1000.; // bbHScale = (8282.7*0.11 + 6867.8*0.11)/1000.; } TH1F* ggH = refill((TH1F*)input->Get(TString::Format("%s/ggH160", directory)), "ggH"); InitSignal(ggH); ggH ->Scale(ggHScale); TH1F* bbH = refill((TH1F*)input->Get(TString::Format("%s/bbH160", directory)), "bbH"); InitSignal(bbH); bbH ->Scale(bbHScale); #else #ifndef DROP_SIGNAL TH1F* ggH = refill((TH1F*)input->Get(TString::Format("%s/ggH125", directory)), "ggH"); InitSignal(ggH); ggH ->Scale(SIGNAL_SCALE); TH1F* qqH = refill((TH1F*)input->Get(TString::Format("%s/qqH125", directory)), "qqH"); InitSignal(qqH); qqH ->Scale(SIGNAL_SCALE); TH1F* VH = refill((TH1F*)input->Get(TString::Format("%s/VH125" , directory)), "VH" ); InitSignal(VH ); VH ->Scale(SIGNAL_SCALE); #endif #endif TH1F* data = refill((TH1F*)input->Get(TString::Format("%s/data_obs", directory)), "data", true); InitHist(data, "#bf{m_{#tau#tau} [GeV]}", "#bf{dN/dm_{#tau#tau} [1/GeV]}"); InitData(data); TH1F* ref=(TH1F*)Fakes->Clone("ref"); ref->Add(EWK1 ); ref->Add(EWK2 ); #ifdef EXTRA_SAMPLES ref->Add(EWK3 ); #endif ref->Add(EWK ); ref->Add(ttbar); ref->Add(Ztt ); double unscaled[7]; unscaled[0] = Fakes->Integral(); unscaled[1] = EWK ->Integral(); unscaled[1]+= EWK1 ->Integral(); unscaled[1]+= EWK2 ->Integral(); #ifdef EXTRA_SAMPLES unscaled[1]+= EWK3 ->Integral(); #endif unscaled[2] = ttbar->Integral(); unscaled[3] = Ztt ->Integral(); #ifdef MSSM unscaled[4] = ggH ->Integral(); unscaled[5] = bbH ->Integral(); unscaled[6] = 0; #else #ifndef DROP_SIGNAL unscaled[4] = ggH ->Integral(); unscaled[5] = qqH ->Integral(); unscaled[6] = VH ->Integral(); #endif #endif if(scaled){ rescale(Fakes, 7); rescale(EWK1 , 3); rescale(EWK2 , 4); #ifdef EXTRA_SAMPLES rescale(EWK3 , 5); #endif rescale(EWK , 6); rescale(ttbar, 2); rescale(Ztt , 1); #ifdef MSSM rescale(ggH , 8); rescale(bbH , 9); #else #ifndef DROP_SIGNAL rescale(ggH , 8); rescale(qqH , 9); rescale(VH ,10); #endif #endif } TH1F* scales[7]; scales[0] = new TH1F("scales-Fakes", "", 7, 0, 7); scales[0]->SetBinContent(1, unscaled[0]>0 ? (Fakes->Integral()/unscaled[0]-1.) : 0.); scales[1] = new TH1F("scales-EWK" , "", 7, 0, 7); scales[1]->SetBinContent(2, unscaled[1]>0 ? ((EWK ->Integral() +EWK1 ->Integral() +EWK2 ->Integral() #ifdef EXTRA_SAMPLES +EWK3 ->Integral() #endif )/unscaled[1]-1.) : 0.); scales[2] = new TH1F("scales-ttbar", "", 7, 0, 7); scales[2]->SetBinContent(3, unscaled[2]>0 ? (ttbar->Integral()/unscaled[2]-1.) : 0.); scales[3] = new TH1F("scales-Ztt" , "", 7, 0, 7); scales[3]->SetBinContent(4, unscaled[3]>0 ? (Ztt ->Integral()/unscaled[3]-1.) : 0.); #ifdef MSSM scales[4] = new TH1F("scales-ggH" , "", 7, 0, 7); scales[4]->SetBinContent(5, unscaled[4]>0 ? (ggH ->Integral()/unscaled[4]-1.) : 0.); scales[5] = new TH1F("scales-bbH" , "", 7, 0, 7); scales[5]->SetBinContent(6, unscaled[5]>0 ? (bbH ->Integral()/unscaled[5]-1.) : 0.); scales[6] = new TH1F("scales-NONE" , "", 7, 0, 7); scales[6]->SetBinContent(7, 0.); #else #ifndef DROP_SIGNAL scales[4] = new TH1F("scales-ggH" , "", 7, 0, 7); scales[4]->SetBinContent(5, unscaled[4]>0 ? (ggH ->Integral()/unscaled[4]-1.) : 0.); scales[5] = new TH1F("scales-qqH" , "", 7, 0, 7); scales[5]->SetBinContent(6, unscaled[5]>0 ? (qqH ->Integral()/unscaled[5]-1.) : 0.); scales[6] = new TH1F("scales-VH" , "", 7, 0, 7); scales[6]->SetBinContent(7, unscaled[6]>0 ? (VH ->Integral()/unscaled[6]-1.) : 0.); #endif #endif EWK1 ->Add(Fakes); EWK2 ->Add(EWK1 ); #ifdef EXTRA_SAMPLES EWK3 ->Add(EWK2 ); EWK ->Add(EWK3 ); #else EWK ->Add(EWK2 ); #endif ttbar->Add(EWK ); Ztt ->Add(ttbar); if(log){ #ifdef MSSM ggH ->Add(bbH); #else #ifndef DROP_SIGNAL qqH ->Add(VH ); ggH ->Add(qqH); #endif #endif } else{ #ifdef MSSM bbH ->Add(Ztt); ggH ->Add(bbH); #else #ifndef DROP_SIGNAL VH ->Add(Ztt); qqH ->Add(VH ); ggH ->Add(qqH); #endif #endif } /* Mass plot before and after fit */ TCanvas *canv = MakeCanvas("canv", "histograms", 600, 600); canv->cd(); if(log){ canv->SetLogy(1); } #if defined MSSM if(!log){ data->GetXaxis()->SetRange(0, data->FindBin(350)); } else{ data->GetXaxis()->SetRange(0, data->FindBin(1000)); }; #else data->GetXaxis()->SetRange(0, data->FindBin(350)); #endif data->SetNdivisions(505); data->SetMinimum(min); data->SetMaximum(max>0 ? max : std::max(maximum(data, log), maximum(Ztt, log))); data->Draw("e"); TH1F* errorBand = (TH1F*)Ztt ->Clone(); errorBand ->SetMarkerSize(0); errorBand ->SetFillColor(1); errorBand ->SetFillStyle(3013); errorBand ->SetLineWidth(1); for(int idx=0; idx<errorBand->GetNbinsX(); ++idx){ if(errorBand->GetBinContent(idx)>0){ std::cout << "Uncertainties on summed background samples: " << errorBand->GetBinError(idx)/errorBand->GetBinContent(idx) << std::endl; break; } } if(log){ Ztt ->Draw("histsame"); ttbar->Draw("histsame"); EWK ->Draw("histsame"); Fakes->Draw("histsame"); $DRAW_ERROR #ifndef DROP_SIGNAL ggH ->Draw("histsame"); #endif } else{ #ifndef DROP_SIGNAL ggH ->Draw("histsame"); #endif Ztt ->Draw("histsame"); ttbar->Draw("histsame"); EWK ->Draw("histsame"); Fakes->Draw("histsame"); $DRAW_ERROR } data->Draw("esame"); canv->RedrawAxis(); //CMSPrelim(dataset, "#tau_{#mu}#tau_{h}", 0.17, 0.835); CMSPrelim(dataset, "", 0.16, 0.835); TPaveText* chan = new TPaveText(0.20, 0.74+0.061, 0.32, 0.74+0.161, "NDC"); chan->SetBorderSize( 0 ); chan->SetFillStyle( 0 ); chan->SetTextAlign( 12 ); chan->SetTextSize ( 0.05 ); chan->SetTextColor( 1 ); chan->SetTextFont ( 62 ); chan->AddText("#mu#tau_{h}"); chan->Draw(); TPaveText* cat = new TPaveText(0.20, 0.68+0.061, 0.32, 0.68+0.161, "NDC"); cat->SetBorderSize( 0 ); cat->SetFillStyle( 0 ); cat->SetTextAlign( 12 ); cat->SetTextSize ( 0.05 ); cat->SetTextColor( 1 ); cat->SetTextFont ( 62 ); cat->AddText(category_extra); cat->Draw(); #ifdef MSSM TPaveText* massA = new TPaveText(0.75, 0.48+0.061, 0.85, 0.48+0.161, "NDC"); massA->SetBorderSize( 0 ); massA->SetFillStyle( 0 ); massA->SetTextAlign( 12 ); massA->SetTextSize ( 0.03 ); massA->SetTextColor( 1 ); massA->SetTextFont ( 62 ); massA->AddText("m_{A}=160GeV"); massA->Draw(); TPaveText* tanb = new TPaveText(0.75, 0.44+0.061, 0.85, 0.44+0.161, "NDC"); tanb->SetBorderSize( 0 ); tanb->SetFillStyle( 0 ); tanb->SetTextAlign( 12 ); tanb->SetTextSize ( 0.03 ); tanb->SetTextColor( 1 ); tanb->SetTextFont ( 62 ); tanb->AddText("tan#beta=20"); tanb->Draw(); TPaveText* scen = new TPaveText(0.75, 0.40+0.061, 0.85, 0.40+0.161, "NDC"); scen->SetBorderSize( 0 ); scen->SetFillStyle( 0 ); scen->SetTextAlign( 12 ); scen->SetTextSize ( 0.03 ); scen->SetTextColor( 1 ); scen->SetTextFont ( 62 ); scen->AddText("mhmax"); scen->Draw(); #endif #ifdef MSSM TLegend* leg = new TLegend(0.45, 0.65, 0.95, 0.90); SetLegendStyle(leg); leg->AddEntry(ggH , "#phi#rightarrow#tau#tau" , "L" ); #else TLegend* leg = new TLegend(0.50, 0.65, 0.95, 0.90); SetLegendStyle(leg); #ifndef DROP_SIGNAL if(SIGNAL_SCALE!=1){ leg->AddEntry(ggH , TString::Format("%.0f#timesH(125 GeV)#rightarrow#tau#tau", SIGNAL_SCALE) , "L" ); } else{ leg->AddEntry(ggH , "H(125 GeV)#rightarrow#tau#tau" , "L" ); } #endif #endif leg->AddEntry(data , "observed" , "LP"); leg->AddEntry(Ztt , "Z#rightarrow#tau#tau" , "F" ); leg->AddEntry(ttbar, "t#bar{t}" , "F" ); leg->AddEntry(EWK , "electroweak" , "F" ); leg->AddEntry(Fakes, "QCD" , "F" ); $ERROR_LEGEND leg->Draw(); //#ifdef MSSM // TPaveText* mssm = new TPaveText(0.69, 0.85, 0.90, 0.90, "NDC"); // mssm->SetBorderSize( 0 ); // mssm->SetFillStyle( 0 ); // mssm->SetTextAlign( 12 ); // mssm->SetTextSize ( 0.03 ); // mssm->SetTextColor( 1 ); // mssm->SetTextFont ( 62 ); // mssm->AddText("(m_{A}=120, tan#beta=10)"); // mssm->Draw(); //#else // TPaveText* mssm = new TPaveText(0.83, 0.85, 0.95, 0.90, "NDC"); // mssm->SetBorderSize( 0 ); // mssm->SetFillStyle( 0 ); // mssm->SetTextAlign( 12 ); // mssm->SetTextSize ( 0.03 ); // mssm->SetTextColor( 1 ); // mssm->SetTextFont ( 62 ); // mssm->AddText("m_{H}=125"); // mssm->Draw(); //#endif /* Ratio Data over MC */ TCanvas *canv0 = MakeCanvas("canv0", "histograms", 600, 400); canv0->SetGridx(); canv0->SetGridy(); canv0->cd(); TH1F* zero = (TH1F*)ref->Clone("zero"); zero->Clear(); TH1F* rat1 = (TH1F*)data->Clone("rat"); rat1->Divide(Ztt); for(int ibin=0; ibin<rat1->GetNbinsX(); ++ibin){ if(rat1->GetBinContent(ibin+1)>0){ // catch cases of 0 bins, which would lead to 0-alpha*0-1 rat1->SetBinContent(ibin+1, rat1->GetBinContent(ibin+1)-1.); } zero->SetBinContent(ibin+1, 0.); } rat1->SetLineColor(kBlack); rat1->SetFillColor(kGray ); rat1->SetMaximum(+0.5); rat1->SetMinimum(-0.5); rat1->GetYaxis()->CenterTitle(); rat1->GetYaxis()->SetTitle("#bf{Data/MC-1}"); rat1->GetXaxis()->SetTitle("#bf{m_{#tau#tau} [GeV]}"); rat1->Draw(); zero->SetLineColor(kBlack); zero->Draw("same"); canv0->RedrawAxis(); /* Ratio After fit over Prefit */ TCanvas *canv1 = MakeCanvas("canv1", "histograms", 600, 400); canv1->SetGridx(); canv1->SetGridy(); canv1->cd(); TH1F* rat2 = (TH1F*) Ztt->Clone("rat2"); rat2->Divide(ref); for(int ibin=0; ibin<rat2->GetNbinsX(); ++ibin){ if(rat2->GetBinContent(ibin+1)>0){ // catch cases of 0 bins, which would lead to 0-alpha*0-1 rat2 ->SetBinContent(ibin+1, rat2->GetBinContent(ibin+1)-1.); } } rat2->SetLineColor(kRed+ 3); rat2->SetFillColor(kRed-10); rat2->SetMaximum(+0.3); rat2->SetMinimum(-0.3); rat2->GetYaxis()->SetTitle("#bf{Fit/Prefit-1}"); rat2->GetYaxis()->CenterTitle(); rat2->GetXaxis()->SetTitle("#bf{m_{#tau#tau} [GeV]}"); rat2->Draw(); zero->SetLineColor(kBlack); zero->Draw("same"); canv1->RedrawAxis(); /* Relative shift per sample */ TCanvas *canv2 = MakeCanvas("canv2", "histograms", 600, 400); canv2->SetGridx(); canv2->SetGridy(); canv2->cd(); InitHist (scales[0], "", "", kMagenta-10, 1001); InitHist (scales[1], "", "", kRed + 2, 1001); InitHist (scales[2], "", "", kBlue - 8, 1001); InitHist (scales[3], "", "", kOrange - 4, 1001); #ifndef DROP_SIGNAL InitSignal(scales[4]); InitSignal(scales[5]); InitSignal(scales[6]); #endif scales[0]->Draw(); scales[0]->GetXaxis()->SetBinLabel(1, "#bf{Fakes}"); scales[0]->GetXaxis()->SetBinLabel(2, "#bf{EWK}" ); scales[0]->GetXaxis()->SetBinLabel(3, "#bf{ttbar}"); scales[0]->GetXaxis()->SetBinLabel(4, "#bf{Ztt}" ); #ifdef MSSM scales[0]->GetXaxis()->SetBinLabel(5, "#bf{ggH}" ); scales[0]->GetXaxis()->SetBinLabel(6, "#bf{bbH}" ); scales[0]->GetXaxis()->SetBinLabel(7, "NONE" ); #else scales[0]->GetXaxis()->SetBinLabel(5, "#bf{ggH}" ); scales[0]->GetXaxis()->SetBinLabel(6, "#bf{qqH}" ); scales[0]->GetXaxis()->SetBinLabel(7, "#bf{VH}" ); #endif scales[0]->SetMaximum(+1.0); scales[0]->SetMinimum(-1.0); scales[0]->GetYaxis()->CenterTitle(); scales[0]->GetYaxis()->SetTitle("#bf{Fit/Prefit-1}"); scales[1]->Draw("same"); scales[2]->Draw("same"); scales[3]->Draw("same"); #ifndef DROP_SIGNAL scales[4]->Draw("same"); scales[5]->Draw("same"); scales[6]->Draw("same"); #endif zero->Draw("same"); canv2->RedrawAxis(); /* prepare output */ bool isSevenTeV = std::string(inputfile).find("7TeV")!=std::string::npos; canv ->Print(TString::Format("%s_%sscaled_%s_%s.png" , directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv ->Print(TString::Format("%s_%sscaled_%s_%s.pdf" , directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv ->Print(TString::Format("%s_%sscaled_%s_%s.eps" , directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv0->Print(TString::Format("%s_datamc_%sscaled_%s_%s.png", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv0->Print(TString::Format("%s_datamc_%sscaled_%s_%s.pdf", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv0->Print(TString::Format("%s_datamc_%sscaled_%s_%s.eps", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv1->Print(TString::Format("%s_prefit_%sscaled_%s_%s.png", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv1->Print(TString::Format("%s_prefit_%sscaled_%s_%s.pdf", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv1->Print(TString::Format("%s_prefit_%sscaled_%s_%s.eps", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv2->Print(TString::Format("%s_sample_%sscaled_%s_%s.png", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv2->Print(TString::Format("%s_sample_%sscaled_%s_%s.pdf", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); canv2->Print(TString::Format("%s_sample_%sscaled_%s_%s.eps", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : "")); TFile* output = new TFile(TString::Format("%s_%sscaled_%s_%s.root", directory, scaled ? "re" : "un", isSevenTeV ? "7TeV" : "8TeV", log ? "LOG" : ""), "update"); output->cd(); data ->Write("data_obs"); Fakes->Write("Fakes" ); EWK ->Write("EWK" ); ttbar->Write("ttbar" ); Ztt ->Write("Ztt" ); #ifdef MSSM ggH ->Write("ggH" ); bbH ->Write("bbH" ); #else #ifndef DROP_SIGNAL ggH ->Write("ggH" ); qqH ->Write("qqH" ); VH ->Write("VH" ); #endif #endif if(errorBand){ errorBand->Write("errorBand"); } output->Close(); }
void mass4Chan(){ //=========Macro generated from canvas: ccc/ //========= (Thu Mar 7 22:11:11 2013) by ROOT version5.34/03 TCanvas *ccc = new TCanvas("ccc", "",0,0,600,600); gStyle->SetOptFit(1); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); ccc->Range(86.5625,-1.875,92.8125,10.625); ccc->SetFillColor(0); ccc->SetBorderMode(0); ccc->SetBorderSize(2); ccc->SetLeftMargin(0.15); ccc->SetRightMargin(0.05); ccc->SetTopMargin(0.05); ccc->SetBottomMargin(0.15); ccc->SetFrameFillStyle(0); ccc->SetFrameBorderMode(0); ccc->SetFrameFillStyle(0); ccc->SetFrameBorderMode(0); TH2F *hframe = new TH2F("hframe","",100,85,96,100,0,10); hframe->SetLineStyle(0); hframe->SetMarkerStyle(20); hframe->GetXaxis()->SetTitle(" m_{Z} (GeV)"); hframe->GetXaxis()->SetNdivisions(510); hframe->GetXaxis()->SetLabelFont(42); hframe->GetXaxis()->SetLabelOffset(0.01); hframe->GetXaxis()->SetLabelSize(0.05); hframe->GetXaxis()->SetTitleSize(0.05); hframe->GetXaxis()->SetTitleOffset(1.15); hframe->GetXaxis()->SetTitleFont(42); hframe->GetYaxis()->SetTitle(" -2#Delta ln L"); hframe->GetYaxis()->SetLabelFont(42); hframe->GetYaxis()->SetLabelOffset(0.01); hframe->GetYaxis()->SetLabelSize(0.05); hframe->GetYaxis()->SetTitleSize(0.05); hframe->GetYaxis()->SetTitleOffset(1.4); hframe->GetYaxis()->SetTitleFont(42); hframe->GetZaxis()->SetLabelFont(42); hframe->GetZaxis()->SetLabelOffset(0.007); hframe->GetZaxis()->SetLabelSize(0.045); hframe->GetZaxis()->SetTitleSize(0.05); hframe->GetZaxis()->SetTitleFont(42); hframe->Draw(""); //4e TGraph *graph = new TGraph(211); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetLineColor(kGreen+1); graph->SetLineWidth(3); graph->SetMarkerStyle(20); graph->SetPoint(0,88.01999664,24.17581367); graph->SetPoint(1,88.05999756,23.87920761); graph->SetPoint(2,88.09999847,23.58337593); graph->SetPoint(3,88.13999939,23.28834534); graph->SetPoint(4,88.18000031,22.99414253); graph->SetPoint(5,88.22000122,22.70079803); graph->SetPoint(6,88.26000214,22.40833855); graph->SetPoint(7,88.30000305,22.11679268); graph->SetPoint(8,88.33999634,21.82618904); graph->SetPoint(9,88.37999725,21.53655434); graph->SetPoint(10,88.41999817,21.24791718); graph->SetPoint(11,88.45999908,20.96030426); graph->SetPoint(12,88.5,20.6737442); graph->SetPoint(13,88.54000092,20.3882618); graph->SetPoint(14,88.58000183,20.10388756); graph->SetPoint(15,88.62000275,19.82064438); graph->SetPoint(16,88.66000366,19.53856277); graph->SetPoint(17,88.69999695,19.25766563); graph->SetPoint(18,88.73999786,18.97797966); graph->SetPoint(19,88.77999878,18.69953346); graph->SetPoint(20,88.81999969,18.42235184); graph->SetPoint(21,88.81999969,18.42235184); graph->SetPoint(22,88.86000061,18.14645958); graph->SetPoint(23,88.90000153,17.87188148); graph->SetPoint(24,88.94000244,17.59864616); graph->SetPoint(25,88.98000336,17.3267765); graph->SetPoint(26,89.01999664,17.05629921); graph->SetPoint(27,89.05999756,16.78723907); graph->SetPoint(28,89.09999847,16.51961899); graph->SetPoint(29,89.13999939,16.25346756); graph->SetPoint(30,89.18000031,15.98880577); graph->SetPoint(31,89.22000122,15.72565937); graph->SetPoint(32,89.26000214,15.46405411); graph->SetPoint(33,89.30000305,15.20401192); graph->SetPoint(34,89.33999634,14.94555759); graph->SetPoint(35,89.37999725,14.68871498); graph->SetPoint(36,89.41999817,14.43350792); graph->SetPoint(37,89.45999908,14.1799593); graph->SetPoint(38,89.5,13.92809296); graph->SetPoint(39,89.54000092,13.67793083); graph->SetPoint(40,89.58000183,13.42949772); graph->SetPoint(41,89.62000275,13.1828146); graph->SetPoint(42,89.62000275,13.1828146); graph->SetPoint(43,89.66000366,12.93790436); graph->SetPoint(44,89.69999695,12.69478893); graph->SetPoint(45,89.73999786,12.45349026); graph->SetPoint(46,89.77999878,12.21403122); graph->SetPoint(47,89.81999969,11.9764328); graph->SetPoint(48,89.86000061,11.74071598); graph->SetPoint(49,89.90000153,11.50690174); graph->SetPoint(50,89.94000244,11.27501011); graph->SetPoint(51,89.98000336,11.04506397); graph->SetPoint(52,90.01999664,10.81708145); graph->SetPoint(53,90.05999756,10.59108353); graph->SetPoint(54,90.09999847,10.36709023); graph->SetPoint(55,90.13999939,10.14511967); graph->SetPoint(56,90.18000031,9.925192833); graph->SetPoint(57,90.22000122,9.707327843); graph->SetPoint(58,90.26000214,9.49154377); graph->SetPoint(59,90.30000305,9.27785778); graph->SetPoint(60,90.33999634,9.066288948); graph->SetPoint(61,90.37999725,8.856854439); graph->SetPoint(62,90.41999817,8.649573326); graph->SetPoint(63,90.41999817,8.649573326); graph->SetPoint(64,90.45999908,8.444460869); graph->SetPoint(65,90.5,8.241534233); graph->SetPoint(66,90.54000092,8.040810585); graph->SetPoint(67,90.58000183,7.84230566); graph->SetPoint(68,90.62000275,7.646035671); graph->SetPoint(69,90.66000366,7.452015877); graph->SetPoint(70,90.69999695,7.260261536); graph->SetPoint(71,90.73999786,7.07078743); graph->SetPoint(72,90.77999878,6.883607864); graph->SetPoint(73,90.81999969,6.698737621); graph->SetPoint(74,90.86000061,6.516190529); graph->SetPoint(75,90.90000153,6.335978985); graph->SetPoint(76,90.94000244,6.158116817); graph->SetPoint(77,90.98000336,5.982616901); graph->SetPoint(78,91.01999664,5.809491634); graph->SetPoint(79,91.05999756,5.638751984); graph->SetPoint(80,91.09999847,5.470410824); graph->SetPoint(81,91.13999939,5.304479122); graph->SetPoint(82,91.18000031,5.140967369); graph->SetPoint(83,91.22000122,4.979886055); graph->SetPoint(84,91.22000122,4.979886055); graph->SetPoint(85,91.26000214,4.821246147); graph->SetPoint(86,91.30000305,4.665056705); graph->SetPoint(87,91.33999634,4.511327267); graph->SetPoint(88,91.37999725,4.360067368); graph->SetPoint(89,91.41999817,4.211285114); graph->SetPoint(90,91.45999908,4.064989567); graph->SetPoint(91,91.5,3.921188593); graph->SetPoint(92,91.54000092,3.77989006); graph->SetPoint(93,91.58000183,3.641101122); graph->SetPoint(94,91.62000275,3.504829168); graph->SetPoint(95,91.66000366,3.371080875); graph->SetPoint(96,91.69999695,3.239862919); graph->SetPoint(97,91.73999786,3.111181259); graph->SetPoint(98,91.77999878,2.985042334); graph->SetPoint(99,91.81999969,2.861451626); graph->SetPoint(100,91.86000061,2.740414619); graph->SetPoint(101,91.90000153,2.62193656); graph->SetPoint(102,91.94000244,2.506022453); graph->SetPoint(103,91.98000336,2.392677069); graph->SetPoint(104,92.01999664,2.281905413); graph->SetPoint(105,92.01999664,2.281905413); graph->SetPoint(106,92.05999756,2.173711538); graph->SetPoint(107,92.09999847,2.068099499); graph->SetPoint(108,92.13999939,1.965073943); graph->SetPoint(109,92.18000031,1.864638567); graph->SetPoint(110,92.22000122,1.766797066); graph->SetPoint(111,92.26000214,1.671553373); graph->SetPoint(112,92.30000305,1.578910828); graph->SetPoint(113,92.33999634,1.488873124); graph->SetPoint(114,92.37999725,1.401443481); graph->SetPoint(115,92.41999817,1.316625237); graph->SetPoint(116,92.45999908,1.234421849); graph->SetPoint(117,92.5,1.154836297); graph->SetPoint(118,92.54000092,1.077871799); graph->SetPoint(119,92.58000183,1.003531575); graph->SetPoint(120,92.62000275,0.9318185449); graph->SetPoint(121,92.66000366,0.8627359867); graph->SetPoint(122,92.69999695,0.796286881); graph->SetPoint(123,92.73999786,0.7324743271); graph->SetPoint(124,92.77999878,0.6713014841); graph->SetPoint(125,92.81999969,0.6127713919); graph->SetPoint(126,92.81999969,0.6127713919); graph->SetPoint(127,92.86000061,0.556887269); graph->SetPoint(128,92.90000153,0.5036522746); graph->SetPoint(129,92.94000244,0.4530695975); graph->SetPoint(130,92.98000336,0.4051425755); graph->SetPoint(131,93.01999664,0.3598744869); graph->SetPoint(132,93.05999756,0.3172687292); graph->SetPoint(133,93.09999847,0.2773286998); graph->SetPoint(134,93.13999939,0.2400579304); graph->SetPoint(135,93.18000031,0.2054599077); graph->SetPoint(136,93.22000122,0.1735383123); graph->SetPoint(137,93.26000214,0.1442967504); graph->SetPoint(138,93.30000305,0.1177390069); graph->SetPoint(139,93.33999634,0.09386885911); graph->SetPoint(140,93.37999725,0.07269018143); graph->SetPoint(141,93.41999817,0.05420689285); graph->SetPoint(142,93.45999908,0.03842297941); graph->SetPoint(143,93.5,0.02534246817); graph->SetPoint(144,93.54000092,0.01496945601); graph->SetPoint(145,93.58000183,0.007308077533); graph->SetPoint(146,93.62000275,0.002362518338); graph->SetPoint(147,93.62000275,0.002362518338); graph->SetPoint(148,93.66000366,0.0001370045647); graph->SetPoint(149,93.6727066,0); graph->SetPoint(150,93.6727066,0); graph->SetPoint(151,93.6727066,0); graph->SetPoint(152,93.6727066,0); graph->SetPoint(153,93.6727066,0); graph->SetPoint(154,93.6727066,0); graph->SetPoint(155,93.6727066,0); graph->SetPoint(156,93.90000153,0.04414568096); graph->SetPoint(157,93.94000244,0.06108137593); graph->SetPoint(158,93.98000336,0.08077188581); graph->SetPoint(159,94.01999664,0.1032215655); graph->SetPoint(160,94.05999756,0.1284348369); graph->SetPoint(161,94.09999847,0.1564160585); graph->SetPoint(162,94.13999939,0.1871695817); graph->SetPoint(163,94.18000031,0.2206996977); graph->SetPoint(164,94.22000122,0.2570107281); graph->SetPoint(165,94.26000214,0.2961069047); graph->SetPoint(166,94.30000305,0.3379923999); graph->SetPoint(167,94.33999634,0.3826714158); graph->SetPoint(168,94.37999725,0.4301479757); graph->SetPoint(169,94.41999817,0.4804261029); graph->SetPoint(170,94.41999817,0.4804261029); graph->SetPoint(171,94.45999908,0.5335097313); graph->SetPoint(172,94.5,0.589402616); graph->SetPoint(173,94.54000092,0.6481084824); graph->SetPoint(174,94.58000183,0.7096309662); graph->SetPoint(175,94.62000275,0.7739735246); graph->SetPoint(176,94.66000366,0.8411393762); graph->SetPoint(177,94.69999695,0.9111317396); graph->SetPoint(178,94.73999786,0.9839535356); graph->SetPoint(179,94.77999878,1.059607625); graph->SetPoint(180,94.81999969,1.138096452); graph->SetPoint(181,94.86000061,1.21942234); graph->SetPoint(182,94.90000153,1.303587556); graph->SetPoint(183,94.94000244,1.390593767); graph->SetPoint(184,94.98000336,1.480442762); graph->SetPoint(185,95.01999664,1.573135614); graph->SetPoint(186,95.05999756,1.668673396); graph->SetPoint(187,95.09999847,1.767056823); graph->SetPoint(188,95.13999939,1.868286133); graph->SetPoint(189,95.18000031,1.972361326); graph->SetPoint(190,95.22000122,2.079282045); graph->SetPoint(191,95.22000122,2.079282045); graph->SetPoint(192,95.26000214,2.189047575); graph->SetPoint(193,95.30000305,2.301656485); graph->SetPoint(194,95.33999634,2.417107344); graph->SetPoint(195,95.37999725,2.535398245); graph->SetPoint(196,95.41999817,2.656526327); graph->SetPoint(197,95.45999908,2.780489206); graph->SetPoint(198,95.5,2.907283306); graph->SetPoint(199,95.54000092,3.036904335); graph->SetPoint(200,95.58000183,3.169348717); graph->SetPoint(201,95.62000275,3.304610968); graph->SetPoint(202,95.66000366,3.442685843); graph->SetPoint(203,95.69999695,3.583567619); graph->SetPoint(204,95.73999786,3.727249861); graph->SetPoint(205,95.77999878,3.873725414); graph->SetPoint(206,95.81999969,4.022986889); graph->SetPoint(207,95.86000061,4.175026417); graph->SetPoint(208,95.90000153,4.329834938); graph->SetPoint(209,95.94000244,4.487403393); graph->SetPoint(210,95.98000336,4.647722244); graph->Sort(); cout << "4e: " << graph->Eval(91.1876) << endl; //2e2mu TGraph *graph1 = new TGraph(211); graph1->SetName("Graph1"); graph1->SetTitle("Graph1"); graph1->SetFillColor(1); graph1->SetLineWidth(3); graph1->SetLineColor(kBlue); graph1->SetMarkerStyle(20); graph1->SetPoint(0,88.01999664,42.53228378); graph1->SetPoint(1,88.05999756,41.62067032); graph1->SetPoint(2,88.09999847,40.71479416); graph1->SetPoint(3,88.13999939,39.81480408); graph1->SetPoint(4,88.18000031,38.92084122); graph1->SetPoint(5,88.22000122,38.03306198); graph1->SetPoint(6,88.26000214,37.15161514); graph1->SetPoint(7,88.30000305,36.27664185); graph1->SetPoint(8,88.33999634,35.40829468); graph1->SetPoint(9,88.37999725,34.54672241); graph1->SetPoint(10,88.41999817,33.69207764); graph1->SetPoint(11,88.45999908,32.84450531); graph1->SetPoint(12,88.5,32.00415421); graph1->SetPoint(13,88.54000092,31.17118073); graph1->SetPoint(14,88.58000183,30.34573174); graph1->SetPoint(15,88.62000275,29.52795982); graph1->SetPoint(16,88.66000366,28.71801567); graph1->SetPoint(17,88.69999695,27.91605186); graph1->SetPoint(18,88.73999786,27.12222099); graph1->SetPoint(19,88.77999878,26.33667755); graph1->SetPoint(20,88.81999969,25.55957413); graph1->SetPoint(21,88.81999969,25.55957413); graph1->SetPoint(22,88.86000061,24.79106331); graph1->SetPoint(23,88.90000153,24.03130341); graph1->SetPoint(24,88.94000244,23.28044701); graph1->SetPoint(25,88.98000336,22.53864861); graph1->SetPoint(26,89.01999664,21.80606842); graph1->SetPoint(27,89.05999756,21.08285904); graph1->SetPoint(28,89.09999847,20.36917686); graph1->SetPoint(29,89.13999939,19.66518211); graph1->SetPoint(30,89.18000031,18.97103119); graph1->SetPoint(31,89.22000122,18.28688049); graph1->SetPoint(32,89.26000214,17.61288834); graph1->SetPoint(33,89.30000305,16.94921303); graph1->SetPoint(34,89.33999634,16.29601097); graph1->SetPoint(35,89.37999725,15.65344238); graph1->SetPoint(36,89.41999817,15.02166271); graph1->SetPoint(37,89.45999908,14.40083027); graph1->SetPoint(38,89.5,13.79110146); graph1->SetPoint(39,89.54000092,13.19263268); graph1->SetPoint(40,89.58000183,12.60557842); graph1->SetPoint(41,89.62000275,12.03009319); graph1->SetPoint(42,89.62000275,12.03009319); graph1->SetPoint(43,89.66000366,11.46633053); graph1->SetPoint(44,89.69999695,10.91444302); graph1->SetPoint(45,89.73999786,10.37458038); graph1->SetPoint(46,89.77999878,9.846892357); graph1->SetPoint(47,89.81999969,9.331525803); graph1->SetPoint(48,89.86000061,8.828626633); graph1->SetPoint(49,89.90000153,8.338338852); graph1->SetPoint(50,89.94000244,7.860803127); graph1->SetPoint(51,89.98000336,7.396159172); graph1->SetPoint(52,90.01999664,6.944543839); graph1->SetPoint(53,90.05999756,6.506091118); graph1->SetPoint(54,90.09999847,6.080932617); graph1->SetPoint(55,90.13999939,5.669197083); graph1->SetPoint(56,90.18000031,5.271010399); graph1->SetPoint(57,90.22000122,4.886495113); graph1->SetPoint(58,90.26000214,4.515771389); graph1->SetPoint(59,90.30000305,4.15895462); graph1->SetPoint(60,90.33999634,3.816158772); graph1->SetPoint(61,90.37999725,3.487493038); graph1->SetPoint(62,90.41999817,3.17306304); graph1->SetPoint(63,90.41999817,3.17306304); graph1->SetPoint(64,90.45999908,2.872971296); graph1->SetPoint(65,90.5,2.587316275); graph1->SetPoint(66,90.54000092,2.316192389); graph1->SetPoint(67,90.58000183,2.059690237); graph1->SetPoint(68,90.62000275,1.817896128); graph1->SetPoint(69,90.66000366,1.590892553); graph1->SetPoint(70,90.69999695,1.378757238); graph1->SetPoint(71,90.73999786,1.181563854); graph1->SetPoint(72,90.77999878,0.999381721); graph1->SetPoint(73,90.81999969,0.832275331); graph1->SetPoint(74,90.86000061,0.6803047061); graph1->SetPoint(75,90.90000153,0.5435250998); graph1->SetPoint(76,90.94000244,0.4219872355); graph1->SetPoint(77,90.98000336,0.315736711); graph1->SetPoint(78,91.01999664,0.2248144299); graph1->SetPoint(79,91.05999756,0.149256289); graph1->SetPoint(80,91.09999847,0.08909317851); graph1->SetPoint(81,91.13999939,0.04435096309); graph1->SetPoint(82,91.18000031,0.01505037863); graph1->SetPoint(83,91.22000122,0.00120701245); graph1->SetPoint(84,91.22000122,0.00120701245); graph1->SetPoint(85,91.2358017,0); graph1->SetPoint(86,91.2358017,0); graph1->SetPoint(87,91.2358017,0); graph1->SetPoint(88,91.2358017,0); graph1->SetPoint(89,91.2358017,0); graph1->SetPoint(90,91.2358017,0); graph1->SetPoint(91,91.2358017,0); graph1->SetPoint(92,91.45999908,0.2429630756); graph1->SetPoint(93,91.5,0.337316364); graph1->SetPoint(94,91.54000092,0.4470618963); graph1->SetPoint(95,91.58000183,0.5721673965); graph1->SetPoint(96,91.62000275,0.7125952244); graph1->SetPoint(97,91.66000366,0.8683020473); graph1->SetPoint(98,91.69999695,1.039239407); graph1->SetPoint(99,91.73999786,1.225353122); graph1->SetPoint(100,91.77999878,1.426583886); graph1->SetPoint(101,91.81999969,1.642866492); graph1->SetPoint(102,91.86000061,1.874130487); graph1->SetPoint(103,91.90000153,2.120300293); graph1->SetPoint(104,91.94000244,2.381294727); graph1->SetPoint(105,91.98000336,2.657027245); graph1->SetPoint(106,92.01999664,2.947405815); graph1->SetPoint(107,92.01999664,2.947405815); graph1->SetPoint(108,92.05999756,3.252333403); graph1->SetPoint(109,92.09999847,3.571707726); graph1->SetPoint(110,92.13999939,3.905421734); graph1->SetPoint(111,92.18000031,4.253362656); graph1->SetPoint(112,92.22000122,4.615413189); graph1->SetPoint(113,92.26000214,4.991451263); graph1->SetPoint(114,92.30000305,5.381349564); graph1->SetPoint(115,92.33999634,5.784977436); graph1->SetPoint(116,92.37999725,6.202198505); graph1->SetPoint(117,92.41999817,6.632872105); graph1->SetPoint(118,92.45999908,7.076854706); graph1->SetPoint(119,92.5,7.533997059); graph1->SetPoint(120,92.54000092,8.00414753); graph1->SetPoint(121,92.58000183,8.487151146); graph1->SetPoint(122,92.62000275,8.982847214); graph1->SetPoint(123,92.66000366,9.491073608); graph1->SetPoint(124,92.69999695,10.0116663); graph1->SetPoint(125,92.73999786,10.54445553); graph1->SetPoint(126,92.77999878,11.08927155); graph1->SetPoint(127,92.81999969,11.64594078); graph1->SetPoint(128,92.81999969,11.64594078); graph1->SetPoint(129,92.86000061,12.21428871); graph1->SetPoint(130,92.90000153,12.79413795); graph1->SetPoint(131,92.94000244,13.38531017); graph1->SetPoint(132,92.98000336,13.98762512); graph1->SetPoint(133,93.01999664,14.6009016); graph1->SetPoint(134,93.05999756,15.22495747); graph1->SetPoint(135,93.09999847,15.85961056); graph1->SetPoint(136,93.13999939,16.50467491); graph1->SetPoint(137,93.18000031,17.15996933); graph1->SetPoint(138,93.22000122,17.82530975); graph1->SetPoint(139,93.26000214,18.50051117); graph1->SetPoint(140,93.30000305,19.18539047); graph1->SetPoint(141,93.33999634,19.87976265); graph1->SetPoint(142,93.37999725,20.5834465); graph1->SetPoint(143,93.41999817,21.29626083); graph1->SetPoint(144,93.45999908,22.01802063); graph1->SetPoint(145,93.5,22.74854851); graph1->SetPoint(146,93.54000092,23.48766518); graph1->SetPoint(147,93.58000183,24.23518753); graph1->SetPoint(148,93.62000275,24.99094391); graph1->SetPoint(149,93.62000275,24.99094391); graph1->SetPoint(150,93.66000366,25.75475311); graph1->SetPoint(151,93.69999695,26.52644157); graph1->SetPoint(152,93.73999786,27.30583763); graph1->SetPoint(153,93.77999878,28.09276581); graph1->SetPoint(154,93.81999969,28.88705635); graph1->SetPoint(155,93.86000061,29.68853951); graph1->SetPoint(156,93.90000153,30.49704552); graph1->SetPoint(157,93.94000244,31.31240845); graph1->SetPoint(158,93.98000336,32.13446045); graph1->SetPoint(159,94.01999664,32.9630394); graph1->SetPoint(160,94.05999756,33.79798508); graph1->SetPoint(161,94.09999847,34.63912964); graph1->SetPoint(162,94.13999939,35.4863205); graph1->SetPoint(163,94.18000031,36.3393898); graph1->SetPoint(164,94.22000122,37.19818878); graph1->SetPoint(165,94.26000214,38.06255722); graph1->SetPoint(166,94.30000305,38.93234253); graph1->SetPoint(167,94.33999634,39.80738831); graph1->SetPoint(168,94.37999725,40.68754959); graph1->SetPoint(169,94.41999817,41.5726738); graph1->SetPoint(170,94.41999817,41.5726738); graph1->SetPoint(171,94.45999908,42.46260834); graph1->SetPoint(172,94.5,43.35721588); graph1->SetPoint(173,94.54000092,44.25634003); graph1->SetPoint(174,94.58000183,45.15984726); graph1->SetPoint(175,94.62000275,46.06758881); graph1->SetPoint(176,94.66000366,46.97943115); graph1->SetPoint(177,94.69999695,47.89522934); graph1->SetPoint(178,94.73999786,48.81485367); graph1->SetPoint(179,94.77999878,49.73816299); graph1->SetPoint(180,94.81999969,50.66502762); graph1->SetPoint(181,94.86000061,51.59532166); graph1->SetPoint(182,94.90000153,52.52890778); graph1->SetPoint(183,94.94000244,53.46566772); graph1->SetPoint(184,94.98000336,54.40546799); graph1->SetPoint(185,95.01999664,55.34819412); graph1->SetPoint(186,95.05999756,56.29372406); graph1->SetPoint(187,95.09999847,57.24193954); graph1->SetPoint(188,95.13999939,58.19272232); graph1->SetPoint(189,95.18000031,59.14596176); graph1->SetPoint(190,95.22000122,60.10154724); graph1->SetPoint(191,95.22000122,60.10154724); graph1->SetPoint(192,95.26000214,61.05936813); graph1->SetPoint(193,95.30000305,62.01932144); graph1->SetPoint(194,95.33999634,62.98130035); graph1->SetPoint(195,95.37999725,63.94520569); graph1->SetPoint(196,95.41999817,64.91093445); graph1->SetPoint(197,95.45999908,65.87839508); graph1->SetPoint(198,95.5,66.84749603); graph1->SetPoint(199,95.54000092,67.81813049); graph1->SetPoint(200,95.58000183,68.79022217); graph1->SetPoint(201,95.62000275,69.7636795); graph1->SetPoint(202,95.66000366,70.73841858); graph1->SetPoint(203,95.69999695,71.71435547); graph1->SetPoint(204,95.73999786,72.69141388); graph1->SetPoint(205,95.77999878,73.66950226); graph1->SetPoint(206,95.81999969,74.64855194); graph1->SetPoint(207,95.86000061,75.62849426); graph1->SetPoint(208,95.90000153,76.6092453); graph1->SetPoint(209,95.94000244,77.59073639); graph1->SetPoint(210,95.98000336,78.57290649); cout<< "2e2mu: " << graph1->Eval(91.1876) << endl; //4mu TGraph *graph2 = new TGraph(211); graph2->SetName("Graph2"); graph2->SetTitle("Graph2"); graph2->SetFillColor(1); graph2->SetLineWidth(3); graph2->SetLineColor(kRed); graph2->SetMarkerStyle(20); graph2->SetPoint(0,88.01999664,106.7364273); graph2->SetPoint(1,88.05999756,104.3517303); graph2->SetPoint(2,88.09999847,101.9809418); graph2->SetPoint(3,88.13999939,99.62443542); graph2->SetPoint(4,88.18000031,97.2826004); graph2->SetPoint(5,88.22000122,94.95583344); graph2->SetPoint(6,88.26000214,92.64452362); graph2->SetPoint(7,88.30000305,90.34907532); graph2->SetPoint(8,88.33999634,88.06989288); graph2->SetPoint(9,88.37999725,85.80740356); graph2->SetPoint(10,88.41999817,83.56202698); graph2->SetPoint(11,88.45999908,81.33418274); graph2->SetPoint(12,88.5,79.12432098); graph2->SetPoint(13,88.54000092,76.93287659); graph2->SetPoint(14,88.58000183,74.76031494); graph2->SetPoint(15,88.62000275,72.60709381); graph2->SetPoint(16,88.66000366,70.47368622); graph2->SetPoint(17,88.69999695,68.36057281); graph2->SetPoint(18,88.73999786,66.26824951); graph2->SetPoint(19,88.77999878,64.19721985); graph2->SetPoint(20,88.81999969,62.14799881); graph2->SetPoint(21,88.81999969,62.14799881); graph2->SetPoint(22,88.86000061,60.12110519); graph2->SetPoint(23,88.90000153,58.11707306); graph2->SetPoint(24,88.94000244,56.13645554); graph2->SetPoint(25,88.98000336,54.17980194); graph2->SetPoint(26,89.01999664,52.24768448); graph2->SetPoint(27,89.05999756,50.34067917); graph2->SetPoint(28,89.09999847,48.45937347); graph2->SetPoint(29,89.13999939,46.6043663); graph2->SetPoint(30,89.18000031,44.77626038); graph2->SetPoint(31,89.22000122,42.97567749); graph2->SetPoint(32,89.26000214,41.20323181); graph2->SetPoint(33,89.30000305,39.45955276); graph2->SetPoint(34,89.33999634,37.74528122); graph2->SetPoint(35,89.37999725,36.06105423); graph2->SetPoint(36,89.41999817,34.40750885); graph2->SetPoint(37,89.45999908,32.78529739); graph2->SetPoint(38,89.5,31.19506073); graph2->SetPoint(39,89.54000092,29.63745117); graph2->SetPoint(40,89.58000183,28.11310959); graph2->SetPoint(41,89.62000275,26.62268066); graph2->SetPoint(42,89.62000275,26.62268066); graph2->SetPoint(43,89.66000366,25.16680336); graph2->SetPoint(44,89.69999695,23.74611092); graph2->SetPoint(45,89.73999786,22.36123466); graph2->SetPoint(46,89.77999878,21.01279449); graph2->SetPoint(47,89.81999969,19.70140076); graph2->SetPoint(48,89.86000061,18.42765999); graph2->SetPoint(49,89.90000153,17.19216156); graph2->SetPoint(50,89.94000244,15.99549007); graph2->SetPoint(51,89.98000336,14.83821201); graph2->SetPoint(52,90.01999664,13.72088242); graph2->SetPoint(53,90.05999756,12.64404106); graph2->SetPoint(54,90.09999847,11.60821342); graph2->SetPoint(55,90.13999939,10.61390781); graph2->SetPoint(56,90.18000031,9.661615372); graph2->SetPoint(57,90.22000122,8.75180912); graph2->SetPoint(58,90.26000214,7.884942055); graph2->SetPoint(59,90.30000305,7.061448574); graph2->SetPoint(60,90.33999634,6.281741619); graph2->SetPoint(61,90.37999725,5.546211243); graph2->SetPoint(62,90.41999817,4.855226517); graph2->SetPoint(63,90.41999817,4.855226517); graph2->SetPoint(64,90.45999908,4.209132195); graph2->SetPoint(65,90.5,3.608248472); graph2->SetPoint(66,90.54000092,3.052870989); graph2->SetPoint(67,90.58000183,2.543269396); graph2->SetPoint(68,90.62000275,2.079686403); graph2->SetPoint(69,90.66000366,1.662337065); graph2->SetPoint(70,90.69999695,1.29140842); graph2->SetPoint(71,90.73999786,0.9670585394); graph2->SetPoint(72,90.77999878,0.6894162893); graph2->SetPoint(73,90.81999969,0.4585802257); graph2->SetPoint(74,90.86000061,0.2746185958); graph2->SetPoint(75,90.90000153,0.1375684142); graph2->SetPoint(76,90.94000244,0.04743507132); graph2->SetPoint(77,90.98000336,0.004192293622); graph2->SetPoint(78,90.99692535,0); graph2->SetPoint(79,90.99692535,0); graph2->SetPoint(80,90.99692535,0); graph2->SetPoint(81,90.99692535,0); graph2->SetPoint(82,90.99692535,0); graph2->SetPoint(83,90.99692535,0); graph2->SetPoint(84,90.99692535,0); graph2->SetPoint(85,91.22000122,0.7239263654); graph2->SetPoint(86,91.22000122,0.7239263654); graph2->SetPoint(87,91.26000214,1.005486846); graph2->SetPoint(88,91.30000305,1.332574487); graph2->SetPoint(89,91.33999634,1.704877257); graph2->SetPoint(90,91.37999725,2.122053623); graph2->SetPoint(91,91.41999817,2.583733082); graph2->SetPoint(92,91.45999908,3.089517355); graph2->SetPoint(93,91.5,3.638980389); graph2->SetPoint(94,91.54000092,4.23167181); graph2->SetPoint(95,91.58000183,4.867115498); graph2->SetPoint(96,91.62000275,5.544812679); graph2->SetPoint(97,91.66000366,6.264243603); graph2->SetPoint(98,91.69999695,7.024868488); graph2->SetPoint(99,91.73999786,7.826128483); graph2->SetPoint(100,91.77999878,8.667448044); graph2->SetPoint(101,91.81999969,9.548238754); graph2->SetPoint(102,91.86000061,10.46789742); graph2->SetPoint(103,91.90000153,11.42580891); graph2->SetPoint(104,91.94000244,12.42135048); graph2->SetPoint(105,91.98000336,13.4538908); graph2->SetPoint(106,92.01999664,14.52279377); graph2->SetPoint(107,92.01999664,14.52279377); graph2->SetPoint(108,92.05999756,15.62741661); graph2->SetPoint(109,92.09999847,16.76711464); graph2->SetPoint(110,92.13999939,17.94124603); graph2->SetPoint(111,92.18000031,19.14916039); graph2->SetPoint(112,92.22000122,20.39021873); graph2->SetPoint(113,92.26000214,21.66377449); graph2->SetPoint(114,92.30000305,22.9691925); graph2->SetPoint(115,92.33999634,24.30584145); graph2->SetPoint(116,92.37999725,25.67308617); graph2->SetPoint(117,92.41999817,27.07030869); graph2->SetPoint(118,92.45999908,28.49688721); graph2->SetPoint(119,92.5,29.95221329); graph2->SetPoint(120,92.54000092,31.43568039); graph2->SetPoint(121,92.58000183,32.94668579); graph2->SetPoint(122,92.62000275,34.48464584); graph2->SetPoint(123,92.66000366,36.04896164); graph2->SetPoint(124,92.69999695,37.63905716); graph2->SetPoint(125,92.73999786,39.2543602); graph2->SetPoint(126,92.77999878,40.89429092); graph2->SetPoint(127,92.81999969,42.55828857); graph2->SetPoint(128,92.81999969,42.55828857); graph2->SetPoint(129,92.86000061,44.24579239); graph2->SetPoint(130,92.90000153,45.95624161); graph2->SetPoint(131,92.94000244,47.6890831); graph2->SetPoint(132,92.98000336,49.44376755); graph2->SetPoint(133,93.01999664,51.21974564); graph2->SetPoint(134,93.05999756,53.01646805); graph2->SetPoint(135,93.09999847,54.83339691); graph2->SetPoint(136,93.13999939,56.66999054); graph2->SetPoint(137,93.18000031,58.52570724); graph2->SetPoint(138,93.22000122,60.40001678); graph2->SetPoint(139,93.26000214,62.29237747); graph2->SetPoint(140,93.30000305,64.20226288); graph2->SetPoint(141,93.33999634,66.12913513); graph2->SetPoint(142,93.37999725,68.07247162); graph2->SetPoint(143,93.41999817,70.03173828); graph2->SetPoint(144,93.45999908,72.00642395); graph2->SetPoint(145,93.5,73.99599457); graph2->SetPoint(146,93.54000092,75.99994659); graph2->SetPoint(147,93.58000183,78.0177536); graph2->SetPoint(148,93.62000275,80.04890442); graph2->SetPoint(149,93.62000275,80.04890442); graph2->SetPoint(150,93.66000366,82.09291077); graph2->SetPoint(151,93.69999695,84.14925385); graph2->SetPoint(152,93.73999786,86.21744537); graph2->SetPoint(153,93.77999878,88.29699707); graph2->SetPoint(154,93.81999969,90.38742828); graph2->SetPoint(155,93.86000061,92.48825836); graph2->SetPoint(156,93.90000153,94.59902954); graph2->SetPoint(157,93.94000244,96.71927643); graph2->SetPoint(158,93.98000336,98.84854889); graph2->SetPoint(159,94.01999664,100.9864197); graph2->SetPoint(160,94.05999756,103.1324387); graph2->SetPoint(161,94.09999847,105.2862015); graph2->SetPoint(162,94.13999939,107.4473038); graph2->SetPoint(163,94.18000031,109.6153336); graph2->SetPoint(164,94.22000122,111.7899246); graph2->SetPoint(165,94.26000214,113.9706879); graph2->SetPoint(166,94.30000305,116.15728); graph2->SetPoint(167,94.33999634,118.3493423); graph2->SetPoint(168,94.37999725,120.5465469); graph2->SetPoint(169,94.41999817,122.7485733); graph2->SetPoint(170,94.41999817,122.7485733); graph2->SetPoint(171,94.45999908,124.9551163); graph2->SetPoint(172,94.5,127.1658707); graph2->SetPoint(173,94.54000092,129.3805542); graph2->SetPoint(174,94.58000183,131.5989227); graph2->SetPoint(175,94.62000275,133.820694); graph2->SetPoint(176,94.66000366,136.0456238); graph2->SetPoint(177,94.69999695,138.2734833); graph2->SetPoint(178,94.73999786,140.5040436); graph2->SetPoint(179,94.77999878,142.7371216); graph2->SetPoint(180,94.81999969,144.9724884); graph2->SetPoint(181,94.86000061,147.2099609); graph2->SetPoint(182,94.90000153,149.4493713); graph2->SetPoint(183,94.94000244,151.6905365); graph2->SetPoint(184,94.98000336,153.9332886); graph2->SetPoint(185,95.01999664,156.1782074); graph2->SetPoint(186,95.05999756,158.4309082); graph2->SetPoint(187,95.09999847,160.6924896); graph2->SetPoint(188,95.13999939,162.962677); graph2->SetPoint(189,95.18000031,165.2412262); graph2->SetPoint(190,95.22000122,167.5278778); graph2->SetPoint(191,95.22000122,167.5278778); graph2->SetPoint(192,95.26000214,169.8223724); graph2->SetPoint(193,95.30000305,172.1244812); graph2->SetPoint(194,95.33999634,174.43396); graph2->SetPoint(195,95.37999725,176.7505646); graph2->SetPoint(196,95.41999817,179.0740356); graph2->SetPoint(197,95.45999908,181.4041595); graph2->SetPoint(198,95.5,183.7407074); graph2->SetPoint(199,95.54000092,186.0834351); graph2->SetPoint(200,95.58000183,188.4321594); graph2->SetPoint(201,95.62000275,190.7866364); graph2->SetPoint(202,95.66000366,193.1466827); graph2->SetPoint(203,95.69999695,195.512085); graph2->SetPoint(204,95.73999786,197.8826752); graph2->SetPoint(205,95.77999878,200.2582397); graph2->SetPoint(206,95.81999969,202.6385651); graph2->SetPoint(207,95.86000061,205.023468); graph2->SetPoint(208,95.90000153,207.4127502); graph2->SetPoint(209,95.94000244,209.8062286); graph2->SetPoint(210,95.98000336,212.2036896); cout<< "4mu: " << graph2->Eval(91.1876) << endl; //4l TGraph *graph3 = new TGraph(212); graph3->SetName("Graph3"); graph3->SetTitle("Graph3"); graph3->SetFillColor(1); graph3->SetLineWidth(3); graph3->SetMarkerStyle(20); graph3->SetPoint(0,88.01999664,157.330307); graph3->SetPoint(1,88.05999756,153.9913483); graph3->SetPoint(2,88.09999847,150.6700134); graph3->SetPoint(3,88.13999939,147.3667908); graph3->SetPoint(4,88.18000031,144.0821991); graph3->SetPoint(5,88.22000122,140.8167419); graph3->SetPoint(6,88.26000214,137.5709686); graph3->SetPoint(7,88.30000305,134.3454132); graph3->SetPoint(8,88.33999634,131.1406097); graph3->SetPoint(9,88.37999725,127.9571304); graph3->SetPoint(10,88.41999817,124.7955246); graph3->SetPoint(11,88.45999908,121.6563721); graph3->SetPoint(12,88.5,118.5402679); graph3->SetPoint(13,88.54000092,115.4477997); graph3->SetPoint(14,88.58000183,112.3795853); graph3->SetPoint(15,88.62000275,109.3362427); graph3->SetPoint(16,88.66000366,106.3183975); graph3->SetPoint(17,88.69999695,103.3267059); graph3->SetPoint(18,88.73999786,100.3618164); graph3->SetPoint(19,88.77999878,97.42440796); graph3->SetPoint(20,88.81999969,94.51515961); graph3->SetPoint(21,88.81999969,94.51515961); graph3->SetPoint(22,88.86000061,91.63476562); graph3->SetPoint(23,88.90000153,88.78394318); graph3->SetPoint(24,88.94000244,85.96340942); graph3->SetPoint(25,88.98000336,83.17390442); graph3->SetPoint(26,89.01999664,80.41617584); graph3->SetPoint(27,89.05999756,77.690979); graph3->SetPoint(28,89.09999847,74.99910736); graph3->SetPoint(29,89.13999939,72.34132385); graph3->SetPoint(30,89.18000031,69.71843719); graph3->SetPoint(31,89.22000122,67.1312561); graph3->SetPoint(32,89.26000214,64.58059692); graph3->SetPoint(33,89.30000305,62.06728745); graph3->SetPoint(34,89.33999634,59.59215164); graph3->SetPoint(35,89.37999725,57.15603638); graph3->SetPoint(36,89.41999817,54.75978088); graph3->SetPoint(37,89.45999908,52.40423203); graph3->SetPoint(38,89.5,50.09024048); graph3->SetPoint(39,89.54000092,47.81865311); graph3->SetPoint(40,89.58000183,45.59031677); graph3->SetPoint(41,89.62000275,43.40607834); graph3->SetPoint(42,89.62000275,43.40607834); graph3->SetPoint(43,89.66000366,41.26677322); graph3->SetPoint(44,89.69999695,39.17324066); graph3->SetPoint(45,89.73999786,37.12630463); graph3->SetPoint(46,89.77999878,35.12678528); graph3->SetPoint(47,89.81999969,33.17548752); graph3->SetPoint(48,89.86000061,31.27321053); graph3->SetPoint(49,89.90000153,29.42073631); graph3->SetPoint(50,89.94000244,27.61883545); graph3->SetPoint(51,89.98000336,25.86825943); graph3->SetPoint(52,90.01999664,24.16974449); graph3->SetPoint(53,90.05999756,22.52401161); graph3->SetPoint(54,90.09999847,20.9317627); graph3->SetPoint(55,90.13999939,19.39367294); graph3->SetPoint(56,90.18000031,17.91040421); graph3->SetPoint(57,90.22000122,16.48259354); graph3->SetPoint(58,90.26000214,15.1108532); graph3->SetPoint(59,90.30000305,13.79577255); graph3->SetPoint(60,90.33999634,12.53791523); graph3->SetPoint(61,90.37999725,11.33781815); graph3->SetPoint(62,90.41999817,10.19599247); graph3->SetPoint(63,90.41999817,10.19599247); graph3->SetPoint(64,90.45999908,9.112918854); graph3->SetPoint(65,90.5,8.089050293); graph3->SetPoint(66,90.54000092,7.124809742); graph3->SetPoint(67,90.58000183,6.220586777); graph3->SetPoint(68,90.62000275,5.376740932); graph3->SetPoint(69,90.66000366,4.593597889); graph3->SetPoint(70,90.69999695,3.871450424); graph3->SetPoint(71,90.73999786,3.210555792); graph3->SetPoint(72,90.77999878,2.611136436); graph3->SetPoint(73,90.81999969,2.073378563); graph3->SetPoint(74,90.86000061,1.597431421); graph3->SetPoint(75,90.90000153,1.183406949); graph3->SetPoint(76,90.94000244,0.8313789964); graph3->SetPoint(77,90.98000336,0.5413833261); graph3->SetPoint(78,91.01999664,0.3134166598); graph3->SetPoint(79,91.05999756,0.1474360079); graph3->SetPoint(80,91.09999847,0.04335928336); graph3->SetPoint(81,91.13999939,0.001064706827); graph3->SetPoint(82,91.14743805,0); graph3->SetPoint(83,91.14743805,0); graph3->SetPoint(84,91.14743805,0); graph3->SetPoint(85,91.14743805,0); graph3->SetPoint(86,91.14743805,0); graph3->SetPoint(87,91.14743805,0); graph3->SetPoint(88,91.14743805,0); graph3->SetPoint(89,91.30000305,0.4458756745); graph3->SetPoint(90,91.33999634,0.7092721462); graph3->SetPoint(91,91.37999725,1.032887816); graph3->SetPoint(92,91.41999817,1.416327119); graph3->SetPoint(93,91.45999908,1.859157085); graph3->SetPoint(94,91.5,2.360908747); graph3->SetPoint(95,91.54000092,2.921078444); graph3->SetPoint(96,91.58000183,3.539128542); graph3->SetPoint(97,91.62000275,4.214489937); graph3->SetPoint(98,91.66000366,4.946561337); graph3->SetPoint(99,91.69999695,5.734714508); graph3->SetPoint(100,91.73999786,6.578292847); graph3->SetPoint(101,91.77999878,7.476614475); graph3->SetPoint(102,91.81999969,8.428975105); graph3->SetPoint(103,91.86000061,9.434648514); graph3->SetPoint(104,91.90000153,10.49289227); graph3->SetPoint(105,91.94000244,11.60294342); graph3->SetPoint(106,91.98000336,12.76402855); graph3->SetPoint(107,92.01999664,13.97536087); graph3->SetPoint(108,92.01999664,13.97536087); graph3->SetPoint(109,92.05999756,15.23614311); graph3->SetPoint(110,92.09999847,16.54557228); graph3->SetPoint(111,92.13999939,17.90283775); graph3->SetPoint(112,92.18000031,19.30713081); graph3->SetPoint(113,92.22000122,20.75763512); graph3->SetPoint(114,92.26000214,22.25354004); graph3->SetPoint(115,92.30000305,23.79403305); graph3->SetPoint(116,92.33999634,25.37830734); graph3->SetPoint(117,92.37999725,27.00556183); graph3->SetPoint(118,92.41999817,28.67499733); graph3->SetPoint(119,92.45999908,30.38582802); graph3->SetPoint(120,92.5,32.13726807); graph3->SetPoint(121,92.54000092,33.92854309); graph3->SetPoint(122,92.58000183,35.75888824); graph3->SetPoint(123,92.62000275,37.6275444); graph3->SetPoint(124,92.66000366,39.53376007); graph3->SetPoint(125,92.69999695,41.47679138); graph3->SetPoint(126,92.73999786,43.45590591); graph3->SetPoint(127,92.77999878,45.47037888); graph3->SetPoint(128,92.81999969,47.51948166); graph3->SetPoint(129,92.81999969,47.51948166); graph3->SetPoint(130,92.86000061,49.60250854); graph3->SetPoint(131,92.90000153,51.71874619); graph3->SetPoint(132,92.94000244,53.86748886); graph3->SetPoint(133,92.98000336,56.04804611); graph3->SetPoint(134,93.01999664,58.25971603); graph3->SetPoint(135,93.05999756,60.50180817); graph3->SetPoint(136,93.09999847,62.77363968); graph3->SetPoint(137,93.13999939,65.07452393); graph3->SetPoint(138,93.18000031,67.40378571); graph3->SetPoint(139,93.22000122,69.76073456); graph3->SetPoint(140,93.26000214,72.14469147); graph3->SetPoint(141,93.30000305,74.55499268); graph3->SetPoint(142,93.33999634,76.99095917); graph3->SetPoint(143,93.37999725,79.45191956); graph3->SetPoint(144,93.41999817,81.93720245); graph3->SetPoint(145,93.45999908,84.4461441); graph3->SetPoint(146,93.5,86.97807312); graph3->SetPoint(147,93.54000092,89.53233337); graph3->SetPoint(148,93.58000183,92.10826874); graph3->SetPoint(149,93.62000275,94.70523071); graph3->SetPoint(150,93.62000275,94.70523071); graph3->SetPoint(151,93.66000366,97.32256317); graph3->SetPoint(152,93.69999695,99.95962524); graph3->SetPoint(153,93.73999786,102.6157837); graph3->SetPoint(154,93.77999878,105.2904053); graph3->SetPoint(155,93.81999969,107.982872); graph3->SetPoint(156,93.86000061,110.6925735); graph3->SetPoint(157,93.90000153,113.4188995); graph3->SetPoint(158,93.94000244,116.1612625); graph3->SetPoint(159,93.98000336,118.9190826); graph3->SetPoint(160,94.01999664,121.6917801); graph3->SetPoint(161,94.05999756,124.4788055); graph3->SetPoint(162,94.09999847,127.2796173); graph3->SetPoint(163,94.13999939,130.0936737); graph3->SetPoint(164,94.18000031,132.9204712); graph3->SetPoint(165,94.22000122,135.7595062); graph3->SetPoint(166,94.26000214,138.6103058); graph3->SetPoint(167,94.30000305,141.4723816); graph3->SetPoint(168,94.33999634,144.3453064); graph3->SetPoint(169,94.37999725,147.2286224); graph3->SetPoint(170,94.41999817,150.121933); graph3->SetPoint(171,94.41999817,150.121933); graph3->SetPoint(172,94.45999908,153.0248108); graph3->SetPoint(173,94.5,155.9368896); graph3->SetPoint(174,94.54000092,158.8578033); graph3->SetPoint(175,94.58000183,161.7871857); graph3->SetPoint(176,94.62000275,164.7247162); graph3->SetPoint(177,94.66000366,167.6700592); graph3->SetPoint(178,94.69999695,170.6229095); graph3->SetPoint(179,94.73999786,173.5829926); graph3->SetPoint(180,94.77999878,176.5500183); graph3->SetPoint(181,94.81999969,179.5243683); graph3->SetPoint(182,94.86000061,182.5137939); graph3->SetPoint(183,94.90000153,185.5203857); graph3->SetPoint(184,94.94000244,188.5437469); graph3->SetPoint(185,94.98000336,191.5835266); graph3->SetPoint(186,95.01999664,194.6393738); graph3->SetPoint(187,95.05999756,197.7109222); graph3->SetPoint(188,95.09999847,200.797821); graph3->SetPoint(189,95.13999939,203.899704); graph3->SetPoint(190,95.18000031,207.0162354); graph3->SetPoint(191,95.22000122,210.1470642); graph3->SetPoint(192,95.22000122,210.1470642); graph3->SetPoint(193,95.26000214,213.2918396); graph3->SetPoint(194,95.30000305,216.4502106); graph3->SetPoint(195,95.33999634,219.6218414); graph3->SetPoint(196,95.37999725,222.8063965); graph3->SetPoint(197,95.41999817,226.00354); graph3->SetPoint(198,95.45999908,229.2129364); graph3->SetPoint(199,95.5,232.4342499); graph3->SetPoint(200,95.54000092,235.66716); graph3->SetPoint(201,95.58000183,238.9113312); graph3->SetPoint(202,95.62000275,242.1664581); graph3->SetPoint(203,95.66000366,245.4322052); graph3->SetPoint(204,95.69999695,248.708252); graph3->SetPoint(205,95.73999786,251.9943085); graph3->SetPoint(206,95.77999878,255.2900238); graph3->SetPoint(207,95.81999969,258.5951233); graph3->SetPoint(208,95.86000061,261.9092712); graph3->SetPoint(209,95.90000153,265.2321777); graph3->SetPoint(210,95.94000244,268.5635376); graph3->SetPoint(211,95.98000336,271.9030457); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",212,84.03,95.97); Graph_Graph1->SetMinimum(0); Graph_Graph1->SetMaximum(57.47094); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); Graph_Graph1->SetLineStyle(0); Graph_Graph1->SetMarkerStyle(20); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelOffset(0.01); Graph_Graph1->GetXaxis()->SetLabelSize(0.045); Graph_Graph1->GetXaxis()->SetTitleSize(0.055); Graph_Graph1->GetXaxis()->SetTitleOffset(0.9); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelOffset(0.01); Graph_Graph1->GetYaxis()->SetLabelSize(0.045); Graph_Graph1->GetYaxis()->SetTitleSize(0.055); Graph_Graph1->GetYaxis()->SetTitleOffset(1.25); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelOffset(0.01); Graph_Graph1->GetZaxis()->SetLabelSize(0.045); Graph_Graph1->GetZaxis()->SetTitleSize(0.055); Graph_Graph1->GetZaxis()->SetTitleFont(42); Graph_Graph1->GetXaxis()->SetNdivisions(510); graph->SetHistogram(Graph_Graph1); graph->Draw("cx"); graph1->Draw("cx"); graph2->Draw("cx"); graph3->Draw("cx"); TPaveText *pt = new TPaveText(0.1577181,0.95,0.9580537,0.99,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.03); TText *text = pt->AddText(0.01,0.5,"CMS Preliminary"); text = pt->AddText(0.3,0.6,"#sqrt{s} = 7 TeV, L = 5.1 fb^{-1} #sqrt{s} = 8 TeV, L = 19.7 fb^{-1}"); pt->Draw(); TLegend *leg = new TLegend(0.73,0.77,0.94,0.94); leg->SetTextSize(0.035); leg->SetTextFont(42); leg->SetFillColor(kWhite); //leg->SetBorderSize(0); //leg->SetFillStyle(0); leg->AddEntry(graph3,"Combined","L"); leg->AddEntry(graph,"Z#rightarrow 4e","L"); leg->AddEntry(graph2,"Z#rightarrow 4#mu","L"); leg->AddEntry(graph1,"Z#rightarrow 2e2#mu","L"); double yLow = 0.5; pt = new TPaveText(0.11,yLow,0.4,yLow+0.04,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.03); pt->SetTextColor(kBlue); text = pt->AddText(0.2,0.2,"m_{2e2#mu} = 91.24 #pm 0.46 GeV"); //text = pt->AddText(0.2,0.2,"m_{2e2#mu} = 91.24 #pm 0.40 #pm 0.16 GeV"); //stat 91.4315 +0.405948-0.397679 cout << "Syst 2e2mu: " << findSystErr(0.43,0.40) << endl; //pt->Draw(); pt = new TPaveText(0.11,yLow+0.06,0.4,yLow+0.1,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.03); pt->SetTextColor(kRed); text = pt->AddText(0.2,0.2,"m_{4#mu} = 91.00 #pm 0.26 GeV"); //text = pt->AddText(0.2,0.2,"m_{4#mu} = 91.00 #pm 0.25 #pm 0.09 GeV"); //stat 91.0078 +0.255715-0.25533 cout << "Syst 4mu: " << findSystErr(0.27,0.255) << endl; //pt->Draw(); pt = new TPaveText(0.11,yLow+0.12,0.4,yLow+0.16,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.03); pt->SetTextColor(kGreen+1); text = pt->AddText(0.2,0.2,"m_{4e} = 93.67 #pm 1.08 GeV"); //text = pt->AddText(0.2,0.2,"m_{4e} = 9 #pm 0.74 #pm 0.30 GeV"); //stat 91.8026 +0.745333-0.740755 cout << "Syst 4e: " << findSystErr(0.8,0.74) << endl; //pt->Draw(); pt = new TPaveText(0.11,yLow+0.18,0.4,yLow+0.22,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.03); text = pt->AddText(0.2,0.2,"m_{4l} = 91.15 #pm 0.23 GeV"); //text = pt->AddText(0.2,0.2,"m_{4l} = 91.17 #pm 0.18 #pm 0.13 GeV"); //stat 91.1724 +0.168014-0.204439 cout << "Syst 4l: " << findSystErr(0.22,0.18) << endl; //pt->Draw(); pt = new TPaveText(0.18,yLow+0.24,0.4,yLow+0.28,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetTextAlign(12); pt->SetTextFont(42); pt->SetTextSize(0.035); text = pt->AddText(0.2,0.2,"#chi^{2}/ndof = 1.38/3"); //pt->Draw(); gPad->SetTicks(1,1); TLine *line95 = new TLine(88,3.84,96,3.84); line95->SetLineColor(kRed); line95->SetLineWidth(2); line95->Draw(); TLine *line68 = new TLine(88,1,96,1); line68->SetLineColor(kRed); line68->SetLineWidth(3); line68->Draw(); TLine *lineZ = new TLine(91.1876,0,91.1876,10); lineZ->SetLineColor(kGray+2); lineZ->SetLineStyle(7); lineZ->Draw(); leg->Draw(); hframe->GetXaxis()->SetRangeUser(88,96); ccc->Modified(); ccc->cd(); ccc->SetSelected(ccc); ccc->SaveAs("massZ4lScan_MZ2gt4_Legacy_split.eps"); ccc->SaveAs("massZ4lScan_MZ2gt4_Legacy_split.png"); }
void initial_z_diff() { //=========Macro generated from canvas: c/ //========= (Fri Jul 24 10:47:18 2015) by ROOT version6.04/00 TCanvas *c = new TCanvas("c", "",0,45,600,500); c->SetHighLightColor(2); c->Range(-187.5,-3568.557,187.5,32117.01); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); TH1D *hist__1 = new TH1D("hist__1","Difference in PMT-constructed position and mc-truth start position",100,-150,150); hist__1->SetBinContent(0,49); hist__1->SetBinContent(1,12); hist__1->SetBinContent(2,7); hist__1->SetBinContent(3,9); hist__1->SetBinContent(4,12); hist__1->SetBinContent(5,21); hist__1->SetBinContent(6,30); hist__1->SetBinContent(7,36); hist__1->SetBinContent(8,47); hist__1->SetBinContent(9,67); hist__1->SetBinContent(10,70); hist__1->SetBinContent(11,90); hist__1->SetBinContent(12,140); hist__1->SetBinContent(13,162); hist__1->SetBinContent(14,208); hist__1->SetBinContent(15,208); hist__1->SetBinContent(16,317); hist__1->SetBinContent(17,367); hist__1->SetBinContent(18,460); hist__1->SetBinContent(19,581); hist__1->SetBinContent(20,685); hist__1->SetBinContent(21,838); hist__1->SetBinContent(22,963); hist__1->SetBinContent(23,1079); hist__1->SetBinContent(24,1231); hist__1->SetBinContent(25,1281); hist__1->SetBinContent(26,1264); hist__1->SetBinContent(27,1318); hist__1->SetBinContent(28,1318); hist__1->SetBinContent(29,1265); hist__1->SetBinContent(30,1282); hist__1->SetBinContent(31,1235); hist__1->SetBinContent(32,1315); hist__1->SetBinContent(33,1290); hist__1->SetBinContent(34,1399); hist__1->SetBinContent(35,1363); hist__1->SetBinContent(36,1528); hist__1->SetBinContent(37,1700); hist__1->SetBinContent(38,1822); hist__1->SetBinContent(39,2053); hist__1->SetBinContent(40,2441); hist__1->SetBinContent(41,2903); hist__1->SetBinContent(42,3359); hist__1->SetBinContent(43,4326); hist__1->SetBinContent(44,5618); hist__1->SetBinContent(45,7284); hist__1->SetBinContent(46,9575); hist__1->SetBinContent(47,12857); hist__1->SetBinContent(48,16804); hist__1->SetBinContent(49,21562); hist__1->SetBinContent(50,27189); hist__1->SetBinContent(51,26947); hist__1->SetBinContent(52,21828); hist__1->SetBinContent(53,17254); hist__1->SetBinContent(54,13388); hist__1->SetBinContent(55,10171); hist__1->SetBinContent(56,7452); hist__1->SetBinContent(57,5752); hist__1->SetBinContent(58,4452); hist__1->SetBinContent(59,3522); hist__1->SetBinContent(60,2826); hist__1->SetBinContent(61,2449); hist__1->SetBinContent(62,2170); hist__1->SetBinContent(63,1855); hist__1->SetBinContent(64,1635); hist__1->SetBinContent(65,1515); hist__1->SetBinContent(66,1393); hist__1->SetBinContent(67,1344); hist__1->SetBinContent(68,1279); hist__1->SetBinContent(69,1232); hist__1->SetBinContent(70,1248); hist__1->SetBinContent(71,1277); hist__1->SetBinContent(72,1226); hist__1->SetBinContent(73,1247); hist__1->SetBinContent(74,1229); hist__1->SetBinContent(75,1187); hist__1->SetBinContent(76,1265); hist__1->SetBinContent(77,1253); hist__1->SetBinContent(78,1269); hist__1->SetBinContent(79,1210); hist__1->SetBinContent(80,1055); hist__1->SetBinContent(81,914); hist__1->SetBinContent(82,761); hist__1->SetBinContent(83,632); hist__1->SetBinContent(84,515); hist__1->SetBinContent(85,450); hist__1->SetBinContent(86,356); hist__1->SetBinContent(87,264); hist__1->SetBinContent(88,227); hist__1->SetBinContent(89,176); hist__1->SetBinContent(90,127); hist__1->SetBinContent(91,134); hist__1->SetBinContent(92,85); hist__1->SetBinContent(93,60); hist__1->SetBinContent(94,47); hist__1->SetBinContent(95,29); hist__1->SetBinContent(96,31); hist__1->SetBinContent(97,18); hist__1->SetBinContent(98,14); hist__1->SetBinContent(99,12); hist__1->SetBinContent(100,12); hist__1->SetBinContent(101,63); hist__1->SetEntries(289897); TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); TText *AText = ptstats->AddText("hist"); AText->SetTextSize(0.0368); AText = ptstats->AddText("Entries = 289897 "); AText = ptstats->AddText("Mean = 0.6888"); AText = ptstats->AddText("Std Dev = 33.12"); ptstats->SetOptStat(1111); ptstats->SetOptFit(0); ptstats->Draw(); hist__1->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(hist__1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hist__1->SetLineColor(ci); hist__1->GetXaxis()->SetTitle("#DeltaZ [cm]"); hist__1->GetXaxis()->SetLabelFont(42); hist__1->GetXaxis()->SetLabelSize(0.035); hist__1->GetXaxis()->SetTitleSize(0.035); hist__1->GetXaxis()->SetTitleFont(42); hist__1->GetYaxis()->SetLabelFont(42); hist__1->GetYaxis()->SetLabelSize(0.035); hist__1->GetYaxis()->SetTitleSize(0.035); hist__1->GetYaxis()->SetTitleFont(42); hist__1->GetZaxis()->SetLabelFont(42); hist__1->GetZaxis()->SetLabelSize(0.035); hist__1->GetZaxis()->SetTitleSize(0.035); hist__1->GetZaxis()->SetTitleFont(42); hist__1->Draw(""); TPaveText *pt = new TPaveText(0.15,0.9368947,0.85,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); AText = pt->AddText("Difference in PMT-constructed position and mc-truth start position"); pt->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }
void compareBestFit(const char* filename="test.root", const char* channelstr="boost,vbf,vhtt,cmb+", const char* type="sm", double mass=125, double minimum=-1., double maximum=4.5, const char* label="Preliminary, #sqrt{s}=7-8 TeV, L = 24.3 fb^{-1}, H #rightarrow #tau #tau") { SetStyle(); std::map<std::string, unsigned int> colors; colors["0jet" ] = kBlue; colors["2jet" ] = kMagenta; colors["vbf" ] = kRed; colors["boost" ] = kGreen; colors["btag" ] = kRed; colors["nobtag" ] = kBlue; colors["em" ] = kBlue; colors["et" ] = kRed; colors["mt" ] = kGreen; colors["mm" ] = kMagenta; colors["tt" ] = kOrange; colors["vhtt" ] = kMagenta+2; colors["cmb" ] = kBlack; colors["cmb+" ] = kGray+2; colors["htt" ] = kBlack; colors["ggH" ] = kRed; colors["bbH" ] = kBlue; colors["mvis" ] = kBlue+2; colors["test-0" ] = kRed+2; colors["test-1" ] = kGreen+2; colors["test-2" ] = kGreen; colors["test-3" ] = kRed+2; colors["test-4" ] = kBlue; colors["test-5" ] = kViolet-6; colors["HIG-11-020" ] = kBlue+2; colors["HIG-11-029" ] = kRed+2; colors["HIG-12-018" ] = kBlue; colors["HIG-12-032" ] = kRed+2; colors["HIG-12-043" ] = kBlack; colors["HIG-12-050" ] = kBlack; std::cout << " *******************************************************************************************************\n" << " * Usage : root -l \n" << " * .x macros/compareBestFit.C+(file, chn, type) \n" << " * \n" << " * Arguments : + file const char* full path to the input file \n" << " * + chn const char* list of channels; choose between: 'cmb', 'htt', 'em', \n" << " * 'et', 'mt', 'mm', 'vhtt', 'hgg', 'hww', 'ggH', \n" << " * 'bbH', 'nomix[-200, +200]', 'mhmax[-400, -200, +200]' \n" << " * 'mhmax[+400, +600, +800]', 'test-0...5', 'saeff', 'gluph' \n" << " * The list should be comma separated and may contain \n" << " * whitespaces \n" << " * + type const char* type of plot; choose between 'sm' and 'mssm' \n" << " * \n" << " * + mass double Higgs mass for which the plot should be performed \n" << " * \n" << " * + minimum double Minimum value for the x-Axis (best fit value) \n" << " * \n" << " * + maximum double Maximum value for the x-Axis (best fit value) \n" << " * \n" << " *******************************************************************************************************\n"; /// open input file TFile* inputFile = new TFile(filename); if(inputFile->IsZombie()){ std::cout << "ERROR:: file: " << filename << " does not exist.\n"; } /// prepare input parameters std::vector<std::string> channels; string2Vector(cleanupWhitespaces(channelstr), channels); /// prepare histograms std::vector<TGraph*> hexp; std::vector<TGraph*> hband; for(unsigned i=0; i<channels.size(); ++i){ hexp.push_back(get<TGraph>(inputFile, std::string(channels[i]).append("/expected").c_str())); hband.push_back(get<TGraph>(inputFile, std::string(channels[i]).append("/innerBand").c_str())); } int massid = 0; for(int i0 = 0; i0 < hexp[hexp.size()-1]->GetN(); i0++) { double lX = 0; double lY = 0; hexp[hexp.size()-1]->GetPoint(i0, lX, lY); if(lX==mass) {massid = i0; break;} } /// do the drawing TCanvas* canv1 = new TCanvas("canv1", "Best Fit Comparison", 600, 600); canv1->cd(); canv1->SetGridx(0); canv1->SetGridy(0); TLine* SM = new TLine(1, 0, 1, hexp.size()); TLine* ZERO = new TLine(0, 0, 0, hexp.size()); double *lBestFitX = new double[4]; double *lBestFitY = new double[4]; lBestFitX[0] = hexp[hexp.size()-1]->Eval(mass) - hband[hband.size()-1]->GetErrorYlow(massid); lBestFitX[1] = hexp[hexp.size()-1]->Eval(mass) + hband[hband.size()-1]->GetErrorYhigh(massid); lBestFitX[3] = hexp[hexp.size()-1]->Eval(mass) - hband[hband.size()-1]->GetErrorYlow(massid); lBestFitX[2] = hexp[hexp.size()-1]->Eval(mass) + hband[hband.size()-1]->GetErrorYhigh(massid); lBestFitY[0] = hexp.size(); lBestFitY[1] = hexp.size(); lBestFitY[2] = 0; lBestFitY[3] = 0; TGraph* BAND = new TGraph(4,lBestFitX,lBestFitY); BAND->SetFillColor(kYellow); TLine * BEST = new TLine (hexp[hexp.size()-1]->Eval(mass),0,hexp[hexp.size()-1]->Eval(mass),hexp.size()); BEST->SetLineStyle(kDashed); BEST->SetLineColor(kRed); bool firstPlot=true; for(unsigned int i=0; i<hexp.size(); ++i){ double value[1] = {hexp[i]->Eval(mass)}; double position[1] = {hexp.size()-i-0.5}; double x; double y; double el=0; double eh=0; int k = hexp[i]->GetN(); for(int l=0; l<k; l++){ hexp[i]->GetPoint(l, x, y); if(x==mass){ el=hband[i]->GetErrorYlow(l); eh=hband[i]->GetErrorYhigh(l); break; } } double elow[1] = {el}; double ehigh[1] = {eh}; double help1[1] = {0.0}; double help2[1] = {0.0}; TGraphAsymmErrors *gr = new TGraphAsymmErrors(1, value, position, elow, ehigh, help1, help2); if(firstPlot){ if(std::string(type) == std::string("mssm")){ gr->SetMaximum(hexp.size()); gr->SetMinimum(0); } else{ gr->SetMaximum(hexp.size()); gr->SetMinimum(0); } // gr->GetYaxis()->Set(hexp.size(), 0, hexp.size()); // gr = new TGraphAsymmErrors(1, value, position, elow, ehigh, help1, help2); // std::cout << gr->GetYaxis()->GetNbins() << std::endl; // format x-axis std::string x_title; if(std::string(type).find("mssm")!=std::string::npos){ x_title = std::string("best fit for #sigma(#phi#rightarrow#tau#tau)"); } else{ x_title = std::string("best fit for #sigma/#sigma_{SM}"); } gr->GetXaxis()->SetTitle(x_title.c_str()); gr->GetXaxis()->SetLabelFont(62); gr->GetXaxis()->SetTitleFont(62); gr->GetXaxis()->SetTitleColor(1); gr->GetXaxis()->SetTitleOffset(1.05); gr->GetXaxis()->SetLimits(minimum, maximum); BAND->GetXaxis()->SetTitle(x_title.c_str()); BAND->GetXaxis()->SetLabelFont(62); BAND->GetXaxis()->SetTitleFont(62); BAND->GetXaxis()->SetTitleColor(1); BAND->GetXaxis()->SetTitleOffset(1.05); BAND->GetXaxis()->SetLimits(minimum, maximum); // format y-axis //BAND->GetYaxis()->Set(hexp.size(), 0, hexp.size()); gr ->GetYaxis()->Set(hexp.size(), 0, hexp.size()); //std::cout<<gr->GetYaxis()->GetBinCenter(hexp.size()-i)<<std::endl; //BAND->GetYaxis()->SetBinLabel(hexp.size()-1, legendEntry(channels[hexp.size()-1]).c_str()); for(unsigned int j=0; j<hexp.size(); ++j){ gr ->GetYaxis()->SetBinLabel(hexp.size()-j, legendEntry(channels[j]).c_str()); } gr->GetYaxis()->SetTickLength(0); gr->GetYaxis()->SetLabelFont(62); gr->GetYaxis()->SetTitleFont(62); gr->GetYaxis()->SetLabelSize(0.07); gr->GetYaxis()->SetTitle(""); gr->GetYaxis()->SetLabelFont(62); gr->GetYaxis()->SetTitleOffset(1.05); gr->GetYaxis()->SetLabelSize(0.03); gr->GetYaxis()->SetLabelOffset(-0.32); BAND->GetYaxis()->SetLabelFont(62); BAND->GetYaxis()->SetTitleFont(62); BAND->GetYaxis()->SetLabelSize(0.07); BAND->GetYaxis()->SetTitle(""); BAND->GetYaxis()->SetLabelFont(62); BAND->GetYaxis()->SetTitleOffset(1.05); BAND->GetYaxis()->SetLabelSize(0.03); BAND->GetYaxis()->SetLabelOffset(-0.32); } BAND->GetYaxis()->SetLabelSize(0.07); BAND->SetTitle(""); gr ->GetYaxis()->SetLabelSize(0.07); gr->SetTitle(""); gr->SetLineStyle( 1.); gr->SetLineWidth( 2.); //gr->SetLineColor(colorzxs.find(channels[i])->second); gr->SetLineColor(kBlack); gr->SetMarkerStyle(kFullCircle); gr->SetMarkerSize(MARKER_SIZE); //gr->SetMarkerColor(colors.find(channels[i])->second); gr->SetMarkerColor(kBlack); cout << "===> " << gr->GetErrorYhigh(0) << endl; //cout << "==> "<< BAND->GetYaxis()->GetMaximum() << endl; if(firstPlot) gr->Draw("AP"); if(firstPlot) { BAND->Draw("Fsame"); BEST->Draw("l"); TLine *lLine = new TLine(minimum,1.0,maximum,1.0); lLine->SetLineWidth(3); lLine->SetLineColor(kBlue+2); lLine->Draw(); SM->SetLineWidth(3); SM->SetLineColor(kGreen+3); if(std::string(type).find("mssm")==std::string::npos) SM->Draw("same"); } gr->Draw(firstPlot ? "Psame" : "Psame"); //gr->Draw(firstPlot ? "AL" : "Lsame"); firstPlot=false; } ZERO->SetLineWidth(3); ZERO->SetLineColor(kBlue); ZERO->SetLineStyle(11); //ZERO->Draw("same"); //TPaveText *pt = new TPaveText(2*(maximum+minimum)/3,hexp.size()-0.3,maximum,hexp.size()-0.02); TPaveText *pt = new TPaveText(0.76, 0.88, 1.0, 1.0, "NDC"); if(std::string(type).find("mssm")!=std::string::npos) pt->AddText(TString::Format("m_{A} = %0.0f GeV" , mass)); else pt->AddText(TString::Format("m_{H} = %0.0f GeV" , mass)); pt->SetBorderSize( 0 ); pt->SetFillStyle( 0 ); pt->SetTextAlign( 12 ); pt->SetTextSize ( 0.03 ); pt->SetTextColor( 1 ); pt->SetTextFont ( 62 ); pt->Draw("same"); canv1->RedrawAxis(); CMSPrelim(label, "", 0.15, 0.835); canv1->Print(std::string("BestFit").append(std::string(type).find("mssm")!=std::string::npos ? "_mssm.png" : "_sm.png").c_str()); canv1->Print(std::string("BestFit").append(std::string(type).find("mssm")!=std::string::npos ? "_mssm.pdf" : "_sm.pdf").c_str()); canv1->Print(std::string("BestFit").append(std::string(type).find("mssm")!=std::string::npos ? "_mssm.pdf" : "_sm.eps").c_str()); return; }
void effvsdR(){ const char* title = ";gen #Delta R;Efficiency"; TFile *f = new TFile("tree_BulkGravToZZToZlepZhad.root"); TTree *t; f->GetObject("ana/t", t); TH1F *pass0 = new TH1F("pass0", title,20,0.,0.4); TH1F *pass1 = new TH1F("pass1", title,20,0.,0.4); TH1F *pass2 = new TH1F("pass2", title,20,0.,0.4); TH1F *total = new TH1F("total", title,20,0.,0.4); TCut A = "medium1==1 && medium2==1"; TCut B = "highPt1==1 && highPt2==1"; TCut C = "(highPt1==1 && tracker2==1) ||\ (highPt2==1 && tracker1==1)"; t->Project("pass0", "dRGenGen", A ); t->Project("pass1", "dRGenGen", B ); t->Project("pass2", "dRGenGen", C ); t->Project("total", "dRGenGen" ); TEfficiency *eff0 = new TEfficiency(*pass0,*total); TEfficiency *eff1 = new TEfficiency(*pass1,*total); TEfficiency *eff2 = new TEfficiency(*pass2,*total); eff0->SetLineColor(2); eff0->SetMarkerSize(0.8); eff0->SetMarkerStyle(20); eff0->SetMarkerColor(2); eff1->SetLineColor(4); eff1->SetMarkerSize(0.8); eff1->SetMarkerStyle(20); eff1->SetMarkerColor(4); eff2->SetLineColor(6); eff2->SetMarkerSize(0.8); eff2->SetMarkerStyle(20); eff2->SetMarkerColor(6); TCanvas *c1 = new TCanvas("c1","c1",900,900); c1->cd(); gPad->SetGridy(); gPad->SetGridx(); eff0->Draw("aZ"); eff1->Draw("Zsame"); eff2->Draw("Zsame"); gPad->Update(); eff0->GetPaintedGraph()->GetYaxis()->SetRangeUser(0.,1.06); eff0->GetPaintedGraph()->GetXaxis()->SetRangeUser(0.063,0.36); eff0->GetPaintedGraph()->GetYaxis()->CenterTitle(); eff0->GetPaintedGraph()->GetYaxis()->SetTitleSize(0.06); eff0->GetPaintedGraph()->GetXaxis()->SetTitleSize(0.06); eff0->GetPaintedGraph()->GetYaxis()->SetTitleOffset(0.72); eff0->GetPaintedGraph()->GetXaxis()->SetTitleOffset(0.72); TLegend *leg = new TLegend(0.35,0.32,0.8,0.58); leg->SetLineColor(1); leg->SetTextSize(0.035); leg->AddEntry(eff0,"Medium #plus Medium", "p"); leg->AddEntry(eff1,"High-pt #plus High-pt", "p"); leg->AddEntry(eff2,"High-pt #plus custom tracker", "p"); leg->Draw(); TPaveText *pave = new TPaveText(0.05,0.93,0.5,0.98,"NDCNB"); pave->SetFillColor(0); pave->SetTextFont(42); pave->AddText("#bf{CMS} Preliminary #sqrt{s} = 13 TeV"); pave->Draw(); }
void ptBestFit(float BIN_SIZE=5.0,bool BLIND=false,TString MASS,TString NAME) { gROOT->ProcessLine(".x ../../common/styleCMSTDR.C"); gSystem->Load("libHiggsAnalysisCombinedLimit.so"); gROOT->ForceStyle(); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); gROOT->SetBatch(1); gStyle->SetPadRightMargin(0.04); gStyle->SetPadLeftMargin(0.16); gStyle->SetPadTopMargin(0.06); gStyle->SetPadBottomMargin(0.10); gStyle->SetTitleFont(42,"XY"); gStyle->SetTitleSize(0.0475,"XY"); gStyle->SetTitleOffset(0.9,"X"); gStyle->SetTitleOffset(1.5,"Y"); gStyle->SetLabelSize(0.0375,"XY"); RooMsgService::instance().setSilentMode(kTRUE); for(int i=0;i<2;i++) { RooMsgService::instance().setStreamStatus(i,kFALSE); } float XMIN = 80; float XMAX = 200; TFile *f1 = TFile::Open("datacards/datacard_m"+MASS+"_"+NAME+".root"); TFile *f2 = TFile::Open("combine/mlfit.vbfHbb_"+NAME+"_mH"+MASS+".root"); TFile *f3 = TFile::Open("root/sig_shapes_workspace_B80-200.root"); TFile *f4 = TFile::Open("root/data_shapes_workspace_"+NAME+".root"); RooWorkspace *w = (RooWorkspace*)f1->Get("w"); //w->Print(); RooAbsPdf *bkg_model = (RooAbsPdf*)w->pdf("model_s"); RooFitResult *res_s = (RooFitResult*)f2->Get("fit_s"); RooFitResult *res_b = (RooFitResult*)f2->Get("fit_b"); RooRealVar *rFit = dynamic_cast<RooRealVar *>(res_s->floatParsFinal()).find("r"); RooDataSet *data = (RooDataSet*)w->data("data_obs"); int nparS=0,nparB=0; cout << res_s->floatParsFinal().getSize() << endl; cout << res_b->floatParsFinal().getSize() << endl; nparS = res_s->floatParsFinal().getSize(); nparB = res_b->floatParsFinal().getSize(); float chi2sumS = 0.; float chi2sumB = 0.; int nparsum = 0; // if (BLIND) { // res_b->Print(); // } // else { // res_s->Print(); // } w->allVars().assignValueOnly(res_s->floatParsFinal()); // w->Print(); // w->allVars()->Print(); RooWorkspace *wSig = (RooWorkspace*)f3->Get("w"); RooWorkspace *wDat = (RooWorkspace*)f4->Get("w"); const RooSimultaneous *sim = dynamic_cast<const RooSimultaneous *> (bkg_model); const RooAbsCategoryLValue &cat = (RooAbsCategoryLValue &) sim->indexCat(); TList *datasets = data->split(cat,true); TIter next(datasets); //int count = 0; for(RooAbsData *ds = (RooAbsData*)next();ds != 0; ds = (RooAbsData*)next()) { //if (count > 0) return 0; //count++; RooAbsPdf *pdfi = sim->getPdf(ds->GetName()); RooArgSet *obs = (RooArgSet*)pdfi->getObservables(ds); RooRealVar *x = dynamic_cast<RooRealVar *>(obs->first()); RooRealVar *yield_vbf = (RooRealVar*)wSig->var("yield_signalVBF_mass"+MASS+"_"+TString(ds->GetName())); RooRealVar *yield_gf = (RooRealVar*)wSig->var("yield_signalGF_mass"+MASS+"_"+TString(ds->GetName())); TString ds_name(ds->GetName()); //----- get the QCD normalization ----------- RooRealVar *qcd_norm_final = dynamic_cast<RooRealVar *>(res_s->floatParsFinal()).find("CMS_vbfbb_qcd_norm_"+ds_name); RooRealVar *qcd_yield = (RooRealVar*)wDat->var("yield_data_"+ds_name); float Nqcd = exp(log(1.5)*qcd_norm_final->getVal())*qcd_yield->getVal(); float eNqcd = log(1.5)*qcd_norm_final->getError()*Nqcd; cout<<"QCD normalization = "<<Nqcd<<" +/- "<<eNqcd<<endl; TH1 *hCoarse = (TH1*)ds->createHistogram("coarseHisto_"+ds_name,*x); float norm = hCoarse->Integral(); int rebin = BIN_SIZE/hCoarse->GetBinWidth(1); hCoarse->Rebin(rebin); float MIN_VAL = TMath::Max(0.9*hCoarse->GetBinContent(hCoarse->GetMinimumBin()),1.0); float MAX_VAL = 1.3*hCoarse->GetBinContent(hCoarse->GetMaximumBin()); RooDataHist ds_coarse("ds_coarse_"+ds_name,"ds_coarse_"+ds_name,*x,hCoarse); TH1F *hBlind = (TH1F*)hCoarse->Clone("blindHisto_"+ds_name); for(int i=0;i<hBlind->GetNbinsX();i++) { double x0 = hBlind->GetBinCenter(i+1); if (x0 > 100 && x0 < 150) { hBlind->SetBinContent(i+1,0); hBlind->SetBinError(i+1,0); } } RooDataHist ds_blind("ds_blind_"+ds_name,"ds_blind_"+ds_name,*x,hBlind); RooHist *hresid,*hresid0; RooPlot *frame1 = x->frame(); RooPlot *frame2 = x->frame(); if (BLIND) { //cout << "Blind case: " << ds_coarse.GetName() << endl; ds_coarse.plotOn(frame1,LineColor(0),MarkerColor(0)); pdfi->plotOn(frame1,Components("shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name),VisualizeError(*res_s,1,kTRUE),FillColor(0),MoveToBack()); pdfi->plotOn(frame1,Components("shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name),LineWidth(2),LineStyle(3)); ds_blind.plotOn(frame1); hresid = frame1->residHist(); frame2->addPlotable(hresid,"pE1"); } else { //cout << "Non-blind case: " << ds_coarse.GetName() << endl; ds_coarse.plotOn(frame1); pdfi->plotOn(frame1); //cout << pdfi->getParameters(ds_coarse)->selectByAttrib("Constant",kFALSE)->getSize() << endl; cout<<"chi2/ndof (bkg+sig) = "<<frame1->chiSquare()<<endl; cout << ds_coarse.numEntries() << endl; chi2sumS += frame1->chiSquare()*ds_coarse.numEntries(); nparsum += ds_coarse.numEntries(); //hresid0 = frame1->residHist(); //pdfi->plotOn(frame1,VisualizeError(*res_s,1,kTRUE),FillColor(0),MoveToBack()); pdfi->plotOn(frame1,Components("shapeBkg_qcd_"+ds_name),LineWidth(2),LineStyle(5),LineColor(kGreen+2)); pdfi->plotOn(frame1,Components("shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name),LineWidth(2),LineStyle(2),LineColor(kBlack)); cout<<"chi2/ndof (bkg) = "<<frame1->chiSquare()<<endl; chi2sumB += frame1->chiSquare()*ds_coarse.numEntries(); pdfi->plotOn(frame1,Components("shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name),LineWidth(2),LineStyle(2),LineColor(kBlack),VisualizeError(*res_s,1,kTRUE),FillColor(0),MoveToBack()); hresid = frame1->residHist(); frame2->addPlotable(hresid,"pE1"); float yield_sig = rFit->getValV()*(yield_vbf->getValV()+yield_gf->getValV()); RooAbsPdf *signal_pdf = (RooAbsPdf*)w->pdf("shapeSig_qqH_"+ds_name); signal_pdf->plotOn(frame2,LineWidth(2),LineColor(kRed),Normalization(yield_sig,RooAbsReal::NumEvent),MoveToBack()); } // hresid0->Print(); // hresid->Print(); // double x2,y2; // for (int i=0; i<3; ++i) { // hresid0->GetPoint(i,x2,y2); // cout << "BKG+SIG\t" << x2 << "\t" << y2 << endl; // hresid->GetPoint(i,x2,y2); // cout << "BKG\t" << x2 << "\t" << y2 << endl; // ds_coarse.get(i); // cout << ds_coarse.weightError(RooAbsData::SumW2) << endl; // cout << endl; // } TCanvas* canFit = new TCanvas("Higgs_fit_"+ds_name,"Higgs_fit_"+ds_name,900,750); canFit->cd(1)->SetBottomMargin(0.4); frame1->SetMinimum(MIN_VAL); frame1->SetMaximum(MAX_VAL); frame1->GetYaxis()->SetNdivisions(510); frame1->GetXaxis()->SetTitleSize(0); frame1->GetXaxis()->SetLabelSize(0); frame1->GetYaxis()->SetTitle(TString::Format("Events / %1.1f GeV",BIN_SIZE)); frame1->Draw(); gPad->Update(); TList *list = (TList*)gPad->GetListOfPrimitives(); //list->Print(); TH1F *hUncH = new TH1F("hUncH"+ds_name,"hUncH"+ds_name,(XMAX-XMIN)/BIN_SIZE,XMIN,XMAX); TH1F *hUncL = new TH1F("hUncL"+ds_name,"hUncL"+ds_name,(XMAX-XMIN)/BIN_SIZE,XMIN,XMAX); TH1F *hUnc2H = new TH1F("hUnc2H"+ds_name,"hUnc2H"+ds_name,(XMAX-XMIN)/BIN_SIZE,XMIN,XMAX); TH1F *hUnc2L = new TH1F("hUnc2L"+ds_name,"hUnc2L"+ds_name,(XMAX-XMIN)/BIN_SIZE,XMIN,XMAX); TH1F *hUncC = new TH1F("hUncC"+ds_name,"hUncC"+ds_name,(XMAX-XMIN)/BIN_SIZE,XMIN,XMAX); RooCurve *errorBand,*gFit,*gQCDFit,*gBkgFit; //list->Print(); if (BLIND) { errorBand = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]_errorband_Comp[shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name+"]"); gFit = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]"+"_Comp[shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name+"]"); } else { //errorBand = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]_errorband"); errorBand = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]_errorband_Comp[shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name+"]"); gFit = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]"); } gQCDFit = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]"+"_Comp[shapeBkg_qcd_"+ds_name+"]"); gBkgFit = (RooCurve*)list->FindObject("pdf_bin"+ds_name+"_Norm[mbbReg_"+ds_name+"]"+"_Comp[shapeBkg_qcd_"+ds_name+",shapeBkg_top_"+ds_name+",shapeBkg_zjets_"+ds_name+"]"); for(int i=0;i<hUncH->GetNbinsX();i++) { double x0 = hUncH->GetBinCenter(i+1); double e1 = fabs(errorBand->Eval(x0)-gBkgFit->Eval(x0)); //double e1 = fabs(errorBand->Eval(x0)-gFit->Eval(x0)); double e2 = eNqcd/hUncH->GetNbinsX(); hUncH->SetBinContent(i+1,sqrt(pow(e2,2)+pow(e1,2))); hUnc2H->SetBinContent(i+1,2*sqrt(pow(e2,2)+pow(e1,2))); hUncL->SetBinContent(i+1,-sqrt(pow(e2,2)+pow(e1,2))); hUnc2L->SetBinContent(i+1,-2*sqrt(pow(e2,2)+pow(e1,2))); hUncC->SetBinContent(i+1,0.); } TPad* pad = new TPad("pad", "pad", 0., 0., 1., 1.); pad->SetTopMargin(0.63); pad->SetFillColor(0); pad->SetFillStyle(0); pad->Draw(); pad->cd(0); hUnc2H->GetXaxis()->SetTitle("m_{bb} (GeV)"); hUnc2H->GetYaxis()->SetTitle("Data - Bkg"); //hUnc2H->GetYaxis()->SetTitle("Data - Fit"); double YMAX = 1.1*frame2->GetMaximum(); double YMIN = -1.1*frame2->GetMaximum(); hUnc2H->GetYaxis()->SetRangeUser(YMIN,YMAX); hUnc2H->GetYaxis()->SetNdivisions(507); // hUnc2H->GetXaxis()->SetTitleOffset(0.9); // hUnc2H->GetYaxis()->SetTitleOffset(1.0); hUnc2H->GetYaxis()->SetTickLength(0.0); // hUnc2H->GetYaxis()->SetTitleSize(0.05); // hUnc2H->GetYaxis()->SetLabelSize(0.04); hUnc2H->GetYaxis()->CenterTitle(kTRUE); hUnc2H->SetFillColor(kGreen); hUnc2L->SetFillColor(kGreen); hUncH->SetFillColor(kYellow); hUncL->SetFillColor(kYellow); hUncC->SetLineColor(kBlack); hUncC->SetLineStyle(7); hUnc2H->Draw("HIST"); hUnc2L->Draw("same HIST"); hUncH->Draw("same HIST"); hUncL->Draw("same HIST"); hUncC->Draw("same HIST"); frame2->GetYaxis()->SetTickLength(0.03/0.4); frame2->Draw("same"); TList *list1 = (TList*)gPad->GetListOfPrimitives(); //list1->Print(); RooCurve *gSigFit = (RooCurve*)list1->FindObject("shapeSig_qqH_"+ds_name+"_Norm[mbbReg_"+ds_name+"]"); TLegend *leg = new TLegend(0.70,0.61,0.94,1.-gStyle->GetPadTopMargin()-0.01); leg->SetTextFont(42); leg->SetFillStyle(-1); //leg->SetHeader(ds_name+" (m_{H}="+MASS+")"); leg->SetHeader(TString::Format("Category %d",atoi(ds_name(3,1).Data())+1)); leg->AddEntry(hBlind,"Data","P"); if (!BLIND) { leg->AddEntry(gSigFit,"Fitted signal","L"); } TLine *gEmpty = new TLine(0.0,0.0,0.0,0.0); gEmpty->SetLineWidth(0); TLegendEntry *l1 = leg->AddEntry(gEmpty,"(m_{H} = "+MASS+" GeV)",""); l1->SetTextSize(0.038*0.97*0.85); leg->AddEntry(gFit,"Bkg. + signal","L"); leg->AddEntry(gBkgFit,"Bkg.","L"); leg->AddEntry(gQCDFit,"QCD","L"); leg->AddEntry(hUnc2H,"2#sigma bkg. unc.","F"); leg->AddEntry(hUncH,"1#sigma bkg. unc.","F"); leg->SetFillColor(0); leg->SetBorderSize(0); leg->SetTextFont(42); leg->SetTextSize(0.038*0.98); leg->Draw(); leg->SetY1(leg->GetY2()-leg->GetNRows()*0.045*0.96); TPaveText *paveCMS = new TPaveText(gStyle->GetPadLeftMargin()+0.02,0.7,gStyle->GetPadLeftMargin()+0.15,1.-gStyle->GetPadTopMargin()-0.01,"NDC"); paveCMS->SetTextFont(62); paveCMS->SetTextSize(gStyle->GetPadTopMargin()*3./4.); paveCMS->SetBorderSize(0); paveCMS->SetFillStyle(-1); paveCMS->SetTextAlign(12); paveCMS->AddText("CMS"); paveCMS->Draw(); gPad->Update(); paveCMS->SetY1NDC(paveCMS->GetY2NDC()-paveCMS->GetListOfLines()->GetSize()*gStyle->GetPadTopMargin()); TPaveText *paveLumi = new TPaveText(0.5,1.-gStyle->GetPadTopMargin(),0.98,1.00,"NDC"); paveLumi->SetTextFont(42); paveLumi->SetTextSize(gStyle->GetPadTopMargin()*3./4.); paveLumi->SetBorderSize(0); paveLumi->SetFillStyle(-1); paveLumi->SetTextAlign(32); paveLumi->AddText(TString::Format("%.1f fb^{-1} (8TeV)",(atoi(ds_name(3,1).Data())<4 ? 19.8 : 18.3)).Data());//+ 18.2 ; paveLumi->Draw(); TString path="."; //TString path="BiasV10_limit_BRN5p4_dX0p1_B80-200_CAT0-6/output/"; system(TString::Format("[ ! -d %s/plot ] && mkdir %s/plot",path.Data(),path.Data()).Data()); system(TString::Format("[ ! -d %s/plot/fits ] && mkdir %s/plot/fits",path.Data(),path.Data()).Data()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s.pdf",path.Data(),MASS.Data(),ds_name.Data()).Data()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s.png",path.Data(),MASS.Data(),ds_name.Data()).Data()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s.eps",path.Data(),MASS.Data(),ds_name.Data()).Data()); TText *l = (TText*)paveCMS->AddText("Preliminary"); l->SetTextFont(52); paveCMS->Draw(); gPad->Update(); paveCMS->SetY1NDC(paveCMS->GetY2NDC()-paveCMS->GetListOfLines()->GetSize()*gStyle->GetPadTopMargin()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s_prelim.pdf",path.Data(),MASS.Data(),ds_name.Data()).Data()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s_prelim.png",path.Data(),MASS.Data(),ds_name.Data()).Data()); canFit->SaveAs(TString::Format("%s/plot/fits/Fit_mH%s_%s_prelim.eps",path.Data(),MASS.Data(),ds_name.Data()).Data()); delete ds; } cout << "chi2sumS: " << chi2sumS << endl; cout << "chi2sumB: " << chi2sumB << endl; cout << "nparS: " << nparS << endl; cout << "nparB: " << nparB << endl; cout << "nbinsum: " << nparsum << endl; cout << "chi2sumS/(nbinsum - nparS): " << chi2sumS / (float)(nparsum - nparS) << endl; cout << "chi2sumB/(nbinsum - nparB): " << chi2sumB / (float)(nparsum - nparB) << endl; delete datasets; }
void METJets() { //=========Macro generated from canvas: METJets/METJets //========= (Mon Nov 23 11:05:00 2015) by ROOT version6.02/05 TCanvas *METJets = new TCanvas("METJets", "METJets",100,122,700,700); METJets->Range(-1.875,-6.772831,16.875,5.054722); METJets->SetFillColor(0); METJets->SetBorderMode(0); METJets->SetBorderSize(2); METJets->SetLogy(); METJets->SetFrameBorderMode(0); METJets->SetFrameBorderMode(0); THStack *METJets = new THStack(); METJets->SetName("METJets"); METJets->SetTitle("METJets"); TH1F *METJets_stack_6 = new TH1F("METJets_stack_6","METJets",15,0,15); METJets_stack_6->SetMinimum(2.569948e-06); METJets_stack_6->SetMaximum(7446.75); METJets_stack_6->SetDirectory(0); METJets_stack_6->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); METJets_stack_6->SetLineColor(ci); METJets_stack_6->GetXaxis()->SetTitle("METJets"); METJets_stack_6->GetXaxis()->SetLabelFont(42); METJets_stack_6->GetXaxis()->SetLabelSize(0.035); METJets_stack_6->GetXaxis()->SetTitleSize(0.035); METJets_stack_6->GetXaxis()->SetTitleFont(42); METJets_stack_6->GetYaxis()->SetTitle("Events/pb"); METJets_stack_6->GetYaxis()->SetLabelFont(42); METJets_stack_6->GetYaxis()->SetLabelSize(0.035); METJets_stack_6->GetYaxis()->SetTitleSize(0.035); METJets_stack_6->GetYaxis()->SetTitleFont(42); METJets_stack_6->GetZaxis()->SetLabelFont(42); METJets_stack_6->GetZaxis()->SetLabelSize(0.035); METJets_stack_6->GetZaxis()->SetTitleSize(0.035); METJets_stack_6->GetZaxis()->SetTitleFont(42); METJets->SetHistogram(METJets_stack_6); TH1D *METJets26 = new TH1D("METJets26"," Number of jets in MET hemisphere",15,0,15); METJets26->SetBinContent(1,2.358311); METJets26->SetBinContent(2,1799.25); METJets26->SetBinContent(3,2794.573); METJets26->SetBinContent(4,982.1805); METJets26->SetBinContent(5,126.0732); METJets26->SetBinContent(6,6.831502); METJets26->SetBinContent(7,0.05059331); METJets26->SetBinError(1,0.8851475); METJets26->SetBinError(2,24.25261); METJets26->SetBinError(3,30.24717); METJets26->SetBinError(4,17.9355); METJets26->SetBinError(5,6.393654); METJets26->SetBinError(6,1.459512); METJets26->SetBinError(7,0.02038811); METJets26->SetEntries(35032); ci = TColor::GetColor("#00cc00"); METJets26->SetFillColor(ci); ci = TColor::GetColor("#00cc00"); METJets26->SetLineColor(ci); ci = TColor::GetColor("#00cc00"); METJets26->SetMarkerColor(ci); METJets26->SetMarkerStyle(22); METJets26->GetXaxis()->SetTitle("METJets"); METJets26->GetXaxis()->SetLabelFont(42); METJets26->GetXaxis()->SetLabelSize(0.035); METJets26->GetXaxis()->SetTitleSize(0.035); METJets26->GetXaxis()->SetTitleFont(42); METJets26->GetYaxis()->SetTitle("Events/pb"); METJets26->GetYaxis()->SetLabelFont(42); METJets26->GetYaxis()->SetLabelSize(0.035); METJets26->GetYaxis()->SetTitleSize(0.035); METJets26->GetYaxis()->SetTitleFont(42); METJets26->GetZaxis()->SetLabelFont(42); METJets26->GetZaxis()->SetLabelSize(0.035); METJets26->GetZaxis()->SetTitleSize(0.035); METJets26->GetZaxis()->SetTitleFont(42); METJets->Add(METJets,""); TH1D *METJets27 = new TH1D("METJets27"," Number of jets in MET hemisphere",15,0,15); METJets27->SetBinContent(1,0.8785647); METJets27->SetBinContent(2,19.65506); METJets27->SetBinContent(3,13.48662); METJets27->SetBinContent(4,1.798839); METJets27->SetBinContent(5,0.132607); METJets27->SetBinContent(6,0.006526677); METJets27->SetBinContent(7,0.0001605133); METJets27->SetBinContent(8,1.473949e-05); METJets27->SetBinError(1,0.02795641); METJets27->SetBinError(2,0.1254575); METJets27->SetBinError(3,0.1000964); METJets27->SetBinError(4,0.03249664); METJets27->SetBinError(5,0.007171238); METJets27->SetBinError(6,0.001513783); METJets27->SetBinError(7,4.840768e-05); METJets27->SetBinError(8,1.473949e-05); METJets27->SetEntries(136801); ci = TColor::GetColor("#00ffff"); METJets27->SetFillColor(ci); ci = TColor::GetColor("#00ffff"); METJets27->SetLineColor(ci); ci = TColor::GetColor("#00ffff"); METJets27->SetMarkerColor(ci); METJets27->SetMarkerStyle(20); METJets27->GetXaxis()->SetTitle("METJets"); METJets27->GetXaxis()->SetLabelFont(42); METJets27->GetXaxis()->SetLabelSize(0.035); METJets27->GetXaxis()->SetTitleSize(0.035); METJets27->GetXaxis()->SetTitleFont(42); METJets27->GetYaxis()->SetTitle("Events/pb"); METJets27->GetYaxis()->SetLabelFont(42); METJets27->GetYaxis()->SetLabelSize(0.035); METJets27->GetYaxis()->SetTitleSize(0.035); METJets27->GetYaxis()->SetTitleFont(42); METJets27->GetZaxis()->SetLabelFont(42); METJets27->GetZaxis()->SetLabelSize(0.035); METJets27->GetZaxis()->SetTitleSize(0.035); METJets27->GetZaxis()->SetTitleFont(42); METJets->Add(METJets,""); TH1D *METJets28 = new TH1D("METJets28"," Number of jets in MET hemisphere",15,0,15); METJets28->SetBinContent(1,0.1431715); METJets28->SetBinContent(2,2.860636); METJets28->SetBinContent(3,1.738326); METJets28->SetBinContent(4,0.1855333); METJets28->SetBinContent(5,0.01162161); METJets28->SetBinContent(6,0.0007176836); METJets28->SetBinContent(7,3.39293e-05); METJets28->SetBinError(1,0.003525434); METJets28->SetBinError(2,0.01498037); METJets28->SetBinError(3,0.0112588); METJets28->SetBinError(4,0.003217574); METJets28->SetBinError(5,0.0006944844); METJets28->SetBinError(6,0.0001304861); METJets28->SetBinError(7,2.841073e-05); METJets28->SetEntries(131338); ci = TColor::GetColor("#ffcc00"); METJets28->SetFillColor(ci); ci = TColor::GetColor("#ffcc00"); METJets28->SetLineColor(ci); ci = TColor::GetColor("#ffcc00"); METJets28->SetMarkerColor(ci); METJets28->SetMarkerStyle(21); METJets28->GetXaxis()->SetTitle("METJets"); METJets28->GetXaxis()->SetLabelFont(42); METJets28->GetXaxis()->SetLabelSize(0.035); METJets28->GetXaxis()->SetTitleSize(0.035); METJets28->GetXaxis()->SetTitleFont(42); METJets28->GetYaxis()->SetTitle("Events/pb"); METJets28->GetYaxis()->SetLabelFont(42); METJets28->GetYaxis()->SetLabelSize(0.035); METJets28->GetYaxis()->SetTitleSize(0.035); METJets28->GetYaxis()->SetTitleFont(42); METJets28->GetZaxis()->SetLabelFont(42); METJets28->GetZaxis()->SetLabelSize(0.035); METJets28->GetZaxis()->SetTitleSize(0.035); METJets28->GetZaxis()->SetTitleFont(42); METJets->Add(METJets,""); TH1D *METJets29 = new TH1D("METJets29"," Number of jets in MET hemisphere",15,0,15); METJets29->SetBinContent(1,0.003208312); METJets29->SetBinContent(2,0.03535313); METJets29->SetBinContent(3,0.02142474); METJets29->SetBinContent(4,0.003779021); METJets29->SetBinContent(5,0.0003701898); METJets29->SetBinContent(6,9.254746e-05); METJets29->SetBinError(1,0.0002224564); METJets29->SetBinError(2,0.0007384491); METJets29->SetBinError(3,0.000574863); METJets29->SetBinError(4,0.0002414328); METJets29->SetBinError(5,7.556468e-05); METJets29->SetBinError(6,3.778234e-05); METJets29->SetEntries(4164); ci = TColor::GetColor("#ff0000"); METJets29->SetFillColor(ci); ci = TColor::GetColor("#ff0000"); METJets29->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); METJets29->SetMarkerColor(ci); METJets29->SetMarkerStyle(20); METJets29->GetXaxis()->SetTitle("METJets"); METJets29->GetXaxis()->SetLabelFont(42); METJets29->GetXaxis()->SetLabelSize(0.035); METJets29->GetXaxis()->SetTitleSize(0.035); METJets29->GetXaxis()->SetTitleFont(42); METJets29->GetYaxis()->SetTitle("Events/pb"); METJets29->GetYaxis()->SetLabelFont(42); METJets29->GetYaxis()->SetLabelSize(0.035); METJets29->GetYaxis()->SetTitleSize(0.035); METJets29->GetYaxis()->SetTitleFont(42); METJets29->GetZaxis()->SetLabelFont(42); METJets29->GetZaxis()->SetLabelSize(0.035); METJets29->GetZaxis()->SetTitleSize(0.035); METJets29->GetZaxis()->SetTitleFont(42); METJets->Add(METJets,""); TH1D *METJets30 = new TH1D("METJets30"," Number of jets in MET hemisphere",15,0,15); METJets30->SetBinContent(2,0.000335433); METJets30->SetBinContent(3,0.000335433); METJets30->SetBinContent(4,0.0002180314); METJets30->SetBinContent(5,0.0001341732); METJets30->SetBinError(2,7.500509e-05); METJets30->SetBinError(3,7.500509e-05); METJets30->SetBinError(4,6.047104e-05); METJets30->SetBinError(5,4.743738e-05); METJets30->SetEntries(61); ci = TColor::GetColor("#0000ff"); METJets30->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); METJets30->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); METJets30->SetMarkerColor(ci); METJets30->SetMarkerStyle(21); METJets30->GetXaxis()->SetTitle("METJets"); METJets30->GetXaxis()->SetLabelFont(42); METJets30->GetXaxis()->SetLabelSize(0.035); METJets30->GetXaxis()->SetTitleSize(0.035); METJets30->GetXaxis()->SetTitleFont(42); METJets30->GetYaxis()->SetTitle("Events/pb"); METJets30->GetYaxis()->SetLabelFont(42); METJets30->GetYaxis()->SetLabelSize(0.035); METJets30->GetYaxis()->SetTitleSize(0.035); METJets30->GetYaxis()->SetTitleFont(42); METJets30->GetZaxis()->SetLabelFont(42); METJets30->GetZaxis()->SetLabelSize(0.035); METJets30->GetZaxis()->SetTitleSize(0.035); METJets30->GetZaxis()->SetTitleFont(42); METJets->Add(METJets,""); METJets->Draw("nostack"); TPaveText *pt = new TPaveText(0.3872701,0.94,0.6127299,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *AText = pt->AddText("METJets"); pt->Draw(); TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC"); leg->SetBorderSize(1); leg->SetTextSize(0.034965); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("METJets","METJets_QCD","lp"); ci = TColor::GetColor("#00cc00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00cc00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(22); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METJets","METJets_WJetsToLNu","lp"); ci = TColor::GetColor("#00ffff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00ffff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METJets","METJets_ZJetsToNuNu","lp"); ci = TColor::GetColor("#ffcc00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ffcc00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METJets","METJets_signal","lp"); ci = TColor::GetColor("#ff0000"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff0000"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("METJets","METJets_ttbar","lp"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#0000ff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); METJets->Modified(); METJets->cd(); METJets->SetSelected(METJets); }
void single() { //=========Macro generated from canvas: METODO2/Simulazione MC (1000 simulazioni) - Likelihood //========= (Fri Dec 30 16:48:29 2016) by ROOT version6.09/01 TCanvas *METODO2 = new TCanvas("METODO2", "Simulazione MC (1000 simulazioni) - Likelihood",97,58,1202,813); gStyle->SetOptStat(0); METODO2->SetHighLightColor(2); METODO2->Range(0,0,1,1); METODO2->SetFillColor(0); METODO2->SetBorderMode(0); METODO2->SetBorderSize(2); METODO2->SetFrameBorderMode(0); // ------------>Primitives in pad: METODO2_1 TPad *METODO2_1 = new TPad("METODO2_1", "METODO2_1",0.01,0.51,0.24,0.99); METODO2_1->Draw(); METODO2_1->cd(); METODO2_1->Range(2.073257,-7.875001,2.385795,70.875); METODO2_1->SetFillColor(0); METODO2_1->SetBorderMode(0); METODO2_1->SetBorderSize(2); METODO2_1->SetFrameBorderMode(0); METODO2_1->SetFrameBorderMode(0); TH1D *hFitTauL2__9__1 = new TH1D("hFitTauL2__9__1","#tau_{+}",40,2.104511,2.354541); hFitTauL2__9__1->SetBinContent(1,3); hFitTauL2__9__1->SetBinContent(2,5); hFitTauL2__9__1->SetBinContent(3,8); hFitTauL2__9__1->SetBinContent(4,12); hFitTauL2__9__1->SetBinContent(5,11); hFitTauL2__9__1->SetBinContent(6,33); hFitTauL2__9__1->SetBinContent(7,38); hFitTauL2__9__1->SetBinContent(8,31); hFitTauL2__9__1->SetBinContent(9,41); hFitTauL2__9__1->SetBinContent(10,46); hFitTauL2__9__1->SetBinContent(11,55); hFitTauL2__9__1->SetBinContent(12,49); hFitTauL2__9__1->SetBinContent(13,48); hFitTauL2__9__1->SetBinContent(14,60); hFitTauL2__9__1->SetBinContent(15,58); hFitTauL2__9__1->SetBinContent(16,59); hFitTauL2__9__1->SetBinContent(17,45); hFitTauL2__9__1->SetBinContent(18,48); hFitTauL2__9__1->SetBinContent(19,38); hFitTauL2__9__1->SetBinContent(20,34); hFitTauL2__9__1->SetBinContent(21,37); hFitTauL2__9__1->SetBinContent(22,40); hFitTauL2__9__1->SetBinContent(23,34); hFitTauL2__9__1->SetBinContent(24,26); hFitTauL2__9__1->SetBinContent(25,26); hFitTauL2__9__1->SetBinContent(26,17); hFitTauL2__9__1->SetBinContent(27,25); hFitTauL2__9__1->SetBinContent(28,13); hFitTauL2__9__1->SetBinContent(29,12); hFitTauL2__9__1->SetBinContent(30,6); hFitTauL2__9__1->SetBinContent(31,5); hFitTauL2__9__1->SetBinContent(32,2); hFitTauL2__9__1->SetBinContent(33,2); hFitTauL2__9__1->SetBinContent(34,1); hFitTauL2__9__1->SetBinContent(37,1); hFitTauL2__9__1->SetEntries(969); hFitTauL2__9__1->SetStats(0); TF1 *gaus1 = new TF1("gaus","gaus",2.107636,2.351416); gaus1->SetFillColor(19); gaus1->SetFillStyle(0); gaus1->SetLineColor(2); gaus1->SetLineWidth(2); gaus1->SetChisquare(40.40096); gaus1->SetNDF(32); gaus1->GetXaxis()->SetLabelFont(42); gaus1->GetXaxis()->SetLabelSize(0.035); gaus1->GetXaxis()->SetTitleSize(0.035); gaus1->GetXaxis()->SetTitleFont(42); gaus1->GetYaxis()->SetLabelFont(42); gaus1->GetYaxis()->SetLabelSize(0.035); gaus1->GetYaxis()->SetTitleSize(0.035); gaus1->GetYaxis()->SetTitleFont(42); gaus1->SetParameter(0,55.14361); gaus1->SetParError(0,2.225785); gaus1->SetParLimits(0,0,0); gaus1->SetParameter(1,2.19903); gaus1->SetParError(1,0.001480435); gaus1->SetParLimits(1,0,0); gaus1->SetParameter(2,0.04266168); gaus1->SetParError(2,0.001105597); gaus1->SetParLimits(2,0,0.4145804); hFitTauL2__9__1->GetListOfFunctions()->Add(gaus1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hFitTauL2__9__1->SetLineColor(ci); hFitTauL2__9__1->GetXaxis()->SetTitle("mus"); hFitTauL2__9__1->GetXaxis()->CenterTitle(true); hFitTauL2__9__1->GetXaxis()->SetNdivisions(505); hFitTauL2__9__1->GetXaxis()->SetLabelFont(42); hFitTauL2__9__1->GetXaxis()->SetLabelOffset(-0.005); hFitTauL2__9__1->GetXaxis()->SetLabelSize(0.07); hFitTauL2__9__1->GetXaxis()->SetTitleSize(0.07); hFitTauL2__9__1->GetXaxis()->SetTitleOffset(0.7); hFitTauL2__9__1->GetXaxis()->SetTitleFont(42); hFitTauL2__9__1->GetYaxis()->SetNdivisions(506); hFitTauL2__9__1->GetYaxis()->SetLabelFont(42); hFitTauL2__9__1->GetYaxis()->SetLabelSize(0.07); hFitTauL2__9__1->GetYaxis()->SetTitleSize(0.035); hFitTauL2__9__1->GetYaxis()->SetTitleFont(42); hFitTauL2__9__1->GetZaxis()->SetLabelFont(42); hFitTauL2__9__1->GetZaxis()->SetLabelSize(0.035); hFitTauL2__9__1->GetZaxis()->SetTitleSize(0.035); hFitTauL2__9__1->GetZaxis()->SetTitleFont(42); hFitTauL2__9__1->Draw(""); TLine *line = new TLine(2.197175,0,2.197175,60); ci = TColor::GetColor("#006600"); line->SetLineColor(ci); line->SetLineWidth(3); line->Draw(); TPaveText *pt = new TPaveText(0.4700392,0.94,0.5299608,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); TText *AText = pt->AddText("#tau_{+}"); pt->Draw(); METODO2_1->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_2 TPad *METODO2_2 = new TPad("METODO2_2", "METODO2_2",0.26,0.51,0.49,0.99); METODO2_2->Draw(); METODO2_2->cd(); METODO2_2->Range(0.7088825,-8.793751,1.086034,79.14375); METODO2_2->SetFillColor(0); METODO2_2->SetBorderMode(0); METODO2_2->SetBorderSize(2); METODO2_2->SetFrameBorderMode(0); METODO2_2->SetFrameBorderMode(0); TH1D *hFitTauShortL2__10__2 = new TH1D("hFitTauShortL2__10__2","#tau_{-}",40,0.7465977,1.048319); hFitTauShortL2__10__2->SetBinContent(1,2); hFitTauShortL2__10__2->SetBinContent(2,6); hFitTauShortL2__10__2->SetBinContent(3,8); hFitTauShortL2__10__2->SetBinContent(4,11); hFitTauShortL2__10__2->SetBinContent(5,12); hFitTauShortL2__10__2->SetBinContent(6,15); hFitTauShortL2__10__2->SetBinContent(7,20); hFitTauShortL2__10__2->SetBinContent(8,28); hFitTauShortL2__10__2->SetBinContent(9,21); hFitTauShortL2__10__2->SetBinContent(10,32); hFitTauShortL2__10__2->SetBinContent(11,30); hFitTauShortL2__10__2->SetBinContent(12,35); hFitTauShortL2__10__2->SetBinContent(13,32); hFitTauShortL2__10__2->SetBinContent(14,46); hFitTauShortL2__10__2->SetBinContent(15,49); hFitTauShortL2__10__2->SetBinContent(16,41); hFitTauShortL2__10__2->SetBinContent(17,50); hFitTauShortL2__10__2->SetBinContent(18,67); hFitTauShortL2__10__2->SetBinContent(19,50); hFitTauShortL2__10__2->SetBinContent(20,40); hFitTauShortL2__10__2->SetBinContent(21,42); hFitTauShortL2__10__2->SetBinContent(22,51); hFitTauShortL2__10__2->SetBinContent(23,36); hFitTauShortL2__10__2->SetBinContent(24,48); hFitTauShortL2__10__2->SetBinContent(25,37); hFitTauShortL2__10__2->SetBinContent(26,26); hFitTauShortL2__10__2->SetBinContent(27,26); hFitTauShortL2__10__2->SetBinContent(28,26); hFitTauShortL2__10__2->SetBinContent(29,23); hFitTauShortL2__10__2->SetBinContent(30,13); hFitTauShortL2__10__2->SetBinContent(31,6); hFitTauShortL2__10__2->SetBinContent(32,9); hFitTauShortL2__10__2->SetBinContent(33,9); hFitTauShortL2__10__2->SetBinContent(34,12); hFitTauShortL2__10__2->SetBinContent(35,2); hFitTauShortL2__10__2->SetBinContent(36,3); hFitTauShortL2__10__2->SetBinContent(37,1); hFitTauShortL2__10__2->SetBinContent(38,3); hFitTauShortL2__10__2->SetBinContent(39,1); hFitTauShortL2__10__2->SetEntries(969); hFitTauShortL2__10__2->SetStats(0); TF1 *gaus2 = new TF1("gaus","gaus",0.7503692,1.044548); gaus2->SetFillColor(19); gaus2->SetFillStyle(0); gaus2->SetLineColor(2); gaus2->SetLineWidth(2); gaus2->SetChisquare(36.70305); gaus2->SetNDF(36); gaus2->GetXaxis()->SetLabelFont(42); gaus2->GetXaxis()->SetLabelSize(0.035); gaus2->GetXaxis()->SetTitleSize(0.035); gaus2->GetXaxis()->SetTitleFont(42); gaus2->GetYaxis()->SetLabelFont(42); gaus2->GetYaxis()->SetLabelSize(0.035); gaus2->GetYaxis()->SetTitleSize(0.035); gaus2->GetYaxis()->SetTitleFont(42); gaus2->SetParameter(0,50.39287); gaus2->SetParError(0,2.049464); gaus2->SetParLimits(0,0,0); gaus2->SetParameter(1,0.8784985); gaus2->SetParError(1,0.001946827); gaus2->SetParLimits(1,0,0); gaus2->SetParameter(2,0.05632111); gaus2->SetParError(2,0.001480131); gaus2->SetParLimits(2,0,0.554472); hFitTauShortL2__10__2->GetListOfFunctions()->Add(gaus2); ci = TColor::GetColor("#000099"); hFitTauShortL2__10__2->SetLineColor(ci); hFitTauShortL2__10__2->GetXaxis()->SetTitle("mus"); hFitTauShortL2__10__2->GetXaxis()->CenterTitle(true); hFitTauShortL2__10__2->GetXaxis()->SetNdivisions(506); hFitTauShortL2__10__2->GetXaxis()->SetLabelFont(42); hFitTauShortL2__10__2->GetXaxis()->SetLabelOffset(-0.005); hFitTauShortL2__10__2->GetXaxis()->SetLabelSize(0.07); hFitTauShortL2__10__2->GetXaxis()->SetTitleSize(0.07); hFitTauShortL2__10__2->GetXaxis()->SetTitleOffset(0.7); hFitTauShortL2__10__2->GetXaxis()->SetTitleFont(42); hFitTauShortL2__10__2->GetYaxis()->SetNdivisions(507); hFitTauShortL2__10__2->GetYaxis()->SetLabelFont(42); hFitTauShortL2__10__2->GetYaxis()->SetLabelSize(0.07); hFitTauShortL2__10__2->GetYaxis()->SetTitleSize(0.035); hFitTauShortL2__10__2->GetYaxis()->SetTitleFont(42); hFitTauShortL2__10__2->GetZaxis()->SetLabelFont(42); hFitTauShortL2__10__2->GetZaxis()->SetLabelSize(0.035); hFitTauShortL2__10__2->GetZaxis()->SetTitleSize(0.035); hFitTauShortL2__10__2->GetZaxis()->SetTitleFont(42); hFitTauShortL2__10__2->Draw(""); line = new TLine(0.8809186,0,0.8809186,67); ci = TColor::GetColor("#006600"); line->SetLineColor(ci); line->SetLineWidth(3); line->Draw(); pt = new TPaveText(0.4754831,0.94,0.5245169,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("#tau_{-}"); pt->Draw(); METODO2_2->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_3 TPad *METODO2_3 = new TPad("METODO2_3", "METODO2_3",0.51,0.51,0.74,0.99); METODO2_3->Draw(); METODO2_3->cd(); METODO2_3->Range(0.8959783,-9.318751,1.111001,83.86875); METODO2_3->SetFillColor(0); METODO2_3->SetBorderMode(0); METODO2_3->SetBorderSize(2); METODO2_3->SetFrameBorderMode(0); METODO2_3->SetFrameBorderMode(0); TH1D *hFitBL2__11__3 = new TH1D("hFitBL2__11__3","b",40,0.9174806,1.089499); hFitBL2__11__3->SetBinContent(1,2); hFitBL2__11__3->SetBinContent(2,1); hFitBL2__11__3->SetBinContent(3,2); hFitBL2__11__3->SetBinContent(4,4); hFitBL2__11__3->SetBinContent(5,2); hFitBL2__11__3->SetBinContent(6,3); hFitBL2__11__3->SetBinContent(7,6); hFitBL2__11__3->SetBinContent(8,9); hFitBL2__11__3->SetBinContent(9,15); hFitBL2__11__3->SetBinContent(10,13); hFitBL2__11__3->SetBinContent(11,27); hFitBL2__11__3->SetBinContent(12,25); hFitBL2__11__3->SetBinContent(13,33); hFitBL2__11__3->SetBinContent(14,51); hFitBL2__11__3->SetBinContent(15,40); hFitBL2__11__3->SetBinContent(16,68); hFitBL2__11__3->SetBinContent(17,48); hFitBL2__11__3->SetBinContent(18,59); hFitBL2__11__3->SetBinContent(19,56); hFitBL2__11__3->SetBinContent(20,56); hFitBL2__11__3->SetBinContent(21,71); hFitBL2__11__3->SetBinContent(22,63); hFitBL2__11__3->SetBinContent(23,51); hFitBL2__11__3->SetBinContent(24,38); hFitBL2__11__3->SetBinContent(25,47); hFitBL2__11__3->SetBinContent(26,39); hFitBL2__11__3->SetBinContent(27,37); hFitBL2__11__3->SetBinContent(28,29); hFitBL2__11__3->SetBinContent(29,18); hFitBL2__11__3->SetBinContent(30,14); hFitBL2__11__3->SetBinContent(31,16); hFitBL2__11__3->SetBinContent(32,10); hFitBL2__11__3->SetBinContent(33,8); hFitBL2__11__3->SetBinContent(34,3); hFitBL2__11__3->SetBinContent(35,2); hFitBL2__11__3->SetBinContent(36,2); hFitBL2__11__3->SetBinContent(38,1); hFitBL2__11__3->SetEntries(969); hFitBL2__11__3->SetStats(0); TF1 *gaus3 = new TF1("gaus","gaus",0.9196308,1.087349); gaus3->SetFillColor(19); gaus3->SetFillStyle(0); gaus3->SetLineColor(2); gaus3->SetLineWidth(2); gaus3->SetChisquare(26.97344); gaus3->SetNDF(34); gaus3->GetXaxis()->SetLabelFont(42); gaus3->GetXaxis()->SetLabelSize(0.035); gaus3->GetXaxis()->SetTitleSize(0.035); gaus3->GetXaxis()->SetTitleFont(42); gaus3->GetYaxis()->SetLabelFont(42); gaus3->GetYaxis()->SetLabelSize(0.035); gaus3->GetYaxis()->SetTitleSize(0.035); gaus3->GetYaxis()->SetTitleFont(42); gaus3->SetParameter(0,61.73503); gaus3->SetParError(0,2.484555); gaus3->SetParLimits(0,0,0); gaus3->SetParameter(1,1.000895); gaus3->SetParError(1,0.0008693081); gaus3->SetParLimits(1,0,0); gaus3->SetParameter(2,0.02626284); gaus3->SetParError(2,0.0006388533); gaus3->SetParLimits(2,0,0.262935); hFitBL2__11__3->GetListOfFunctions()->Add(gaus3); ci = TColor::GetColor("#000099"); hFitBL2__11__3->SetLineColor(ci); hFitBL2__11__3->GetXaxis()->SetTitle("conteggi"); hFitBL2__11__3->GetXaxis()->CenterTitle(true); hFitBL2__11__3->GetXaxis()->SetNdivisions(506); hFitBL2__11__3->GetXaxis()->SetLabelFont(42); hFitBL2__11__3->GetXaxis()->SetLabelOffset(-0.005); hFitBL2__11__3->GetXaxis()->SetLabelSize(0.07); hFitBL2__11__3->GetXaxis()->SetTitleSize(0.07); hFitBL2__11__3->GetXaxis()->SetTitleOffset(0.7); hFitBL2__11__3->GetXaxis()->SetTitleFont(42); hFitBL2__11__3->GetYaxis()->SetNdivisions(507); hFitBL2__11__3->GetYaxis()->SetLabelFont(42); hFitBL2__11__3->GetYaxis()->SetLabelSize(0.07); hFitBL2__11__3->GetYaxis()->SetTitleSize(0.035); hFitBL2__11__3->GetYaxis()->SetTitleFont(42); hFitBL2__11__3->GetZaxis()->SetLabelFont(42); hFitBL2__11__3->GetZaxis()->SetLabelSize(0.035); hFitBL2__11__3->GetZaxis()->SetTitleSize(0.035); hFitBL2__11__3->GetZaxis()->SetTitleFont(42); hFitBL2__11__3->Draw(""); line = new TLine(1,0,1,71); ci = TColor::GetColor("#006600"); line->SetLineColor(ci); line->SetLineWidth(3); line->Draw(); pt = new TPaveText(0.4718538,0.94,0.5208393,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("b"); pt->Draw(); METODO2_3->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_4 TPad *METODO2_4 = new TPad("METODO2_4", "METODO2_4",0.76,0.51,0.99,0.99); METODO2_4->Draw(); METODO2_4->cd(); METODO2_4->Range(0.8398416,-8.006251,1.78409,72.05625); METODO2_4->SetFillColor(0); METODO2_4->SetBorderMode(0); METODO2_4->SetBorderSize(2); METODO2_4->SetFrameBorderMode(0); METODO2_4->SetFrameBorderMode(0); TH1D *hFitRL2__12__4 = new TH1D("hFitRL2__12__4","R",40,0.9342664,1.689665); hFitRL2__12__4->SetBinContent(1,4); hFitRL2__12__4->SetBinContent(2,6); hFitRL2__12__4->SetBinContent(3,9); hFitRL2__12__4->SetBinContent(4,12); hFitRL2__12__4->SetBinContent(5,13); hFitRL2__12__4->SetBinContent(6,16); hFitRL2__12__4->SetBinContent(7,21); hFitRL2__12__4->SetBinContent(8,35); hFitRL2__12__4->SetBinContent(9,44); hFitRL2__12__4->SetBinContent(10,31); hFitRL2__12__4->SetBinContent(11,28); hFitRL2__12__4->SetBinContent(12,44); hFitRL2__12__4->SetBinContent(13,36); hFitRL2__12__4->SetBinContent(14,39); hFitRL2__12__4->SetBinContent(15,44); hFitRL2__12__4->SetBinContent(16,45); hFitRL2__12__4->SetBinContent(17,44); hFitRL2__12__4->SetBinContent(18,46); hFitRL2__12__4->SetBinContent(19,61); hFitRL2__12__4->SetBinContent(20,37); hFitRL2__12__4->SetBinContent(21,46); hFitRL2__12__4->SetBinContent(22,41); hFitRL2__12__4->SetBinContent(23,46); hFitRL2__12__4->SetBinContent(24,35); hFitRL2__12__4->SetBinContent(25,31); hFitRL2__12__4->SetBinContent(26,22); hFitRL2__12__4->SetBinContent(27,33); hFitRL2__12__4->SetBinContent(28,25); hFitRL2__12__4->SetBinContent(29,15); hFitRL2__12__4->SetBinContent(30,19); hFitRL2__12__4->SetBinContent(31,11); hFitRL2__12__4->SetBinContent(32,8); hFitRL2__12__4->SetBinContent(33,6); hFitRL2__12__4->SetBinContent(34,5); hFitRL2__12__4->SetBinContent(35,3); hFitRL2__12__4->SetBinContent(36,4); hFitRL2__12__4->SetBinContent(37,1); hFitRL2__12__4->SetBinContent(38,2); hFitRL2__12__4->SetBinContent(40,1); hFitRL2__12__4->SetEntries(969); hFitRL2__12__4->SetStats(0); TF1 *gaus4 = new TF1("gaus","gaus",0.9437089,1.680222); gaus4->SetFillColor(19); gaus4->SetFillStyle(0); gaus4->SetLineColor(2); gaus4->SetLineWidth(2); gaus4->SetChisquare(31.56924); gaus4->SetNDF(36); gaus4->GetXaxis()->SetLabelFont(42); gaus4->GetXaxis()->SetLabelSize(0.035); gaus4->GetXaxis()->SetTitleSize(0.035); gaus4->GetXaxis()->SetTitleFont(42); gaus4->GetYaxis()->SetLabelFont(42); gaus4->GetYaxis()->SetLabelSize(0.035); gaus4->GetYaxis()->SetTitleSize(0.035); gaus4->GetYaxis()->SetTitleFont(42); gaus4->SetParameter(0,48.42124); gaus4->SetParError(0,1.953846); gaus4->SetParLimits(0,0,0); gaus4->SetParameter(1,1.254783); gaus4->SetParError(1,0.005227531); gaus4->SetParLimits(1,0,0); gaus4->SetParameter(2,0.148583); gaus4->SetParError(2,0.003981527); gaus4->SetParLimits(2,0,1.414801); hFitRL2__12__4->GetListOfFunctions()->Add(gaus4); ci = TColor::GetColor("#000099"); hFitRL2__12__4->SetLineColor(ci); hFitRL2__12__4->GetXaxis()->SetNdivisions(507); hFitRL2__12__4->GetXaxis()->SetLabelFont(42); hFitRL2__12__4->GetXaxis()->SetLabelOffset(-0.005); hFitRL2__12__4->GetXaxis()->SetLabelSize(0.07); hFitRL2__12__4->GetXaxis()->SetTitleSize(0.035); hFitRL2__12__4->GetXaxis()->SetTitleFont(42); hFitRL2__12__4->GetYaxis()->SetNdivisions(506); hFitRL2__12__4->GetYaxis()->SetLabelFont(42); hFitRL2__12__4->GetYaxis()->SetLabelSize(0.07); hFitRL2__12__4->GetYaxis()->SetTitleSize(0.035); hFitRL2__12__4->GetYaxis()->SetTitleFont(42); hFitRL2__12__4->GetZaxis()->SetLabelFont(42); hFitRL2__12__4->GetZaxis()->SetLabelSize(0.035); hFitRL2__12__4->GetZaxis()->SetTitleSize(0.035); hFitRL2__12__4->GetZaxis()->SetTitleFont(42); hFitRL2__12__4->Draw(""); line = new TLine(1.261,0,1.261,61); ci = TColor::GetColor("#006600"); line->SetLineColor(ci); line->SetLineWidth(3); line->Draw(); pt = new TPaveText(0.4718538,0.94,0.5281462,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("R"); pt->Draw(); METODO2_4->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_5 TPad *METODO2_5 = new TPad("METODO2_5", "METODO2_5",0.01,0.01,0.24,0.49); METODO2_5->Draw(); METODO2_5->cd(); METODO2_5->Range(0.0276943,-8.531251,0.07885156,76.78125); METODO2_5->SetFillColor(0); METODO2_5->SetBorderMode(0); METODO2_5->SetBorderSize(2); METODO2_5->SetFrameBorderMode(0); METODO2_5->SetFrameBorderMode(0); TH1D *hFitErrTauL2__13__5 = new TH1D("hFitErrTauL2__13__5","#tau_{+} - errori",40,0.03281003,0.07373583); hFitErrTauL2__13__5->SetBinContent(1,4); hFitErrTauL2__13__5->SetBinContent(2,14); hFitErrTauL2__13__5->SetBinContent(3,17); hFitErrTauL2__13__5->SetBinContent(4,26); hFitErrTauL2__13__5->SetBinContent(5,37); hFitErrTauL2__13__5->SetBinContent(6,46); hFitErrTauL2__13__5->SetBinContent(7,45); hFitErrTauL2__13__5->SetBinContent(8,49); hFitErrTauL2__13__5->SetBinContent(9,60); hFitErrTauL2__13__5->SetBinContent(10,60); hFitErrTauL2__13__5->SetBinContent(11,65); hFitErrTauL2__13__5->SetBinContent(12,56); hFitErrTauL2__13__5->SetBinContent(13,63); hFitErrTauL2__13__5->SetBinContent(14,54); hFitErrTauL2__13__5->SetBinContent(15,51); hFitErrTauL2__13__5->SetBinContent(16,50); hFitErrTauL2__13__5->SetBinContent(17,49); hFitErrTauL2__13__5->SetBinContent(18,37); hFitErrTauL2__13__5->SetBinContent(19,32); hFitErrTauL2__13__5->SetBinContent(20,34); hFitErrTauL2__13__5->SetBinContent(21,27); hFitErrTauL2__13__5->SetBinContent(22,22); hFitErrTauL2__13__5->SetBinContent(23,19); hFitErrTauL2__13__5->SetBinContent(24,8); hFitErrTauL2__13__5->SetBinContent(25,10); hFitErrTauL2__13__5->SetBinContent(26,7); hFitErrTauL2__13__5->SetBinContent(27,6); hFitErrTauL2__13__5->SetBinContent(28,4); hFitErrTauL2__13__5->SetBinContent(29,3); hFitErrTauL2__13__5->SetBinContent(30,3); hFitErrTauL2__13__5->SetBinContent(31,4); hFitErrTauL2__13__5->SetBinContent(32,1); hFitErrTauL2__13__5->SetBinContent(33,2); hFitErrTauL2__13__5->SetBinContent(34,2); hFitErrTauL2__13__5->SetBinContent(35,1); hFitErrTauL2__13__5->SetBinContent(40,1); hFitErrTauL2__13__5->SetEntries(969); hFitErrTauL2__13__5->SetStats(0); TF1 *gaus5 = new TF1("gaus","gaus",0.03332161,0.07322426); gaus5->SetFillColor(19); gaus5->SetFillStyle(0); gaus5->SetLineColor(2); gaus5->SetLineWidth(2); gaus5->SetChisquare(35.18343); gaus5->SetNDF(33); gaus5->GetXaxis()->SetLabelFont(42); gaus5->GetXaxis()->SetLabelSize(0.035); gaus5->GetXaxis()->SetTitleSize(0.035); gaus5->GetXaxis()->SetTitleFont(42); gaus5->GetYaxis()->SetLabelFont(42); gaus5->GetYaxis()->SetLabelSize(0.035); gaus5->GetYaxis()->SetTitleSize(0.035); gaus5->GetYaxis()->SetTitleFont(42); gaus5->SetParameter(0,61.35917); gaus5->SetParError(0,2.59323); gaus5->SetParLimits(0,0,0); gaus5->SetParameter(1,0.0453134); gaus5->SetParError(1,0.0002230925); gaus5->SetParLimits(1,0,0); gaus5->SetParameter(2,0.006370057); gaus5->SetParError(2,0.0001915713); gaus5->SetParLimits(2,0,0.0639349); hFitErrTauL2__13__5->GetListOfFunctions()->Add(gaus5); ci = TColor::GetColor("#000099"); hFitErrTauL2__13__5->SetLineColor(ci); hFitErrTauL2__13__5->GetXaxis()->SetTitle("mus"); hFitErrTauL2__13__5->GetXaxis()->CenterTitle(true); hFitErrTauL2__13__5->GetXaxis()->SetNdivisions(507); hFitErrTauL2__13__5->GetXaxis()->SetLabelFont(42); hFitErrTauL2__13__5->GetXaxis()->SetLabelOffset(-0.005); hFitErrTauL2__13__5->GetXaxis()->SetLabelSize(0.07); hFitErrTauL2__13__5->GetXaxis()->SetTitleSize(0.07); hFitErrTauL2__13__5->GetXaxis()->SetTitleOffset(0.7); hFitErrTauL2__13__5->GetXaxis()->SetTitleFont(42); hFitErrTauL2__13__5->GetYaxis()->SetNdivisions(506); hFitErrTauL2__13__5->GetYaxis()->SetLabelFont(42); hFitErrTauL2__13__5->GetYaxis()->SetLabelSize(0.07); hFitErrTauL2__13__5->GetYaxis()->SetTitleSize(0.035); hFitErrTauL2__13__5->GetYaxis()->SetTitleFont(42); hFitErrTauL2__13__5->GetZaxis()->SetLabelFont(42); hFitErrTauL2__13__5->GetZaxis()->SetLabelSize(0.035); hFitErrTauL2__13__5->GetZaxis()->SetTitleSize(0.035); hFitErrTauL2__13__5->GetZaxis()->SetTitleFont(42); hFitErrTauL2__13__5->Draw(""); pt = new TPaveText(0.3811229,0.94,0.6188771,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("#tau_{+} - errori"); pt->Draw(); METODO2_5->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_6 TPad *METODO2_6 = new TPad("METODO2_6", "METODO2_6",0.26,0.01,0.49,0.49); METODO2_6->Draw(); METODO2_6->cd(); METODO2_6->Range(0.04390291,-10.5,0.08244582,94.5); METODO2_6->SetFillColor(0); METODO2_6->SetBorderMode(0); METODO2_6->SetBorderSize(2); METODO2_6->SetFrameBorderMode(0); METODO2_6->SetFrameBorderMode(0); TH1D *hFitErrTauShortL2__14__6 = new TH1D("hFitErrTauShortL2__14__6","#tau_{-} - errori",40,0.0477572,0.07859153); hFitErrTauShortL2__14__6->SetBinContent(1,1); hFitErrTauShortL2__14__6->SetBinContent(3,2); hFitErrTauShortL2__14__6->SetBinContent(4,2); hFitErrTauShortL2__14__6->SetBinContent(5,7); hFitErrTauShortL2__14__6->SetBinContent(6,12); hFitErrTauShortL2__14__6->SetBinContent(7,16); hFitErrTauShortL2__14__6->SetBinContent(8,12); hFitErrTauShortL2__14__6->SetBinContent(9,27); hFitErrTauShortL2__14__6->SetBinContent(10,35); hFitErrTauShortL2__14__6->SetBinContent(11,46); hFitErrTauShortL2__14__6->SetBinContent(12,52); hFitErrTauShortL2__14__6->SetBinContent(13,56); hFitErrTauShortL2__14__6->SetBinContent(14,61); hFitErrTauShortL2__14__6->SetBinContent(15,80); hFitErrTauShortL2__14__6->SetBinContent(16,59); hFitErrTauShortL2__14__6->SetBinContent(17,66); hFitErrTauShortL2__14__6->SetBinContent(18,57); hFitErrTauShortL2__14__6->SetBinContent(19,63); hFitErrTauShortL2__14__6->SetBinContent(20,61); hFitErrTauShortL2__14__6->SetBinContent(21,55); hFitErrTauShortL2__14__6->SetBinContent(22,48); hFitErrTauShortL2__14__6->SetBinContent(23,30); hFitErrTauShortL2__14__6->SetBinContent(24,28); hFitErrTauShortL2__14__6->SetBinContent(25,16); hFitErrTauShortL2__14__6->SetBinContent(26,16); hFitErrTauShortL2__14__6->SetBinContent(27,19); hFitErrTauShortL2__14__6->SetBinContent(28,8); hFitErrTauShortL2__14__6->SetBinContent(29,5); hFitErrTauShortL2__14__6->SetBinContent(30,6); hFitErrTauShortL2__14__6->SetBinContent(31,4); hFitErrTauShortL2__14__6->SetBinContent(32,4); hFitErrTauShortL2__14__6->SetBinContent(33,5); hFitErrTauShortL2__14__6->SetBinContent(34,4); hFitErrTauShortL2__14__6->SetBinContent(35,2); hFitErrTauShortL2__14__6->SetBinContent(36,1); hFitErrTauShortL2__14__6->SetBinContent(37,1); hFitErrTauShortL2__14__6->SetBinContent(39,2); hFitErrTauShortL2__14__6->SetEntries(969); hFitErrTauShortL2__14__6->SetStats(0); TF1 *gaus6 = new TF1("gaus","gaus",0.04814263,0.0782061); gaus6->SetFillColor(19); gaus6->SetFillStyle(0); gaus6->SetLineColor(2); gaus6->SetLineWidth(2); gaus6->SetChisquare(38.01385); gaus6->SetNDF(34); gaus6->GetXaxis()->SetLabelFont(42); gaus6->GetXaxis()->SetLabelSize(0.035); gaus6->GetXaxis()->SetTitleSize(0.035); gaus6->GetXaxis()->SetTitleFont(42); gaus6->GetYaxis()->SetLabelFont(42); gaus6->GetYaxis()->SetLabelSize(0.035); gaus6->GetYaxis()->SetTitleSize(0.035); gaus6->GetYaxis()->SetTitleFont(42); gaus6->SetParameter(0,68.18906); gaus6->SetParError(0,2.855854); gaus6->SetParLimits(0,0,0); gaus6->SetParameter(1,0.06034312); gaus6->SetParError(1,0.000142911); gaus6->SetParLimits(1,0,0); gaus6->SetParameter(2,0.004212504); gaus6->SetParError(2,0.0001124842); gaus6->SetParLimits(2,0,0.04501277); hFitErrTauShortL2__14__6->GetListOfFunctions()->Add(gaus6); ci = TColor::GetColor("#000099"); hFitErrTauShortL2__14__6->SetLineColor(ci); hFitErrTauShortL2__14__6->GetXaxis()->SetTitle("mus"); hFitErrTauShortL2__14__6->GetXaxis()->CenterTitle(true); hFitErrTauShortL2__14__6->GetXaxis()->SetNdivisions(506); hFitErrTauShortL2__14__6->GetXaxis()->SetLabelFont(42); hFitErrTauShortL2__14__6->GetXaxis()->SetLabelOffset(-0.005); hFitErrTauShortL2__14__6->GetXaxis()->SetLabelSize(0.07); hFitErrTauShortL2__14__6->GetXaxis()->SetTitleSize(0.07); hFitErrTauShortL2__14__6->GetXaxis()->SetTitleOffset(0.7); hFitErrTauShortL2__14__6->GetXaxis()->SetTitleFont(42); hFitErrTauShortL2__14__6->GetYaxis()->SetNdivisions(507); hFitErrTauShortL2__14__6->GetYaxis()->SetLabelFont(42); hFitErrTauShortL2__14__6->GetYaxis()->SetLabelSize(0.07); hFitErrTauShortL2__14__6->GetYaxis()->SetTitleSize(0.035); hFitErrTauShortL2__14__6->GetYaxis()->SetTitleFont(42); hFitErrTauShortL2__14__6->GetZaxis()->SetLabelFont(42); hFitErrTauShortL2__14__6->GetZaxis()->SetLabelSize(0.035); hFitErrTauShortL2__14__6->GetZaxis()->SetTitleSize(0.035); hFitErrTauShortL2__14__6->GetZaxis()->SetTitleFont(42); hFitErrTauShortL2__14__6->Draw(""); pt = new TPaveText(0.3865667,0.94,0.6134333,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("#tau_{-} - errori"); pt->Draw(); METODO2_6->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_7 TPad *METODO2_7 = new TPad("METODO2_7", "METODO2_7",0.51,0.01,0.74,0.49); METODO2_7->Draw(); METODO2_7->cd(); METODO2_7->Range(0.02895023,-10.2375,0.03645069,92.1375); METODO2_7->SetFillColor(0); METODO2_7->SetBorderMode(0); METODO2_7->SetBorderSize(2); METODO2_7->SetFrameBorderMode(0); METODO2_7->SetFrameBorderMode(0); TH1D *hFitErrBL2__15__7 = new TH1D("hFitErrBL2__15__7","B - errori",40,0.02970028,0.03570064); hFitErrBL2__15__7->SetBinContent(1,6); hFitErrBL2__15__7->SetBinContent(2,5); hFitErrBL2__15__7->SetBinContent(3,10); hFitErrBL2__15__7->SetBinContent(4,15); hFitErrBL2__15__7->SetBinContent(5,22); hFitErrBL2__15__7->SetBinContent(6,36); hFitErrBL2__15__7->SetBinContent(7,43); hFitErrBL2__15__7->SetBinContent(8,50); hFitErrBL2__15__7->SetBinContent(9,65); hFitErrBL2__15__7->SetBinContent(10,60); hFitErrBL2__15__7->SetBinContent(11,78); hFitErrBL2__15__7->SetBinContent(12,68); hFitErrBL2__15__7->SetBinContent(13,61); hFitErrBL2__15__7->SetBinContent(14,52); hFitErrBL2__15__7->SetBinContent(15,73); hFitErrBL2__15__7->SetBinContent(16,50); hFitErrBL2__15__7->SetBinContent(17,56); hFitErrBL2__15__7->SetBinContent(18,48); hFitErrBL2__15__7->SetBinContent(19,31); hFitErrBL2__15__7->SetBinContent(20,29); hFitErrBL2__15__7->SetBinContent(21,22); hFitErrBL2__15__7->SetBinContent(22,24); hFitErrBL2__15__7->SetBinContent(23,18); hFitErrBL2__15__7->SetBinContent(24,13); hFitErrBL2__15__7->SetBinContent(25,13); hFitErrBL2__15__7->SetBinContent(26,3); hFitErrBL2__15__7->SetBinContent(27,6); hFitErrBL2__15__7->SetBinContent(28,1); hFitErrBL2__15__7->SetBinContent(29,4); hFitErrBL2__15__7->SetBinContent(30,2); hFitErrBL2__15__7->SetBinContent(32,1); hFitErrBL2__15__7->SetBinContent(35,1); hFitErrBL2__15__7->SetBinContent(38,3); hFitErrBL2__15__7->SetEntries(969); hFitErrBL2__15__7->SetStats(0); TF1 *gaus7 = new TF1("gaus","gaus",0.02977528,0.03562564); gaus7->SetFillColor(19); gaus7->SetFillStyle(0); gaus7->SetLineColor(2); gaus7->SetLineWidth(2); gaus7->SetChisquare(39.93834); gaus7->SetNDF(30); gaus7->GetXaxis()->SetLabelFont(42); gaus7->GetXaxis()->SetLabelSize(0.035); gaus7->GetXaxis()->SetTitleSize(0.035); gaus7->GetXaxis()->SetTitleFont(42); gaus7->GetYaxis()->SetLabelFont(42); gaus7->GetYaxis()->SetLabelSize(0.035); gaus7->GetYaxis()->SetTitleSize(0.035); gaus7->GetYaxis()->SetTitleFont(42); gaus7->SetParameter(0,67.73498); gaus7->SetParError(0,2.8055); gaus7->SetParLimits(0,0,0); gaus7->SetParameter(1,0.03159294); gaus7->SetParError(1,2.852494e-05); gaus7->SetParLimits(1,0,0); gaus7->SetParameter(2,0.0008306818); gaus7->SetParError(2,2.25768e-05); gaus7->SetParLimits(2,0,0.008572887); hFitErrBL2__15__7->GetListOfFunctions()->Add(gaus7); ci = TColor::GetColor("#000099"); hFitErrBL2__15__7->SetLineColor(ci); hFitErrBL2__15__7->GetXaxis()->SetTitle("conteggi"); hFitErrBL2__15__7->GetXaxis()->CenterTitle(true); hFitErrBL2__15__7->GetXaxis()->SetNdivisions(506); hFitErrBL2__15__7->GetXaxis()->SetLabelFont(42); hFitErrBL2__15__7->GetXaxis()->SetLabelOffset(-0.005); hFitErrBL2__15__7->GetXaxis()->SetLabelSize(0.07); hFitErrBL2__15__7->GetXaxis()->SetTitleSize(0.07); hFitErrBL2__15__7->GetXaxis()->SetTitleOffset(0.7); hFitErrBL2__15__7->GetXaxis()->SetTitleFont(42); hFitErrBL2__15__7->GetYaxis()->SetNdivisions(507); hFitErrBL2__15__7->GetYaxis()->SetLabelFont(42); hFitErrBL2__15__7->GetYaxis()->SetLabelSize(0.07); hFitErrBL2__15__7->GetYaxis()->SetTitleSize(0.035); hFitErrBL2__15__7->GetYaxis()->SetTitleFont(42); hFitErrBL2__15__7->GetZaxis()->SetLabelFont(42); hFitErrBL2__15__7->GetZaxis()->SetLabelSize(0.035); hFitErrBL2__15__7->GetZaxis()->SetTitleSize(0.035); hFitErrBL2__15__7->GetZaxis()->SetTitleFont(42); hFitErrBL2__15__7->Draw(""); pt = new TPaveText(0.3829375,0.94,0.6170625,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("B - errori"); pt->Draw(); METODO2_7->Modified(); METODO2->cd(); // ------------>Primitives in pad: METODO2_8 TPad *METODO2_8 = new TPad("METODO2_8", "METODO2_8",0.76,0.01,0.99,0.49); METODO2_8->Draw(); METODO2_8->cd(); METODO2_8->Range(0.07309322,-10.89375,0.1870743,98.04375); METODO2_8->SetFillColor(0); METODO2_8->SetBorderMode(0); METODO2_8->SetBorderSize(2); METODO2_8->SetFrameBorderMode(0); METODO2_8->SetFrameBorderMode(0); TH1D *hFitErrRL2__16__8 = new TH1D("hFitErrRL2__16__8","R - errori",40,0.08449133,0.1756762); hFitErrRL2__16__8->SetBinContent(1,4); hFitErrRL2__16__8->SetBinContent(2,3); hFitErrRL2__16__8->SetBinContent(3,9); hFitErrRL2__16__8->SetBinContent(4,14); hFitErrRL2__16__8->SetBinContent(5,22); hFitErrRL2__16__8->SetBinContent(6,38); hFitErrRL2__16__8->SetBinContent(7,43); hFitErrRL2__16__8->SetBinContent(8,55); hFitErrRL2__16__8->SetBinContent(9,83); hFitErrRL2__16__8->SetBinContent(10,65); hFitErrRL2__16__8->SetBinContent(11,75); hFitErrRL2__16__8->SetBinContent(12,66); hFitErrRL2__16__8->SetBinContent(13,76); hFitErrRL2__16__8->SetBinContent(14,56); hFitErrRL2__16__8->SetBinContent(15,73); hFitErrRL2__16__8->SetBinContent(16,47); hFitErrRL2__16__8->SetBinContent(17,49); hFitErrRL2__16__8->SetBinContent(18,41); hFitErrRL2__16__8->SetBinContent(19,30); hFitErrRL2__16__8->SetBinContent(20,28); hFitErrRL2__16__8->SetBinContent(21,17); hFitErrRL2__16__8->SetBinContent(22,24); hFitErrRL2__16__8->SetBinContent(23,13); hFitErrRL2__16__8->SetBinContent(24,8); hFitErrRL2__16__8->SetBinContent(25,7); hFitErrRL2__16__8->SetBinContent(26,7); hFitErrRL2__16__8->SetBinContent(27,4); hFitErrRL2__16__8->SetBinContent(28,5); hFitErrRL2__16__8->SetBinContent(30,1); hFitErrRL2__16__8->SetBinContent(31,3); hFitErrRL2__16__8->SetBinContent(32,1); hFitErrRL2__16__8->SetBinContent(33,1); hFitErrRL2__16__8->SetBinContent(40,1); hFitErrRL2__16__8->SetEntries(969); hFitErrRL2__16__8->SetStats(0); TF1 *gaus8 = new TF1("gaus","gaus",0.08563114,0.1745364); gaus8->SetFillColor(19); gaus8->SetFillStyle(0); gaus8->SetLineColor(2); gaus8->SetLineWidth(2); gaus8->SetChisquare(52.49831); gaus8->SetNDF(30); gaus8->GetXaxis()->SetLabelFont(42); gaus8->GetXaxis()->SetLabelSize(0.035); gaus8->GetXaxis()->SetTitleSize(0.035); gaus8->GetXaxis()->SetTitleFont(42); gaus8->GetYaxis()->SetLabelFont(42); gaus8->GetYaxis()->SetLabelSize(0.035); gaus8->GetYaxis()->SetTitleSize(0.035); gaus8->GetYaxis()->SetTitleFont(42); gaus8->SetParameter(0,71.73788); gaus8->SetParError(0,3.119069); gaus8->SetParLimits(0,0,0); gaus8->SetParameter(1,0.112697); gaus8->SetParError(1,0.0004287075); gaus8->SetParLimits(1,0,0); gaus8->SetParameter(2,0.01171897); gaus8->SetParError(2,0.0003484249); gaus8->SetParLimits(2,0,0.1238761); hFitErrRL2__16__8->GetListOfFunctions()->Add(gaus8); ci = TColor::GetColor("#000099"); hFitErrRL2__16__8->SetLineColor(ci); hFitErrRL2__16__8->GetXaxis()->SetNdivisions(508); hFitErrRL2__16__8->GetXaxis()->SetLabelFont(42); hFitErrRL2__16__8->GetXaxis()->SetLabelOffset(-0.005); hFitErrRL2__16__8->GetXaxis()->SetLabelSize(0.07); hFitErrRL2__16__8->GetXaxis()->SetTitleSize(0.035); hFitErrRL2__16__8->GetXaxis()->SetTitleFont(42); hFitErrRL2__16__8->GetYaxis()->SetNdivisions(508); hFitErrRL2__16__8->GetYaxis()->SetLabelFont(42); hFitErrRL2__16__8->GetYaxis()->SetLabelSize(0.07); hFitErrRL2__16__8->GetYaxis()->SetTitleSize(0.035); hFitErrRL2__16__8->GetYaxis()->SetTitleFont(42); hFitErrRL2__16__8->GetZaxis()->SetLabelFont(42); hFitErrRL2__16__8->GetZaxis()->SetLabelSize(0.035); hFitErrRL2__16__8->GetZaxis()->SetTitleSize(0.035); hFitErrRL2__16__8->GetZaxis()->SetTitleFont(42); hFitErrRL2__16__8->Draw(""); pt = new TPaveText(0.3829375,0.94,0.6170625,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); pt->SetTextSize(0.1009779); AText = pt->AddText("R - errori"); pt->Draw(); METODO2_8->Modified(); METODO2->cd(); METODO2->Modified(); METODO2->cd(); METODO2->SetSelected(METODO2); }
void zj_dphi_8TeV_log() { //=========Macro generated from canvas: default_Canvas/defaultCanvas //========= (Thu Apr 28 10:19:34 2016) by ROOT version6.04/10 TCanvas *default_Canvas = new TCanvas("default_Canvas", "defaultCanvas",0,0,800,800); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); default_Canvas->SetHighLightColor(2); default_Canvas->Range(0,0,1,1); default_Canvas->SetFillColor(0); default_Canvas->SetBorderMode(0); default_Canvas->SetBorderSize(2); default_Canvas->SetTickx(1); default_Canvas->SetTicky(1); default_Canvas->SetLeftMargin(0.14); default_Canvas->SetRightMargin(0.05); default_Canvas->SetTopMargin(0.05); default_Canvas->SetBottomMargin(0.16); default_Canvas->SetFrameLineWidth(2); default_Canvas->SetFrameBorderMode(0); // ------------>Primitives in pad: bottomPad TPad *bottomPad = new TPad("bottomPad", "bottomPad",0.005,0.05,0.995,0.995); bottomPad->Draw(); bottomPad->cd(); bottomPad->Range(0,0,1,1); bottomPad->SetFillColor(0); bottomPad->SetFillStyle(4000); bottomPad->SetBorderMode(0); bottomPad->SetBorderSize(2); bottomPad->SetTickx(1); bottomPad->SetTicky(1); bottomPad->SetLeftMargin(0.14); bottomPad->SetRightMargin(0.05); bottomPad->SetTopMargin(0.05); bottomPad->SetBottomMargin(0.16); bottomPad->SetFrameLineWidth(2); bottomPad->SetFrameBorderMode(0); bottomPad->Modified(); default_Canvas->cd(); // ------------>Primitives in pad: upperPad TPad *upperPad = new TPad("upperPad", "upperPad",0.005,0.05,0.995,0.995); upperPad->Draw(); upperPad->cd(); upperPad->Range(-0.5429913,-2.062865,3.335518,1.327192); upperPad->SetFillColor(0); upperPad->SetFillStyle(4000); upperPad->SetBorderMode(0); upperPad->SetBorderSize(2); upperPad->SetLogy(); upperPad->SetTickx(1); upperPad->SetTicky(1); upperPad->SetLeftMargin(0.14); upperPad->SetRightMargin(0.05); upperPad->SetTopMargin(0.05); upperPad->SetBottomMargin(0.33); upperPad->SetFrameLineWidth(2); upperPad->SetFrameBorderMode(0); upperPad->SetFrameLineWidth(2); upperPad->SetFrameBorderMode(0); TH1F *z_dphi_toterr__37 = new TH1F("z_dphi_toterr__37","z_dphi",6,0,3.141593); z_dphi_toterr__37->SetBinContent(1,0.261202); z_dphi_toterr__37->SetBinContent(2,0.3162337); z_dphi_toterr__37->SetBinContent(3,0.3852335); z_dphi_toterr__37->SetBinContent(4,0.7150939); z_dphi_toterr__37->SetBinContent(5,1.796506); z_dphi_toterr__37->SetBinContent(6,7.258657); z_dphi_toterr__37->SetBinContent(7,3.800624); z_dphi_toterr__37->SetBinError(1,0.03375302); z_dphi_toterr__37->SetBinError(2,0.03634611); z_dphi_toterr__37->SetBinError(3,0.0427511); z_dphi_toterr__37->SetBinError(4,0.05747346); z_dphi_toterr__37->SetBinError(5,0.1278198); z_dphi_toterr__37->SetBinError(6,0.3295685); z_dphi_toterr__37->SetBinError(7,0.1725617); z_dphi_toterr__37->SetEntries(14); z_dphi_toterr__37->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ffff00"); z_dphi_toterr__37->SetFillColor(ci); ci = TColor::GetColor("#ffff00"); z_dphi_toterr__37->SetLineColor(ci); z_dphi_toterr__37->SetLineWidth(2); ci = TColor::GetColor("#ffff00"); z_dphi_toterr__37->SetMarkerColor(ci); z_dphi_toterr__37->SetMarkerStyle(0); z_dphi_toterr__37->GetXaxis()->SetNdivisions(4); z_dphi_toterr__37->GetXaxis()->SetLabelFont(132); z_dphi_toterr__37->GetXaxis()->SetLabelOffset(999); z_dphi_toterr__37->GetXaxis()->SetLabelSize(0); z_dphi_toterr__37->GetXaxis()->SetTitleSize(0.06); z_dphi_toterr__37->GetXaxis()->SetTitleFont(132); z_dphi_toterr__37->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); z_dphi_toterr__37->GetYaxis()->SetLabelFont(132); z_dphi_toterr__37->GetYaxis()->SetLabelSize(0.05); z_dphi_toterr__37->GetYaxis()->SetTitleSize(0.06); z_dphi_toterr__37->GetYaxis()->SetTitleOffset(1.3); z_dphi_toterr__37->GetYaxis()->SetTitleFont(132); z_dphi_toterr__37->GetZaxis()->SetLabelFont(132); z_dphi_toterr__37->GetZaxis()->SetLabelSize(0.05); z_dphi_toterr__37->GetZaxis()->SetTitleSize(0.06); z_dphi_toterr__37->GetZaxis()->SetTitleFont(132); z_dphi_toterr__37->Draw("e2"); TH1F *z_dphi_staterr__38 = new TH1F("z_dphi_staterr__38","z_dphi",6,0,3.141593); z_dphi_staterr__38->SetBinContent(1,0.261202); z_dphi_staterr__38->SetBinContent(2,0.3162337); z_dphi_staterr__38->SetBinContent(3,0.3852335); z_dphi_staterr__38->SetBinContent(4,0.7150939); z_dphi_staterr__38->SetBinContent(5,1.796506); z_dphi_staterr__38->SetBinContent(6,7.258657); z_dphi_staterr__38->SetBinContent(7,3.800624); z_dphi_staterr__38->SetBinError(1,0.01764622); z_dphi_staterr__38->SetBinError(2,0.01951211); z_dphi_staterr__38->SetBinError(3,0.02108379); z_dphi_staterr__38->SetBinError(4,0.03021233); z_dphi_staterr__38->SetBinError(5,0.04899558); z_dphi_staterr__38->SetBinError(6,0.1002775); z_dphi_staterr__38->SetBinError(7,0.05250516); z_dphi_staterr__38->SetEntries(14); z_dphi_staterr__38->SetStats(0); ci = TColor::GetColor("#ff9933"); z_dphi_staterr__38->SetFillColor(ci); ci = TColor::GetColor("#ff9933"); z_dphi_staterr__38->SetLineColor(ci); z_dphi_staterr__38->SetLineWidth(2); ci = TColor::GetColor("#ff9933"); z_dphi_staterr__38->SetMarkerColor(ci); z_dphi_staterr__38->SetMarkerStyle(0); z_dphi_staterr__38->GetXaxis()->SetNdivisions(4); z_dphi_staterr__38->GetXaxis()->SetLabelFont(132); z_dphi_staterr__38->GetXaxis()->SetLabelOffset(999); z_dphi_staterr__38->GetXaxis()->SetLabelSize(0); z_dphi_staterr__38->GetXaxis()->SetTitleSize(0.06); z_dphi_staterr__38->GetXaxis()->SetTitleFont(132); z_dphi_staterr__38->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); z_dphi_staterr__38->GetYaxis()->SetLabelFont(132); z_dphi_staterr__38->GetYaxis()->SetLabelSize(0.05); z_dphi_staterr__38->GetYaxis()->SetTitleSize(0.06); z_dphi_staterr__38->GetYaxis()->SetTitleFont(132); z_dphi_staterr__38->GetZaxis()->SetLabelFont(132); z_dphi_staterr__38->GetZaxis()->SetLabelSize(0.05); z_dphi_staterr__38->GetZaxis()->SetTitleSize(0.06); z_dphi_staterr__38->GetZaxis()->SetTitleFont(132); z_dphi_staterr__38->Draw("e2same"); Double_t dphi_toterrs_fx3043[6] = { 0.3403392, 0.863938, 1.387537, 1.911136, 2.434734, 2.958333}; Double_t dphi_toterrs_fy3043[6] = { 0.1926519, 0.2207154, 0.3546338, 0.6864677, 2.01515, 7.779723}; Double_t dphi_toterrs_felx3043[6] = { 0, 0, 0, 0, 0, 0}; Double_t dphi_toterrs_fely3043[6] = { 0.03415733, 0.03577312, 0.05682396, 0.09598937, 0.1897309, 0.5023379}; Double_t dphi_toterrs_fehx3043[6] = { 0, 0, 0, 0, 0, 0}; Double_t dphi_toterrs_fehy3043[6] = { 0.04673612, 0.05211068, 0.07287587, 0.1207667, 0.143423, 0.3949306}; TGraphAsymmErrors *grae = new TGraphAsymmErrors(6,dphi_toterrs_fx3043,dphi_toterrs_fy3043,dphi_toterrs_felx3043,dphi_toterrs_fehx3043,dphi_toterrs_fely3043,dphi_toterrs_fehy3043); grae->SetName("dphi_toterrs"); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); TH1F *Graph_dphi_toterrs3043 = new TH1F("Graph_dphi_toterrs3043","",100,0.07853982,3.220132); Graph_dphi_toterrs3043->SetMinimum(0.1426451); Graph_dphi_toterrs3043->SetMaximum(8.976269); Graph_dphi_toterrs3043->SetDirectory(0); Graph_dphi_toterrs3043->SetStats(0); Graph_dphi_toterrs3043->SetLineWidth(2); Graph_dphi_toterrs3043->SetMarkerStyle(0); Graph_dphi_toterrs3043->GetXaxis()->SetNdivisions(4); Graph_dphi_toterrs3043->GetXaxis()->SetLabelFont(132); Graph_dphi_toterrs3043->GetXaxis()->SetLabelOffset(999); Graph_dphi_toterrs3043->GetXaxis()->SetLabelSize(0); Graph_dphi_toterrs3043->GetXaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3043->GetXaxis()->SetTitleFont(132); Graph_dphi_toterrs3043->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); Graph_dphi_toterrs3043->GetYaxis()->SetLabelFont(132); Graph_dphi_toterrs3043->GetYaxis()->SetLabelSize(0.05); Graph_dphi_toterrs3043->GetYaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3043->GetYaxis()->SetTitleFont(132); Graph_dphi_toterrs3043->GetZaxis()->SetLabelFont(132); Graph_dphi_toterrs3043->GetZaxis()->SetLabelSize(0.05); Graph_dphi_toterrs3043->GetZaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3043->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_dphi_toterrs3043); grae->Draw("p1p"); Double_t _fx3044[6] = { 0.3403392, 0.863938, 1.387537, 1.911136, 2.434734, 2.958333}; Double_t _fy3044[6] = { 0.1926519, 0.2207154, 0.3546338, 0.6864677, 2.01515, 7.779723}; Double_t _felx3044[6] = { 0, 0, 0, 0, 0, 0}; Double_t _fely3044[6] = { 0.02873042, 0.03223617, 0.04948444, 0.07740101, 0.1117696, 0.3251484}; Double_t _fehx3044[6] = { 0, 0, 0, 0, 0, 0}; Double_t _fehy3044[6] = { 0.03948655, 0.04420709, 0.06698785, 0.1028379, 0.1104173, 0.2636435}; grae = new TGraphAsymmErrors(6,_fx3044,_fy3044,_felx3044,_fehx3044,_fely3044,_fehy3044); grae->SetName(""); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); TH1F *Graph_Graph3044 = new TH1F("Graph_Graph3044","",100,0.07853982,3.220132); Graph_Graph3044->SetMinimum(0.1475293); Graph_Graph3044->SetMaximum(8.831311); Graph_Graph3044->SetDirectory(0); Graph_Graph3044->SetStats(0); Graph_Graph3044->SetLineWidth(2); Graph_Graph3044->SetMarkerStyle(0); Graph_Graph3044->GetXaxis()->SetNdivisions(4); Graph_Graph3044->GetXaxis()->SetLabelFont(132); Graph_Graph3044->GetXaxis()->SetLabelOffset(999); Graph_Graph3044->GetXaxis()->SetLabelSize(0); Graph_Graph3044->GetXaxis()->SetTitleSize(0.06); Graph_Graph3044->GetXaxis()->SetTitleFont(132); Graph_Graph3044->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); Graph_Graph3044->GetYaxis()->SetLabelFont(132); Graph_Graph3044->GetYaxis()->SetLabelSize(0.05); Graph_Graph3044->GetYaxis()->SetTitleSize(0.06); Graph_Graph3044->GetYaxis()->SetTitleFont(132); Graph_Graph3044->GetZaxis()->SetLabelFont(132); Graph_Graph3044->GetZaxis()->SetLabelSize(0.05); Graph_Graph3044->GetZaxis()->SetTitleSize(0.06); Graph_Graph3044->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_Graph3044); grae->Draw("p1p"); Double_t dphi_toterrs_fx3045[6] = { 0.1832596, 0.7068583, 1.230457, 1.754056, 2.277655, 2.801253}; Double_t dphi_toterrs_fy3045[6] = { 0.3071206, 0.3788296, 0.5235754, 0.9026085, 2.09773, 8.042891}; Double_t dphi_toterrs_felx3045[6] = { 0, 0, 0, 0, 0, 0}; Double_t dphi_toterrs_fely3045[6] = { 0.03223837, 0.05049376, 0.0513308, 0.07859791, 0.1671821, 0.6048482}; Double_t dphi_toterrs_fehx3045[6] = { 0, 0, 0, 0, 0, 0}; Double_t dphi_toterrs_fehy3045[6] = { 0.05069997, 0.04670219, 0.05741781, 0.0972528, 0.2140117, 0.6377428}; grae = new TGraphAsymmErrors(6,dphi_toterrs_fx3045,dphi_toterrs_fy3045,dphi_toterrs_felx3045,dphi_toterrs_fehx3045,dphi_toterrs_fely3045,dphi_toterrs_fehy3045); grae->SetName("dphi_toterrs"); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(20); TH1F *Graph_dphi_toterrs3045 = new TH1F("Graph_dphi_toterrs3045","",100,0,3.063053); Graph_dphi_toterrs3045->SetMinimum(0.247394); Graph_dphi_toterrs3045->SetMaximum(9.521209); Graph_dphi_toterrs3045->SetDirectory(0); Graph_dphi_toterrs3045->SetStats(0); Graph_dphi_toterrs3045->SetLineWidth(2); Graph_dphi_toterrs3045->SetMarkerStyle(0); Graph_dphi_toterrs3045->GetXaxis()->SetNdivisions(4); Graph_dphi_toterrs3045->GetXaxis()->SetLabelFont(132); Graph_dphi_toterrs3045->GetXaxis()->SetLabelOffset(999); Graph_dphi_toterrs3045->GetXaxis()->SetLabelSize(0); Graph_dphi_toterrs3045->GetXaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3045->GetXaxis()->SetTitleFont(132); Graph_dphi_toterrs3045->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); Graph_dphi_toterrs3045->GetYaxis()->SetLabelFont(132); Graph_dphi_toterrs3045->GetYaxis()->SetLabelSize(0.05); Graph_dphi_toterrs3045->GetYaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3045->GetYaxis()->SetTitleFont(132); Graph_dphi_toterrs3045->GetZaxis()->SetLabelFont(132); Graph_dphi_toterrs3045->GetZaxis()->SetLabelSize(0.05); Graph_dphi_toterrs3045->GetZaxis()->SetTitleSize(0.06); Graph_dphi_toterrs3045->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_dphi_toterrs3045); grae->Draw("p1p"); Double_t _fx3046[6] = { 0.1832596, 0.7068583, 1.230457, 1.754056, 2.277655, 2.801253}; Double_t _fy3046[6] = { 0.3071206, 0.3788296, 0.5235754, 0.9026085, 2.09773, 8.042891}; Double_t _felx3046[6] = { 0, 0, 0, 0, 0, 0}; Double_t _fely3046[6] = { 0.02710968, 0.03295216, 0.04124188, 0.06402796, 0.1338949, 0.4694553}; Double_t _fehx3046[6] = { 0, 0, 0, 0, 0, 0}; Double_t _fehy3046[6] = { 0.03469016, 0.04020747, 0.048986, 0.07362466, 0.1488417, 0.5027875}; grae = new TGraphAsymmErrors(6,_fx3046,_fy3046,_felx3046,_fehx3046,_fely3046,_fehy3046); grae->SetName(""); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(20); TH1F *Graph_Graph3046 = new TH1F("Graph_Graph3046","",100,0,3.063053); Graph_Graph3046->SetMinimum(0.2520099); Graph_Graph3046->SetMaximum(9.372245); Graph_Graph3046->SetDirectory(0); Graph_Graph3046->SetStats(0); Graph_Graph3046->SetLineWidth(2); Graph_Graph3046->SetMarkerStyle(0); Graph_Graph3046->GetXaxis()->SetNdivisions(4); Graph_Graph3046->GetXaxis()->SetLabelFont(132); Graph_Graph3046->GetXaxis()->SetLabelOffset(999); Graph_Graph3046->GetXaxis()->SetLabelSize(0); Graph_Graph3046->GetXaxis()->SetTitleSize(0.06); Graph_Graph3046->GetXaxis()->SetTitleFont(132); Graph_Graph3046->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); Graph_Graph3046->GetYaxis()->SetLabelFont(132); Graph_Graph3046->GetYaxis()->SetLabelSize(0.05); Graph_Graph3046->GetYaxis()->SetTitleSize(0.06); Graph_Graph3046->GetYaxis()->SetTitleFont(132); Graph_Graph3046->GetZaxis()->SetLabelFont(132); Graph_Graph3046->GetZaxis()->SetLabelSize(0.05); Graph_Graph3046->GetZaxis()->SetTitleSize(0.06); Graph_Graph3046->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_Graph3046); grae->Draw("p1p"); TLegend *leg = new TLegend(0.2,0.57,0.5,0.82,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(132); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); leg->SetFillColor(10); leg->SetFillStyle(0); TLegendEntry *entry=leg->AddEntry("data_stat","Data_{stat}","f"); ci = TColor::GetColor("#ff9933"); entry->SetFillColor(ci); entry->SetFillStyle(1001); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("data_tot","Data_{tot}","f"); ci = TColor::GetColor("#ffff00"); entry->SetFillColor(ci); entry->SetFillStyle(1001); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("powheg_temp","POWHEG","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("amcatnlo_temp","aMC@NLO","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(24); entry->SetMarkerSize(1); entry->SetTextFont(132); leg->Draw(); TPaveText *pt = new TPaveText(0.2,0.8,0.55,0.95,"brNDC"); pt->SetBorderSize(0); pt->SetFillStyle(0); pt->SetLineWidth(2); pt->SetTextFont(132); TText *AText = pt->AddText("LHCb, #sqrt{s} = 8 TeV"); pt->Draw(); TH1F *z_dphi_toterr_copy__39 = new TH1F("z_dphi_toterr_copy__39","z_dphi",6,0,3.141593); z_dphi_toterr_copy__39->SetBinContent(1,0.261202); z_dphi_toterr_copy__39->SetBinContent(2,0.3162337); z_dphi_toterr_copy__39->SetBinContent(3,0.3852335); z_dphi_toterr_copy__39->SetBinContent(4,0.7150939); z_dphi_toterr_copy__39->SetBinContent(5,1.796506); z_dphi_toterr_copy__39->SetBinContent(6,7.258657); z_dphi_toterr_copy__39->SetBinContent(7,3.800624); z_dphi_toterr_copy__39->SetBinError(1,0.03375302); z_dphi_toterr_copy__39->SetBinError(2,0.03634611); z_dphi_toterr_copy__39->SetBinError(3,0.0427511); z_dphi_toterr_copy__39->SetBinError(4,0.05747346); z_dphi_toterr_copy__39->SetBinError(5,0.1278198); z_dphi_toterr_copy__39->SetBinError(6,0.3295685); z_dphi_toterr_copy__39->SetBinError(7,0.1725617); z_dphi_toterr_copy__39->SetEntries(14); z_dphi_toterr_copy__39->SetDirectory(0); z_dphi_toterr_copy__39->SetStats(0); ci = TColor::GetColor("#ffff00"); z_dphi_toterr_copy__39->SetFillColor(ci); ci = TColor::GetColor("#ffff00"); z_dphi_toterr_copy__39->SetLineColor(ci); z_dphi_toterr_copy__39->SetLineWidth(2); ci = TColor::GetColor("#ffff00"); z_dphi_toterr_copy__39->SetMarkerColor(ci); z_dphi_toterr_copy__39->SetMarkerStyle(0); z_dphi_toterr_copy__39->GetXaxis()->SetNdivisions(4); z_dphi_toterr_copy__39->GetXaxis()->SetLabelFont(132); z_dphi_toterr_copy__39->GetXaxis()->SetLabelOffset(999); z_dphi_toterr_copy__39->GetXaxis()->SetLabelSize(0); z_dphi_toterr_copy__39->GetXaxis()->SetTitleSize(0.06); z_dphi_toterr_copy__39->GetXaxis()->SetTitleFont(132); z_dphi_toterr_copy__39->GetYaxis()->SetTitle("d#sigma(#it{Zj})/d|#Delta#it{#phi} [pb/rad]"); z_dphi_toterr_copy__39->GetYaxis()->SetLabelFont(132); z_dphi_toterr_copy__39->GetYaxis()->SetLabelSize(0.05); z_dphi_toterr_copy__39->GetYaxis()->SetTitleSize(0.06); z_dphi_toterr_copy__39->GetYaxis()->SetTitleOffset(1.3); z_dphi_toterr_copy__39->GetYaxis()->SetTitleFont(132); z_dphi_toterr_copy__39->GetZaxis()->SetLabelFont(132); z_dphi_toterr_copy__39->GetZaxis()->SetLabelSize(0.05); z_dphi_toterr_copy__39->GetZaxis()->SetTitleSize(0.06); z_dphi_toterr_copy__39->GetZaxis()->SetTitleFont(132); z_dphi_toterr_copy__39->Draw("sameaxis"); upperPad->Modified(); default_Canvas->cd(); // ------------>Primitives in pad: lowerPad TPad *lowerPad = new TPad("lowerPad", "lowerPad",0.005,0.05,0.995,0.995); lowerPad->Draw(); lowerPad->cd(); lowerPad->Range(-0.5429913,-0.4371795,3.335518,5.614103); lowerPad->SetFillColor(0); lowerPad->SetFillStyle(4000); lowerPad->SetBorderMode(0); lowerPad->SetBorderSize(2); lowerPad->SetTickx(1); lowerPad->SetTicky(1); lowerPad->SetLeftMargin(0.14); lowerPad->SetRightMargin(0.05); lowerPad->SetTopMargin(0.665); lowerPad->SetBottomMargin(0.14); lowerPad->SetFrameLineWidth(2); lowerPad->SetFrameBorderMode(0); lowerPad->SetFrameLineWidth(2); lowerPad->SetFrameBorderMode(0); TH1F *zj_dphi_8TeV_log_400_1001_0ratiocomp0__40 = new TH1F("zj_dphi_8TeV_log_400_1001_0ratiocomp0__40","z_dphi",6,0,3.141593); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(1,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(2,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(3,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(4,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(5,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(6,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinContent(7,3.800624); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(1,0.1292219); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(2,0.1149343); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(3,0.1109745); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(4,0.08037191); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(5,0.07114914); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(6,0.04540351); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetBinError(7,0.1725617); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetMinimum(0.41); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetMaximum(1.59); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetEntries(20); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetStats(0); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetFillColor(ci); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetLineColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetLineWidth(2); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetMarkerColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->SetMarkerStyle(0); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetNdivisions(4); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetLabelOffset(0.02); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetXaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetTitle("Ratio"); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->CenterTitle(true); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetNdivisions(505); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetTickLength(0.12325); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetTitleOffset(1.3); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetYaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetZaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetZaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetZaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->GetZaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0__40->Draw("e2"); TH1F *zj_dphi_8TeV_log_400_1001_0ratiocomp1__41 = new TH1F("zj_dphi_8TeV_log_400_1001_0ratiocomp1__41","z_dphi",6,0,3.141593); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(1,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(2,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(3,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(4,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(5,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(6,1); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinContent(7,3.800624); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(1,0.06755777); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(2,0.06170157); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(3,0.0547299); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(4,0.04224946); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(5,0.02727271); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(6,0.01381488); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetBinError(7,0.05250516); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetMinimum(0.41); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetMaximum(1.59); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetEntries(20); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetStats(0); ci = TColor::GetColor("#ff9933"); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetFillColor(ci); ci = TColor::GetColor("#ff9933"); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetLineColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetLineWidth(2); ci = TColor::GetColor("#ff9933"); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetMarkerColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->SetMarkerStyle(0); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetNdivisions(4); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetLabelOffset(0.02); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetXaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetTitle("Ratio"); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->CenterTitle(true); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetNdivisions(505); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetTickLength(0.12325); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetYaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetZaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetZaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetZaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->GetZaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp1__41->Draw("e2same"); Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_fx3047[6] = { 0.3403392, 0.863938, 1.387537, 1.911136, 2.434734, 2.958333}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_fy3047[6] = { 0.7375589, 0.6979502, 0.9205685, 0.9599686, 1.121705, 1.071786}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_felx3047[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_fely3047[6] = { 0.1307698, 0.1131224, 0.1475052, 0.1342332, 0.1056111, 0.06920535}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_fehx3047[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp2_fehy3047[6] = { 0.1789271, 0.1647854, 0.1891732, 0.1688822, 0.07983441, 0.05440822}; grae = new TGraphAsymmErrors(6,zj_dphi_8TeV_log_400_1001_0ratiocomp2_fx3047,zj_dphi_8TeV_log_400_1001_0ratiocomp2_fy3047,zj_dphi_8TeV_log_400_1001_0ratiocomp2_felx3047,zj_dphi_8TeV_log_400_1001_0ratiocomp2_fehx3047,zj_dphi_8TeV_log_400_1001_0ratiocomp2_fely3047,zj_dphi_8TeV_log_400_1001_0ratiocomp2_fehy3047); grae->SetName("zj_dphi_8TeV_log_400_1001_0ratiocomp2"); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); TH1F *Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047 = new TH1F("Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047","",100,0.07853982,3.220132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetMinimum(0.41); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetMaximum(1.59); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetDirectory(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetStats(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetLineWidth(2); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->SetMarkerStyle(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetNdivisions(4); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetLabelOffset(0.02); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetXaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetTitle("Ratio"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->CenterTitle(true); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetNdivisions(505); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetYaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetZaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetZaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetZaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp23047); grae->Draw("p1"); Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_fx3048[6] = { 0.3403392, 0.863938, 1.387537, 1.911136, 2.434734, 2.958333}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_fy3048[6] = { 0.7375589, 0.6979502, 0.9205685, 0.9599686, 1.121705, 1.071786}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_felx3048[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_fely3048[6] = { 0.1099931, 0.1019378, 0.1284531, 0.1082389, 0.06221498, 0.04479457}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_fehx3048[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp3_fehy3048[6] = { 0.1511724, 0.1397925, 0.1738889, 0.1438103, 0.06146226, 0.03632125}; grae = new TGraphAsymmErrors(6,zj_dphi_8TeV_log_400_1001_0ratiocomp3_fx3048,zj_dphi_8TeV_log_400_1001_0ratiocomp3_fy3048,zj_dphi_8TeV_log_400_1001_0ratiocomp3_felx3048,zj_dphi_8TeV_log_400_1001_0ratiocomp3_fehx3048,zj_dphi_8TeV_log_400_1001_0ratiocomp3_fely3048,zj_dphi_8TeV_log_400_1001_0ratiocomp3_fehy3048); grae->SetName("zj_dphi_8TeV_log_400_1001_0ratiocomp3"); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); TH1F *Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048 = new TH1F("Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048","",100,0.07853982,3.220132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetMinimum(0.41); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetMaximum(1.59); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetDirectory(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetStats(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetLineWidth(2); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->SetMarkerStyle(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetNdivisions(4); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetLabelOffset(0.02); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetXaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetTitle("Ratio"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->CenterTitle(true); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetNdivisions(505); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetYaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetZaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetZaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetZaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp33048); grae->Draw("p1"); Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_fx3049[6] = { 0.1832596, 0.7068583, 1.230457, 1.754056, 2.277655, 2.801253}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_fy3049[6] = { 1.175797, 1.197942, 1.359112, 1.262224, 1.167673, 1.108041}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_felx3049[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_fely3049[6] = { 0.1234231, 0.1596723, 0.1332459, 0.1099127, 0.09305962, 0.08332785}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_fehx3049[6] = { 0, 0, 0, 0, 0, 0}; Double_t zj_dphi_8TeV_log_400_1001_0ratiocomp4_fehy3049[6] = { 0.1941025, 0.1476825, 0.1490468, 0.136, 0.1191266, 0.08785962}; grae = new TGraphAsymmErrors(6,zj_dphi_8TeV_log_400_1001_0ratiocomp4_fx3049,zj_dphi_8TeV_log_400_1001_0ratiocomp4_fy3049,zj_dphi_8TeV_log_400_1001_0ratiocomp4_felx3049,zj_dphi_8TeV_log_400_1001_0ratiocomp4_fehx3049,zj_dphi_8TeV_log_400_1001_0ratiocomp4_fely3049,zj_dphi_8TeV_log_400_1001_0ratiocomp4_fehy3049); grae->SetName("zj_dphi_8TeV_log_400_1001_0ratiocomp4"); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(20); TH1F *Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049 = new TH1F("Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049","",100,0,3.063053); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetMinimum(0.41); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetMaximum(1.59); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetDirectory(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetStats(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetLineWidth(2); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->SetMarkerStyle(0); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetNdivisions(4); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetLabelOffset(0.02); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetXaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetTitle("Ratio"); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->CenterTitle(true); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetNdivisions(505); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetYaxis()->SetTitleFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetZaxis()->SetLabelFont(132); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetZaxis()->SetLabelSize(0.05); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetZaxis()->SetTitleSize(0.06); Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_zj_dphi_8TeV_log_400_1001_0ratiocomp43049); grae->Draw("p1"); TH1F *zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42 = new TH1F("zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42","z_dphi",6,0,3.141593); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(1,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(2,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(3,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(4,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(5,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(6,1); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinContent(7,3.800624); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(1,0.1292219); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(2,0.1149343); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(3,0.1109745); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(4,0.08037191); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(5,0.07114914); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(6,0.04540351); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetBinError(7,0.1725617); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetMinimum(0.41); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetMaximum(1.59); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetEntries(20); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetDirectory(0); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetStats(0); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetFillColor(ci); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetLineColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetLineWidth(2); ci = TColor::GetColor("#ffff00"); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetMarkerColor(ci); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->SetMarkerStyle(0); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetTitle("|#Delta#it{#phi}| [rad]"); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetNdivisions(4); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetLabelOffset(0.02); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetXaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetTitle("Ratio"); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->CenterTitle(true); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetNdivisions(505); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetTickLength(0.12325); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetTitleOffset(1.3); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetYaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetZaxis()->SetLabelFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetZaxis()->SetLabelSize(0.05); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetZaxis()->SetTitleSize(0.06); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->GetZaxis()->SetTitleFont(132); zj_dphi_8TeV_log_400_1001_0ratiocomp0_copy__42->Draw("sameaxis"); lowerPad->Modified(); default_Canvas->cd(); default_Canvas->Modified(); default_Canvas->cd(); default_Canvas->SetSelected(default_Canvas); }
void proj_npe_7() { //=========Macro generated from canvas: c/ //========= (Wed Jul 15 10:08:15 2015) by ROOT version6.04/00 TCanvas *c = new TCanvas("c", "",0,45,600,500); c->SetHighLightColor(2); c->Range(-2716.773,-19.2575,4381.788,173.3175); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); Double_t _fx8[40] = { -1533.68, -1080.366, -985.4475, -967.7257, -676.2766, -543.2768, 0.5077484, 1.609375, 4, 230.4228, 298.6529, 327.7793, 383.4035, 536.5637, 668.7969, 863.9145, 907.8805, 964.7188, 971.6563, 1075.914, 1097.936, 1215.826, 1275.258, 1308.524, 1328.116, 1732.736, 2102.711, 2197.457, 2255.99, 2286.444, 2371.061, 2594.067, 2630.891, 2704.654, 2727.792, 2773.388, 2784.73, 2845.592, 2924.958, 3198.695}; Double_t _fy8[40] = { 2.75, 2.65, 2.65, 2.7, 2.35, 2.45, 140.25, 2.65, 2.15, 2.55, 2.35, 2.45, 2.3, 2.5, 2.65, 4.05, 2.55, 2.5, 2.35, 2.25, 2.6, 2.7, 2.7, 2.6, 2.4, 2.35, 2.8, 2.55, 2.35, 2.8, 2.4, 2.35, 2.6, 2.6, 2.45, 2.45, 2.65, 2.55, 2.55, 2.65}; TGraph *graph = new TGraph(40,_fx8,_fy8); graph->SetName(""); graph->SetTitle("npe values of flashes in event: 7"); graph->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#0000ff"); graph->SetMarkerColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph8 = new TH1F("Graph_Graph8","npe values of flashes in event: 7",100,-2006.917,3671.932); Graph_Graph8->SetMinimum(0); Graph_Graph8->SetMaximum(154.06); Graph_Graph8->SetDirectory(0); Graph_Graph8->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph8->SetLineColor(ci); Graph_Graph8->GetXaxis()->SetTitle("flash_t"); Graph_Graph8->GetXaxis()->SetLabelFont(42); Graph_Graph8->GetXaxis()->SetLabelSize(0.035); Graph_Graph8->GetXaxis()->SetTitleSize(0.035); Graph_Graph8->GetXaxis()->SetTitleFont(42); Graph_Graph8->GetYaxis()->SetTitle("flash_npe"); Graph_Graph8->GetYaxis()->SetLabelFont(42); Graph_Graph8->GetYaxis()->SetLabelSize(0.035); Graph_Graph8->GetYaxis()->SetTitleSize(0.035); Graph_Graph8->GetYaxis()->SetTitleFont(42); Graph_Graph8->GetZaxis()->SetLabelFont(42); Graph_Graph8->GetZaxis()->SetLabelSize(0.035); Graph_Graph8->GetZaxis()->SetTitleSize(0.035); Graph_Graph8->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph8); graph->Draw("ap"); TPaveText *pt = new TPaveText(0.1823077,0.9368947,0.8176923,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *AText = pt->AddText("npe values of flashes in event: 7"); pt->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }