CMS 3D CMS Logo

EfficiencyHistograms Class Reference

Description: <one line="" class="" summary>="">. More...

#include <L1TriggerOffline/L1Analyzer/interface/EfficiencyHistograms.h>

List of all members.

Public Member Functions

 EfficiencyHistograms (const std::string name, const edm::ParameterSet &cfg)
void FillL1 (const reco::CandidateRef &l1)
void FillReference (const reco::CandidateRef &ref)
virtual ~EfficiencyHistograms ()

Private Member Functions

 EfficiencyHistograms ()

Private Attributes

std::string m_dirName
TH1F * m_EtaEff
double m_etaMax
double m_etaMin
int m_etaNBins
TH1F * m_EtEff
double m_etMax
double m_etMin
int m_etNBins
TH1F * m_L1EtaEff
TH1F * m_L1EtEff
TH1F * m_L1PhiEff
TH1F * m_PhiEff
double m_phiMax
double m_phiMin
int m_phiNBins
TH1F * m_RefEtaEff
TH1F * m_RefEtEff
TH1F * m_RefPhiEff


Detailed Description

Description: <one line="" class="" summary>="">.

Usage: <usage>

Definition at line 29 of file EfficiencyHistograms.h.


Constructor & Destructor Documentation

EfficiencyHistograms::EfficiencyHistograms ( const std::string  name,
const edm::ParameterSet cfg 
)

Definition at line 16 of file EfficiencyHistograms.cc.

References dir, m_dirName, m_EtaEff, m_etaMax, m_etaMin, m_etaNBins, m_EtEff, m_etMax, m_etMin, m_etNBins, m_L1EtaEff, m_L1EtEff, m_L1PhiEff, m_PhiEff, m_phiMax, m_phiMin, m_phiNBins, m_RefEtaEff, m_RefEtEff, m_RefPhiEff, and TFileDirectory::make().

00016                                                                                            : 
00017   m_dirName(name),
00018   m_etNBins(cfg.getUntrackedParameter<int>("etNBins")),
00019   m_etaNBins(cfg.getUntrackedParameter<int>("etaNBins")),
00020   m_phiNBins(cfg.getUntrackedParameter<int>("phiNBins")),
00021   m_etMin(cfg.getUntrackedParameter<double>("etMin")),
00022   m_etaMin(cfg.getUntrackedParameter<double>("etaMin")),
00023   m_phiMin(cfg.getUntrackedParameter<double>("phiMin")),
00024   m_etMax(cfg.getUntrackedParameter<double>("etMax")),
00025   m_etaMax(cfg.getUntrackedParameter<double>("etaMax")),
00026   m_phiMax(cfg.getUntrackedParameter<double>("phiMax"))
00027 {
00028   
00029   edm::Service<TFileService> fs;
00030 
00031   TFileDirectory dir = fs->mkdir(m_dirName);
00032 
00033   m_EtEff  = dir.make<TH1F>("EtEff", "E_{T} Efficiency",m_etNBins,m_etMin,m_etMax); 
00034   m_EtaEff = dir.make<TH1F>("EtaEff","#eta Efficiency", m_etaNBins,m_etaMin,m_etaMax);
00035   m_PhiEff = dir.make<TH1F>("PhiEff","#phi Efficiency", m_phiNBins,m_phiMin,m_phiMax);
00036 
00037   m_L1EtEff  = dir.make<TH1F>("L1EtEff", "E_{T}",m_etNBins,m_etMin,m_etMax);    m_L1EtEff->Sumw2();
00038   m_L1EtaEff = dir.make<TH1F>("L1EtaEff","#eta", m_etaNBins,m_etaMin,m_etaMax); m_L1EtaEff->Sumw2();
00039   m_L1PhiEff = dir.make<TH1F>("L1PhiEff","#phi", m_phiNBins,m_phiMin,m_phiMax); m_L1PhiEff->Sumw2();
00040 
00041   m_RefEtEff  = dir.make<TH1F>("RefEtEff", "E_{T}",m_etNBins,m_etMin,m_etMax);    m_RefEtEff->Sumw2();
00042   m_RefEtaEff = dir.make<TH1F>("RefEtaEff","#eta", m_etaNBins,m_etaMin,m_etaMax); m_RefEtaEff->Sumw2();
00043   m_RefPhiEff = dir.make<TH1F>("RefPhiEff","#phi", m_phiNBins,m_phiMin,m_phiMax); m_RefPhiEff->Sumw2();
00044 
00045 }

