CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHcalDiJetsAlCaReco Class Reference
Inheritance diagram for DQMHcalDiJetsAlCaReco:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 DQMHcalDiJetsAlCaReco (const edm::ParameterSet &)
 
 ~DQMHcalDiJetsAlCaReco () 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

bool allowMissingInputs_
 
edm::EDGetTokenT< EcalRecHitCollectionec_
 
int eventCounter_
 
std::string fileName_
 Output file name if required. More...
 
std::string folderName_
 DQM folder name. More...
 
edm::EDGetTokenT< HBHERecHitCollectionhbhe_
 
edm::EDGetTokenT< HFRecHitCollectionhf_
 
MonitorElementhiDistrEtThirdJet_
 
MonitorElementhiDistrProbeJetEnergy_
 
MonitorElementhiDistrProbeJetEta_
 
MonitorElementhiDistrProbeJetPhi_
 
MonitorElementhiDistrRecHitEnergyEBEE_
 
MonitorElementhiDistrRecHitEnergyHBHE_
 
MonitorElementhiDistrRecHitEnergyHF_
 
MonitorElementhiDistrRecHitEnergyHO_
 
MonitorElementhiDistrTagJetEnergy_
 
MonitorElementhiDistrTagJetEta_
 
MonitorElementhiDistrTagJetPhi_
 
edm::EDGetTokenT< HORecHitCollectionho_
 
edm::EDGetTokenT< reco::CaloJetCollectionjets_
 object to monitor More...
 
bool saveToFile_
 Write to file. More...
 

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 38 of file DQMHcalDiJetsAlCaReco.cc.

Constructor & Destructor Documentation

◆ DQMHcalDiJetsAlCaReco()

DQMHcalDiJetsAlCaReco::DQMHcalDiJetsAlCaReco ( const edm::ParameterSet iConfig)

Definition at line 91 of file DQMHcalDiJetsAlCaReco.cc.

References ec_, fileName_, folderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbhe_, hf_, ho_, jets_, saveToFile_, and AlCaHLTBitMon_QueryRunRegistry::string.

91  : eventCounter_(0) {
92  //
93  // Input from configurator file
94  //
95  folderName_ = iConfig.getUntrackedParameter<std::string>("FolderName", "ALCAStreamHcalDiJets");
96 
97  jets_ = consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("jetsInput"));
98  ec_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("ecInput"));
99  hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
100  ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
101  hf_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInput"));
102 
103  saveToFile_ = iConfig.getUntrackedParameter<bool>("SaveToFile", false);
104  fileName_ = iConfig.getUntrackedParameter<std::string>("FileName", "MonitorAlCaHcalDiJets.root");
105 }
edm::EDGetTokenT< reco::CaloJetCollection > jets_
object to monitor
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string fileName_
Output file name if required.
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HORecHitCollection > ho_
edm::EDGetTokenT< HFRecHitCollection > hf_
edm::EDGetTokenT< HBHERecHitCollection > hbhe_
bool saveToFile_
Write to file.
edm::EDGetTokenT< EcalRecHitCollection > ec_
std::string folderName_
DQM folder name.

◆ ~DQMHcalDiJetsAlCaReco()

DQMHcalDiJetsAlCaReco::~DQMHcalDiJetsAlCaReco ( )
override

Definition at line 107 of file DQMHcalDiJetsAlCaReco.cc.

107 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 164 of file DQMHcalDiJetsAlCaReco.cc.

References ec_, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), eventCounter_, dqm::impl::MonitorElement::Fill(), photonIsolationHIProducer_cfi::hbhe, hbhe_, photonIsolationHIProducer_cfi::hf, hf_, hiDistrEtThirdJet_, hiDistrProbeJetEnergy_, hiDistrProbeJetEta_, hiDistrProbeJetPhi_, hiDistrRecHitEnergyEBEE_, hiDistrRecHitEnergyHBHE_, hiDistrRecHitEnergyHF_, hiDistrRecHitEnergyHO_, hiDistrTagJetEnergy_, hiDistrTagJetEta_, hiDistrTagJetPhi_, photonIsolationHIProducer_cfi::ho, ho_, iEvent, edm::HandleBase::isValid(), metsig::jet, singleTopDQM_cfi::jets, jets_, LogDebug, and reco::LeafCandidate::phi().

