#include <PFMETBenchmarkAnalyzer.cc>
Public Member Functions | |
PFMETBenchmarkAnalyzer (const edm::ParameterSet &) | |
~PFMETBenchmarkAnalyzer () | |
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 53 of file PFMETBenchmarkAnalyzer.cc.
PFMETBenchmarkAnalyzer::PFMETBenchmarkAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 90 of file PFMETBenchmarkAnalyzer.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), cmsCodeRules::cppFunctionSkipper::operator, OutputFileName, pfmBenchmarkDebug, PFMETBenchmark_, PFMETBenchmark::setup(), sInputCaloLabel, sInputRecoLabel, sInputTCLabel, sInputTruthLabel, xbenchmarkLabel_, xdbe_, and xplotAgainstReco.
{ //now do what ever initialization is needed sInputTruthLabel = iConfig.getParameter<InputTag>("InputTruthLabel"); sInputRecoLabel = iConfig.getParameter<InputTag>("InputRecoLabel"); sInputCaloLabel = iConfig.getParameter<InputTag>("InputCaloLabel"); sInputTCLabel = iConfig.getParameter<InputTag>("InputTCLabel"); OutputFileName = iConfig.getUntrackedParameter<string>("OutputFile"); pfmBenchmarkDebug = iConfig.getParameter<bool>("pfjBenchmarkDebug"); xplotAgainstReco = iConfig.getParameter<bool>("PlotAgainstRecoQuantities"); xbenchmarkLabel_ = iConfig.getParameter<string>("BenchmarkLabel"); xdbe_ = edm::Service<DQMStore>().operator->(); PFMETBenchmark_.setup( OutputFileName, pfmBenchmarkDebug, xplotAgainstReco, xbenchmarkLabel_, xdbe_); }
PFMETBenchmarkAnalyzer::~PFMETBenchmarkAnalyzer | ( | ) |
Definition at line 121 of file PFMETBenchmarkAnalyzer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void PFMETBenchmarkAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 134 of file PFMETBenchmarkAnalyzer.cc.
References gather_cfg::cout, edm::Event::getByLabel(), PFMETBenchmark_, PFMETBenchmark::process(), sInputCaloLabel, sInputRecoLabel, sInputTCLabel, and sInputTruthLabel.
{ // get gen jet collection Handle<GenParticleCollection> genparticles; bool isGen = iEvent.getByLabel(sInputTruthLabel, genparticles); if (!isGen) { std::cout << "Warning : no Gen Particles in input !" << std::endl; return; } // get rec PFMet collection Handle<PFMETCollection> pfmets; bool isReco = iEvent.getByLabel(sInputRecoLabel, pfmets); if (!isReco) { std::cout << "Warning : no PF MET in input !" << std::endl; return; } // get rec TCMet collection Handle<METCollection> tcmets; bool isTC = iEvent.getByLabel(sInputTCLabel, tcmets); if (!isTC) { std::cout << "Warning : no TC MET in input !" << std::endl; return; } Handle<CaloMETCollection> calomets; bool isCalo = iEvent.getByLabel(sInputCaloLabel, calomets); if (!isCalo) { std::cout << "Warning : no Calo MET in input !" << std::endl; return; } // Analyse (no "z" in "analyse" : we are in Europe, dammit!) PFMETBenchmark_.process(*pfmets, *genparticles, *calomets, *tcmets); }
void PFMETBenchmarkAnalyzer::beginJob | ( | void | ) | [private, virtual] |
void PFMETBenchmarkAnalyzer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 181 of file PFMETBenchmarkAnalyzer.cc.
References PFMETBenchmark::analyse(), PFMETBenchmark_, and PFMETBenchmark::write().
{ // PFMETBenchmark_.save(); PFMETBenchmark_.analyse(); PFMETBenchmark_.write(); }