CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHcalIsolatedBunchAlCaReco Class Reference
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 44 of file DQMHcalIsolatedBunchAlCaReco.cc.

Constructor & Destructor Documentation

◆ DQMHcalIsolatedBunchAlCaReco()

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

Definition at line 74 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

74  {
75  //
76  // Input from configurator file
77  //
78  folderName_ = ps.getUntrackedParameter<std::string>("FolderName", "ALCAStreamHcalIsolatedBunch");
79  trigName_ = ps.getParameter<std::string>("TriggerName");
80  plotAll_ = ps.getUntrackedParameter<bool>("PlotAll", true);
81 
82  hbhereco_ = consumes<HBHERecHitCollection>(ps.getParameter<edm::InputTag>("hbheInput"));
83  horeco_ = consumes<HORecHitCollection>(ps.getParameter<edm::InputTag>("hoInput"));
84  hfreco_ = consumes<HFRecHitCollection>(ps.getParameter<edm::InputTag>("hfInput"));
85  trigResult_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResult"));
86 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
T getUntrackedParameter(std::string const &, T const &) const
std::string folderName_
DQM folder name.
edm::EDGetTokenT< HORecHitCollection > horeco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
edm::EDGetTokenT< edm::TriggerResults > trigResult_

◆ ~DQMHcalIsolatedBunchAlCaReco()

DQMHcalIsolatedBunchAlCaReco::~DQMHcalIsolatedBunchAlCaReco ( )
override

Definition at line 88 of file DQMHcalIsolatedBunchAlCaReco.cc.

88 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 104 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

104  {
105  bool accept(false);
108  iEvent.getByToken(trigResult_, triggerResults);
109  if (triggerResults.isValid()) {
110  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*triggerResults);
111  const std::vector<std::string> &triggerNames_ = triggerNames.triggerNames();
112  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
113  int hlt = triggerResults->accept(iHLT);
114  if (hlt > 0) {
115  if (triggerNames_[iHLT].find(trigName_) != std::string::npos) {
116  accept = true;
117  break;
118  }
119  }
120  }
121  }
122  h_Event_->Fill(0.);
123  if (accept)
124  h_Event_->Fill(1.);
125 
126  if (accept || plotAll_) {
128  iEvent.getByToken(hbhereco_, hbhe);
129  if (!hbhe.isValid()) {
130  edm::LogInfo("HcalCalib") << "Cannot get hbhe product!" << std::endl;
131  } else {
132  h_hbhehit_->Fill(hbhe->size());
133  }
134 
136  iEvent.getByToken(hfreco_, hf);
137  if (!hf.isValid()) {
138  edm::LogInfo("HcalCalib") << "Cannot get hf product!" << std::endl;
139  } else {
140  h_hfhit_->Fill(hf->size());
141  }
142 
144  iEvent.getByToken(horeco_, ho);
145  if (!ho.isValid()) {
146  edm::LogInfo("HcalCalib") << "Cannot get ho product!" << std::endl;
147  } else {
148  h_hohit_->Fill(ho->size());
149  }
150  }
151 
152 } // analyze
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
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:31
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< HORecHitCollection > horeco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
static std::string const triggerResults
Definition: EdmProvDump.cc:47
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::TriggerResults > trigResult_

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 91 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

93  {
94  // create and cd into new folder
96  h_Event_ = ibooker.book1D("hEvent", "Selection summary", 10, 0, 10);
97  h_hbhehit_ = ibooker.book1D("hHBHEHit", "Size of HBHE Collection", 200, 0, 2000);
98  h_hohit_ = ibooker.book1D("hHOHit", "Size of HO Collection", 200, 0, 2000);
99  h_hfhit_ = ibooker.book1D("hHFHit", "Size of HF Collection", 200, 0, 2000);
100 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::string folderName_
DQM folder name.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

◆ folderName_

std::string DQMHcalIsolatedBunchAlCaReco::folderName_
private

DQM folder name.

Definition at line 60 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by bookHistograms(), and DQMHcalIsolatedBunchAlCaReco().

◆ h_Event_

MonitorElement* DQMHcalIsolatedBunchAlCaReco::h_Event_
private

Definition at line 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ h_hbhehit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
private

Definition at line 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ h_hfhit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hfhit_
private

Definition at line 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ h_hohit_

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hohit_
private

Definition at line 57 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hbhereco_

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

object to monitor

Definition at line 64 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ hfreco_

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

Definition at line 66 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ horeco_

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

Definition at line 65 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ plotAll_

bool DQMHcalIsolatedBunchAlCaReco::plotAll_
private

Definition at line 61 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ trigName_

std::string DQMHcalIsolatedBunchAlCaReco::trigName_
private

Definition at line 60 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

◆ trigResult_

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

Definition at line 67 of file DQMHcalIsolatedBunchAlCaReco.cc.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().