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
PFMuonDQMAnalyzer Class Reference

#include <PFMuonDQMAnalyzer.h>

Inheritance diagram for PFMuonDQMAnalyzer:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 PFMuonDQMAnalyzer (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
 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_
 
bool createEfficiencyHistos_
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 
edm::InputTag matchLabel_
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
myCand_
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
myMatchedCand_
 
int nBadEvents_
 
PFCandidateMonitor pfCandidateMonitor_
 
edm::ParameterSet pSet_
 
double ptBase_
 
double ptNotPF_
 
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
 
- 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::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 PFMuonDQMAnalyzer.h.

Constructor & Destructor Documentation

PFMuonDQMAnalyzer::PFMuonDQMAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 20 of file PFMuonDQMAnalyzer.cc.

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

22 {
24  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
25  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
26  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
27  createEfficiencyHistos_ = pSet_.getParameter<bool>( "CreateEfficiencyHistos" );
28 
29  pfCandidateMonitor_.setParameters(parameterSet);
30 
31  myCand_ = consumes< edm::View<reco::Muon> >(inputLabel_);
32  myMatchedCand_ = consumes< edm::View<reco::Muon> >(matchLabel_);
33 
34 
35  std::string folder = benchmarkLabel_ ;
36 
37  subsystemname_ = "ParticleFlow" ;
38  eventInfoFolder_ = subsystemname_ + "/" + folder ;
39 
40  nBadEvents_ = 0;
41 
42 }
T getParameter(std::string const &) const
edm::InputTag inputLabel_
edm::ParameterSet pSet_
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_
std::string subsystemname_
edm::EDGetTokenT< edm::View< reco::Muon > > myMatchedCand_
std::string eventInfoFolder_
edm::InputTag matchLabel_
std::string benchmarkLabel_
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
edm::EDGetTokenT< edm::View< reco::Muon > > myCand_

Member Function Documentation

void PFMuonDQMAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
privatevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 63 of file PFMuonDQMAnalyzer.cc.

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

64  {
65 
66  edm::Handle< edm::View<reco::Muon> > candCollection;
67  edm::Handle< edm::View<reco::Muon> > matchedCandCollection;
68  if ( !createEfficiencyHistos_ ) {
69  iEvent.getByToken( myCand_, candCollection);
70  iEvent.getByToken( myMatchedCand_, matchedCandCollection);
71  } else {
72  iEvent.getByToken( myMatchedCand_, candCollection);
73  iEvent.getByToken( myCand_, matchedCandCollection);
74  }
75 
76  float maxRes = 0.0;
77  float minRes = 99.99;
78  if (candCollection.isValid() && matchedCandCollection.isValid()) {
79  pfCandidateMonitor_.fill( *candCollection, *matchedCandCollection, minRes, maxRes, pSet_, *matchedCandCollection) ;
80 
81  }
82 }
edm::ParameterSet pSet_
PFCandidateMonitor pfCandidateMonitor_
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:230
edm::EDGetTokenT< edm::View< reco::Muon > > myMatchedCand_
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::View< reco::Muon > > myCand_
void PFMuonDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 48 of file PFMuonDQMAnalyzer.cc.

References eventInfoFolder_, pfCandidateMonitor_, pSet_, DQMStore::IBooker::setCurrentFolder(), and PFCandidateMonitor::setup().

51 {
53 
54  edm::LogInfo("PFMuonDQMAnalyzer") << " PFMuonDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_;
55 
57 }
edm::ParameterSet pSet_
void setup(DQMStore::IBooker &b)
book histograms
PFCandidateMonitor pfCandidateMonitor_
std::string eventInfoFolder_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274

Member Data Documentation

std::string PFMuonDQMAnalyzer::benchmarkLabel_
private

Definition at line 30 of file PFMuonDQMAnalyzer.h.

Referenced by PFMuonDQMAnalyzer().

bool PFMuonDQMAnalyzer::createEfficiencyHistos_
private

Definition at line 31 of file PFMuonDQMAnalyzer.h.

Referenced by analyze(), and PFMuonDQMAnalyzer().

std::string PFMuonDQMAnalyzer::eventInfoFolder_
private

Definition at line 39 of file PFMuonDQMAnalyzer.h.

Referenced by bookHistograms(), and PFMuonDQMAnalyzer().

edm::InputTag PFMuonDQMAnalyzer::inputLabel_
private

Definition at line 29 of file PFMuonDQMAnalyzer.h.

Referenced by PFMuonDQMAnalyzer().

edm::InputTag PFMuonDQMAnalyzer::matchLabel_
private

Definition at line 28 of file PFMuonDQMAnalyzer.h.

Referenced by PFMuonDQMAnalyzer().

edm::EDGetTokenT< edm::View<reco::Muon> > PFMuonDQMAnalyzer::myCand_
private

Definition at line 26 of file PFMuonDQMAnalyzer.h.

Referenced by analyze(), and PFMuonDQMAnalyzer().

edm::EDGetTokenT< edm::View<reco::Muon> > PFMuonDQMAnalyzer::myMatchedCand_
private

Definition at line 27 of file PFMuonDQMAnalyzer.h.

Referenced by analyze(), and PFMuonDQMAnalyzer().

int PFMuonDQMAnalyzer::nBadEvents_
private

Definition at line 42 of file PFMuonDQMAnalyzer.h.

Referenced by PFMuonDQMAnalyzer().

PFCandidateMonitor PFMuonDQMAnalyzer::pfCandidateMonitor_
private

Definition at line 36 of file PFMuonDQMAnalyzer.h.

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

edm::ParameterSet PFMuonDQMAnalyzer::pSet_
private

Definition at line 38 of file PFMuonDQMAnalyzer.h.

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

double PFMuonDQMAnalyzer::ptBase_
private

Definition at line 33 of file PFMuonDQMAnalyzer.h.

double PFMuonDQMAnalyzer::ptNotPF_
private

Definition at line 34 of file PFMuonDQMAnalyzer.h.

std::string PFMuonDQMAnalyzer::subsystemname_
private

Definition at line 40 of file PFMuonDQMAnalyzer.h.

Referenced by PFMuonDQMAnalyzer().