CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFJetDQMAnalyzer Class Reference

#include <PFJetDQMAnalyzer.h>

Inheritance diagram for PFJetDQMAnalyzer:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 PFJetDQMAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

std::string benchmarkLabel_
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 
edm::InputTag matchLabel_
 
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
 
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
 
int nBadEvents_
 
PFJetMonitor pfJetMonitor_
 
edm::ParameterSet pSet_
 
std::string subsystemname_
 

Detailed Description

Definition at line 15 of file PFJetDQMAnalyzer.h.

Constructor & Destructor Documentation

PFJetDQMAnalyzer::PFJetDQMAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 23 of file PFJetDQMAnalyzer.cc.

References benchmarkLabel_, eventInfoFolder_, printsummarytable::folder, edm::ParameterSet::getParameter(), inputLabel_, matchLabel_, myJet_, myMatchedJet_, nBadEvents_, edm::parameterSet(), pfJetMonitor_, pSet_, PFJetMonitor::setParameters(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

25 {
27  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
28  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
29  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
30 
31  pfJetMonitor_.setParameters(parameterSet); // set parameters for booking histograms and validating jet
32 
33  myJet_ = consumes<edm::View<reco::Jet>>(inputLabel_);
34  myMatchedJet_ = consumes<edm::View<reco::Jet>>(matchLabel_);
35 
37 
38  subsystemname_ = "ParticleFlow";
40 
41  nBadEvents_ = 0;
42 }
T getParameter(std::string const &) const
edm::InputTag inputLabel_
PFJetMonitor pfJetMonitor_
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
void setParameters(float dRMax, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool fracHistoFlag=true)
set the parameters locally
Definition: PFJetMonitor.cc:60
std::string benchmarkLabel_
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
edm::ParameterSet pSet_
edm::InputTag matchLabel_
std::string eventInfoFolder_
std::string subsystemname_
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11

Member Function Documentation

void PFJetDQMAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 61 of file PFJetDQMAnalyzer.cc.

References DEFINE_FWK_MODULE, PFJetMonitor::fill(), edm::Event::getByToken(), edm::HandleBase::isValid(), myJet_, myMatchedJet_, pfJetMonitor_, and pSet_.

61  {
62  edm::Handle<edm::View<reco::Jet>> jetCollection;
63  iEvent.getByToken(myJet_, jetCollection);
64 
65  edm::Handle<edm::View<reco::Jet>> matchedJetCollection;
66  iEvent.getByToken(myMatchedJet_, matchedJetCollection);
67 
68  float maxRes = 0.0;
69  float minRes = 99.99;
70  float jetpT = 0.0;
71  if (jetCollection.isValid() && matchedJetCollection.isValid()) {
72  pfJetMonitor_.fill(*jetCollection,
73  *matchedJetCollection,
74  minRes,
75  maxRes,
76  jetpT,
77  pSet_); // match collections and fill pt eta phi and charge histos for
78  // candidate jet, fill delta_x_VS_y histos for matched couples,
79  // book and fill delta_frac_VS_frac histos for matched couples
80  }
81 }
PFJetMonitor pfJetMonitor_
void fill(const T &jetCollection, const C &matchedJetCollection, float &minVal, float &maxVal)
fill histograms with all particle
Definition: PFJetMonitor.h:89
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
edm::ParameterSet pSet_
void PFJetDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 47 of file PFJetDQMAnalyzer.cc.

References eventInfoFolder_, pfJetMonitor_, pSet_, DQMStore::IBooker::setCurrentFolder(), and PFJetMonitor::setup().

49  {
51 
52  edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::bookHistograms "
53  << "Histogram Folder path set to " << eventInfoFolder_;
54 
55  pfJetMonitor_.setup(ibooker, pSet_);
56 }
PFJetMonitor pfJetMonitor_
void setup(DQMStore::IBooker &b)
book histograms
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
edm::ParameterSet pSet_
std::string eventInfoFolder_

Member Data Documentation

std::string PFJetDQMAnalyzer::benchmarkLabel_
private

Definition at line 28 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

std::string PFJetDQMAnalyzer::eventInfoFolder_
private

Definition at line 33 of file PFJetDQMAnalyzer.h.

Referenced by bookHistograms(), and PFJetDQMAnalyzer().

edm::InputTag PFJetDQMAnalyzer::inputLabel_
private

Definition at line 27 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

edm::InputTag PFJetDQMAnalyzer::matchLabel_
private

Definition at line 26 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

edm::EDGetTokenT<edm::View<reco::Jet> > PFJetDQMAnalyzer::myJet_
private

Definition at line 24 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

edm::EDGetTokenT<edm::View<reco::Jet> > PFJetDQMAnalyzer::myMatchedJet_
private

Definition at line 25 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

int PFJetDQMAnalyzer::nBadEvents_
private

Definition at line 36 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

PFJetMonitor PFJetDQMAnalyzer::pfJetMonitor_
private

Definition at line 30 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFJetDQMAnalyzer().

edm::ParameterSet PFJetDQMAnalyzer::pSet_
private

Definition at line 32 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFJetDQMAnalyzer().

std::string PFJetDQMAnalyzer::subsystemname_
private

Definition at line 34 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().