CMS 3D CMS Logo

DQMHcalIsolatedBunchAlCaReco.cc
Go to the documentation of this file.
1 /*
2  * \file DQMHcalIsolatedBunchAlCaReco.cc
3  *
4  * \author Olga Kodolova
5  *
6  *
7  *
8  * Description: Monitoring of Phi Symmetry Calibration Stream
9  */
10 
16 
19 
20 // DQM include files
21 
23 
24 // work on collections
25 
30 
36 
38 
39 // ******************************************
40 // constructors
41 // *****************************************
42 
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 }
56 
58 
59 //--------------------------------------------------------
61  edm::Run const &irun,
62  edm::EventSetup const &isetup) {
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 }
70 
71 //-------------------------------------------------------------
72 
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
DQMHcalIsolatedBunchAlCaReco::h_hbhehit_
MonitorElement * h_hbhehit_
Definition: DQMHcalIsolatedBunchAlCaReco.h:37
DQMHcalIsolatedBunchAlCaReco::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: DQMHcalIsolatedBunchAlCaReco.cc:73
FEDNumbering.h
MessageLogger.h
DQMHcalIsolatedBunchAlCaReco::folderName_
std::string folderName_
DQM folder name.
Definition: DQMHcalIsolatedBunchAlCaReco.h:40
DQMHcalIsolatedBunchAlCaReco::trigName_
std::string trigName_
Definition: DQMHcalIsolatedBunchAlCaReco.h:40
edm::Run
Definition: Run.h:45
DQMHcalIsolatedBunchAlCaReco::~DQMHcalIsolatedBunchAlCaReco
~DQMHcalIsolatedBunchAlCaReco() override
Definition: DQMHcalIsolatedBunchAlCaReco.cc:57
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
DQMStore.h
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
FEDRawData.h
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
Service.h
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TFileService.h
DQMHcalIsolatedBunchAlCaReco.h
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HcalDetId.h
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
DQMHcalIsolatedBunchAlCaReco::hbhereco_
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_
object to monitor
Definition: DQMHcalIsolatedBunchAlCaReco.h:44
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
CaloCellGeometry.h
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
EventSetup.h
DQMHcalIsolatedBunchAlCaReco::DQMHcalIsolatedBunchAlCaReco
DQMHcalIsolatedBunchAlCaReco(const edm::ParameterSet &)
Definition: DQMHcalIsolatedBunchAlCaReco.cc:43
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
DQMHcalIsolatedBunchAlCaReco::hfreco_
edm::EDGetTokenT< HFRecHitCollection > hfreco_
Definition: DQMHcalIsolatedBunchAlCaReco.h:46
HcalDCCHeader.h
ParameterSet.h
DQMHcalIsolatedBunchAlCaReco::horeco_
edm::EDGetTokenT< HORecHitCollection > horeco_
Definition: DQMHcalIsolatedBunchAlCaReco.h:45
edm::Event
Definition: Event.h:73
DQMHcalIsolatedBunchAlCaReco::plotAll_
bool plotAll_
Definition: DQMHcalIsolatedBunchAlCaReco.h:41
FEDHeader.h
edm::InputTag
Definition: InputTag.h:15
DQMHcalIsolatedBunchAlCaReco::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DQMHcalIsolatedBunchAlCaReco.cc:60
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
HcalHTRData.h