164  {
165  eventCounter_++;
166 
167  reco::CaloJet jet1, jet2, jet3;
168  Float_t etVetoJet;
169 
171  iEvent.getByToken(jets_, jets);
172 
173  if (!jets.isValid()) {
174  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't getjet product!" << std::endl;
175  return;
176  }
177 
178  if (jets->size() > 1) {
179  jet1 = (*jets)[0];
180  jet2 = (*jets)[1];
181  if (fabs(jet1.eta()) > fabs(jet2.eta())) {
182  reco::CaloJet jet = jet1;
183  jet1 = jet2;
184  jet2 = jet;
185  }
186  // if(fabs(jet1.eta())>eta_1 || (fabs(jet2.eta())-jet_R) < eta_2){
187  // return;}
188  } else {
189  return;
190  }
191 
193  hiDistrTagJetEta_->Fill(jet1.eta());
194  hiDistrTagJetPhi_->Fill(jet1.phi());
195 
197  hiDistrProbeJetEta_->Fill(jet2.eta());
198  hiDistrProbeJetPhi_->Fill(jet2.phi());
199 
200  if (jets->size() > 2) {
201  jet3 = (*jets)[2];
202  etVetoJet = jet3.et();
203  hiDistrEtThirdJet_->Fill(etVetoJet);
204  } else {
205  etVetoJet = 0.;
206  hiDistrEtThirdJet_->Fill(etVetoJet);
207  }
208 
210  iEvent.getByToken(ec_, ec);
211 
212  if (!ec.isValid()) {
213  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ec product!" << std::endl;
214  return;
215  }
216 
217  for (EcalRecHitCollection::const_iterator ecItr = (*ec).begin(); ecItr != (*ec).end(); ++ecItr) {
218  hiDistrRecHitEnergyEBEE_->Fill(ecItr->energy());
219  }
220 
222  iEvent.getByToken(hbhe_, hbhe);
223 
224  if (!hbhe.isValid()) {
225  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hbhe product!" << std::endl;
226  return;
227  }
228 
229  for (HBHERecHitCollection::const_iterator hbheItr = hbhe->begin(); hbheItr != hbhe->end(); hbheItr++) {
230  hiDistrRecHitEnergyHBHE_->Fill(hbheItr->energy());
231  }
232 
234  iEvent.getByToken(ho_, ho);
235 
236  if (!ho.isValid()) {
237  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ho product!" << std::endl;
238  return;
239  }
240 
241  for (HORecHitCollection::const_iterator hoItr = ho->begin(); hoItr != ho->end(); hoItr++) {
242  hiDistrRecHitEnergyHO_->Fill(hoItr->energy());
243  }
244 
246  iEvent.getByToken(hf_, hf);
247 
248  if (!hf.isValid()) {
249  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hf product!" << std::endl;
250  return;
251  }
252 
253  for (HFRecHitCollection::const_iterator hfItr = hf->begin(); hfItr != hf->end(); hfItr++) {
254  hiDistrRecHitEnergyHF_->Fill(hfItr->energy());
255  }
256 
257 } // analyze
edm::EDGetTokenT< reco::CaloJetCollection > jets_
object to monitor
MonitorElement * hiDistrTagJetEnergy_
MonitorElement * hiDistrRecHitEnergyHF_
Jets made from CaloTowers.
Definition: CaloJet.h:27
MonitorElement * hiDistrTagJetPhi_
MonitorElement * hiDistrTagJetEta_
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * hiDistrRecHitEnergyEBEE_
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< HORecHitCollection > ho_
edm::EDGetTokenT< HFRecHitCollection > hf_
MonitorElement * hiDistrProbeJetEta_
MonitorElement * hiDistrProbeJetPhi_
edm::EDGetTokenT< HBHERecHitCollection > hbhe_
bool isValid() const
Definition: HandleBase.h:70
double et() const final
transverse energy
edm::EDGetTokenT< EcalRecHitCollection > ec_
MonitorElement * hiDistrRecHitEnergyHBHE_
MonitorElement * hiDistrProbeJetEnergy_
MonitorElement * hiDistrRecHitEnergyHO_
double phi() const final
momentum azimuthal angle
MonitorElement * hiDistrEtThirdJet_
#define LogDebug(id)
double energy() const final
energy
double eta() const final
momentum pseudorapidity

