Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:06

0001 void plotL1RelVal(bool printCanvas = false, bool printIndividual = false, bool normHists = true)
0002 {
0003   gROOT->SetStyle("Plain");
0004   gStyle->SetOptStat(0);
0005   gStyle->SetErrorX(0);
0006   gStyle->SetOptTitle(kFALSE);
0007   gStyle->SetCanvasBorderMode(0);
0008   gStyle->SetFrameBorderMode(0);
0009   gStyle->SetPadRightMargin(0.12);
0010   gStyle->SetCanvasDefH(820);
0011   gStyle->SetCanvasDefW(760);
0012   gStyle->SetLabelOffset(0.001,"Y");
0013 
0014   TString dir = "";
0015   TString l1branch = "l1tau/histos/";
0016 
0017   TString ver1 = "CMSSW_1_6_9";
0018   //TString ver2 = "CMSSW_1_8_0_pre9";
0019   TString ver2 = "CMSSW_2_0_0_pre2";
0020 
0021   
0022   TFile *f1 = new TFile("/uscms/home/chinhan/lpctau/CMSSW_1_6_9/src/UserCode/L1TauAnalyzer/test/relValZTT.root"); 
0023   TFile *f2 = new TFile("relValZTT.root"); 
0024   //TFile *f1 = new TFile("/uscms/home/chinhan/lpctau/CMSSW_1_8_0_pre9/src/UserCode/L1TauAnalyzer/test/relValZTT.root"); 
0025   //TFile *f1 = new TFile("relValZTT.root"); 
0026   //TFile *f2 = new TFile("relValZTT.root");
0027   //TFile *f1 = new TFile("test.root"); 
0028   //TFile *f2 = new TFile("test.root"); 
0029   
0030   TCanvas* ca1 = new TCanvas();
0031   ca1->Divide(3,3); 
0032 
0033   ca1->cd(1);
0034   //__________________________________________________________________________________________________
0035   TString lstr = "L1TauEt";
0036   TString l1str = l1branch+lstr;
0037   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0038   //hl1->SetAxisRange(0.,120.,"X");
0039   hl1->GetXaxis()->SetTitle("Incl. L1 #tau E_{T} (GeV)");
0040   hl1->GetYaxis()->SetTitle("Entries");
0041   hl1->SetLineColor(kBlue);
0042   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0043   hl2->SetMarkerColor(kBlack);
0044   hl2->SetMarkerSize(1.);
0045   hl2->SetLineWidth(1);
0046   hl2->SetLineColor(kBlack);
0047   hl2->SetMarkerStyle(kFullDotLarge);
0048 
0049   if (normHists) {
0050     double integ1 = (double)hl1->Integral();
0051     hl1->Scale(1./integ1);
0052     double integ2 = (double)hl2->Integral();
0053     hl2->Scale(1./integ2);
0054   }
0055   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0056   
0057   hl1->Draw("hist");
0058   hl2->Draw("e same");
0059 
0060   gPad->Update();
0061   //gPad->SetLogy();
0062   if (printIndividual) {
0063     TString plotFileName = dir+l1str;
0064     gPad->SaveAs(plotFileName+".gif");
0065   }
0066   //return;
0067 
0068   ca1->cd(2);
0069   //__________________________________________________________________________________________________
0070   TString lstr = "L1TauEta";
0071   TString l1str = l1branch+lstr;
0072   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0073   //hl1->SetAxisRange(0.,120.,"X");
0074   hl1->GetXaxis()->SetTitle("Incl. L1 #tau #eta");
0075   hl1->GetYaxis()->SetTitle("Entries");
0076   hl1->SetLineColor(kBlue);
0077   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0078   hl2->SetMarkerColor(kBlack);
0079   hl2->SetMarkerSize(1.);
0080   hl2->SetLineWidth(1);
0081   hl2->SetLineColor(kBlack);
0082   hl2->SetMarkerStyle(kFullDotLarge);
0083 
0084   if (normHists) {
0085     double integ1 = (double)hl1->Integral();
0086     hl1->Scale(1./integ1);
0087     double integ2 = (double)hl2->Integral();
0088     hl2->Scale(1./integ2);
0089   }
0090   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0091 
0092   hl1->Draw("hist");
0093   hl2->Draw("e same");
0094 
0095   gPad->Update();
0096   //gPad->SetLogy();
0097   if (printIndividual) {
0098     TString plotFileName = dir+l1str;
0099     gPad->SaveAs(plotFileName+".gif");
0100   }
0101   //return;
0102 
0103   ca1->cd(3);
0104   //__________________________________________________________________________________________________
0105   TString lstr = "L1TauPhi";
0106   TString l1str = l1branch+lstr;
0107   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0108   //hl1->SetAxisRange(0.,120.,"X");
0109   hl1->GetXaxis()->SetTitle("Incl. L1 #tau #phi");
0110   hl1->GetYaxis()->SetTitle("Entries");
0111   hl1->SetLineColor(kBlue);
0112   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0113   hl2->SetMarkerColor(kBlack);
0114   hl2->SetMarkerSize(1.);
0115   hl2->SetLineWidth(1);
0116   hl2->SetLineColor(kBlack);
0117   hl2->SetMarkerStyle(kFullDotLarge);
0118 
0119   if (normHists) {
0120     double integ1 = (double)hl1->Integral();
0121     hl1->Scale(1./integ1);
0122     double integ2 = (double)hl2->Integral();
0123     hl2->Scale(1./integ2);
0124   }
0125   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0126 
0127   hl1->Draw("hist");
0128   hl2->Draw("e same");
0129 
0130   gPad->Update();
0131   //gPad->SetLogy();
0132   if (printIndividual) {
0133     TString plotFileName = dir+l1str;
0134     gPad->SaveAs(plotFileName+".gif");
0135   }
0136   //return;
0137 
0138 
0139   ca1->cd(4);
0140   //__________________________________________________________________________________________________
0141   TString lstr = "L1Tau1Et";
0142   TString l1str = l1branch+lstr;
0143   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0144   //hl1->SetAxisRange(0.,120.,"X");
0145   hl1->GetXaxis()->SetTitle("Leading L1 #tau E_{T} (GeV)");
0146   hl1->GetYaxis()->SetTitle("Entries");
0147   hl1->SetLineColor(kBlue);
0148   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0149   hl2->SetMarkerColor(kBlack);
0150   hl2->SetMarkerSize(1.);
0151   hl2->SetLineWidth(1);
0152   hl2->SetLineColor(kBlack);
0153   hl2->SetMarkerStyle(kFullDotLarge);
0154 
0155   if (normHists) {
0156     double integ1 = (double)hl1->Integral();
0157     hl1->Scale(1./integ1);
0158     double integ2 = (double)hl2->Integral();
0159     hl2->Scale(1./integ2);
0160   }
0161   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0162 
0163   hl1->Draw("hist");
0164   hl2->Draw("e same");
0165 
0166   gPad->Update();
0167   //gPad->SetLogy();
0168   if (printIndividual) {
0169     TString plotFileName = dir+l1str;
0170     gPad->SaveAs(plotFileName+".gif");
0171   }
0172   //return;
0173 
0174   ca1->cd(5);
0175   //__________________________________________________________________________________________________
0176   TString lstr = "L1Tau1Eta";
0177   TString l1str = l1branch+lstr;
0178   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0179   //hl1->SetAxisRange(0.,120.,"X");
0180   hl1->GetXaxis()->SetTitle("Leading L1 #tau #eta");
0181   hl1->GetYaxis()->SetTitle("Entries");
0182   hl1->SetLineColor(kBlue);
0183   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0184   hl2->SetMarkerColor(kBlack);
0185   hl2->SetMarkerSize(1.);
0186   hl2->SetLineWidth(1);
0187   hl2->SetLineColor(kBlack);
0188   hl2->SetMarkerStyle(kFullDotLarge);
0189 
0190   if (normHists) {
0191     double integ1 = (double)hl1->Integral();
0192     hl1->Scale(1./integ1);
0193     double integ2 = (double)hl2->Integral();
0194     hl2->Scale(1./integ2);
0195   }
0196   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0197 
0198   hl1->Draw("hist");
0199   hl2->Draw("e same");
0200 
0201   gPad->Update();
0202   //gPad->SetLogy();
0203   if (printIndividual) {
0204     TString plotFileName = dir+l1str;
0205     gPad->SaveAs(plotFileName+".gif");
0206   }
0207   //return;
0208 
0209   ca1->cd(6);
0210   //__________________________________________________________________________________________________
0211   TString lstr = "L1Tau1Phi";
0212   TString l1str = l1branch+lstr;
0213   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0214   //hl1->SetAxisRange(0.,120.,"X");
0215   hl1->GetXaxis()->SetTitle("Leading L1 #tau #phi");
0216   hl1->GetYaxis()->SetTitle("Entries");
0217   hl1->SetLineColor(kBlue);
0218   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0219   hl2->SetMarkerColor(kBlack);
0220   hl2->SetMarkerSize(1.);
0221   hl2->SetLineWidth(1);
0222   hl2->SetLineColor(kBlack);
0223   hl2->SetMarkerStyle(kFullDotLarge);
0224 
0225   if (normHists) {
0226     double integ1 = (double)hl1->Integral();
0227     hl1->Scale(1./integ1);
0228     double integ2 = (double)hl2->Integral();
0229     hl2->Scale(1./integ2);
0230   }
0231   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0232 
0233   hl1->Draw("hist");
0234   hl2->Draw("e same");
0235 
0236   gPad->Update();
0237   //gPad->SetLogy();
0238   if (printIndividual) {
0239     TString plotFileName = dir+l1str;
0240     gPad->SaveAs(plotFileName+".gif");
0241   }
0242   //return;
0243 
0244   ca1->cd(7);
0245   //__________________________________________________________________________________________________
0246   TString lstr = "L1Tau2Et";
0247   TString l1str = l1branch+lstr;
0248   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0249   //hl1->SetAxisRange(0.,120.,"X");
0250   hl1->GetXaxis()->SetTitle("2. L1 #tau E_{T} (GeV)");
0251   hl1->GetYaxis()->SetTitle("Entries");
0252   hl1->SetLineColor(kBlue);
0253   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0254   hl2->SetMarkerColor(kBlack);
0255   hl2->SetMarkerSize(1.);
0256   hl2->SetLineWidth(1);
0257   hl2->SetLineColor(kBlack);
0258   hl2->SetMarkerStyle(kFullDotLarge);
0259 
0260   if (normHists) {
0261     double integ1 = (double)hl1->Integral();
0262     hl1->Scale(1./integ1);
0263     double integ2 = (double)hl2->Integral();
0264     hl2->Scale(1./integ2);
0265   }
0266   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0267 
0268   hl1->Draw("hist");
0269   hl2->Draw("e same");
0270 
0271   gPad->Update();
0272   //gPad->SetLogy();
0273   if (printIndividual) {
0274     TString plotFileName = dir+l1str;
0275     gPad->SaveAs(plotFileName+".gif");
0276   }
0277   //return;
0278 
0279   ca1->cd(8);
0280   //__________________________________________________________________________________________________
0281   TString lstr = "L1Tau2Eta";
0282   TString l1str = l1branch+lstr;
0283   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0284   //hl1->SetAxisRange(0.,120.,"X");
0285   hl1->GetXaxis()->SetTitle("2. L1 #tau #eta");
0286   hl1->GetYaxis()->SetTitle("Entries");
0287   hl1->SetLineColor(kBlue);
0288   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0289   hl2->SetMarkerColor(kBlack);
0290   hl2->SetMarkerSize(1.);
0291   hl2->SetLineWidth(1);
0292   hl2->SetLineColor(kBlack);
0293   hl2->SetMarkerStyle(kFullDotLarge);
0294 
0295   if (normHists) {
0296     double integ1 = (double)hl1->Integral();
0297     hl1->Scale(1./integ1);
0298     double integ2 = (double)hl2->Integral();
0299     hl2->Scale(1./integ2);
0300   }
0301   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0302 
0303   hl1->Draw("hist");
0304   hl2->Draw("e same");
0305 
0306   gPad->Update();
0307   //gPad->SetLogy();
0308   if (printIndividual) {
0309     TString plotFileName = dir+l1str;
0310     gPad->SaveAs(plotFileName+".gif");
0311   }
0312   //return;
0313 
0314   ca1->cd(9);
0315   //__________________________________________________________________________________________________
0316   TString lstr = "L1Tau2Phi";
0317   TString l1str = l1branch+lstr;
0318   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0319   //hl1->SetAxisRange(0.,120.,"X");
0320   hl1->GetXaxis()->SetTitle("2. L1 #tau #phi");
0321   hl1->GetYaxis()->SetTitle("Entries");
0322   hl1->SetLineColor(kBlue);
0323   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0324   hl2->SetMarkerColor(kBlack);
0325   hl2->SetMarkerSize(1.);
0326   hl2->SetLineWidth(1);
0327   hl2->SetLineColor(kBlack);
0328   hl2->SetMarkerStyle(kFullDotLarge);
0329 
0330   if (normHists) {
0331     double integ1 = (double)hl1->Integral();
0332     hl1->Scale(1./integ1);
0333     double integ2 = (double)hl2->Integral();
0334     hl2->Scale(1./integ2);
0335   }
0336   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0337 
0338   hl1->Draw("hist");
0339   hl2->Draw("e same");
0340 
0341   gPad->Update();
0342   //gPad->SetLogy();
0343   if (printIndividual) {
0344     TString plotFileName = dir+l1str;
0345     gPad->SaveAs(plotFileName+".gif");
0346   }
0347   //return;
0348 
0349 
0350   ////////////////////////////////////////////////////////////////
0351   
0352   ca1->cd();
0353   if (printCanvas) {
0354     gPad->SaveAs("L1ValidationPlots_c1.gif");
0355   }
0356 
0357   ////////////////////////////////////////////////////////////////
0358 
0359 
0360   TCanvas* ca2 = new TCanvas();
0361   ca2->Divide(3,3); 
0362 
0363 
0364   ca2->cd(1);
0365   //__________________________________________________________________________________________________
0366   
0367   TLegend *legend = new TLegend(0.25, 0.4, 0.87, 0.75);
0368   legend->SetTextSize(0.045);
0369   legend->SetFillColor(0);
0370   legend->SetBorderSize(1);
0371   //legend->SetHeader("Inclusive L1 Tau Et");
0372   legend->AddEntry(hl1,ver1,"l");
0373   legend->AddEntry(hl2,ver2,"pl");
0374   legend->Draw();
0375   gPad->Update();
0376 
0377 
0378   ca2->cd(2);
0379   //__________________________________________________________________________________________________
0380   TString lstr = "L1minusMCTauEt";
0381   TString l1str = l1branch+lstr;
0382   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0383   //hl1->SetAxisRange(0.,120.,"X");
0384   hl1->GetXaxis()->SetTitle("L1 #tau E_{T} - MC Tau_{had}^{vis} E_{T} (GeV)");
0385   hl1->GetYaxis()->SetTitle("Entries");
0386   hl1->SetLineColor(kBlue);
0387   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0388   hl2->SetMarkerColor(kBlack);
0389   hl2->SetMarkerSize(1.);
0390   hl2->SetLineWidth(1);
0391   hl2->SetLineColor(kBlack);
0392   hl2->SetMarkerStyle(kFullDotLarge);
0393 
0394   if (normHists) {
0395     double integ1 = (double)hl1->Integral();
0396     hl1->Scale(1./integ1);
0397     double integ2 = (double)hl2->Integral();
0398     hl2->Scale(1./integ2);
0399   }
0400   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0401 
0402   hl1->Draw("hist");
0403   hl2->Draw("e same");
0404 
0405   gPad->Update();
0406   //gPad->SetLogy();
0407   if (printIndividual) {
0408     TString plotFileName = dir+l1str;
0409     gPad->SaveAs(plotFileName+".gif");
0410   }
0411   //return;
0412 
0413   ca2->cd(3);
0414   //__________________________________________________________________________________________________
0415   TString lstr = "L1minusMCoverMCTauEt";
0416   TString l1str = l1branch+lstr;
0417   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0418   //hl1->SetAxisRange(0.,120.,"X");
0419   hl1->GetXaxis()->SetTitle("(L1 #tau E_{T} - MC Tau_{had}^{vis} E_{T})/ MC Tau_{had}^{vis} E_{T}");
0420   hl1->GetYaxis()->SetTitle("Entries");
0421   hl1->SetLineColor(kBlue);
0422   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0423   hl2->SetMarkerColor(kBlack);
0424   hl2->SetMarkerSize(1.);
0425   hl2->SetLineWidth(1);
0426   hl2->SetLineColor(kBlack);
0427   hl2->SetMarkerStyle(kFullDotLarge);
0428 
0429   if (normHists) {
0430     double integ1 = (double)hl1->Integral();
0431     hl1->Scale(1./integ1);
0432     double integ2 = (double)hl2->Integral();
0433     hl2->Scale(1./integ2);
0434   }
0435   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0436 
0437   hl1->Draw("hist");
0438   hl2->Draw("e same");
0439 
0440   gPad->Update();
0441   //gPad->SetLogy();
0442   if (printIndividual) {
0443     TString plotFileName = dir+l1str;
0444     gPad->SaveAs(plotFileName+".gif");
0445   }
0446   //return;
0447 
0448 
0449   ca2->cd(4);
0450   //__________________________________________________________________________________________________
0451   TString lstr = "EffMCTauEt";
0452   TString l1str = l1branch+lstr;
0453   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0454   //hl1->SetAxisRange(0.,120.,"X");
0455   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} E_{T} GeV");
0456   hl1->GetYaxis()->SetTitle("MCMatch Efficiency");
0457   hl1->SetLineColor(kBlue);
0458   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0459   hl2->SetMarkerColor(kBlack);
0460   hl2->SetMarkerSize(1.);
0461   hl2->SetLineWidth(1);
0462   hl2->SetLineColor(kBlack);
0463   hl2->SetMarkerStyle(kFullDotLarge);
0464 
0465   //hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0466   hl1->SetMaximum(1.01);
0467   hl1->SetMinimum(0.);
0468 
0469   hl1->Draw("hist");
0470   hl2->Draw("e same");
0471 
0472   gPad->Update();
0473   //gPad->SetLogy();
0474   if (printIndividual) {
0475     TString plotFileName = dir+l1str;
0476     gPad->SaveAs(plotFileName+".gif");
0477   }
0478   //return;
0479 
0480   ca2->cd(5);
0481   //__________________________________________________________________________________________________
0482   TString lstr = "EffMCTauEta";
0483   TString l1str = l1branch+lstr;
0484   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0485   //hl1->SetAxisRange(0.,120.,"X");
0486   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} #eta");
0487   hl1->GetYaxis()->SetTitle("MCMatch Efficiency");
0488   hl1->SetLineColor(kBlue);
0489   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0490   hl2->SetMarkerColor(kBlack);
0491   hl2->SetMarkerSize(1.);
0492   hl2->SetLineWidth(1);
0493   hl2->SetLineColor(kBlack);
0494   hl2->SetMarkerStyle(kFullDotLarge);
0495 
0496   //  hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0497   hl1->SetMaximum(1.01);
0498   hl1->SetMinimum(0.);
0499 
0500   hl1->Draw("hist");
0501   hl2->Draw("e same");
0502 
0503   gPad->Update();
0504   //gPad->SetLogy();
0505   if (printIndividual) {
0506     TString plotFileName = dir+l1str;
0507     gPad->SaveAs(plotFileName+".gif");
0508   }
0509   //return;
0510 
0511   ca2->cd(6);
0512   //__________________________________________________________________________________________________
0513   TString lstr = "EffMCTauPhi";
0514   TString l1str = l1branch+lstr;
0515   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0516   //hl1->SetAxisRange(0.,120.,"X");
0517   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} #phi");
0518   hl1->GetYaxis()->SetTitle("MCMatch Efficiency");
0519   hl1->SetLineColor(kBlue);
0520   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0521   hl2->SetMarkerColor(kBlack);
0522   hl2->SetMarkerSize(1.);
0523   hl2->SetLineWidth(1);
0524   hl2->SetLineColor(kBlack);
0525   hl2->SetMarkerStyle(kFullDotLarge);
0526 
0527   //hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0528   hl1->SetMaximum(1.01);
0529   hl1->SetMinimum(0.);
0530 
0531   hl1->Draw("hist");
0532   hl2->Draw("e same");
0533 
0534   gPad->Update();
0535   //gPad->SetLogy();
0536   if (printIndividual) {
0537     TString plotFileName = dir+l1str;
0538     gPad->SaveAs(plotFileName+".gif");
0539   }
0540   //return;
0541 
0542   ca2->cd(7);
0543   //__________________________________________________________________________________________________
0544   TString lstr = "EffMCPFTauEt";
0545   TString l1str = l1branch+lstr;
0546   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0547   //hl1->SetAxisRange(0.,120.,"X");
0548   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} E_{T} GeV");
0549   hl1->GetYaxis()->SetTitle("PFTau-MCMatch Efficiency");
0550   hl1->SetLineColor(kBlue);
0551   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0552   hl2->SetMarkerColor(kBlack);
0553   hl2->SetMarkerSize(1.);
0554   hl2->SetLineWidth(1);
0555   hl2->SetLineColor(kBlack);
0556   hl2->SetMarkerStyle(kFullDotLarge);
0557 
0558   //hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0559   hl1->SetMaximum(1.01);
0560   hl1->SetMinimum(0.);
0561 
0562   hl1->Draw("hist");
0563   hl2->Draw("e same");
0564 
0565   gPad->Update();
0566   //gPad->SetLogy();
0567   if (printIndividual) {
0568     TString plotFileName = dir+l1str;
0569     gPad->SaveAs(plotFileName+".gif");
0570   }
0571   //return;
0572 
0573   ca2->cd(8);
0574   //__________________________________________________________________________________________________
0575   TString lstr = "EffMCPFTauEta";
0576   TString l1str = l1branch+lstr;
0577   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0578   //hl1->SetAxisRange(0.,120.,"X");
0579   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} #eta");
0580   hl1->GetYaxis()->SetTitle("PFTau-MCMatch Efficiency");
0581   hl1->SetLineColor(kBlue);
0582   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0583   hl2->SetMarkerColor(kBlack);
0584   hl2->SetMarkerSize(1.);
0585   hl2->SetLineWidth(1);
0586   hl2->SetLineColor(kBlack);
0587   hl2->SetMarkerStyle(kFullDotLarge);
0588 
0589   //  hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0590   hl1->SetMaximum(1.01);
0591   hl1->SetMinimum(0.);
0592 
0593   hl1->Draw("hist");
0594   hl2->Draw("e same");
0595 
0596   gPad->Update();
0597   //gPad->SetLogy();
0598   if (printIndividual) {
0599     TString plotFileName = dir+l1str;
0600     gPad->SaveAs(plotFileName+".gif");
0601   }
0602   //return;
0603 
0604   ca2->cd(9);
0605   //__________________________________________________________________________________________________
0606   TString lstr = "EffMCPFTauPhi";
0607   TString l1str = l1branch+lstr;
0608   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0609   //hl1->SetAxisRange(0.,120.,"X");
0610   hl1->GetXaxis()->SetTitle("(MC Tau_{had}^{vis} #phi");
0611   hl1->GetYaxis()->SetTitle("PFTau-MCMatch Efficiency");
0612   hl1->SetLineColor(kBlue);
0613   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0614   hl2->SetMarkerColor(kBlack);
0615   hl2->SetMarkerSize(1.);
0616   hl2->SetLineWidth(1);
0617   hl2->SetLineColor(kBlack);
0618   hl2->SetMarkerStyle(kFullDotLarge);
0619 
0620   //hl1->SetMaximum(1.05*max(hl1->GetMaximum(),hl2->GetMaximum()));
0621   hl1->SetMaximum(1.01);
0622   hl1->SetMinimum(0.);
0623 
0624   hl1->Draw("hist");
0625   hl2->Draw("e same");
0626 
0627   gPad->Update();
0628   //gPad->SetLogy();
0629   if (printIndividual) {
0630     TString plotFileName = dir+l1str;
0631     gPad->SaveAs(plotFileName+".gif");
0632   }
0633   //return;
0634 
0635   
0636   ////////////////////////////////////////////////////////////////
0637   
0638   ca2->cd();
0639   if (printCanvas) {
0640     gPad->SaveAs("L1ValidationPlots_c2.gif");
0641   }
0642 
0643   ////////////////////////////////////////////////////////////////
0644 
0645 
0646   TCanvas* ca3 = new TCanvas();
0647   ca3->Divide(2,3); 
0648 
0649   ca3->cd(1);
0650   //__________________________________________________________________________________________________
0651   TString lstr = "L1SingleTauEffEt";
0652   TString l1str = l1branch+lstr;
0653   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0654   //hl1->SetAxisRange(0.,120.,"X");
0655   hl1->GetXaxis()->SetTitle("L1 Single #tau E_{T} threshold (GeV)");
0656   hl1->GetYaxis()->SetTitle("Integrated Global Efficiency");
0657   hl1->SetLineColor(kBlue);
0658 
0659   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0660   hl2->SetMarkerColor(kBlack);
0661   hl2->SetMarkerSize(1.);
0662   hl2->SetLineWidth(1);
0663   hl2->SetLineColor(kBlack);
0664   hl2->SetMarkerStyle(kFullDotLarge);
0665 
0666   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0667 
0668   hl1->Draw("hist");
0669   hl2->Draw("e same");
0670 
0671   gPad->Update();
0672   //gPad->SetLogy();
0673   if (printIndividual) {
0674     TString plotFileName = dir+l1str;
0675     gPad->SaveAs(plotFileName+".gif");
0676   }
0677   //return;
0678 
0679   ca3->cd(2);
0680   //__________________________________________________________________________________________________
0681   TString lstr = "L1DoubleTauEffEt";
0682   TString l1str = l1branch+lstr;
0683   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0684   //hl1->SetAxisRange(0.,120.,"X");
0685   hl1->GetXaxis()->SetTitle("L1 Double #tau E_{T} threshold (GeV)");
0686   hl1->GetYaxis()->SetTitle("Integrated Global Efficiency");
0687   hl1->SetLineColor(kBlue);
0688   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0689   hl2->SetMarkerColor(kBlack);
0690   hl2->SetMarkerSize(1.);
0691   hl2->SetLineWidth(1);
0692   hl2->SetLineColor(kBlack);
0693   hl2->SetMarkerStyle(kFullDotLarge);
0694 
0695   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0696 
0697   hl1->Draw("hist");
0698   hl2->Draw("e same");
0699 
0700   gPad->Update();
0701   //gPad->SetLogy();
0702   if (printIndividual) {
0703     TString plotFileName = dir+l1str;
0704     gPad->SaveAs(plotFileName+".gif");
0705   }
0706   //return;
0707 
0708 
0709 
0710 
0711   ca3->cd(3);
0712   //__________________________________________________________________________________________________
0713   TString lstr = "L1SingleTauEffMCMatchEt";
0714   TString l1str = l1branch+lstr;
0715   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0716   //hl1->SetAxisRange(0.,120.,"X");
0717   hl1->GetXaxis()->SetTitle("L1 Single #tau E_{T} threshold (GeV)");
0718   hl1->GetYaxis()->SetTitle("Integrated MCMatch Efficiency");
0719   hl1->SetLineColor(kBlue);
0720   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0721   hl2->SetMarkerColor(kBlack);
0722   hl2->SetMarkerSize(1.);
0723   hl2->SetLineWidth(1);
0724   hl2->SetLineColor(kBlack);
0725   hl2->SetMarkerStyle(kFullDotLarge);
0726 
0727   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0728 
0729   hl1->Draw("hist");
0730   hl2->Draw("e same");
0731 
0732   gPad->Update();
0733   //gPad->SetLogy();
0734   if (printIndividual) {
0735     TString plotFileName = dir+l1str;
0736     gPad->SaveAs(plotFileName+".gif");
0737   }
0738   //return;
0739 
0740   ca3->cd(4);
0741   //__________________________________________________________________________________________________
0742   TString lstr = "L1DoubleTauEffMCMatchEt";
0743   TString l1str = l1branch+lstr;
0744   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0745   //hl1->SetAxisRange(0.,120.,"X");
0746   hl1->GetXaxis()->SetTitle("L1 Double #tau E_{T} threshold (GeV)");
0747   hl1->GetYaxis()->SetTitle("Integrated MCMatch Efficiency");
0748   hl1->SetLineColor(kBlue);
0749   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0750   hl2->SetMarkerColor(kBlack);
0751   hl2->SetMarkerSize(1.);
0752   hl2->SetLineWidth(1);
0753   hl2->SetLineColor(kBlack);
0754   hl2->SetMarkerStyle(kFullDotLarge);
0755 
0756   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0757 
0758   hl1->Draw("hist");
0759   hl2->Draw("e same");
0760 
0761   gPad->Update();
0762   //gPad->SetLogy();
0763   if (printIndividual) {
0764     TString plotFileName = dir+l1str;
0765     gPad->SaveAs(plotFileName+".gif");
0766   }
0767   //return;
0768 
0769   ca3->cd(5);
0770   //__________________________________________________________________________________________________
0771   TString lstr = "L1SingleTauEffPFMCMatchEt";
0772   TString l1str = l1branch+lstr;
0773   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0774   //hl1->SetAxisRange(0.,120.,"X");
0775   hl1->GetXaxis()->SetTitle("L1 Single #tau E_{T} threshold (GeV)");
0776   hl1->GetYaxis()->SetTitle("Integrated PFTau-MCMatch Efficiency");
0777   hl1->SetLineColor(kBlue);
0778   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0779   hl2->SetMarkerColor(kBlack);
0780   hl2->SetMarkerSize(1.);
0781   hl2->SetLineWidth(1);
0782   hl2->SetLineColor(kBlack);
0783   hl2->SetMarkerStyle(kFullDotLarge);
0784 
0785   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0786 
0787   hl1->Draw("hist");
0788   hl2->Draw("e same");
0789 
0790   gPad->Update();
0791   //gPad->SetLogy();
0792   if (printIndividual) {
0793     TString plotFileName = dir+l1str;
0794     gPad->SaveAs(plotFileName+".gif");
0795   }
0796   //return;
0797 
0798   ca3->cd(6);
0799   //__________________________________________________________________________________________________
0800   TString lstr = "L1DoubleTauEffPFMCMatchEt";
0801   TString l1str = l1branch+lstr;
0802   TH1* hl1 = (TH1F *) (f1->Get(l1str));
0803   //hl1->SetAxisRange(0.,120.,"X");
0804   hl1->GetXaxis()->SetTitle("L1 Double #tau E_{T} threshold (GeV)");
0805   hl1->GetYaxis()->SetTitle("Integrated PFTau-MCMatch Efficiency");
0806   hl1->SetLineColor(kBlue);
0807   TH1* hl2 = (TH1F *) (f2->Get(l1str));
0808   hl2->SetMarkerColor(kBlack);
0809   hl2->SetMarkerSize(1.);
0810   hl2->SetLineWidth(1);
0811   hl2->SetLineColor(kBlack);
0812   hl2->SetMarkerStyle(kFullDotLarge);
0813 
0814   hl1->SetMaximum(1.1*max(hl1->GetMaximum(),hl2->GetMaximum()));
0815 
0816   hl1->Draw("hist");
0817   hl2->Draw("e same");
0818 
0819   gPad->Update();
0820   //gPad->SetLogy();
0821   if (printIndividual) {
0822     TString plotFileName = dir+l1str;
0823     gPad->SaveAs(plotFileName+".gif");
0824   }
0825   //return;
0826 
0827 
0828   ////////////////////////////////////////////////////////////////
0829   
0830   ca3->cd();
0831   if (printCanvas) {
0832     gPad->SaveAs("L1ValidationPlots_c3.gif");
0833   }
0834 
0835   ////////////////////////////////////////////////////////////////
0836 
0837 }