CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHcalDiJetsAlCaReco Class Reference

#include <DQMHcalDiJetsAlCaReco.h>

Inheritance diagram for DQMHcalDiJetsAlCaReco:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

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

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...
 

Detailed Description

Definition at line 26 of file DQMHcalDiJetsAlCaReco.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file DQMHcalDiJetsAlCaReco.cc.

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

41  : eventCounter_(0) {
42  //
43  // Input from configurator file
44  //
45  folderName_ = iConfig.getUntrackedParameter<string>("FolderName", "ALCAStreamHcalDiJets");
46 
47  jets_ = consumes<CaloJetCollection>(iConfig.getParameter<edm::InputTag>("jetsInput"));
48  ec_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("ecInput"));
49  hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
50  ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
51  hf_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInput"));
52 
53  saveToFile_ = iConfig.getUntrackedParameter<bool>("SaveToFile", false);
54  fileName_ = iConfig.getUntrackedParameter<string>("FileName", "MonitorAlCaHcalDiJets.root");
55 }
edm::EDGetTokenT< reco::CaloJetCollection > jets_
object to monitor
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string fileName_
Output file name if required.
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 ( )
override

Definition at line 57 of file DQMHcalDiJetsAlCaReco.cc.

57 {}

Member Function Documentation

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

Definition at line 114 of file DQMHcalDiJetsAlCaReco.cc.

References edm::SortedCollection< T, SORT >::begin(), RecoEcal_EventContent_cff::ec, ec_, edm::SortedCollection< T, SORT >::end(), reco::LeafCandidate::energy(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), eventCounter_, MonitorElement::Fill(), edm::Event::getByToken(), photonIsolationHIProducer_cfi::hbhe, hbhe_, photonIsolationHIProducer_cfi::hf, hf_, hiDistrEtThirdJet_, hiDistrProbeJetEnergy_, hiDistrProbeJetEta_, hiDistrProbeJetPhi_, hiDistrRecHitEnergyEBEE_, hiDistrRecHitEnergyHBHE_, hiDistrRecHitEnergyHF_, hiDistrRecHitEnergyHO_, hiDistrTagJetEnergy_, hiDistrTagJetEta_, hiDistrTagJetPhi_, photonIsolationHIProducer_cfi::ho, ho_, edm::HandleBase::isValid(), metsig::jet, fwrapper::jets, jets_, LogDebug, and reco::LeafCandidate::phi().

