#include <PFJetBenchmarkAnalyzer.cc>
Public Member Functions | |
PFJetBenchmarkAnalyzer (const edm::ParameterSet &) | |
~PFJetBenchmarkAnalyzer () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Description: <one line="" class="" summary>="">
Implementation:
Definition at line 51 of file PFJetBenchmarkAnalyzer.cc.
PFJetBenchmarkAnalyzer::PFJetBenchmarkAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 90 of file PFJetBenchmarkAnalyzer.cc.
References benchmarkLabel_, dbe_, deltaRMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maxEta, onlyTwoJets, cppFunctionSkipper::operator, outjetfilename, pfjBenchmarkDebug, PFJetBenchmark_, plotAgainstReco, recPt, PFJetBenchmark::setup(), sGenJetAlgo, and sJetAlgo.
{ //now do what ever initialization is needed sGenJetAlgo = iConfig.getParameter<InputTag>("InputTruthLabel"); sJetAlgo = iConfig.getParameter<InputTag>("InputRecoLabel"); outjetfilename = iConfig.getUntrackedParameter<string>("OutputFile"); pfjBenchmarkDebug = iConfig.getParameter<bool>("pfjBenchmarkDebug"); plotAgainstReco = iConfig.getParameter<bool>("PlotAgainstRecoQuantities"); onlyTwoJets = iConfig.getParameter<bool>("OnlyTwoJets"); deltaRMax = iConfig.getParameter<double>("deltaRMax"); benchmarkLabel_ = iConfig.getParameter<string>("BenchmarkLabel"); recPt = iConfig.getParameter<double>("recPt"); maxEta = iConfig.getParameter<double>("maxEta"); dbe_ = edm::Service<DQMStore>().operator->(); PFJetBenchmark_.setup( outjetfilename, pfjBenchmarkDebug, plotAgainstReco, onlyTwoJets, deltaRMax, benchmarkLabel_, recPt, maxEta, dbe_); }
PFJetBenchmarkAnalyzer::~PFJetBenchmarkAnalyzer | ( | ) |
Definition at line 130 of file PFJetBenchmarkAnalyzer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void PFJetBenchmarkAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 143 of file PFJetBenchmarkAnalyzer.cc.
References gather_cfg::cout, edm::Event::getByLabel(), PFJetBenchmark_, PFJetBenchmark::process(), sGenJetAlgo, and sJetAlgo.
{ // get gen jet collection Handle<GenJetCollection> genjets; bool isGen = iEvent.getByLabel(sGenJetAlgo, genjets); if (!isGen) { std::cout << "Warning : no Gen jets in input !" << std::endl; return; } // get rec PFJet collection Handle<PFJetCollection> pfjets; bool isReco = iEvent.getByLabel(sJetAlgo, pfjets); if (!isReco) { std::cout << "Warning : no PF jets in input !" << std::endl; return; } // Analyse (no "z" in "analyse" : we are in Europe, dammit!) PFJetBenchmark_.process(*pfjets, *genjets); }
void PFJetBenchmarkAnalyzer::beginJob | ( | void | ) | [private, virtual] |
void PFJetBenchmarkAnalyzer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 175 of file PFJetBenchmarkAnalyzer.cc.
References PFJetBenchmark_, and PFJetBenchmark::write().
{ // PFJetBenchmark_.save(); PFJetBenchmark_.write(); }