◆ bookHistograms()

void DQMHcalDiJetsAlCaReco::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 110 of file DQMHcalDiJetsAlCaReco.cc.

References dqm::implementation::IBooker::book1D(), folderName_, hiDistrEtThirdJet_, hiDistrProbeJetEnergy_, hiDistrProbeJetEta_, hiDistrProbeJetPhi_, hiDistrRecHitEnergyEBEE_, hiDistrRecHitEnergyHBHE_, hiDistrRecHitEnergyHF_, hiDistrRecHitEnergyHO_, hiDistrTagJetEnergy_, hiDistrTagJetEta_, hiDistrTagJetPhi_, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

112  {
113  // create and cd into new folder
114  ibooker.setCurrentFolder(folderName_);
115 
116  // book some histograms 1D
117  hiDistrRecHitEnergyEBEE_ = ibooker.book1D("RecHitEnergyEBEE", "the number of hits inside jets", 100, 0, 800);
119  hiDistrRecHitEnergyEBEE_->setAxisTitle("# rechits", 2);
120 
121  hiDistrRecHitEnergyHBHE_ = ibooker.book1D("RecHitEnergyHBHE", "the number of hits inside jets", 100, 0, 800);
123  hiDistrRecHitEnergyHBHE_->setAxisTitle("# rechits", 2);
124 
125  hiDistrRecHitEnergyHF_ = ibooker.book1D("RecHitEnergyHF", "the number of hits inside jets", 150, 0, 1500);
126  hiDistrRecHitEnergyHF_->setAxisTitle("E, GeV", 1);
127  hiDistrRecHitEnergyHF_->setAxisTitle("# rechits", 2);
128 
129  hiDistrRecHitEnergyHO_ = ibooker.book1D("RecHitEnergyHO", "the number of hits inside jets", 100, 0, 100);
130  hiDistrRecHitEnergyHO_->setAxisTitle("E, GeV", 1);
131  hiDistrRecHitEnergyHO_->setAxisTitle("# rechits", 2);
132 
133  hiDistrProbeJetEnergy_ = ibooker.book1D("ProbeJetEnergy", "the energy of probe jets", 250, 0, 2500);
134  hiDistrProbeJetEnergy_->setAxisTitle("E, GeV", 1);
135  hiDistrProbeJetEnergy_->setAxisTitle("# jets", 2);
136 
137  hiDistrProbeJetEta_ = ibooker.book1D("ProbeJetEta", "the number of probe jets", 100, -5., 5.);
138  hiDistrProbeJetEta_->setAxisTitle("#eta", 1);
139  hiDistrProbeJetEta_->setAxisTitle("# jets", 2);
140 
141  hiDistrProbeJetPhi_ = ibooker.book1D("ProbeJetPhi", "the number of probe jets", 50, -3.14, 3.14);
142  hiDistrProbeJetPhi_->setAxisTitle("#phi", 1);
143  hiDistrProbeJetPhi_->setAxisTitle("# jets", 2);
144 
145  hiDistrTagJetEnergy_ = ibooker.book1D("TagJetEnergy", "the energy of tsg jets", 250, 0, 2500);
146  hiDistrTagJetEnergy_->setAxisTitle("E, GeV", 1);
147  hiDistrTagJetEnergy_->setAxisTitle("# jets", 2);
148 
149  hiDistrTagJetEta_ = ibooker.book1D("TagJetEta", "the number of tag jets", 100, -5., 5.);
150  hiDistrTagJetEta_->setAxisTitle("#eta", 1);
151  hiDistrTagJetEta_->setAxisTitle("# jets", 2);
152 
153  hiDistrTagJetPhi_ = ibooker.book1D("TagJetPhi", "the number of tag jets", 50, -3.14, 3.14);
154  hiDistrTagJetPhi_->setAxisTitle("#phi", 1);
155  hiDistrTagJetPhi_->setAxisTitle("# jets", 2);
156 
157  hiDistrEtThirdJet_ = ibooker.book1D("EtThirdJet", "Et of the third jet", 90, 0, 90);
158 
159  //==================================================================================
160 }
MonitorElement * hiDistrTagJetEnergy_
MonitorElement * hiDistrRecHitEnergyHF_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * hiDistrTagJetPhi_
MonitorElement * hiDistrTagJetEta_
MonitorElement * hiDistrRecHitEnergyEBEE_
MonitorElement * hiDistrProbeJetEta_
MonitorElement * hiDistrProbeJetPhi_
MonitorElement * hiDistrRecHitEnergyHBHE_
MonitorElement * hiDistrProbeJetEnergy_
MonitorElement * hiDistrRecHitEnergyHO_
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
MonitorElement * hiDistrEtThirdJet_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