114  {
115  eventCounter_++;
116 
117  CaloJet jet1, jet2, jet3;
118  Float_t etVetoJet;
119 
121  iEvent.getByToken(jets_, jets);
122 
123  if (!jets.isValid()) {
124  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't getjet product!" << std::endl;
125  return;
126  }
127 
128  if (jets->size() > 1) {
129  jet1 = (*jets)[0];
130  jet2 = (*jets)[1];
131  if (fabs(jet1.eta()) > fabs(jet2.eta())) {
132  CaloJet jet = jet1;
133  jet1 = jet2;
134  jet2 = jet;
135  }
136  // if(fabs(jet1.eta())>eta_1 || (fabs(jet2.eta())-jet_R) < eta_2){
137  // return;}
138  } else {
139  return;
140  }
141 
143  hiDistrTagJetEta_->Fill(jet1.eta());
144  hiDistrTagJetPhi_->Fill(jet1.phi());
145 
147  hiDistrProbeJetEta_->Fill(jet2.eta());
148  hiDistrProbeJetPhi_->Fill(jet2.phi());
149 
150  if (jets->size() > 2) {
151  jet3 = (*jets)[2];
152  etVetoJet = jet3.et();
153  hiDistrEtThirdJet_->Fill(etVetoJet);
154  } else {
155  etVetoJet = 0.;
156  hiDistrEtThirdJet_->Fill(etVetoJet);
157  }
158 
160  iEvent.getByToken(ec_, ec);
161 
162  if (!ec.isValid()) {
163  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ec product!" << std::endl;
164  return;
165  }
166 
167  for (EcalRecHitCollection::const_iterator ecItr = (*ec).begin(); ecItr != (*ec).end(); ++ecItr) {
168  hiDistrRecHitEnergyEBEE_->Fill(ecItr->energy());
169  }
170 
172  iEvent.getByToken(hbhe_, hbhe);
173 
174  if (!hbhe.isValid()) {
175  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hbhe product!" << std::endl;
176  return;
177  }
178 
179  for (HBHERecHitCollection::const_iterator hbheItr = hbhe->begin(); hbheItr != hbhe->end(); hbheItr++) {
180  hiDistrRecHitEnergyHBHE_->Fill(hbheItr->energy());
181  }
182 
184  iEvent.getByToken(ho_, ho);
185 
186  if (!ho.isValid()) {
187  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ho product!" << std::endl;
188  return;
189  }
190 
191  for (HORecHitCollection::const_iterator hoItr = ho->begin(); hoItr != ho->end(); hoItr++) {
192  hiDistrRecHitEnergyHO_->Fill(hoItr->energy());
193  }
194 
196  iEvent.getByToken(hf_, hf);
197 
198  if (!hf.isValid()) {
199  LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hf product!" << std::endl;
200  return;
201  }
202 
203  for (HFRecHitCollection::const_iterator hfItr = hf->begin(); hfItr != hf->end(); hfItr++) {
204  hiDistrRecHitEnergyHF_->Fill(hfItr->energy());
205  }
206 
207 } // analyze
#define LogDebug(id)
edm::EDGetTokenT< reco::CaloJetCollection > jets_
object to monitor
MonitorElement * hiDistrTagJetEnergy_
MonitorElement * hiDistrRecHitEnergyHF_
double eta() const final
momentum pseudorapidity
Jets made from CaloTowers.
Definition: CaloJet.h:29
MonitorElement * hiDistrTagJetPhi_
MonitorElement * hiDistrTagJetEta_
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * hiDistrRecHitEnergyEBEE_
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
double et() const final
transverse energy
edm::EDGetTokenT< HORecHitCollection > ho_
vector< PseudoJet > jets
edm::EDGetTokenT< HFRecHitCollection > hf_
double energy() const final
energy
MonitorElement * hiDistrProbeJetEta_
bool isValid() const
Definition: HandleBase.h:74
const_iterator end() const
MonitorElement * hiDistrProbeJetPhi_
edm::EDGetTokenT< HBHERecHitCollection > hbhe_
edm::EDGetTokenT< EcalRecHitCollection > ec_
MonitorElement * hiDistrRecHitEnergyHBHE_
MonitorElement * hiDistrProbeJetEnergy_
MonitorElement * hiDistrRecHitEnergyHO_
double phi() const final
momentum azimuthal angle
MonitorElement * hiDistrEtThirdJet_
const_iterator begin() const
void DQMHcalDiJetsAlCaReco::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 60 of file DQMHcalDiJetsAlCaReco.cc.

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

