CMS 3D CMS Logo

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

#include <PFMETDQMAnalyzer.h>

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

Public Member Functions

 PFMETDQMAnalyzer (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::MET > > myMatchedMET_
 
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
 
int nBadEvents_
 
PFMETMonitor pfMETMonitor_
 
edm::ParameterSet pSet_
 
std::string subsystemname_
 

Detailed Description

Definition at line 15 of file PFMETDQMAnalyzer.h.

Constructor & Destructor Documentation

PFMETDQMAnalyzer::PFMETDQMAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 21 of file PFMETDQMAnalyzer.cc.

References benchmarkLabel_, eventInfoFolder_, printsummarytable::folder, edm::ParameterSet::getParameter(), inputLabel_, matchLabel_, myMatchedMET_, myMET_, nBadEvents_, edm::parameterSet(), pfMETMonitor_, pSet_, PFMETMonitor::setParameters(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

23 {
25  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
26  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
27  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
28 
29  pfMETMonitor_.setParameters(parameterSet);
30 
31  myMET_ = consumes<edm::View<reco::MET>>(inputLabel_);
32  myMatchedMET_ = consumes<edm::View<reco::MET>>(matchLabel_);
33 
35 
36  subsystemname_ = "ParticleFlow";
38 
39  nBadEvents_ = 0;
40 }
T getParameter(std::string const &) const
void setParameters(Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool metSpHistos)
set the parameters locally
Definition: PFMETMonitor.cc:63
edm::InputTag inputLabel_
edm::InputTag matchLabel_
PFMETMonitor pfMETMonitor_
std::string subsystemname_
std::string benchmarkLabel_
edm::ParameterSet pSet_
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
std::string eventInfoFolder_
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
edm::EDGetTokenT< edm::View< reco::MET > > myMatchedMET_

Member Function Documentation

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

Definition at line 59 of file PFMETDQMAnalyzer.cc.

References DEFINE_FWK_MODULE, PFMETMonitor::fillOne(), edm::Event::getByToken(), edm::HandleBase::isValid(), MT2Analyzer::metCollection, myMatchedMET_, myMET_, and pfMETMonitor_.

59  {
61  iEvent.getByToken(myMET_, metCollection);
62 
63  edm::Handle<edm::View<reco::MET>> matchedMetCollection;
64  iEvent.getByToken(myMatchedMET_, matchedMetCollection);
65 
66  if (metCollection.isValid() && matchedMetCollection.isValid()) {
67  float maxRes = 0.0;
68  float minRes = 99.99;
69  pfMETMonitor_.fillOne((*metCollection)[0], (*matchedMetCollection)[0], minRes, maxRes);
70  }
71 }
PFMETMonitor pfMETMonitor_
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:74
void fillOne(const reco::MET &met, const reco::MET &matchedMet, float &minVal, float &maxVal)
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
edm::EDGetTokenT< edm::View< reco::MET > > myMatchedMET_
void PFMETDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 45 of file PFMETDQMAnalyzer.cc.

References eventInfoFolder_, pfMETMonitor_, pSet_, DQMStore::IBooker::setCurrentFolder(), and PFMETMonitor::setup().

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

Member Data Documentation

std::string PFMETDQMAnalyzer::benchmarkLabel_
private

Definition at line 28 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

std::string PFMETDQMAnalyzer::eventInfoFolder_
private

Definition at line 33 of file PFMETDQMAnalyzer.h.

Referenced by bookHistograms(), and PFMETDQMAnalyzer().

edm::InputTag PFMETDQMAnalyzer::inputLabel_
private

Definition at line 27 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

edm::InputTag PFMETDQMAnalyzer::matchLabel_
private

Definition at line 26 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

edm::EDGetTokenT<edm::View<reco::MET> > PFMETDQMAnalyzer::myMatchedMET_
private

Definition at line 25 of file PFMETDQMAnalyzer.h.

Referenced by analyze(), and PFMETDQMAnalyzer().

edm::EDGetTokenT<edm::View<reco::MET> > PFMETDQMAnalyzer::myMET_
private

Definition at line 24 of file PFMETDQMAnalyzer.h.

Referenced by analyze(), and PFMETDQMAnalyzer().

int PFMETDQMAnalyzer::nBadEvents_
private

Definition at line 36 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

PFMETMonitor PFMETDQMAnalyzer::pfMETMonitor_
private

Definition at line 30 of file PFMETDQMAnalyzer.h.

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

edm::ParameterSet PFMETDQMAnalyzer::pSet_
private

Definition at line 32 of file PFMETDQMAnalyzer.h.

Referenced by bookHistograms(), and PFMETDQMAnalyzer().

std::string PFMETDQMAnalyzer::subsystemname_
private

Definition at line 34 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().