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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DQMHcalIsolatedBunchAlCaReco (const edm::ParameterSet &)
 
 ~DQMHcalIsolatedBunchAlCaReco () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 24 of file DQMHcalIsolatedBunchAlCaReco.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

43  {
44  //
45  // Input from configurator file
46  //
47  folderName_ = ps.getUntrackedParameter<std::string>("FolderName", "ALCAStreamHcalIsolatedBunch");
48  trigName_ = ps.getParameter<std::string>("TriggerName");
49  plotAll_ = ps.getUntrackedParameter<bool>("PlotAll", true);
50 
51  hbhereco_ = consumes<HBHERecHitCollection>(ps.getParameter<edm::InputTag>("hbheInput"));
52  horeco_ = consumes<HORecHitCollection>(ps.getParameter<edm::InputTag>("hoInput"));
53  hfreco_ = consumes<HFRecHitCollection>(ps.getParameter<edm::InputTag>("hfInput"));
54  trigResult_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResult"));
55 }
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 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

57 {}

Member Function Documentation

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

Definition at line 73 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

73  {
74  bool accept(false);
77  iEvent.getByToken(trigResult_, triggerResults);
78  if (triggerResults.isValid()) {
79  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*triggerResults);
80  const std::vector<std::string> &triggerNames_ = triggerNames.triggerNames();
81  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
82  int hlt = triggerResults->accept(iHLT);
83  if (hlt > 0) {
84  if (triggerNames_[iHLT].find(trigName_) != std::string::npos) {
85  accept = true;
86  break;
87  }
88  }
89  }
90  }
91  h_Event_->Fill(0.);
92  if (accept)
93  h_Event_->Fill(1.);
94 
95  if (accept || plotAll_) {
97  iEvent.getByToken(hbhereco_, hbhe);
98  if (!hbhe.isValid()) {
99  edm::LogInfo("HcalCalib") << "Cannot get hbhe product!" << std::endl;
100  } else {
101  h_hbhehit_->Fill(hbhe->size());
102  }
103 
105  iEvent.getByToken(hfreco_, hf);
106  if (!hf.isValid()) {
107  edm::LogInfo("HcalCalib") << "Cannot get hf product!" << std::endl;
108  } else {
109  h_hfhit_->Fill(hf->size());
110  }
111 
113  iEvent.getByToken(horeco_, ho);
114  if (!ho.isValid()) {
115  edm::LogInfo("HcalCalib") << "Cannot get ho product!" << std::endl;
116  } else {
117  h_hohit_->Fill(ho->size());
118  }
119  }
120 
121 } // 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:19
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:20
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
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:45
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< edm::TriggerResults > trigResult_
size_type size() const
void DQMHcalIsolatedBunchAlCaReco::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  irun,
edm::EventSetup const &  isetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 60 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

62  {
63  // create and cd into new folder
64  ibooker.setCurrentFolder(folderName_);
65  h_Event_ = ibooker.book1D("hEvent", "Selection summary", 10, 0, 10);
66  h_hbhehit_ = ibooker.book1D("hHBHEHit", "Size of HBHE Collection", 200, 0, 2000);
67  h_hohit_ = ibooker.book1D("hHOHit", "Size of HO Collection", 200, 0, 2000);
68  h_hfhit_ = ibooker.book1D("hHFHit", "Size of HF Collection", 200, 0, 2000);
69 }
std::string folderName_
DQM folder name.

Member Data Documentation

std::string DQMHcalIsolatedBunchAlCaReco::folderName_
private

DQM folder name.

Definition at line 40 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalIsolatedBunchAlCaReco().

MonitorElement* DQMHcalIsolatedBunchAlCaReco::h_Event_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hfhit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hohit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

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

object to monitor

Definition at line 44 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 46 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 45 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

bool DQMHcalIsolatedBunchAlCaReco::plotAll_
private

Definition at line 41 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

std::string DQMHcalIsolatedBunchAlCaReco::trigName_
private

Definition at line 40 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 47 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().