CMS 3D CMS Logo

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

#include <PFCandidateDQMAnalyzer.h>

Inheritance diagram for PFCandidateDQMAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 PFCandidateDQMAnalyzer (const edm::ParameterSet &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
 

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_
 
bool createEfficiencyHistos_
 
MonitorElementeventId_
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 
edm::InputTag matchLabel_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > myCand_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchedCand_
 
int nBadEvents_
 
PFCandidateMonitor pfCandidateMonitor_
 
edm::ParameterSet pSet_
 
std::string subsystemname_
 

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 Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 14 of file PFCandidateDQMAnalyzer.h.

Constructor & Destructor Documentation

◆ PFCandidateDQMAnalyzer()

PFCandidateDQMAnalyzer::PFCandidateDQMAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 18 of file PFCandidateDQMAnalyzer.cc.

References benchmarkLabel_, createEfficiencyHistos_, eventInfoFolder_, printsummarytable::folder, edm::ParameterSet::getParameter(), inputLabel_, matchLabel_, myCand_, myMatchedCand_, nBadEvents_, edm::parameterSet(), pfCandidateMonitor_, pSet_, PFCandidateMonitor::setParameters(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

20 {
22  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
23  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
24  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
25  createEfficiencyHistos_ = pSet_.getParameter<bool>("CreateEfficiencyHistos");
26 
28 
29  myCand_ = consumes<edm::View<reco::Candidate>>(inputLabel_);
30  myMatchedCand_ = consumes<edm::View<reco::Candidate>>(matchLabel_);
31 
33 
34  subsystemname_ = "ParticleFlow";
36 
37  nBadEvents_ = 0;
38 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::View< reco::Candidate > > myCand_
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchedCand_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
void setParameters(float dRMax, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool refHistoFlag)
set the parameters locally
PFCandidateMonitor pfCandidateMonitor_

Member Function Documentation

◆ analyze()

void PFCandidateDQMAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 57 of file PFCandidateDQMAnalyzer.cc.

References createEfficiencyHistos_, PFCandidateMonitor::fill(), iEvent, edm::HandleBase::isValid(), myCand_, myMatchedCand_, pfCandidateMonitor_, and pSet_.

57  {
59  edm::Handle<edm::View<reco::Candidate>> matchedCandCollection;
61  iEvent.getByToken(myCand_, candCollection);
62  iEvent.getByToken(myMatchedCand_, matchedCandCollection);
63  } else {
64  iEvent.getByToken(myMatchedCand_, candCollection);
65  iEvent.getByToken(myCand_, matchedCandCollection);
66  }
67 
68  float maxRes = 0.0;
69  float minRes = 99.99;
70  if (candCollection.isValid() && matchedCandCollection.isValid()) {
71  pfCandidateMonitor_.fill(*candCollection, *matchedCandCollection, minRes, maxRes, pSet_);
72  }
73 }
edm::EDGetTokenT< edm::View< reco::Candidate > > myCand_
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchedCand_
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, const edm::ParameterSet &parameterSet)
fill histograms with all particle
int iEvent
Definition: GenABIO.cc:224
PFCandidateMonitor pfCandidateMonitor_
bool isValid() const
Definition: HandleBase.h:70

◆ bookHistograms()

void PFCandidateDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 43 of file PFCandidateDQMAnalyzer.cc.

References eventInfoFolder_, pfCandidateMonitor_, pSet_, dqm::implementation::NavigatorBase::setCurrentFolder(), and PFCandidateMonitor::setup().

45  {
47 
48  edm::LogInfo("PFCandidateDQMAnalyzer") << " PFCandidateDQMAnalyzer::bookHistograms "
49  << "Histogram Folder path set to " << eventInfoFolder_;
50 
52 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
void setup(DQMStore::IBooker &b)
book histograms
Log< level::Info, false > LogInfo
PFCandidateMonitor pfCandidateMonitor_

Member Data Documentation

◆ benchmarkLabel_

std::string PFCandidateDQMAnalyzer::benchmarkLabel_
private

Definition at line 29 of file PFCandidateDQMAnalyzer.h.

Referenced by PFCandidateDQMAnalyzer().

◆ createEfficiencyHistos_

bool PFCandidateDQMAnalyzer::createEfficiencyHistos_
private

Definition at line 30 of file PFCandidateDQMAnalyzer.h.

Referenced by analyze(), and PFCandidateDQMAnalyzer().

◆ eventId_

MonitorElement* PFCandidateDQMAnalyzer::eventId_
private

Definition at line 23 of file PFCandidateDQMAnalyzer.h.

◆ eventInfoFolder_

std::string PFCandidateDQMAnalyzer::eventInfoFolder_
private

Definition at line 35 of file PFCandidateDQMAnalyzer.h.

Referenced by bookHistograms(), and PFCandidateDQMAnalyzer().

◆ inputLabel_

edm::InputTag PFCandidateDQMAnalyzer::inputLabel_
private

Definition at line 28 of file PFCandidateDQMAnalyzer.h.

Referenced by PFCandidateDQMAnalyzer().

◆ matchLabel_

edm::InputTag PFCandidateDQMAnalyzer::matchLabel_
private

Definition at line 27 of file PFCandidateDQMAnalyzer.h.

Referenced by PFCandidateDQMAnalyzer().

◆ myCand_

edm::EDGetTokenT<edm::View<reco::Candidate> > PFCandidateDQMAnalyzer::myCand_
private

Definition at line 25 of file PFCandidateDQMAnalyzer.h.

Referenced by analyze(), and PFCandidateDQMAnalyzer().

◆ myMatchedCand_

edm::EDGetTokenT<edm::View<reco::Candidate> > PFCandidateDQMAnalyzer::myMatchedCand_
private

Definition at line 26 of file PFCandidateDQMAnalyzer.h.

Referenced by analyze(), and PFCandidateDQMAnalyzer().

◆ nBadEvents_

int PFCandidateDQMAnalyzer::nBadEvents_
private

Definition at line 38 of file PFCandidateDQMAnalyzer.h.

Referenced by PFCandidateDQMAnalyzer().

◆ pfCandidateMonitor_

PFCandidateMonitor PFCandidateDQMAnalyzer::pfCandidateMonitor_
private

Definition at line 32 of file PFCandidateDQMAnalyzer.h.

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

◆ pSet_

edm::ParameterSet PFCandidateDQMAnalyzer::pSet_
private

Definition at line 34 of file PFCandidateDQMAnalyzer.h.

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

◆ subsystemname_

std::string PFCandidateDQMAnalyzer::subsystemname_
private

Definition at line 36 of file PFCandidateDQMAnalyzer.h.

Referenced by PFCandidateDQMAnalyzer().