Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:38

0001 #if !defined(__CINT__) || defined(__MAKECINT__)
0002 #include <iostream>
0003 #include "TFile.h"
0004 #include "TDirectory.h"
0005 #include "TH1F.h"
0006 #include "TGraphAsymmErrors.h"
0007 #include "TCanvas.h"
0008 #endif
0009 
0010 void electronConversionRejection() {
0011 
0012   TFile *fin = new TFile("ElectronConversionRejectionValidation.root");
0013   TDirectory *dir = (TDirectory*)fin->Get("DQMData");
0014   
0015   TCanvas *cpteff = new TCanvas;
0016   TH1F *hptnum = (TH1F*)dir->Get("elePtPass");
0017   TH1F *hptden = (TH1F*)dir->Get("elePtAll");
0018   TGraphAsymmErrors *hpteff = new TGraphAsymmErrors(hptnum,hptden);
0019   hpteff->SetTitle("Conversion Veto Efficiency");
0020   hpteff->GetYaxis()->SetTitle("Efficiency");
0021   hpteff->GetXaxis()->SetTitle("Gsf Electron p_{T} (GeV)");
0022   hpteff->SetMinimum(0.0);
0023   hpteff->SetMaximum(1.0);
0024   hpteff->Draw("APE");
0025   cpteff->SaveAs("cpteff.eps");
0026   
0027   TCanvas *cetaeff = new TCanvas;
0028   TH1F *hetanum = (TH1F*)dir->Get("eleEtaPass");
0029   TH1F *hetaden = (TH1F*)dir->Get("eleEtaAll");
0030   TGraphAsymmErrors *hetaeff = new TGraphAsymmErrors(hetanum,hetaden);
0031   hetaeff->SetTitle("Conversion Veto Efficiency");
0032   hetaeff->GetYaxis()->SetTitle("Efficiency");
0033   hetaeff->GetXaxis()->SetTitle("Gsf Electron #eta");
0034   hetaeff->SetMinimum(0.0);
0035   hetaeff->SetMaximum(1.0);
0036   hetaeff->Draw("APE");
0037   cetaeff->SaveAs("etaeff.eps");
0038   
0039   TCanvas *cphieff = new TCanvas;
0040   TH1F *hphinum = (TH1F*)dir->Get("elePhiPass");
0041   TH1F *hphiden = (TH1F*)dir->Get("elePhiAll");
0042   TGraphAsymmErrors *hphieff = new TGraphAsymmErrors(hphinum,hphiden);
0043   hphieff->SetTitle("Conversion Veto Efficiency");
0044   hphieff->GetYaxis()->SetTitle("Efficiency");
0045   hphieff->GetXaxis()->SetTitle("Gsf Electron #phi");
0046   hphieff->SetMinimum(0.0);
0047   hphieff->SetMaximum(1.0);
0048   hphieff->Draw("APE");  
0049   cphieff->SaveAs("cphieff.eps");
0050   
0051 }