CMS 3D CMS Logo

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

#include <DQMHcalIsolatedBunchAlCaReco.h>

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

Public Member Functions

 DQMHcalIsolatedBunchAlCaReco (const edm::ParameterSet &)
 
 ~DQMHcalIsolatedBunchAlCaReco () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
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
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 
- 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)
 

Private Attributes

std::string folderName_
 DQM folder name. More...
 
MonitorElementh_Event_
 
MonitorElementh_hbhehit_
 
MonitorElementh_hfhit_
 
MonitorElementh_hohit_
 
edm::EDGetTokenT< HBHERecHitCollectionhbhereco_
 object to monitor More...
 
edm::EDGetTokenT< HFRecHitCollectionhfreco_
 
edm::EDGetTokenT< HORecHitCollectionhoreco_
 
bool plotAll_
 
std::string trigName_
 
edm::EDGetTokenT< edm::TriggerResultstrigResult_
 

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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)
 

Detailed Description

Definition at line 26 of file DQMHcalIsolatedBunchAlCaReco.h.

Constructor & Destructor Documentation

DQMHcalIsolatedBunchAlCaReco::DQMHcalIsolatedBunchAlCaReco ( const edm::ParameterSet ps)

Definition at line 44 of file DQMHcalIsolatedBunchAlCaReco.cc.

References folderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbhereco_, hfreco_, horeco_, plotAll_, AlCaHLTBitMon_QueryRunRegistry::string, trigName_, and trigResult_.

