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:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 PFJetDQMAnalyzer (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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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_
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 15 of file PFJetDQMAnalyzer.h.

Constructor & Destructor Documentation

◆ PFJetDQMAnalyzer()

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

Definition at line 22 of file PFJetDQMAnalyzer.cc.

24 {
26  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
27  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
28  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
29 
30  pfJetMonitor_.setParameters(parameterSet); // set parameters for booking histograms and validating jet
31 
32  myJet_ = consumes<edm::View<reco::Jet>>(inputLabel_);
33  myMatchedJet_ = consumes<edm::View<reco::Jet>>(matchLabel_);
34 
36 
37  subsystemname_ = "ParticleFlow";
39 
40  nBadEvents_ = 0;
41 }

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

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 60 of file PFJetDQMAnalyzer.cc.

60  {
62  iEvent.getByToken(myJet_, jetCollection);
63 
64  edm::Handle<edm::View<reco::Jet>> matchedJetCollection;
65  iEvent.getByToken(myMatchedJet_, matchedJetCollection);
66 
67  float maxRes = 0.0;
68  float minRes = 99.99;
69  float jetpT = 0.0;
70  if (jetCollection.isValid() && matchedJetCollection.isValid()) {
72  *matchedJetCollection,
73  minRes,
74  maxRes,
75  jetpT,
76  pSet_); // match collections and fill pt eta phi and charge histos for
77  // candidate jet, fill delta_x_VS_y histos for matched couples,
78  // book and fill delta_frac_VS_frac histos for matched couples
79  }
80 }

References PFJetMonitor::fill(), iEvent, edm::HandleBase::isValid(), jetfilter_cfi::jetCollection, myJet_, myMatchedJet_, pfJetMonitor_, and pSet_.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 46 of file PFJetDQMAnalyzer.cc.

48  {
49  ibooker.setCurrentFolder(eventInfoFolder_);
50 
51  edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::bookHistograms "
52  << "Histogram Folder path set to " << eventInfoFolder_;
53 
54  pfJetMonitor_.setup(ibooker, pSet_);
55 }

References eventInfoFolder_, pfJetMonitor_, pSet_, dqm::implementation::NavigatorBase::setCurrentFolder(), and PFJetMonitor::setup().

Member Data Documentation

◆ benchmarkLabel_

std::string PFJetDQMAnalyzer::benchmarkLabel_
private

Definition at line 28 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

◆ eventInfoFolder_

std::string PFJetDQMAnalyzer::eventInfoFolder_
private

Definition at line 33 of file PFJetDQMAnalyzer.h.

Referenced by bookHistograms(), and PFJetDQMAnalyzer().

◆ inputLabel_

edm::InputTag PFJetDQMAnalyzer::inputLabel_
private

Definition at line 27 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

◆ matchLabel_

edm::InputTag PFJetDQMAnalyzer::matchLabel_
private

Definition at line 26 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

◆ myJet_

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

Definition at line 24 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

◆ myMatchedJet_

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

Definition at line 25 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

◆ nBadEvents_

int PFJetDQMAnalyzer::nBadEvents_
private

Definition at line 36 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

◆ pfJetMonitor_

PFJetMonitor PFJetDQMAnalyzer::pfJetMonitor_
private

Definition at line 30 of file PFJetDQMAnalyzer.h.

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

◆ pSet_

edm::ParameterSet PFJetDQMAnalyzer::pSet_
private

Definition at line 32 of file PFJetDQMAnalyzer.h.

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

◆ subsystemname_

std::string PFJetDQMAnalyzer::subsystemname_
private

Definition at line 34 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

PFJetDQMAnalyzer::nBadEvents_
int nBadEvents_
Definition: PFJetDQMAnalyzer.h:36
PFJetDQMAnalyzer::myMatchedJet_
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
Definition: PFJetDQMAnalyzer.h:25
printsummarytable.folder
folder
Definition: printsummarytable.py:7
edm::LogInfo
Definition: MessageLogger.h:254
PFJetMonitor::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: PFJetMonitor.cc:119
edm::Handle
Definition: AssociativeIterator.h:50
PFJetDQMAnalyzer::benchmarkLabel_
std::string benchmarkLabel_
Definition: PFJetDQMAnalyzer.h:28
PFJetDQMAnalyzer::inputLabel_
edm::InputTag inputLabel_
Definition: PFJetDQMAnalyzer.h:27
PFJetMonitor::fill
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, float &jetpT, const edm::ParameterSet &parameterSet)
fill histograms with all particle
Definition: PFJetMonitor.h:65
PFJetMonitor::setParameters
void setParameters(const edm::ParameterSet &parameterSet)
set the parameters accessing them from ParameterSet
Definition: PFJetMonitor.cc:39
jetfilter_cfi.jetCollection
jetCollection
Definition: jetfilter_cfi.py:4
PFJetDQMAnalyzer::subsystemname_
std::string subsystemname_
Definition: PFJetDQMAnalyzer.h:34
PFJetDQMAnalyzer::matchLabel_
edm::InputTag matchLabel_
Definition: PFJetDQMAnalyzer.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFJetDQMAnalyzer::pSet_
edm::ParameterSet pSet_
Definition: PFJetDQMAnalyzer.h:32
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PFJetDQMAnalyzer::pfJetMonitor_
PFJetMonitor pfJetMonitor_
Definition: PFJetDQMAnalyzer.h:30
PFJetDQMAnalyzer::eventInfoFolder_
std::string eventInfoFolder_
Definition: PFJetDQMAnalyzer.h:33
edm::InputTag
Definition: InputTag.h:15
PFJetDQMAnalyzer::myJet_
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
Definition: PFJetDQMAnalyzer.h:24