62  {
63  // create and cd into new folder
65 
66  // book some histograms 1D
67  hiDistrRecHitEnergyEBEE_ = ibooker.book1D("RecHitEnergyEBEE", "the number of hits inside jets", 100, 0, 800);
69  hiDistrRecHitEnergyEBEE_->setAxisTitle("# rechits", 2);
70 
71  hiDistrRecHitEnergyHBHE_ = ibooker.book1D("RecHitEnergyHBHE", "the number of hits inside jets", 100, 0, 800);
73  hiDistrRecHitEnergyHBHE_->setAxisTitle("# rechits", 2);
74 
75  hiDistrRecHitEnergyHF_ = ibooker.book1D("RecHitEnergyHF", "the number of hits inside jets", 150, 0, 1500);
77  hiDistrRecHitEnergyHF_->setAxisTitle("# rechits", 2);
78 
79  hiDistrRecHitEnergyHO_ = ibooker.book1D("RecHitEnergyHO", "the number of hits inside jets", 100, 0, 100);
81  hiDistrRecHitEnergyHO_->setAxisTitle("# rechits", 2);
82 
83  hiDistrProbeJetEnergy_ = ibooker.book1D("ProbeJetEnergy", "the energy of probe jets", 250, 0, 2500);
86 
87  hiDistrProbeJetEta_ = ibooker.book1D("ProbeJetEta", "the number of probe jets", 100, -5., 5.);
89  hiDistrProbeJetEta_->setAxisTitle("# jets", 2);
90 
91  hiDistrProbeJetPhi_ = ibooker.book1D("ProbeJetPhi", "the number of probe jets", 50, -3.14, 3.14);
93  hiDistrProbeJetPhi_->setAxisTitle("# jets", 2);
94 
95  hiDistrTagJetEnergy_ = ibooker.book1D("TagJetEnergy", "the energy of tsg jets", 250, 0, 2500);
96  hiDistrTagJetEnergy_->setAxisTitle("E, GeV", 1);
97  hiDistrTagJetEnergy_->setAxisTitle("# jets", 2);
98 
99  hiDistrTagJetEta_ = ibooker.book1D("TagJetEta", "the number of tag jets", 100, -5., 5.);
100  hiDistrTagJetEta_->setAxisTitle("#eta", 1);
101  hiDistrTagJetEta_->setAxisTitle("# jets", 2);
102 
103  hiDistrTagJetPhi_ = ibooker.book1D("TagJetPhi", "the number of tag jets", 50, -3.14, 3.14);
104  hiDistrTagJetPhi_->setAxisTitle("#phi", 1);
105  hiDistrTagJetPhi_->setAxisTitle("# jets", 2);
106 
107  hiDistrEtThirdJet_ = ibooker.book1D("EtThirdJet", "Et of the third jet", 90, 0, 90);
108 
109  //==================================================================================
110 }
MonitorElement * hiDistrTagJetEnergy_
MonitorElement * hiDistrRecHitEnergyHF_
MonitorElement * hiDistrTagJetPhi_
MonitorElement * hiDistrTagJetEta_
MonitorElement * hiDistrRecHitEnergyEBEE_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * hiDistrProbeJetEta_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * hiDistrProbeJetPhi_
MonitorElement * hiDistrRecHitEnergyHBHE_
MonitorElement * hiDistrProbeJetEnergy_
MonitorElement * hiDistrRecHitEnergyHO_
std::string folderName_
DQM folder name.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hiDistrEtThirdJet_

Member Data Documentation

bool DQMHcalDiJetsAlCaReco::allowMissingInputs_
private

Definition at line 72 of file DQMHcalDiJetsAlCaReco.h.

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

Definition at line 58 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

int DQMHcalDiJetsAlCaReco::eventCounter_
private

Definition at line 36 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze().

std::string DQMHcalDiJetsAlCaReco::fileName_
private

Output file name if required.

Definition at line 70 of file DQMHcalDiJetsAlCaReco.h.

Referenced by DQMHcalDiJetsAlCaReco().

std::string DQMHcalDiJetsAlCaReco::folderName_
private

DQM folder name.

Definition at line 64 of file DQMHcalDiJetsAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalDiJetsAlCaReco().

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

Definition at line 59 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

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

Definition at line 61 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrEtThirdJet_
private

Definition at line 54 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetEnergy_
private

Definition at line 46 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetEta_
private

Definition at line 47 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrProbeJetPhi_
private

Definition at line 48 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyEBEE_
private

Definition at line 41 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHBHE_
private

Definition at line 42 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHF_
private

Definition at line 43 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrRecHitEnergyHO_
private

Definition at line 44 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetEnergy_
private

Definition at line 50 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetEta_
private

Definition at line 51 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalDiJetsAlCaReco::hiDistrTagJetPhi_
private

Definition at line 52 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 60 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

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

object to monitor

Definition at line 57 of file DQMHcalDiJetsAlCaReco.h.

Referenced by analyze(), and DQMHcalDiJetsAlCaReco().

bool DQMHcalDiJetsAlCaReco::saveToFile_
private

Write to file.

Definition at line 67 of file DQMHcalDiJetsAlCaReco.h.

Referenced by DQMHcalDiJetsAlCaReco().