To plot Candidate quantities. More...
#include <CandidateBenchmark.h>
Public Member Functions | |
CandidateBenchmark (Mode mode) | |
template<class C > | |
void | fill (const C &candidates) |
void | fillOne (const reco::Candidate &candidate) |
fill histograms with a given particle | |
void | setup () |
book histograms | |
void | setup (const edm::ParameterSet ¶meterSet) |
book histograms | |
virtual | ~CandidateBenchmark () |
Protected Attributes | |
TH1F * | charge_ |
TH1F * | eta_ |
bool | histogramBooked_ |
TH1F * | pdgId_ |
COLIN add this histo. | |
TH1F * | phi_ |
TH1F * | pt_ |
To plot Candidate quantities.
Definition at line 10 of file CandidateBenchmark.h.
CandidateBenchmark::CandidateBenchmark | ( | Mode | mode | ) |
CandidateBenchmark::~CandidateBenchmark | ( | ) | [virtual] |
Definition at line 26 of file CandidateBenchmark.cc.
{}
void CandidateBenchmark::fill | ( | const C & | candidates | ) |
Definition at line 43 of file CandidateBenchmark.h.
Referenced by CandidateBenchmarkAnalyzer::analyze().
void CandidateBenchmark::fillOne | ( | const reco::Candidate & | candidate | ) |
fill histograms with a given particle
Definition at line 87 of file CandidateBenchmark.cc.
References reco::Candidate::charge(), charge_, reco::Candidate::eta(), eta_, Benchmark::isInRange(), reco::Candidate::phi(), phi_, reco::Candidate::pt(), and pt_.
Referenced by PFCandidateManager::fill(), fill(), PFJetMonitor::fill(), and PFMETMonitor::fillOne().
void CandidateBenchmark::setup | ( | void | ) |
book histograms
Definition at line 29 of file CandidateBenchmark.cc.
References Benchmark::book1D(), charge_, Benchmark::DQMOFFLINE, eta_, histogramBooked_, Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, Benchmark::mode_, Benchmark::PhaseSpace::n, phi_, and pt_.
Referenced by CandidateBenchmarkAnalyzer::beginJob(), PFMETMonitor::setup(), and PFJetMonitor::setup().
{ if (!histogramBooked_) { PhaseSpace ptPS(100,0,100); PhaseSpace phiPS(360, -3.1416, 3.1416); PhaseSpace etaPS(100, -5,5); switch(mode_) { case DQMOFFLINE: default: ptPS = PhaseSpace(50, 0, 100); phiPS.n = 50; etaPS.n = 20; break; } pt_ = book1D("pt_", "pt_;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); eta_ = book1D("eta_", "eta_;#eta", etaPS.n, etaPS.m, etaPS.M); phi_ = book1D("phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M); charge_ = book1D("charge_", "charge_;charge", 3,-1.5,1.5); histogramBooked_ = true; } }
void CandidateBenchmark::setup | ( | const edm::ParameterSet & | parameterSet | ) |
book histograms
Definition at line 56 of file CandidateBenchmark.cc.
References Benchmark::book1D(), charge_, eta_, edm::ParameterSet::getParameter(), histogramBooked_, phi_, and pt_.
{ if (histogramBooked_) return; edm::ParameterSet ptPS = parameterSet.getParameter<edm::ParameterSet>("PtHistoParameter"); edm::ParameterSet etaPS = parameterSet.getParameter<edm::ParameterSet>("EtaHistoParameter"); edm::ParameterSet phiPS = parameterSet.getParameter<edm::ParameterSet>("PhiHistoParameter"); edm::ParameterSet chPS = parameterSet.getParameter<edm::ParameterSet>("ChargeHistoParameter"); if (ptPS.getParameter<bool>("switchOn")) { pt_ = book1D("pt_", "pt_;p_{T} (GeV)", ptPS.getParameter<int32_t>("nBin"), ptPS.getParameter<double>("xMin"), ptPS.getParameter<double>("xMax")); } if (etaPS.getParameter<bool>("switchOn")) { eta_ = book1D("eta_", "eta_;#eta", etaPS.getParameter<int32_t>("nBin"), etaPS.getParameter<double>("xMin"), etaPS.getParameter<double>("xMax")); } if (phiPS.getParameter<bool>("switchOn")) { phi_ = book1D("phi_", "phi_;#phi", phiPS.getParameter<int32_t>("nBin"), phiPS.getParameter<double>("xMin"), phiPS.getParameter<double>("xMax")); } if (chPS.getParameter<bool>("switchOn")) { charge_ = book1D("charge_","charge_;charge",chPS.getParameter<int32_t>("nBin"), chPS.getParameter<double>("xMin"), chPS.getParameter<double>("xMax")); } histogramBooked_ = true; }
TH1F* CandidateBenchmark::charge_ [protected] |
Definition at line 35 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark(), fillOne(), and setup().
TH1F* CandidateBenchmark::eta_ [protected] |
Definition at line 33 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark(), fillOne(), and setup().
bool CandidateBenchmark::histogramBooked_ [protected] |
Definition at line 39 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark(), and setup().
TH1F* CandidateBenchmark::pdgId_ [protected] |
COLIN add this histo.
Definition at line 37 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark().
TH1F* CandidateBenchmark::phi_ [protected] |
Definition at line 34 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark(), fillOne(), and setup().
TH1F* CandidateBenchmark::pt_ [protected] |
Definition at line 32 of file CandidateBenchmark.h.
Referenced by CandidateBenchmark(), fillOne(), and setup().