44  {
45  //
46  // Input from configurator file
47  //
48  folderName_ = ps.getUntrackedParameter<std::string>("FolderName","ALCAStreamHcalIsolatedBunch");
49  trigName_ = ps.getParameter<std::string>("TriggerName");
50  plotAll_ = ps.getUntrackedParameter<bool>("PlotAll",true);
51 
52  hbhereco_ = consumes<HBHERecHitCollection>(ps.getParameter<edm::InputTag>("hbheInput"));
53  horeco_ = consumes<HORecHitCollection>(ps.getParameter<edm::InputTag>("hoInput"));
54  hfreco_ = consumes<HFRecHitCollection>(ps.getParameter<edm::InputTag>("hfInput"));
55  trigResult_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResult"));
56 
57 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
std::string folderName_
DQM folder name.
edm::EDGetTokenT< HORecHitCollection > horeco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
edm::EDGetTokenT< edm::TriggerResults > trigResult_
DQMHcalIsolatedBunchAlCaReco::~DQMHcalIsolatedBunchAlCaReco ( )
override

Definition at line 59 of file DQMHcalIsolatedBunchAlCaReco.cc.

59 { }

Member Function Documentation

void DQMHcalIsolatedBunchAlCaReco::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 75 of file DQMHcalIsolatedBunchAlCaReco.cc.

References accept(), edm::HLTGlobalStatus::accept(), MonitorElement::Fill(), spr::find(), edm::Event::getByToken(), h_Event_, h_hbhehit_, h_hfhit_, h_hohit_, photonIsolationHIProducer_cfi::hbhe, hbhereco_, photonIsolationHIProducer_cfi::hf, hfreco_, photonIsolationHIProducer_cfi::ho, horeco_, edm::HandleBase::isValid(), plotAll_, edm::HLTGlobalStatus::size(), edm::SortedCollection< T, SORT >::size(), edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, trigName_, and trigResult_.

76  {
77 
78  bool accept(false);
81  iEvent.getByToken(trigResult_, triggerResults);
82  if (triggerResults.isValid()) {
83  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
84  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
85  for (unsigned int iHLT=0; iHLT<triggerResults->size(); iHLT++) {
86  int hlt = triggerResults->accept(iHLT);
87  if (hlt > 0) {
88  if (triggerNames_[iHLT].find(trigName_)!=std::string::npos) {
89  accept = true;
90  break;
91  }
92  }
93  }
94  }
95  h_Event_->Fill(0.);
96  if (accept) h_Event_->Fill(1.);
97 
98  if (accept || plotAll_) {
100  iEvent.getByToken(hbhereco_, hbhe);
101  if (!hbhe.isValid()) {
102  edm::LogInfo("HcalCalib") << "Cannot get hbhe product!" << std::endl;
103  } else {
104  h_hbhehit_->Fill(hbhe->size());
105  }
106 
108  iEvent.getByToken(hfreco_, hf);
109  if (!hf.isValid()) {
110  edm::LogInfo("HcalCalib") << "Cannot get hf product!" << std::endl;
111  } else {
112  h_hfhit_->Fill(hf->size());
113  }
114 
116  iEvent.getByToken(horeco_, ho);
117  if (!ho.isValid()) {
118  edm::LogInfo("HcalCalib") << "Cannot get ho product!" << std::endl;
119  } else {
120  h_hohit_->Fill(ho->size());
121  }
122  }
123 
124 } //analyze
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
bool accept() const
Has at least one path accepted the event?
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:230
unsigned int size() const
Get number of paths stored.
edm::EDGetTokenT< HORecHitCollection > horeco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::TriggerResults > trigResult_
size_type size() const
void DQMHcalIsolatedBunchAlCaReco::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlineoverrideprotected

Definition at line 38 of file DQMHcalIsolatedBunchAlCaReco.h.

39  { }
void DQMHcalIsolatedBunchAlCaReco::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  irun,
edm::EventSetup const &  isetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 62 of file DQMHcalIsolatedBunchAlCaReco.cc.

References DQMStore::IBooker::book1D(), folderName_, h_Event_, h_hbhehit_, h_hfhit_, h_hohit_, and DQMStore::IBooker::setCurrentFolder().

62  {
63 
64  // create and cd into new folder
66  h_Event_ = ibooker.book1D("hEvent","Selection summary",10,0,10);
67  h_hbhehit_ = ibooker.book1D("hHBHEHit","Size of HBHE Collection",200,0,2000);
68  h_hohit_ = ibooker.book1D("hHOHit", "Size of HO Collection", 200,0,2000);
69  h_hfhit_ = ibooker.book1D("hHFHit", "Size of HF Collection", 200,0,2000);
70 
71 }
std::string folderName_
DQM folder name.
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
void DQMHcalIsolatedBunchAlCaReco::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
inlineoverrideprotected

Definition at line 41 of file DQMHcalIsolatedBunchAlCaReco.h.

42  { }
void DQMHcalIsolatedBunchAlCaReco::endRun ( const edm::Run r,
const edm::EventSetup c 
)
inlineoverrideprotected

Definition at line 44 of file DQMHcalIsolatedBunchAlCaReco.h.

44 { }

Member Data Documentation

std::string DQMHcalIsolatedBunchAlCaReco::folderName_
private

DQM folder name.

Definition at line 54 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalIsolatedBunchAlCaReco().

MonitorElement* DQMHcalIsolatedBunchAlCaReco::h_Event_
private

Definition at line 51 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
private

Definition at line 51 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hfhit_
private

Definition at line 51 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hohit_
private

Definition at line 51 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<HBHERecHitCollection> DQMHcalIsolatedBunchAlCaReco::hbhereco_
private

object to monitor

Definition at line 58 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

edm::EDGetTokenT<HFRecHitCollection> DQMHcalIsolatedBunchAlCaReco::hfreco_
private

Definition at line 60 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

edm::EDGetTokenT<HORecHitCollection> DQMHcalIsolatedBunchAlCaReco::horeco_
private

Definition at line 59 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

bool DQMHcalIsolatedBunchAlCaReco::plotAll_
private

Definition at line 55 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

std::string DQMHcalIsolatedBunchAlCaReco::trigName_
private

Definition at line 54 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

edm::EDGetTokenT<edm::TriggerResults> DQMHcalIsolatedBunchAlCaReco::trigResult_
private

Definition at line 61 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().