EfficiencyHistograms::~EfficiencyHistograms (  )  [virtual]

Definition at line 47 of file EfficiencyHistograms.cc.

References m_EtaEff, m_EtEff, m_L1EtaEff, m_L1EtEff, m_L1PhiEff, m_PhiEff, m_RefEtaEff, m_RefEtEff, and m_RefPhiEff.

00048 {
00049   // Divide histograms to get efficiencies 
00050   // When supported will use Bayes method.
00051 
00052   m_EtEff->Divide(m_L1EtEff,m_RefEtEff,1.,1.,"B");
00053   m_EtaEff->Divide(m_L1EtaEff,m_RefEtaEff,1.,1.,"B");
00054   m_PhiEff->Divide(m_L1PhiEff,m_RefPhiEff,1.,1.,"B");
00055 }

EfficiencyHistograms::EfficiencyHistograms (  )  [private]


Member Function Documentation

void EfficiencyHistograms::FillL1 ( const reco::CandidateRef l1  ) 

Definition at line 57 of file EfficiencyHistograms.cc.

References m_L1EtaEff, m_L1EtEff, and m_L1PhiEff.

Referenced by L1Analyzer::analyze().

00058 {
00059   m_L1EtEff->Fill(ref->et());
00060   m_L1EtaEff->Fill(ref->eta());
00061   m_L1PhiEff->Fill(ref->phi());
00062 }

void EfficiencyHistograms::FillReference ( const reco::CandidateRef ref  ) 

Definition at line 64 of file EfficiencyHistograms.cc.

References m_RefEtaEff, m_RefEtEff, and m_RefPhiEff.

Referenced by L1Analyzer::analyze().

00065 {
00066   m_RefEtEff->Fill(ref->et());
00067   m_RefEtaEff->Fill(ref->eta());
00068   m_RefPhiEff->Fill(ref->phi());
00069 }


Member Data Documentation

std::string EfficiencyHistograms::m_dirName [private]

Definition at line 41 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_EtaEff [private]

Definition at line 47 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), and ~EfficiencyHistograms().

double EfficiencyHistograms::m_etaMax [private]

Definition at line 45 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

double EfficiencyHistograms::m_etaMin [private]

Definition at line 44 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

int EfficiencyHistograms::m_etaNBins [private]

Definition at line 43 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

TH1F* EfficiencyHistograms::m_EtEff [private]

Definition at line 47 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), and ~EfficiencyHistograms().

double EfficiencyHistograms::m_etMax [private]

Definition at line 45 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

double EfficiencyHistograms::m_etMin [private]

Definition at line 44 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

int EfficiencyHistograms::m_etNBins [private]

Definition at line 43 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_L1EtaEff [private]

Definition at line 48 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillL1(), and ~EfficiencyHistograms().

TH1F* EfficiencyHistograms::m_L1EtEff [private]

Definition at line 48 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillL1(), and ~EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_L1PhiEff [private]

Definition at line 48 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillL1(), and ~EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_PhiEff [private]

Definition at line 47 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), and ~EfficiencyHistograms().

double EfficiencyHistograms::m_phiMax [private]

Definition at line 45 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

double EfficiencyHistograms::m_phiMin [private]

Definition at line 44 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

int EfficiencyHistograms::m_phiNBins [private]

Definition at line 43 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_RefEtaEff [private]

Definition at line 49 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillReference(), and ~EfficiencyHistograms().

TH1F* EfficiencyHistograms::m_RefEtEff [private]

Definition at line 49 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillReference(), and ~EfficiencyHistograms().

TH1F * EfficiencyHistograms::m_RefPhiEff [private]

Definition at line 49 of file EfficiencyHistograms.h.

Referenced by EfficiencyHistograms(), FillReference(), and ~EfficiencyHistograms().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:09 2009 for CMSSW by  doxygen 1.5.4