#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 (const edm::EventSetup &) |
virtual void | endJob () |
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_, deltaRMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maxEta, onlyTwoJets, outjetfilename, pfjBenchmarkDebug, plotAgainstReco, recPt, and PFJetBenchmark::setup().
00092 { 00093 //now do what ever initialization is needed 00094 sGenJetAlgo = 00095 iConfig.getParameter<InputTag>("InputTruthLabel"); 00096 sJetAlgo = 00097 iConfig.getParameter<InputTag>("InputRecoLabel"); 00098 outjetfilename = 00099 iConfig.getUntrackedParameter<string>("OutputFile"); 00100 pfjBenchmarkDebug = 00101 iConfig.getParameter<bool>("pfjBenchmarkDebug"); 00102 plotAgainstReco = 00103 iConfig.getParameter<bool>("PlotAgainstRecoQuantities"); 00104 onlyTwoJets = 00105 iConfig.getParameter<bool>("OnlyTwoJets"); 00106 deltaRMax = 00107 iConfig.getParameter<double>("deltaRMax"); 00108 benchmarkLabel_ = 00109 iConfig.getParameter<string>("BenchmarkLabel"); 00110 recPt = 00111 iConfig.getParameter<double>("recPt"); 00112 maxEta = 00113 iConfig.getParameter<double>("maxEta"); 00114 00115 dbe_ = edm::Service<DQMStore>().operator->(); 00116 00117 PFJetBenchmark_.setup( 00118 outjetfilename, 00119 pfjBenchmarkDebug, 00120 plotAgainstReco, 00121 onlyTwoJets, 00122 deltaRMax, 00123 benchmarkLabel_, 00124 recPt, 00125 maxEta, 00126 dbe_); 00127 }
PFJetBenchmarkAnalyzer::~PFJetBenchmarkAnalyzer | ( | ) |
Definition at line 130 of file PFJetBenchmarkAnalyzer.cc.
00131 { 00132 // do anything here that needs to be done at desctruction time 00133 // (e.g. close files, deallocate resources etc.) 00134 }
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 GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::Event::getByLabel(), and PFJetBenchmark::process().
00144 { 00145 // get gen jet collection 00146 Handle<GenJetCollection> genjets; 00147 bool isGen = iEvent.getByLabel(sGenJetAlgo, genjets); 00148 if (!isGen) { 00149 std::cout << "Warning : no Gen jets in input !" << std::endl; 00150 return; 00151 } 00152 00153 // get rec PFJet collection 00154 Handle<PFJetCollection> pfjets; 00155 bool isReco = iEvent.getByLabel(sJetAlgo, pfjets); 00156 if (!isReco) { 00157 std::cout << "Warning : no PF jets in input !" << std::endl; 00158 return; 00159 } 00160 // Analyse (no "z" in "analyse" : we are in Europe, dammit!) 00161 PFJetBenchmark_.process(*pfjets, *genjets); 00162 }
void PFJetBenchmarkAnalyzer::beginJob | ( | const edm::EventSetup & | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 174 of file PFJetBenchmarkAnalyzer.cc.
References PFJetBenchmark::write().
00174 { 00175 // PFJetBenchmark_.save(); 00176 PFJetBenchmark_.write(); 00177 }