#include <DQMHcalDiJetsAlCaReco.h>
Definition at line 22 of file DQMHcalDiJetsAlCaReco.h.
DQMHcalDiJetsAlCaReco::DQMHcalDiJetsAlCaReco | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 51 of file DQMHcalDiJetsAlCaReco.cc.
References dbe_, ec_, fileName_, folderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbhe_, hf_, ho_, jets_, cmsCodeRules::cppFunctionSkipper::operator, and saveToFile_.
: eventCounter_(0) { dbe_ = Service<DQMStore>().operator->(); // // Input from configurator file // folderName_ = iConfig.getUntrackedParameter<string>("FolderName","ALCAStreamHcalDiJets"); jets_= iConfig.getParameter<edm::InputTag>("jetsInput"); ec_= iConfig.getParameter<edm::InputTag>("ecInput"); hbhe_= iConfig.getParameter<edm::InputTag>("hbheInput"); ho_= iConfig.getParameter<edm::InputTag>("hoInput"); hf_= iConfig.getParameter<edm::InputTag>("hfInput"); saveToFile_= iConfig.getUntrackedParameter<bool>("SaveToFile",false); fileName_= iConfig.getUntrackedParameter<string>("FileName","MonitorAlCaHcalDiJets.root"); }
DQMHcalDiJetsAlCaReco::~DQMHcalDiJetsAlCaReco | ( | ) |
Definition at line 72 of file DQMHcalDiJetsAlCaReco.cc.
{}
void DQMHcalDiJetsAlCaReco::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Implements edm::EDAnalyzer.
Definition at line 144 of file DQMHcalDiJetsAlCaReco.cc.
References ec_, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), eventCounter_, MonitorElement::Fill(), edm::Event::getByLabel(), hbhe_, hf_, hiDistrEtThirdJet_, hiDistrProbeJetEnergy_, hiDistrProbeJetEta_, hiDistrProbeJetPhi_, hiDistrRecHitEnergyEBEE_, hiDistrRecHitEnergyHBHE_, hiDistrRecHitEnergyHF_, hiDistrRecHitEnergyHO_, hiDistrTagJetEnergy_, hiDistrTagJetEta_, hiDistrTagJetPhi_, ho_, edm::HandleBase::isValid(), metsig::jet, analyzePatCleaning_cfg::jets, jets_, LogDebug, and reco::LeafCandidate::phi().
{ eventCounter_++; CaloJet jet1, jet2, jet3; Float_t etVetoJet; edm::Handle<CaloJetCollection> jets; iEvent.getByLabel(jets_,jets); if(!jets.isValid()){ LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't getjet product!" << std::endl; return ; } if(jets->size()>1){ jet1 = (*jets)[0]; jet2 = (*jets)[1]; if(fabs(jet1.eta())>fabs(jet2.eta())){ CaloJet jet = jet1; jet1 = jet2; jet2 = jet; } // if(fabs(jet1.eta())>eta_1 || (fabs(jet2.eta())-jet_R) < eta_2){ return;} } else {return;} hiDistrTagJetEnergy_->Fill(jet1.energy()); hiDistrTagJetEta_->Fill(jet1.eta()); hiDistrTagJetPhi_->Fill(jet1.phi()); hiDistrProbeJetEnergy_->Fill(jet2.energy()); hiDistrProbeJetEta_->Fill(jet2.eta()); hiDistrProbeJetPhi_->Fill(jet2.phi()); if(jets->size()>2){ jet3 = (*jets)[2]; etVetoJet = jet3.et(); hiDistrEtThirdJet_->Fill(etVetoJet); } else { etVetoJet = 0.; hiDistrEtThirdJet_->Fill(etVetoJet); } Handle<EcalRecHitCollection> ec; iEvent.getByLabel(ec_,ec); if(!ec.isValid()){ LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ec product!" << std::endl; return ; } for(EcalRecHitCollection::const_iterator ecItr = (*ec).begin(); ecItr != (*ec).end(); ++ecItr) { hiDistrRecHitEnergyEBEE_->Fill(ecItr->energy()); } Handle<HBHERecHitCollection> hbhe; iEvent.getByLabel(hbhe_, hbhe); if(!hbhe.isValid()){ LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hbhe product!" << std::endl; return ; } for(HBHERecHitCollection::const_iterator hbheItr=hbhe->begin(); hbheItr!=hbhe->end(); hbheItr++) { hiDistrRecHitEnergyHBHE_->Fill(hbheItr->energy()); } Handle<HORecHitCollection> ho; iEvent.getByLabel(ho_, ho); if(!ho.isValid()){ LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get ho product!" << std::endl; return ; } for(HORecHitCollection::const_iterator hoItr=ho->begin(); hoItr!=ho->end(); hoItr++) { hiDistrRecHitEnergyHO_->Fill(hoItr->energy()); } Handle<HFRecHitCollection> hf; iEvent.getByLabel(hf_, hf); if(!hf.isValid()){ LogDebug("") << "DQMHcalDiJetsAlCaReco: Error! can't get hf product!" << std::endl; return ; } for(HFRecHitCollection::const_iterator hfItr=hf->begin(); hfItr!=hf->end(); hfItr++) { hiDistrRecHitEnergyHF_->Fill(hfItr->energy()); } } //analyze
void DQMHcalDiJetsAlCaReco::beginJob | ( | void | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 76 of file DQMHcalDiJetsAlCaReco.cc.
References DQMStore::book1D(), dbe_, folderName_, hiDistrEtThirdJet_, hiDistrProbeJetEnergy_, hiDistrProbeJetEta_, hiDistrProbeJetPhi_, hiDistrRecHitEnergyEBEE_, hiDistrRecHitEnergyHBHE_, hiDistrRecHitEnergyHF_, hiDistrRecHitEnergyHO_, hiDistrTagJetEnergy_, hiDistrTagJetEta_, hiDistrTagJetPhi_, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().
{ // create and cd into new folder dbe_->setCurrentFolder(folderName_); // book some histograms 1D hiDistrRecHitEnergyEBEE_ = dbe_->book1D("RecHitEnergyEBEE", "the number of hits inside jets", 100, 0, 800); hiDistrRecHitEnergyEBEE_->setAxisTitle("E, GeV", 1); hiDistrRecHitEnergyEBEE_->setAxisTitle("# rechits", 2); hiDistrRecHitEnergyHBHE_ = dbe_->book1D("RecHitEnergyHBHE", "the number of hits inside jets", 100,0, 800); hiDistrRecHitEnergyHBHE_->setAxisTitle("E, GeV", 1); hiDistrRecHitEnergyHBHE_->setAxisTitle("# rechits", 2); hiDistrRecHitEnergyHF_ = dbe_->book1D("RecHitEnergyHF", "the number of hits inside jets", 150,0, 1500); hiDistrRecHitEnergyHF_->setAxisTitle("E, GeV", 1); hiDistrRecHitEnergyHF_->setAxisTitle("# rechits", 2); hiDistrRecHitEnergyHO_ = dbe_->book1D("RecHitEnergyHO", "the number of hits inside jets", 100,0, 100); hiDistrRecHitEnergyHO_->setAxisTitle("E, GeV", 1); hiDistrRecHitEnergyHO_->setAxisTitle("# rechits", 2); hiDistrProbeJetEnergy_ = dbe_->book1D("ProbeJetEnergy", "the energy of probe jets", 250,0, 2500); hiDistrProbeJetEnergy_->setAxisTitle("E, GeV", 1); hiDistrProbeJetEnergy_->setAxisTitle("# jets", 2); hiDistrProbeJetEta_ = dbe_->book1D("ProbeJetEta", "the number of probe jets", 100, -5., 5.); hiDistrProbeJetEta_->setAxisTitle("#eta", 1); hiDistrProbeJetEta_->setAxisTitle("# jets", 2); hiDistrProbeJetPhi_ = dbe_->book1D("ProbeJetPhi", "the number of probe jets", 50, -3.14, 3.14); hiDistrProbeJetPhi_->setAxisTitle("#phi", 1); hiDistrProbeJetPhi_->setAxisTitle("# jets", 2); hiDistrTagJetEnergy_ = dbe_->book1D("TagJetEnergy", "the energy of tsg jets", 250,0, 2500); hiDistrTagJetEnergy_->setAxisTitle("E, GeV", 1); hiDistrTagJetEnergy_->setAxisTitle("# jets", 2); hiDistrTagJetEta_ = dbe_->book1D("TagJetEta", "the number of tag jets", 100, -5., 5.); hiDistrTagJetEta_->setAxisTitle("#eta", 1); hiDistrTagJetEta_->setAxisTitle("# jets", 2); hiDistrTagJetPhi_ = dbe_->book1D("TagJetPhi", "the number of tag jets", 50, -3.14, 3.14); hiDistrTagJetPhi_->setAxisTitle("#phi", 1); hiDistrTagJetPhi_->setAxisTitle("# jets", 2); hiDistrEtThirdJet_ = dbe_->book1D("EtThirdJet", "Et of the third jet", 90, 0, 90); //================================================================================== }
void DQMHcalDiJetsAlCaReco::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [protected, virtual] |
void DQMHcalDiJetsAlCaReco::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
void DQMHcalDiJetsAlCaReco::endJob | ( | void | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 272 of file DQMHcalDiJetsAlCaReco.cc.
References dbe_, fileName_, DQMStore::save(), and saveToFile_.
{ if (saveToFile_) { dbe_->save(fileName_); } }
void DQMHcalDiJetsAlCaReco::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
void DQMHcalDiJetsAlCaReco::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
bool DQMHcalDiJetsAlCaReco::allowMissingInputs_ [private] |
Definition at line 89 of file DQMHcalDiJetsAlCaReco.h.
DQMStore* DQMHcalDiJetsAlCaReco::dbe_ [private] |
Definition at line 50 of file DQMHcalDiJetsAlCaReco.h.
Referenced by beginJob(), DQMHcalDiJetsAlCaReco(), and endJob().
edm::InputTag DQMHcalDiJetsAlCaReco::ec_ [private] |
Definition at line 75 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and DQMHcalDiJetsAlCaReco().
int DQMHcalDiJetsAlCaReco::eventCounter_ [private] |
Definition at line 51 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze().
std::string DQMHcalDiJetsAlCaReco::fileName_ [private] |
Output file name if required.
Definition at line 87 of file DQMHcalDiJetsAlCaReco.h.
Referenced by DQMHcalDiJetsAlCaReco(), and endJob().
std::string DQMHcalDiJetsAlCaReco::folderName_ [private] |
DQM folder name.
Definition at line 81 of file DQMHcalDiJetsAlCaReco.h.
Referenced by beginJob(), and DQMHcalDiJetsAlCaReco().
edm::InputTag DQMHcalDiJetsAlCaReco::hbhe_ [private] |
Definition at line 76 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and DQMHcalDiJetsAlCaReco().
edm::InputTag DQMHcalDiJetsAlCaReco::hf_ [private] |
Definition at line 78 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and DQMHcalDiJetsAlCaReco().
Definition at line 69 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 61 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 62 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 63 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 56 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 57 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 58 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 59 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 65 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 66 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
Definition at line 67 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and beginJob().
edm::InputTag DQMHcalDiJetsAlCaReco::ho_ [private] |
Definition at line 77 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and DQMHcalDiJetsAlCaReco().
edm::InputTag DQMHcalDiJetsAlCaReco::jets_ [private] |
object to monitor
Definition at line 74 of file DQMHcalDiJetsAlCaReco.h.
Referenced by analyze(), and DQMHcalDiJetsAlCaReco().
bool DQMHcalDiJetsAlCaReco::saveToFile_ [private] |
Write to file.
Definition at line 84 of file DQMHcalDiJetsAlCaReco.h.
Referenced by DQMHcalDiJetsAlCaReco(), and endJob().