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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 DQMHcalIsolatedBunchAlCaReco (const edm::ParameterSet &)
 
 ~DQMHcalIsolatedBunchAlCaReco () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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
 

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_
 

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 }
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 58 of file DQMHcalIsolatedBunchAlCaReco.cc.

58 {}

Member Function Documentation

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

Definition at line 74 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_, ValidationMatrix::hlt, 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_.

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

Definition at line 61 of file DQMHcalIsolatedBunchAlCaReco.cc.

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

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 }
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
std::string folderName_
DQM folder name.
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106

Member Data Documentation

std::string DQMHcalIsolatedBunchAlCaReco::folderName_
private

DQM folder name.

Definition at line 42 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalIsolatedBunchAlCaReco().

MonitorElement* DQMHcalIsolatedBunchAlCaReco::h_Event_
private

Definition at line 39 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
private

Definition at line 39 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hfhit_
private

Definition at line 39 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * DQMHcalIsolatedBunchAlCaReco::h_hohit_
private

Definition at line 39 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and bookHistograms().

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

object to monitor

Definition at line 46 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 48 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 47 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

bool DQMHcalIsolatedBunchAlCaReco::plotAll_
private

Definition at line 43 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

std::string DQMHcalIsolatedBunchAlCaReco::trigName_
private

Definition at line 42 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().

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

Definition at line 49 of file DQMHcalIsolatedBunchAlCaReco.h.

Referenced by analyze(), and DQMHcalIsolatedBunchAlCaReco().