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

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
 
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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 DQMEDAnalyzer
uint64_t meId () const
 

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::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 24 of file DQMHcalIsolatedBunchAlCaReco.h.

Constructor & Destructor Documentation

◆ DQMHcalIsolatedBunchAlCaReco()

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

Definition at line 43 of file DQMHcalIsolatedBunchAlCaReco.cc.

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 }

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

◆ ~DQMHcalIsolatedBunchAlCaReco()

DQMHcalIsolatedBunchAlCaReco::~DQMHcalIsolatedBunchAlCaReco ( )
override

Definition at line 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

57 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 73 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

References accept(), dqm::impl::MonitorElement::Fill(), spr::find(), h_Event_, h_hbhehit_, h_hfhit_, h_hohit_, photonIsolationHIProducer_cfi::hbhe, hbhereco_, photonIsolationHIProducer_cfi::hf, hfreco_, ValidationMatrix::hlt, photonIsolationHIProducer_cfi::ho, horeco_, iEvent, plotAll_, L1TEGammaOffline_cfi::triggerNames, triggerResults, trigName_, and trigResult_.

◆ bookHistograms()

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.

62  {
63  // create and cd into new folder
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 }

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

Member Data Documentation

◆ folderName_

std::string DQMHcalIsolatedBunchAlCaReco::folderName_
private

DQM folder name.

Definition at line 40 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalIsolatedBunchAlCaReco().

◆ h_Event_

MonitorElement* DQMHcalIsolatedBunchAlCaReco::h_Event_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

◆ h_hbhehit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

◆ h_hfhit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hfhit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

◆ h_hohit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hohit_
private

Definition at line 37 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

◆ hbhereco_

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

object to monitor

Definition at line 44 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ hfreco_

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

Definition at line 46 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ horeco_

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

Definition at line 45 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ plotAll_

bool DQMHcalIsolatedBunchAlCaReco::plotAll_
private

Definition at line 41 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ trigName_

std::string DQMHcalIsolatedBunchAlCaReco::trigName_
private

Definition at line 40 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ trigResult_

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

Definition at line 47 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
MonitorElement * h_hbhehit_
Definition: DQMHcalIsolatedBunchAlCaReco.h:37
DQMHcalIsolatedBunchAlCaReco::folderName_
std::string folderName_
DQM folder name.
Definition: DQMHcalIsolatedBunchAlCaReco.h:40
DQMHcalIsolatedBunchAlCaReco::trigName_
std::string trigName_
Definition: DQMHcalIsolatedBunchAlCaReco.h:40
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< edm::TriggerResults >
DQMHcalIsolatedBunchAlCaReco::trigResult_
edm::EDGetTokenT< edm::TriggerResults > trigResult_
Definition: DQMHcalIsolatedBunchAlCaReco.h:47
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
iEvent
int iEvent
Definition: GenABIO.cc:224
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
DQMHcalIsolatedBunchAlCaReco::hbhereco_
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
Definition: DQMHcalIsolatedBunchAlCaReco.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
DQMHcalIsolatedBunchAlCaReco::h_hfhit_
MonitorElement * h_hfhit_
Definition: DQMHcalIsolatedBunchAlCaReco.h:37
DQMHcalIsolatedBunchAlCaReco::h_hohit_
MonitorElement * h_hohit_
Definition: DQMHcalIsolatedBunchAlCaReco.h:37
edm::TriggerNames
Definition: TriggerNames.h:55
DQMHcalIsolatedBunchAlCaReco::h_Event_
MonitorElement * h_Event_
Definition: DQMHcalIsolatedBunchAlCaReco.h:37
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DQMHcalIsolatedBunchAlCaReco::hfreco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
Definition: DQMHcalIsolatedBunchAlCaReco.h:46
DQMHcalIsolatedBunchAlCaReco::horeco_
edm::EDGetTokenT< HORecHitCollection > horeco_
Definition: DQMHcalIsolatedBunchAlCaReco.h:45
DQMHcalIsolatedBunchAlCaReco::plotAll_
bool plotAll_
Definition: DQMHcalIsolatedBunchAlCaReco.h:41
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
ValidationMatrix.hlt
hlt
Definition: ValidationMatrix.py:459