Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "L1TriggerOffline/L1Analyzer/interface/SimpleHistograms.h"
00015
00016 SimpleHistograms::SimpleHistograms(const std::string name, const edm::ParameterSet & cfg):
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_Et = dir.make<TH1F>("Et", "E_{T}",m_etNBins,m_etMin,m_etMax);
00034 m_Eta = dir.make<TH1F>("Eta","#eta", m_etaNBins,m_etaMin,m_etaMax);
00035 m_Phi = dir.make<TH1F>("Phi","#phi", m_phiNBins,m_phiMin,m_phiMax);
00036
00037 }
00038
00039 SimpleHistograms::~SimpleHistograms()
00040 {
00041 }
00042
00043 void SimpleHistograms::Fill(const reco::CandidateRef cand)
00044 {
00045 m_Et->Fill(cand->et());
00046 m_Eta->Fill(cand->eta());
00047 m_Phi->Fill(cand->phi());
00048 }
00049
00050