CMS 3D CMS Logo

PFMETDQMAnalyzer.cc
Go to the documentation of this file.
2 
4 
9 
13 
16 
17 //
18 // -- Constructor
19 //
21 
22 {
24  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
25  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
26  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
27 
29 
30  myMET_ = consumes<edm::View<reco::MET>>(inputLabel_);
31  myMatchedMET_ = consumes<edm::View<reco::MET>>(matchLabel_);
32 
34 
35  subsystemname_ = "ParticleFlow";
37 
38  nBadEvents_ = 0;
39 }
40 
41 //
42 // -- BookHistograms
43 //
45  edm::Run const & /* iRun */,
46  edm::EventSetup const & /* iSetup */) {
48 
49  edm::LogInfo("PFMETDQMAnalyzer") << " PFMETDQMAnalyzer::bookHistograms "
50  << "Histogram Folder path set to " << eventInfoFolder_;
51 
52  pfMETMonitor_.setup(ibooker, pSet_);
53 }
54 
55 //
56 // -- Analyze
57 //
60  iEvent.getByToken(myMET_, metCollection);
61 
62  edm::Handle<edm::View<reco::MET>> matchedMetCollection;
63  iEvent.getByToken(myMatchedMET_, matchedMetCollection);
64 
65  if (metCollection.isValid() && matchedMetCollection.isValid()) {
66  float maxRes = 0.0;
67  float minRes = 99.99;
68  pfMETMonitor_.fillOne((*metCollection)[0], (*matchedMetCollection)[0], minRes, maxRes);
69  }
70 }
71 
PFMETDQMAnalyzer::pfMETMonitor_
PFMETMonitor pfMETMonitor_
Definition: PFMETDQMAnalyzer.h:30
Handle.h
MessageLogger.h
PFMETDQMAnalyzer::eventInfoFolder_
std::string eventInfoFolder_
Definition: PFMETDQMAnalyzer.h:33
PFCandidate.h
susyDQM_cfi.metCollection
metCollection
Definition: susyDQM_cfi.py:11
edm::Run
Definition: Run.h:45
printsummarytable.folder
folder
Definition: printsummarytable.py:7
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMStore.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
PFMETDQMAnalyzer::myMET_
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
Definition: PFMETDQMAnalyzer.h:24
PFMETDQMAnalyzer::subsystemname_
std::string subsystemname_
Definition: PFMETDQMAnalyzer.h:34
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
PFMETDQMAnalyzer
Definition: PFMETDQMAnalyzer.h:15
PFMETDQMAnalyzer.h
MakerMacros.h
PFMETDQMAnalyzer::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: PFMETDQMAnalyzer.cc:58
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
PFMETDQMAnalyzer::benchmarkLabel_
std::string benchmarkLabel_
Definition: PFMETDQMAnalyzer.h:28
PFMETDQMAnalyzer::PFMETDQMAnalyzer
PFMETDQMAnalyzer(const edm::ParameterSet &parameterSet)
Definition: PFMETDQMAnalyzer.cc:20
PFMETMonitor::fillOne
void fillOne(const reco::MET &met, const reco::MET &matchedMet, float &minVal, float &maxVal)
Definition: PFMETMonitor.cc:330
PFMETDQMAnalyzer::matchLabel_
edm::InputTag matchLabel_
Definition: PFMETDQMAnalyzer.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
PFMETDQMAnalyzer::myMatchedMET_
edm::EDGetTokenT< edm::View< reco::MET > > myMatchedMET_
Definition: PFMETDQMAnalyzer.h:25
iEvent
int iEvent
Definition: GenABIO.cc:224
PFMETDQMAnalyzer::pSet_
edm::ParameterSet pSet_
Definition: PFMETDQMAnalyzer.h:32
PFMETDQMAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: PFMETDQMAnalyzer.cc:44
edm::EventSetup
Definition: EventSetup.h:58
InputTag.h
PFMETMonitor::setParameters
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
MET.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
PFMETMonitor::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: PFMETMonitor.cc:222
PFMETDQMAnalyzer::inputLabel_
edm::InputTag inputLabel_
Definition: PFMETDQMAnalyzer.h:27
ParameterSet.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PFMETDQMAnalyzer::nBadEvents_
int nBadEvents_
Definition: PFMETDQMAnalyzer.h:36
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
PFCandidateFwd.h