CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 PFJetDQMAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &)
 
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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 15 of file PFJetDQMAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file PFJetDQMAnalyzer.cc.

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

26 {
28  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
29  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
30  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
31 
32  pfJetMonitor_.setParameters(parameterSet); // set parameters for booking histograms and validating jet
33 
34  myJet_ = consumes< edm::View<reco::Jet> >(inputLabel_);
35  myMatchedJet_ = consumes< edm::View<reco::Jet> >(matchLabel_);
36 
37 
38  std::string folder = benchmarkLabel_ ;
39 
40  subsystemname_ = "ParticleFlow" ;
41  eventInfoFolder_ = subsystemname_ + "/" + folder ;
42 
43  nBadEvents_ = 0;
44 
45 }
T getParameter(std::string const &) const
edm::InputTag inputLabel_
PFJetMonitor pfJetMonitor_
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:70
std::string benchmarkLabel_
edm::EDGetTokenT< edm::View< reco::Jet > > myMatchedJet_
edm::ParameterSet pSet_
edm::InputTag matchLabel_
std::string eventInfoFolder_
edm::EDGetTokenT< edm::View< reco::Jet > > myJet_
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 
)
privatevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 66 of file PFJetDQMAnalyzer.cc.

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

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

Implements DQMEDAnalyzer.

Definition at line 51 of file PFJetDQMAnalyzer.cc.

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

54 {
56 
57  edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_;
58 
59  pfJetMonitor_.setup(ibooker, pSet_);
60 }
PFJetMonitor pfJetMonitor_
void setup(DQMStore::IBooker &b)
book histograms
edm::ParameterSet pSet_
std::string eventInfoFolder_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274

Member Data Documentation

std::string PFJetDQMAnalyzer::benchmarkLabel_
private

Definition at line 29 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

std::string PFJetDQMAnalyzer::eventInfoFolder_
private

Definition at line 34 of file PFJetDQMAnalyzer.h.

Referenced by bookHistograms(), and PFJetDQMAnalyzer().

edm::InputTag PFJetDQMAnalyzer::inputLabel_
private

Definition at line 28 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

edm::InputTag PFJetDQMAnalyzer::matchLabel_
private

Definition at line 27 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

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

Definition at line 25 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

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

Definition at line 26 of file PFJetDQMAnalyzer.h.

Referenced by analyze(), and PFJetDQMAnalyzer().

int PFJetDQMAnalyzer::nBadEvents_
private

Definition at line 37 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().

PFJetMonitor PFJetDQMAnalyzer::pfJetMonitor_
private

Definition at line 31 of file PFJetDQMAnalyzer.h.

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

edm::ParameterSet PFJetDQMAnalyzer::pSet_
private

Definition at line 33 of file PFJetDQMAnalyzer.h.

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

std::string PFJetDQMAnalyzer::subsystemname_
private

Definition at line 35 of file PFJetDQMAnalyzer.h.

Referenced by PFJetDQMAnalyzer().