◆ allowMissingInputs_

bool DQMHcalDiJetsAlCaReco::allowMissingInputs_
private

Definition at line 84 of file DQMHcalDiJetsAlCaReco.cc.

◆ ec_

edm::EDGetTokenT<EcalRecHitCollection> DQMHcalDiJetsAlCaReco::ec_
private

Definition at line 70 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

◆ eventCounter_

int DQMHcalDiJetsAlCaReco::eventCounter_
private

Definition at line 48 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze().

◆ fileName_

std::string DQMHcalDiJetsAlCaReco::fileName_
private

Output file name if required.

Definition at line 82 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by DQMHcalDiJetsAlCaReco().

◆ folderName_

std::string DQMHcalDiJetsAlCaReco::folderName_
private

DQM folder name.

Definition at line 76 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by bookHistograms(), and DQMHcalDiJetsAlCaReco().

◆ hbhe_

edm::EDGetTokenT<HBHERecHitCollection> DQMHcalDiJetsAlCaReco::hbhe_
private

Definition at line 71 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

◆ hf_

edm::EDGetTokenT<HFRecHitCollection> DQMHcalDiJetsAlCaReco::hf_
private

Definition at line 73 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

◆ hiDistrEtThirdJet_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrEtThirdJet_
private

Definition at line 66 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrProbeJetEnergy_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetEnergy_
private

Definition at line 58 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrProbeJetEta_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetEta_
private

Definition at line 59 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrProbeJetPhi_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetPhi_
private

Definition at line 60 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrRecHitEnergyEBEE_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyEBEE_
private

Definition at line 53 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrRecHitEnergyHBHE_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHBHE_
private

Definition at line 54 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrRecHitEnergyHF_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHF_
private

Definition at line 55 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrRecHitEnergyHO_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHO_
private

Definition at line 56 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrTagJetEnergy_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetEnergy_
private

Definition at line 62 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrTagJetEta_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetEta_
private

Definition at line 63 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ hiDistrTagJetPhi_

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetPhi_
private

Definition at line 64 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and bookHistograms().

◆ ho_

edm::EDGetTokenT<HORecHitCollection> DQMHcalDiJetsAlCaReco::ho_
private

Definition at line 72 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

◆ jets_

edm::EDGetTokenT<reco::CaloJetCollection> DQMHcalDiJetsAlCaReco::jets_
private

object to monitor

Definition at line 69 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

◆ saveToFile_

bool DQMHcalDiJetsAlCaReco::saveToFile_
private

Write to file.

Definition at line 79 of file DQMHcalDiJetsAlCaReco.cc.

Referenced by DQMHcalDiJetsAlCaReco().