CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
PFJetAnalyzerDQM Class Reference
Inheritance diagram for PFJetAnalyzerDQM:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

class  Plot1DInBin
 
class  Plot1DInBinVariable
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 PFJetAnalyzerDQM (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void fillJetResponse (edm::View< pat::Jet > &recoJetCollection, edm::View< reco::Jet > &genJetCollection)
 
void prepareGenJetMatchedPlots (const std::vector< edm::ParameterSet > &genjet_plots_pset)
 
void prepareGenJetPlots (const std::vector< edm::ParameterSet > &genjet_plots_pset)
 
void prepareGenJetUnmatchedPlots (const std::vector< edm::ParameterSet > &genjet_plots_pset)
 
void prepareJetResponsePlots (const std::vector< edm::ParameterSet > &genjet_plots_pset)
 
void prepareRecoJetMatchedPlots (const std::vector< edm::ParameterSet > &recojet_plots_pset)
 
void prepareRecoJetPlots (const std::vector< edm::ParameterSet > &recojet_plots_pset)
 
void prepareRecoJetUnmatchedPlots (const std::vector< edm::ParameterSet > &recojet_plots_pset)
 

Private Attributes

std::vector< Plot1DInBinVariablegenJetPlots
 
std::vector< Plot1DInBinVariablegenJetPlots_matched
 
std::vector< Plot1DInBinVariablegenJetPlots_unmatched
 
edm::InputTag genJetsLabel
 
bool genJetsOn
 
edm::EDGetTokenT< edm::View< reco::Jet > > genJetsToken
 
bool isMC
 
std::string jetCollectionName
 
float jetDeltaR
 
std::vector< Plot1DInBinjetResponsePlots
 
std::vector< Plot1DInBinjetResponsePlots_noJEC
 
std::vector< Plot1DInBinVariablerecoJetPlots
 
std::vector< Plot1DInBinVariablerecoJetPlots_matched
 
std::vector< Plot1DInBinVariablerecoJetPlots_unmatched
 
edm::InputTag recoJetsLabel
 
bool recoJetsOn
 
edm::EDGetTokenT< edm::View< pat::Jet > > recoJetsToken
 
edm::EDGetTokenT< reco::CandViewMatchMapsrcRefToJetMap
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 21 of file PFJetAnalyzerDQM.cc.

Constructor & Destructor Documentation

◆ PFJetAnalyzerDQM()

PFJetAnalyzerDQM::PFJetAnalyzerDQM ( const edm::ParameterSet iConfig)

Definition at line 315 of file PFJetAnalyzerDQM.cc.

References genJetsLabel, genJetsOn, genJetsToken, edm::ParameterSet::getParameter(), jetCollectionName, jetDeltaR, edm::InputTag::label(), prepareGenJetMatchedPlots(), prepareGenJetPlots(), prepareGenJetUnmatchedPlots(), prepareJetResponsePlots(), prepareRecoJetMatchedPlots(), prepareRecoJetPlots(), prepareRecoJetUnmatchedPlots(), recoJetsLabel, recoJetsOn, and recoJetsToken.

315  {
316  recoJetsLabel = iConfig.getParameter<edm::InputTag>("recoJetCollection");
317  genJetsLabel = iConfig.getParameter<edm::InputTag>("genJetCollection");
318 
319  //label for making new folder
321 
322  //DeltaR for reco to gen jet matching
323  jetDeltaR = iConfig.getParameter<double>("jetDeltaR");
324 
325  //for turn genJet on/off
326  genJetsOn = iConfig.getParameter<bool>("genJetsOn");
327  recoJetsOn = iConfig.getParameter<bool>("recoJetsOn");
328 
329  //Create all jet response plots in bins of genjet pt and eta
330  const auto& response_plots = iConfig.getParameter<std::vector<edm::ParameterSet>>("responsePlots");
331  prepareJetResponsePlots(response_plots);
332 
333  const auto& genjet_plots = iConfig.getParameter<std::vector<edm::ParameterSet>>("genJetPlots");
334  prepareGenJetPlots(genjet_plots);
335  prepareGenJetMatchedPlots(genjet_plots);
336  prepareGenJetUnmatchedPlots(genjet_plots);
337 
338  const auto& recojet_plots = iConfig.getParameter<std::vector<edm::ParameterSet>>("recoJetPlots");
339  prepareRecoJetPlots(recojet_plots);
340  prepareRecoJetMatchedPlots(recojet_plots);
341  prepareRecoJetUnmatchedPlots(recojet_plots);
342 
343  recoJetsToken = consumes<edm::View<pat::Jet>>(recoJetsLabel);
344  genJetsToken = consumes<edm::View<reco::Jet>>(genJetsLabel);
345 }
edm::EDGetTokenT< edm::View< pat::Jet > > recoJetsToken
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void prepareJetResponsePlots(const std::vector< edm::ParameterSet > &genjet_plots_pset)
std::string const & label() const
Definition: InputTag.h:36
void prepareGenJetMatchedPlots(const std::vector< edm::ParameterSet > &genjet_plots_pset)
edm::EDGetTokenT< edm::View< reco::Jet > > genJetsToken
void prepareRecoJetMatchedPlots(const std::vector< edm::ParameterSet > &recojet_plots_pset)
void prepareRecoJetUnmatchedPlots(const std::vector< edm::ParameterSet > &recojet_plots_pset)
edm::InputTag genJetsLabel
std::string jetCollectionName
edm::InputTag recoJetsLabel
void prepareGenJetUnmatchedPlots(const std::vector< edm::ParameterSet > &genjet_plots_pset)
void prepareRecoJetPlots(const std::vector< edm::ParameterSet > &recojet_plots_pset)
void prepareGenJetPlots(const std::vector< edm::ParameterSet > &genjet_plots_pset)

Member Function Documentation

◆ analyze()

void PFJetAnalyzerDQM::analyze ( const edm::Event iEvent,
const edm::EventSetup  
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 478 of file PFJetAnalyzerDQM.cc.

References fillJetResponse(), particleFlowDQM_cff::genJetCollection, genJetsToken, iEvent, isMC, particleFlowDQM_cff::recoJetCollection, and recoJetsToken.

478  {
479  edm::Handle<edm::View<pat::Jet>> recoJetCollectionHandle;
480  iEvent.getByToken(recoJetsToken, recoJetCollectionHandle);
481  auto recoJetCollection = *recoJetCollectionHandle;
482 
483  isMC = !iEvent.isRealData();
484 
485  if (isMC) {
486  edm::Handle<edm::View<reco::Jet>> genJetCollectionHandle;
487  iEvent.getByToken(genJetsToken, genJetCollectionHandle);
488  auto genJetCollection = *genJetCollectionHandle;
489 
491  }
492 }
edm::EDGetTokenT< edm::View< pat::Jet > > recoJetsToken
void fillJetResponse(edm::View< pat::Jet > &recoJetCollection, edm::View< reco::Jet > &genJetCollection)
edm::EDGetTokenT< edm::View< reco::Jet > > genJetsToken
int iEvent
Definition: GenABIO.cc:224

◆ bookHistograms()

void PFJetAnalyzerDQM::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 438 of file PFJetAnalyzerDQM.cc.

References genJetPlots, genJetPlots_matched, genJetPlots_unmatched, genJetsOn, jetCollectionName, jetResponsePlots, jetResponsePlots_noJEC, plotFactory::plot, recoJetPlots, recoJetPlots_matched, recoJetPlots_unmatched, recoJetsOn, and dqm::implementation::NavigatorBase::setCurrentFolder().

438  {
439  booker.setCurrentFolder("ParticleFlow/JetResponse/" + jetCollectionName + "/JEC/");
440  for (auto& plot : jetResponsePlots) {
441  plot.book(booker);
442  }
443  //Book plots for noJEC
444  booker.setCurrentFolder("ParticleFlow/JetResponse/" + jetCollectionName + "/noJEC/");
445  for (auto& plot : jetResponsePlots_noJEC) {
446  plot.book(booker);
447  }
448 
449  if (recoJetsOn) {
450  booker.setCurrentFolder("ParticleFlow/JetResponse/" + jetCollectionName + "/noJEC/");
451  for (auto& plot : genJetPlots_matched) {
452  plot.book(booker);
453  }
454  for (auto& plot : genJetPlots_unmatched) {
455  plot.book(booker);
456  }
457  booker.setCurrentFolder("ParticleFlow/JetResponse/" + jetCollectionName + "/JEC/");
458  for (auto& plot : recoJetPlots) {
459  plot.book(booker);
460  }
461  for (auto& plot : recoJetPlots_matched) {
462  plot.book(booker);
463  }
464  for (auto& plot : recoJetPlots_unmatched) {
465  plot.book(booker);
466  }
467  }
468 
469  //Book plots for gen-jet pt spectra
470  if (genJetsOn) {
471  booker.setCurrentFolder("ParticleFlow/GenJets/");
472  for (auto& plot : genJetPlots) {
473  plot.book(booker);
474  }
475  }
476 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::vector< Plot1DInBin > jetResponsePlots
std::vector< Plot1DInBinVariable > recoJetPlots
std::vector< Plot1DInBinVariable > recoJetPlots_matched
std::vector< Plot1DInBinVariable > recoJetPlots_unmatched
std::string jetCollectionName
std::vector< Plot1DInBinVariable > genJetPlots
std::vector< Plot1DInBinVariable > genJetPlots_matched
std::vector< Plot1DInBinVariable > genJetPlots_unmatched
std::vector< Plot1DInBin > jetResponsePlots_noJEC

◆ fillJetResponse()

void PFJetAnalyzerDQM::fillJetResponse ( edm::View< pat::Jet > &  recoJetCollection,
edm::View< reco::Jet > &  genJetCollection 
)
private

Definition at line 347 of file PFJetAnalyzerDQM.cc.

References funct::abs(), particleFlowDQM_cff::genJetCollection, genJetPlots, genJetPlots_matched, genJetPlots_unmatched, genJetsOn, mps_fire::i, jetDeltaR, jetResponsePlots, jetResponsePlots_noJEC, PFB::match(), plotFactory::plot, particleFlowDQM_cff::recoJetCollection, recoJetPlots, recoJetPlots_matched, recoJetPlots_unmatched, and recoJetsOn.

Referenced by analyze().

347  {
348  //match gen jets to reco jets, require minimum jetDeltaR, choose closest, do not try to match charge
349  std::vector<int> matchIndices;
350  std::vector<int> matchIndicesReco;
351  PFB::match(genJetCollection, recoJetCollection, matchIndices, false, jetDeltaR);
352  PFB::match(recoJetCollection, genJetCollection, matchIndicesReco, false, jetDeltaR);
353 
354  //Fill recojet pt if recoJetOn
355  for (unsigned int i = 0; i < recoJetCollection.size(); i++) {
356  const auto& recoJet = recoJetCollection.at(i);
357  const auto pt_reco = recoJet.pt();
358  const auto eta_reco = abs(recoJet.eta());
359  const int iMatch_reco = matchIndicesReco[i];
360  if (recoJetsOn) {
361  for (auto& plot : recoJetPlots) {
362  if (plot.isInEtaBin(eta_reco)) {
363  plot.fill(pt_reco);
364  }
365  }
366  if (iMatch_reco != -1) {
367  for (auto& plot : recoJetPlots_matched) {
368  if (plot.isInEtaBin(eta_reco)) {
369  plot.fill(pt_reco);
370  }
371  }
372  } else {
373  for (auto& plot : recoJetPlots_unmatched) {
374  if (plot.isInEtaBin(eta_reco)) {
375  plot.fill(pt_reco);
376  }
377  }
378  }
379  }
380  }
381 
382  for (unsigned int i = 0; i < genJetCollection.size(); i++) {
383  const auto& genJet = genJetCollection.at(i);
384  const auto pt_gen = genJet.pt();
385  const auto eta_gen = abs(genJet.eta());
386  const int iMatch = matchIndices[i];
387 
388  //Fill genjet pt if genJetOn
389  if (genJetsOn) {
390  for (auto& plot : genJetPlots) {
391  if (plot.isInEtaBin(eta_gen)) {
392  plot.fill(pt_gen);
393  }
394  }
395  }
396  if (recoJetsOn) {
397  if (iMatch != -1) {
398  for (auto& plot : genJetPlots_matched) {
399  if (plot.isInEtaBin(eta_gen)) {
400  plot.fill(pt_gen);
401  }
402  }
403  } else {
404  for (auto& plot : genJetPlots_unmatched) {
405  if (plot.isInEtaBin(eta_gen)) {
406  plot.fill(pt_gen);
407  }
408  }
409  }
410  }
411 
412  //If gen jet had a matched reco jet
413  if (iMatch != -1) {
414  const auto& recoJet = recoJetCollection[iMatch];
415  auto pt_reco = recoJet.pt();
416 
417  const auto response = pt_reco / pt_gen;
418  const auto response_raw = pt_reco * recoJet.jecFactor("Uncorrected") / pt_gen;
419 
420  //Loop linearly through all plots and check if they match the pt and eta bin
421  //this is not algorithmically optimal but we don't expect to more than a few hundred plots
422  //If this turns out to be a problem, can easily make a 2D-map for indices
423  for (auto& plot : jetResponsePlots) {
424  if (plot.isInPtEtaBin(pt_gen, eta_gen)) {
425  plot.fill(response);
426  }
427  }
428  // this loop should be for NoJEC plots
429  for (auto& plot : jetResponsePlots_noJEC) {
430  if (plot.isInPtEtaBin(pt_gen, eta_gen)) {
431  plot.fill(response_raw);
432  }
433  }
434  }
435  }
436 }
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:17
std::vector< Plot1DInBin > jetResponsePlots
std::vector< Plot1DInBinVariable > recoJetPlots
std::vector< Plot1DInBinVariable > recoJetPlots_matched
std::vector< Plot1DInBinVariable > recoJetPlots_unmatched
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< Plot1DInBinVariable > genJetPlots
std::vector< Plot1DInBinVariable > genJetPlots_matched
std::vector< Plot1DInBinVariable > genJetPlots_unmatched
std::vector< Plot1DInBin > jetResponsePlots_noJEC

◆ prepareGenJetMatchedPlots()

void PFJetAnalyzerDQM::prepareGenJetMatchedPlots ( const std::vector< edm::ParameterSet > &  genjet_plots_pset)
private

Definition at line 200 of file PFJetAnalyzerDQM.cc.

References genJetPlots_matched, Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

200  {
201  for (auto& pset : genjet_plots_pset) {
202  const auto name = pset.getParameter<std::string>("name") + "_matched";
203  const auto title = "Matched " + pset.getParameter<std::string>("title");
204 
205  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
206  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
207  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
208 
209  const auto etabin_low = pset.getParameter<double>("etaBinLow");
210  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
211 
212  genJetPlots_matched.push_back(Plot1DInBinVariable(
213  name,
214  title,
215  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
216  0.0,
217  0.0,
218  etabin_low,
219  etabin_high));
220  }
221 }
std::vector< Plot1DInBinVariable > genJetPlots_matched

◆ prepareGenJetPlots()

void PFJetAnalyzerDQM::prepareGenJetPlots ( const std::vector< edm::ParameterSet > &  genjet_plots_pset)
private

Definition at line 177 of file PFJetAnalyzerDQM.cc.

References genJetPlots, Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

177  {
178  for (auto& pset : genjet_plots_pset) {
179  const auto name = pset.getParameter<std::string>("name");
180  const auto title = pset.getParameter<std::string>("title");
181 
182  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
183  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
184  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
185 
186  const auto etabin_low = pset.getParameter<double>("etaBinLow");
187  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
188 
189  genJetPlots.push_back(Plot1DInBinVariable(
190  name,
191  title,
192  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
193  0.0,
194  0.0,
195  etabin_low,
196  etabin_high));
197  }
198 }
std::vector< Plot1DInBinVariable > genJetPlots

◆ prepareGenJetUnmatchedPlots()

void PFJetAnalyzerDQM::prepareGenJetUnmatchedPlots ( const std::vector< edm::ParameterSet > &  genjet_plots_pset)
private

Definition at line 223 of file PFJetAnalyzerDQM.cc.

References genJetPlots_unmatched, Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

223  {
224  for (auto& pset : genjet_plots_pset) {
225  const auto name = pset.getParameter<std::string>("name") + "_unmatched";
226  const auto title = "Unmatched " + pset.getParameter<std::string>("title");
227 
228  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
229  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
230  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
231 
232  const auto etabin_low = pset.getParameter<double>("etaBinLow");
233  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
234 
235  genJetPlots_unmatched.push_back(Plot1DInBinVariable(
236  name,
237  title,
238  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
239  0.0,
240  0.0,
241  etabin_low,
242  etabin_high));
243  }
244 }
std::vector< Plot1DInBinVariable > genJetPlots_unmatched

◆ prepareJetResponsePlots()

void PFJetAnalyzerDQM::prepareJetResponsePlots ( const std::vector< edm::ParameterSet > &  genjet_plots_pset)
private

Definition at line 147 of file PFJetAnalyzerDQM.cc.

References jetResponsePlots, jetResponsePlots_noJEC, Skims_PA_cff::name, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

147  {
148  for (auto& pset : response_plots) {
149  //Low and high edges of the pt and eta bins for jets to pass to be filled into this histogram
150  const auto ptbin_low = pset.getParameter<double>("ptBinLow");
151  const auto ptbin_high = pset.getParameter<double>("ptBinHigh");
152  const auto etabin_low = pset.getParameter<double>("etaBinLow");
153  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
154 
155  const auto response_nbins = pset.getParameter<uint32_t>("responseNbins");
156  const auto response_low = pset.getParameter<double>("responseLow");
157  const auto response_high = pset.getParameter<double>("responseHigh");
158 
159  const auto name = pset.getParameter<std::string>("name");
160  const auto title = pset.getParameter<std::string>("title");
161 
162  // for title of raw jet response histograms
163  auto rawTitle = title;
164  rawTitle = rawTitle.replace(rawTitle.begin(), rawTitle.begin(), "Raw ");
165 
166  jetResponsePlots.push_back(Plot1DInBin(
167  name, title, response_nbins, response_low, response_high, ptbin_low, ptbin_high, etabin_low, etabin_high));
168 
169  jetResponsePlots_noJEC.push_back(Plot1DInBin(
170  name, rawTitle, response_nbins, response_low, response_high, ptbin_low, ptbin_high, etabin_low, etabin_high));
171  }
172  if (jetResponsePlots.size() > 200) {
173  throw std::runtime_error("Requested too many jet response plots, aborting as this seems unusual.");
174  }
175 }
std::vector< Plot1DInBin > jetResponsePlots
std::vector< Plot1DInBin > jetResponsePlots_noJEC

◆ prepareRecoJetMatchedPlots()

void PFJetAnalyzerDQM::prepareRecoJetMatchedPlots ( const std::vector< edm::ParameterSet > &  recojet_plots_pset)
private

Definition at line 269 of file PFJetAnalyzerDQM.cc.

References Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, recoJetPlots_matched, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

269  {
270  for (auto& pset : recojet_plots_pset) {
271  const auto name = pset.getParameter<std::string>("name") + "_matched";
272  const auto title = "Matched " + pset.getParameter<std::string>("title");
273 
274  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
275  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
276  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
277 
278  const auto etabin_low = pset.getParameter<double>("etaBinLow");
279  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
280 
281  recoJetPlots_matched.push_back(Plot1DInBinVariable(
282  name,
283  title,
284  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
285  0.0,
286  0.0,
287  etabin_low,
288  etabin_high));
289  }
290 }
std::vector< Plot1DInBinVariable > recoJetPlots_matched

◆ prepareRecoJetPlots()

void PFJetAnalyzerDQM::prepareRecoJetPlots ( const std::vector< edm::ParameterSet > &  recojet_plots_pset)
private

Definition at line 246 of file PFJetAnalyzerDQM.cc.

References Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, recoJetPlots, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

246  {
247  for (auto& pset : recojet_plots_pset) {
248  const auto name = pset.getParameter<std::string>("name");
249  const auto title = pset.getParameter<std::string>("title");
250 
251  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
252  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
253  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
254 
255  const auto etabin_low = pset.getParameter<double>("etaBinLow");
256  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
257 
258  recoJetPlots.push_back(Plot1DInBinVariable(
259  name,
260  title,
261  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
262  0.0,
263  0.0,
264  etabin_low,
265  etabin_high));
266  }
267 }
std::vector< Plot1DInBinVariable > recoJetPlots

◆ prepareRecoJetUnmatchedPlots()

void PFJetAnalyzerDQM::prepareRecoJetUnmatchedPlots ( const std::vector< edm::ParameterSet > &  recojet_plots_pset)
private

Definition at line 292 of file PFJetAnalyzerDQM.cc.

References Skims_PA_cff::name, muonDTDigis_cfi::pset, LepHTMonitor_cff::ptbins, recoJetPlots_unmatched, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by PFJetAnalyzerDQM().

292  {
293  for (auto& pset : recojet_plots_pset) {
294  const auto name = pset.getParameter<std::string>("name") + "_unmatched";
295  const auto title = "Unmatched " + pset.getParameter<std::string>("title");
296 
297  //Low and high edges of the eta bins for jets to pass to be filled into this histogram
298  const auto ptbins_d = pset.getParameter<std::vector<double>>("ptBins");
299  std::vector<float> ptbins(ptbins_d.begin(), ptbins_d.end());
300 
301  const auto etabin_low = pset.getParameter<double>("etaBinLow");
302  const auto etabin_high = pset.getParameter<double>("etaBinHigh");
303 
304  recoJetPlots_unmatched.push_back(Plot1DInBinVariable(
305  name,
306  title,
307  std::make_unique<TH1F>(name.c_str(), title.c_str(), static_cast<int>(ptbins.size()) - 1, ptbins.data()),
308  0.0,
309  0.0,
310  etabin_low,
311  etabin_high));
312  }
313 }
std::vector< Plot1DInBinVariable > recoJetPlots_unmatched

Member Data Documentation

◆ genJetPlots

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::genJetPlots
private

Definition at line 116 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and prepareGenJetPlots().

◆ genJetPlots_matched

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::genJetPlots_matched
private

Definition at line 117 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and prepareGenJetMatchedPlots().

◆ genJetPlots_unmatched

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::genJetPlots_unmatched
private

◆ genJetsLabel

edm::InputTag PFJetAnalyzerDQM::genJetsLabel
private

Definition at line 132 of file PFJetAnalyzerDQM.cc.

Referenced by PFJetAnalyzerDQM().

◆ genJetsOn

bool PFJetAnalyzerDQM::genJetsOn
private

Definition at line 127 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and PFJetAnalyzerDQM().

◆ genJetsToken

edm::EDGetTokenT<edm::View<reco::Jet> > PFJetAnalyzerDQM::genJetsToken
private

Definition at line 134 of file PFJetAnalyzerDQM.cc.

Referenced by analyze(), and PFJetAnalyzerDQM().

◆ isMC

bool PFJetAnalyzerDQM::isMC
private

Definition at line 123 of file PFJetAnalyzerDQM.cc.

Referenced by analyze().

◆ jetCollectionName

std::string PFJetAnalyzerDQM::jetCollectionName
private

Definition at line 129 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), and PFJetAnalyzerDQM().

◆ jetDeltaR

float PFJetAnalyzerDQM::jetDeltaR
private

Definition at line 125 of file PFJetAnalyzerDQM.cc.

Referenced by fillJetResponse(), and PFJetAnalyzerDQM().

◆ jetResponsePlots

std::vector<Plot1DInBin> PFJetAnalyzerDQM::jetResponsePlots
private

Definition at line 114 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and prepareJetResponsePlots().

◆ jetResponsePlots_noJEC

std::vector<Plot1DInBin> PFJetAnalyzerDQM::jetResponsePlots_noJEC
private

Definition at line 115 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and prepareJetResponsePlots().

◆ recoJetPlots

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::recoJetPlots
private

Definition at line 119 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and prepareRecoJetPlots().

◆ recoJetPlots_matched

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::recoJetPlots_matched
private

◆ recoJetPlots_unmatched

std::vector<Plot1DInBinVariable> PFJetAnalyzerDQM::recoJetPlots_unmatched
private

◆ recoJetsLabel

edm::InputTag PFJetAnalyzerDQM::recoJetsLabel
private

Definition at line 131 of file PFJetAnalyzerDQM.cc.

Referenced by PFJetAnalyzerDQM().

◆ recoJetsOn

bool PFJetAnalyzerDQM::recoJetsOn
private

Definition at line 127 of file PFJetAnalyzerDQM.cc.

Referenced by bookHistograms(), fillJetResponse(), and PFJetAnalyzerDQM().

◆ recoJetsToken

edm::EDGetTokenT<edm::View<pat::Jet> > PFJetAnalyzerDQM::recoJetsToken
private

Definition at line 133 of file PFJetAnalyzerDQM.cc.

Referenced by analyze(), and PFJetAnalyzerDQM().

◆ srcRefToJetMap

edm::EDGetTokenT<reco::CandViewMatchMap> PFJetAnalyzerDQM::srcRefToJetMap
private

Definition at line 135 of file PFJetAnalyzerDQM.cc.