CMS 3D CMS Logo

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

#include <HCALRecHitAnalyzer.h>

Inheritance diagram for HCALRecHitAnalyzer:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
 HCALRecHitAnalyzer (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void FillGeometry (const edm::EventSetup &)
 

Private Attributes

bool debug_
 
bool finebinning_
 
std::string FolderName_
 
edm::EDGetTokenT< HBHERecHitCollectionhBHERecHitsLabel_
 
edm::EDGetTokenT< HFRecHitCollectionhFRecHitsLabel_
 
MonitorElementhHCAL_D1_energy_ieta_iphi
 
MonitorElementhHCAL_D1_energyvsieta
 
MonitorElementhHCAL_D1_Maxenergy_ieta_iphi
 
MonitorElementhHCAL_D1_Maxenergyvsieta
 
MonitorElementhHCAL_D1_METPhivsieta
 
MonitorElementhHCAL_D1_METvsieta
 
MonitorElementhHCAL_D1_MExvsieta
 
MonitorElementhHCAL_D1_MEyvsieta
 
MonitorElementhHCAL_D1_Minenergy_ieta_iphi
 
MonitorElementhHCAL_D1_Minenergyvsieta
 
MonitorElementhHCAL_D1_Occ_ieta_iphi
 
MonitorElementhHCAL_D1_Occvsieta
 
MonitorElementhHCAL_D1_SETvsieta
 
MonitorElementhHCAL_D2_energy_ieta_iphi
 
MonitorElementhHCAL_D2_energyvsieta
 
MonitorElementhHCAL_D2_Maxenergy_ieta_iphi
 
MonitorElementhHCAL_D2_Maxenergyvsieta
 
MonitorElementhHCAL_D2_METPhivsieta
 
MonitorElementhHCAL_D2_METvsieta
 
MonitorElementhHCAL_D2_MExvsieta
 
MonitorElementhHCAL_D2_MEyvsieta
 
MonitorElementhHCAL_D2_Minenergy_ieta_iphi
 
MonitorElementhHCAL_D2_Minenergyvsieta
 
MonitorElementhHCAL_D2_Occ_ieta_iphi
 
MonitorElementhHCAL_D2_Occvsieta
 
MonitorElementhHCAL_D2_SETvsieta
 
MonitorElementhHCAL_D3_energy_ieta_iphi
 
MonitorElementhHCAL_D3_energyvsieta
 
MonitorElementhHCAL_D3_Maxenergy_ieta_iphi
 
MonitorElementhHCAL_D3_Maxenergyvsieta
 
MonitorElementhHCAL_D3_METPhivsieta
 
MonitorElementhHCAL_D3_METvsieta
 
MonitorElementhHCAL_D3_MExvsieta
 
MonitorElementhHCAL_D3_MEyvsieta
 
MonitorElementhHCAL_D3_Minenergy_ieta_iphi
 
MonitorElementhHCAL_D3_Minenergyvsieta
 
MonitorElementhHCAL_D3_Occ_ieta_iphi
 
MonitorElementhHCAL_D3_Occvsieta
 
MonitorElementhHCAL_D3_SETvsieta
 
MonitorElementhHCAL_D4_energy_ieta_iphi
 
MonitorElementhHCAL_D4_energyvsieta
 
MonitorElementhHCAL_D4_Maxenergy_ieta_iphi
 
MonitorElementhHCAL_D4_Maxenergyvsieta
 
MonitorElementhHCAL_D4_METPhivsieta
 
MonitorElementhHCAL_D4_METvsieta
 
MonitorElementhHCAL_D4_MExvsieta
 
MonitorElementhHCAL_D4_MEyvsieta
 
MonitorElementhHCAL_D4_Minenergy_ieta_iphi
 
MonitorElementhHCAL_D4_Minenergyvsieta
 
MonitorElementhHCAL_D4_Occ_ieta_iphi
 
MonitorElementhHCAL_D4_Occvsieta
 
MonitorElementhHCAL_D4_SETvsieta
 
MonitorElementhHCAL_ieta_detaMap
 
MonitorElementhHCAL_ieta_dphiMap
 
MonitorElementhHCAL_ieta_iphi_etaMap
 
MonitorElementhHCAL_ieta_iphi_HBMap
 
MonitorElementhHCAL_ieta_iphi_HEMap
 
MonitorElementhHCAL_ieta_iphi_HFMap
 
MonitorElementhHCAL_ieta_iphi_HOMap
 
MonitorElementhHCAL_ieta_iphi_phiMap
 
MonitorElementhHCAL_Nevents
 
edm::EDGetTokenT< HORecHitCollectionhORecHitsLabel_
 
int Nevents
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 26 of file HCALRecHitAnalyzer.h.

Constructor & Destructor Documentation

HCALRecHitAnalyzer::HCALRecHitAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 47 of file HCALRecHitAnalyzer.cc.

References debug_, finebinning_, FolderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hBHERecHitsLabel_, hFRecHitsLabel_, hORecHitsLabel_, and AlCaHLTBitMon_QueryRunRegistry::string.

48 {
49 
50  // Retrieve Information from the Configuration File
51  hBHERecHitsLabel_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("HBHERecHitsLabel"));
52  hORecHitsLabel_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("HORecHitsLabel"));
53  hFRecHitsLabel_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("HFRecHitsLabel"));
54 
55  debug_ = iConfig.getParameter<bool>("Debug");
56  finebinning_ = iConfig.getUntrackedParameter<bool>("FineBinning");
57  FolderName_ = iConfig.getUntrackedParameter<std::string>("FolderName");
58 
59 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HFRecHitCollection > hFRecHitsLabel_
edm::EDGetTokenT< HORecHitCollection > hORecHitsLabel_
edm::EDGetTokenT< HBHERecHitCollection > hBHERecHitsLabel_

Member Function Documentation

void HCALRecHitAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Int_t depth = det.depth(); //always 4

Definition at line 447 of file HCALRecHitAnalyzer.cc.

References edm::SortedCollection< T, SORT >::begin(), DEBUG, egammaForCoreTracking_cff::depth, HcalDetId::depth(), edm::SortedCollection< T, SORT >::end(), ET, PVValHelper::eta, JetChargeProducer_cfi::exp, MonitorElement::Fill(), MonitorElement::getBinContent(), edm::Event::getByToken(), egHLT::errCodes::HBHERecHits, hBHERecHitsLabel_, HcalBarrel, egHLT::errCodes::HFRecHits, hFRecHitsLabel_, hHCAL_D1_energy_ieta_iphi, hHCAL_D1_energyvsieta, hHCAL_D1_Maxenergy_ieta_iphi, hHCAL_D1_Maxenergyvsieta, hHCAL_D1_METPhivsieta, hHCAL_D1_METvsieta, hHCAL_D1_MExvsieta, hHCAL_D1_MEyvsieta, hHCAL_D1_Minenergy_ieta_iphi, hHCAL_D1_Minenergyvsieta, hHCAL_D1_Occ_ieta_iphi, hHCAL_D1_Occvsieta, hHCAL_D1_SETvsieta, hHCAL_D2_energy_ieta_iphi, hHCAL_D2_energyvsieta, hHCAL_D2_Maxenergy_ieta_iphi, hHCAL_D2_Maxenergyvsieta, hHCAL_D2_METPhivsieta, hHCAL_D2_METvsieta, hHCAL_D2_MExvsieta, hHCAL_D2_MEyvsieta, hHCAL_D2_Minenergy_ieta_iphi, hHCAL_D2_Minenergyvsieta, hHCAL_D2_Occ_ieta_iphi, hHCAL_D2_Occvsieta, hHCAL_D2_SETvsieta, hHCAL_D3_energy_ieta_iphi, hHCAL_D3_energyvsieta, hHCAL_D3_Maxenergy_ieta_iphi, hHCAL_D3_Maxenergyvsieta, hHCAL_D3_METPhivsieta, hHCAL_D3_METvsieta, hHCAL_D3_MExvsieta, hHCAL_D3_MEyvsieta, hHCAL_D3_Minenergy_ieta_iphi, hHCAL_D3_Minenergyvsieta, hHCAL_D3_Occ_ieta_iphi, hHCAL_D3_Occvsieta, hHCAL_D3_SETvsieta, hHCAL_D4_energy_ieta_iphi, hHCAL_D4_energyvsieta, hHCAL_D4_Maxenergy_ieta_iphi, hHCAL_D4_Maxenergyvsieta, hHCAL_D4_METPhivsieta, hHCAL_D4_METvsieta, hHCAL_D4_MExvsieta, hHCAL_D4_MEyvsieta, hHCAL_D4_Minenergy_ieta_iphi, hHCAL_D4_Minenergyvsieta, hHCAL_D4_Occ_ieta_iphi, hHCAL_D4_Occvsieta, hHCAL_D4_SETvsieta, hHCAL_ieta_iphi_etaMap, hHCAL_ieta_iphi_phiMap, hHCAL_Nevents, hORecHitsLabel_, mps_fire::i, HcalDetId::ieta(), HcalDetId::iphi(), edm::HandleBase::isValid(), Nevents, phi, colinearityKinematic::Phi, edm::Handle< T >::product(), reco::tau::disc::Pt(), MonitorElement::setBinContent(), HcalDetId::subdet(), and theta().

448 {
449  Nevents++;
450  hHCAL_Nevents->Fill(0);
451  // ==========================================================
452  // Retrieve!
453  // ==========================================================
454 
456  const HORecHitCollection *HORecHits;
458 
459  edm::Handle<HBHERecHitCollection> HBHERecHitsHandle;
460  iEvent.getByToken(hBHERecHitsLabel_,HBHERecHitsHandle);
461  if (!HBHERecHitsHandle.isValid()) {
462  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
463  << "HCALRecHitAnalyzer::analyze!\n"; return;
464  } else {
465  HBHERecHits = HBHERecHitsHandle.product();
466  }
467  edm::Handle<HORecHitCollection> HORecHitsHandle;
468  iEvent.getByToken(hORecHitsLabel_,HORecHitsHandle);
469  if (!HORecHitsHandle.isValid()) {
470  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
471  << "HCALRecHitAnalyzer::analyze!\n"; return;
472  } else {
473  HORecHits = HORecHitsHandle.product();
474  }
475  edm::Handle<HFRecHitCollection> HFRecHitsHandle;
476  iEvent.getByToken(hFRecHitsLabel_,HFRecHitsHandle);
477  if (!HFRecHitsHandle.isValid()) {
478  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
479  << "HCALRecHitAnalyzer::analyze!\n"; return;
480  } else {
481  HFRecHits = HFRecHitsHandle.product();
482  }
483 
484  // ==========================================================
485  // Fill Histograms!
486  // ==========================================================
487 
488  TLorentzVector vHBHEMET_EtaRing[83][4];
489  int HBHEActiveRing[83][4];
490  int HBHENActiveCells[83][4];
491  double HBHESET_EtaRing[83][4];
492  double HBHEMinEnergy_EtaRing[83][4];
493  double HBHEMaxEnergy_EtaRing[83][4];
494 
495  for (int i = 0; i < 83; i++) {
496  for (int j = 0; j < 4; j++) {
497 
498  HBHEActiveRing[i][j] = 0;
499  HBHENActiveCells[i][j] = 0;
500  HBHESET_EtaRing[i][j] = 0;
501  HBHEMinEnergy_EtaRing[i][j] = 14E3;
502  HBHEMaxEnergy_EtaRing[i][j] = -999;
503  }
504  }
505 
506  // Loop over HBHERecHit's
508  int nHBrechit = 0, nHErechit = 0;
509 
510  for (hbherechit = HBHERecHits->begin(); hbherechit != HBHERecHits->end(); hbherechit++) {
511 
512  HcalDetId det = hbherechit->id();
513  double Energy = hbherechit->energy();
514  Int_t depth = det.depth();
515  Int_t ieta = det.ieta();
516  Int_t iphi = det.iphi();
517  int EtaRing = 41 + ieta; // this counts from 0
518  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
519  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
520  double theta = 2*TMath::ATan(exp(-1*eta));
521  double ET = Energy*TMath::Sin(theta);
522  HcalSubdetector HcalNum = det.subdet();
523  TLorentzVector v_;
524 
525 
526 
527  if (Energy>0) // zero suppress
528  {
529  HBHEActiveRing[EtaRing][depth-1] = 1;
530  HBHENActiveCells[EtaRing][depth-1]++;
531  HBHESET_EtaRing[EtaRing][depth-1]+=ET;
532  v_.SetPtEtaPhiE(ET, 0, phi, ET);
533  vHBHEMET_EtaRing[EtaRing][depth-1]-=v_;
534 
535 
536  DEBUG( EtaRing << " " << Energy << " " << ET << " " << theta << " " << eta << " " << phi << " : " << vHBHEMET_EtaRing[EtaRing][depth-1].Phi() << " " << vHBHEMET_EtaRing[EtaRing][depth-1].Pt() );
537 
538  switch (depth) {
539  case 1:
540  hHCAL_D1_Occ_ieta_iphi->Fill(ieta,iphi);
541  break;
542  case 2:
543  hHCAL_D2_Occ_ieta_iphi->Fill(ieta,iphi);
544  break;
545  case 3:
546  hHCAL_D3_Occ_ieta_iphi->Fill(ieta,iphi);
547  break;
548  } // end switch
549  }
550 
551  if (Energy > HBHEMaxEnergy_EtaRing[EtaRing][depth-1])
552  HBHEMaxEnergy_EtaRing[EtaRing][depth-1] = Energy;
553  if (Energy < HBHEMinEnergy_EtaRing[EtaRing][depth-1])
554  HBHEMinEnergy_EtaRing[EtaRing][depth-1] = Energy;
555 
556  switch (depth) {
557  case 1:
558  hHCAL_D1_energy_ieta_iphi->Fill(ieta,iphi,Energy);
559  hHCAL_D1_energyvsieta->Fill(ieta,Energy);
560  if (Energy>hHCAL_D1_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
561  hHCAL_D1_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
562  if (Energy<hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
563  hHCAL_D1_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
564 
565  break;
566  case 2:
567  hHCAL_D2_energy_ieta_iphi->Fill(ieta,iphi,Energy);
568 
569  hHCAL_D2_energyvsieta->Fill(ieta,Energy);
570  if (Energy>hHCAL_D2_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
571  hHCAL_D2_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
572  if (Energy<hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
573  hHCAL_D2_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
574  break;
575  case 3:
576  hHCAL_D3_energy_ieta_iphi->Fill(ieta,iphi,Energy);
577 
578  hHCAL_D3_energyvsieta->Fill(ieta,Energy);
579  if (Energy>hHCAL_D3_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
580  hHCAL_D3_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
581  if (Energy<hHCAL_D3_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
582  hHCAL_D3_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
583  break;
584  } // end switch
585 
586 
587  if (HcalNum == HcalBarrel) {
588  nHBrechit++;
589  } else { // HcalEndcap
590  nHErechit++;
591  }
592  } // end loop over HBHERecHit's
593 
594  // Fill eta-ring MET quantities
595  for (int iEtaRing=0; iEtaRing < 83; iEtaRing++) {
596  for (int jDepth=0; jDepth < 3; jDepth++) {
597 
598  switch (jDepth+1) {
599  case 1:
600  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
601  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
602  break;
603  case 2:
604  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
605  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
606  break;
607  case 3:
608  hHCAL_D3_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
609  hHCAL_D3_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
610  break;
611  }
612 
613  if (HBHEActiveRing[iEtaRing][jDepth]) {
614 
615  switch (jDepth+1) {
616  case 1:
617  hHCAL_D1_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
618  hHCAL_D1_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
619  hHCAL_D1_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
620  hHCAL_D1_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
621  hHCAL_D1_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
622  hHCAL_D1_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
623  break;
624  case 2:
625  hHCAL_D2_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
626  hHCAL_D2_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
627  hHCAL_D2_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
628  hHCAL_D2_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
629  hHCAL_D2_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
630  hHCAL_D2_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
631  break;
632  case 3:
633  hHCAL_D3_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
634  hHCAL_D3_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
635  hHCAL_D3_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
636  hHCAL_D3_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
637  hHCAL_D3_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
638  hHCAL_D3_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
639  break;
640  } //switch
641  } //activering
642  }//depth
643  } //etaring
644 
645 
646  //-------------------------------------------------HO
647  TLorentzVector vHOMET_EtaRing[83];
648  int HOActiveRing[83];
649  int HONActiveCells[83];
650  double HOSET_EtaRing[83];
651  double HOMinEnergy_EtaRing[83];
652  double HOMaxEnergy_EtaRing[83];
653 
654  for (int i=0;i<83; i++) {
655 
656  HOActiveRing[i] = 0;
657  HONActiveCells[i] = 0;
658  HOSET_EtaRing[i] = 0;
659  HOMinEnergy_EtaRing[i] = 14E3;
660  HOMaxEnergy_EtaRing[i] = -999;
661  }
662 
663  // Loop over HORecHit's
665  int nHOrechit = 0;
666 
667  for (horechit = HORecHits->begin(); horechit != HORecHits->end(); horechit++) {
668 
669  nHOrechit++;
670 
671  HcalDetId det = horechit->id();
672  double Energy = horechit->energy();
674  Int_t ieta = det.ieta();
675  Int_t iphi = det.iphi();
676  int EtaRing = 41+ieta; // this counts from 0
677  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
678  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
679  double theta = 2*TMath::ATan(exp(-1*eta));
680  double ET = Energy*TMath::Sin(theta);
681  TLorentzVector v_;
682 
683 
684  if (Energy>0) // zero suppress
685  {
686  HOActiveRing[EtaRing] = 1;
687  HONActiveCells[EtaRing]++;
688  HOSET_EtaRing[EtaRing]+=ET;
689  v_.SetPtEtaPhiE(ET, 0, phi, ET);
690  vHOMET_EtaRing[EtaRing]-=v_;
691 
692  hHCAL_D4_Occ_ieta_iphi->Fill(ieta,iphi);
693  }
694 
695  if (Energy > HOMaxEnergy_EtaRing[EtaRing])
696  HOMaxEnergy_EtaRing[EtaRing] = Energy;
697  if (Energy < HOMinEnergy_EtaRing[EtaRing])
698  HOMinEnergy_EtaRing[EtaRing] = Energy;
699 
700  hHCAL_D4_energy_ieta_iphi->Fill(ieta,iphi,Energy);
701 
702  hHCAL_D4_energyvsieta->Fill(ieta,Energy);
703  if (Energy>hHCAL_D4_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
704  hHCAL_D4_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
705  if (Energy<hHCAL_D4_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
706  hHCAL_D4_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
707 
708  } // end loop over HORecHit's
709 
710  // Fill eta-ring MET quantities
711  for (int iEtaRing=0; iEtaRing<83; iEtaRing++) {
712  hHCAL_D4_Maxenergyvsieta->Fill(iEtaRing-41, HOMaxEnergy_EtaRing[iEtaRing]);
713  hHCAL_D4_Minenergyvsieta->Fill(iEtaRing-41, HOMinEnergy_EtaRing[iEtaRing]);
714 
715  if (HOActiveRing[iEtaRing]) {
716 
717  hHCAL_D4_METPhivsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Phi());
718  hHCAL_D4_MExvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Px());
719  hHCAL_D4_MEyvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Py());
720  hHCAL_D4_METvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Pt());
721  hHCAL_D4_SETvsieta->Fill(iEtaRing-41, HOSET_EtaRing[iEtaRing]);
722  hHCAL_D4_Occvsieta->Fill(iEtaRing-41, HONActiveCells[iEtaRing]);
723 
724  }
725 
726  }
727 
728  //------------------------------------------------HF
729 
730  TLorentzVector vHFMET_EtaRing[83][2];
731  int HFActiveRing[83][2];
732  int HFNActiveCells[83][2];
733  double HFSET_EtaRing[83][2];
734  double HFMinEnergy_EtaRing[83][2];
735  double HFMaxEnergy_EtaRing[83][2];
736 
737  for (int i=0;i<83; i++) {
738  for (int j=0;j<2; j++) {
739 
740  HFActiveRing[i][j] = 0;
741  HFNActiveCells[i][j] = 0;
742  HFSET_EtaRing[i][j] = 0;
743  HFMinEnergy_EtaRing[i][j] = 14E3;
744  HFMaxEnergy_EtaRing[i][j] = -999;
745 
746  }
747  }
748 
749  // Loop over HFRecHit's
751  int nHFrechit = 0;
752 
753  for (hfrechit = HFRecHits->begin(); hfrechit != HFRecHits->end(); hfrechit++) {
754 
755  nHFrechit++;
756 
757  HcalDetId det = hfrechit->id();
758  double Energy = hfrechit->energy();
759  Int_t depth = det.depth();
760  Int_t ieta = det.ieta();
761  Int_t iphi = det.iphi();
762  int EtaRing = 41+ieta; // this counts from 0
763  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
764  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
765  double theta = 2*TMath::ATan(exp(-1*eta));
766  double ET = Energy*TMath::Sin(theta);
767 
768  TLorentzVector v_;
769  if (Energy>0) // zero suppress
770  {
771  HFActiveRing[EtaRing][depth-1] = 1;
772  HFNActiveCells[EtaRing][depth-1]++;
773  HFSET_EtaRing[EtaRing][depth-1]+=ET;
774  v_.SetPtEtaPhiE(ET, 0, phi, ET);
775  vHFMET_EtaRing[EtaRing][depth-1]-=v_;
776 
777  switch (depth) {
778  case 1:
779  hHCAL_D1_Occ_ieta_iphi->Fill(ieta,iphi);
780  break;
781  case 2:
782  hHCAL_D2_Occ_ieta_iphi->Fill(ieta,iphi);
783  break;
784 
785  }
786  }
787 
788  if (Energy > HFMaxEnergy_EtaRing[EtaRing][depth-1])
789  HFMaxEnergy_EtaRing[EtaRing][depth-1] = Energy;
790  if (Energy < HFMinEnergy_EtaRing[EtaRing][depth-1])
791  HFMinEnergy_EtaRing[EtaRing][depth-1] = Energy;
792 
793 
794  switch (depth) {
795  case 1:
796  hHCAL_D1_energy_ieta_iphi->Fill(ieta,iphi,Energy);
797 
798  hHCAL_D1_energyvsieta->Fill(ieta,Energy);
799  if (Energy>hHCAL_D1_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
800  hHCAL_D1_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
801  if (Energy<hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
802  hHCAL_D1_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
803  break;
804  case 2:
805  hHCAL_D2_energy_ieta_iphi->Fill(ieta,iphi,Energy);
806 
807  hHCAL_D2_energyvsieta->Fill(ieta,Energy);
808  if (Energy>hHCAL_D2_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
809  hHCAL_D2_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
810  if (Energy<hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
811  hHCAL_D2_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
812  break;
813  }
814 
815  } // end loop over HFRecHit's
816 
817  // Fill eta-ring MET quantities
818  for (int iEtaRing=0; iEtaRing<83; iEtaRing++) {
819  for (int jDepth=0; jDepth<2; jDepth++) {
820  switch (jDepth+1) {
821  case 1:
822  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
823  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
824  break;
825  case 2:
826  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
827  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
828  break;
829  }
830 
831 
832  if (HFActiveRing[iEtaRing][jDepth]) {
833 
834  switch (jDepth+1) {
835  case 1:
836 
837  hHCAL_D1_METPhivsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
838  hHCAL_D1_MExvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
839  hHCAL_D1_MEyvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
840  hHCAL_D1_METvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
841  hHCAL_D1_SETvsieta->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]);
842  hHCAL_D1_Occvsieta->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]);
843  break;
844 
845  case 2:
846 
847  hHCAL_D2_METPhivsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
848  hHCAL_D2_MExvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
849  hHCAL_D2_MEyvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
850  hHCAL_D2_METvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
851  hHCAL_D2_SETvsieta->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]);
852  hHCAL_D2_Occvsieta->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]);
853  break;
854 
855  }
856  }
857  }
858  }
859 
860 
861 
862 }
MonitorElement * hHCAL_D4_Maxenergy_ieta_iphi
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hHCAL_D3_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D3_Maxenergyvsieta
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
MonitorElement * hHCAL_ieta_iphi_phiMap
MonitorElement * hHCAL_D1_SETvsieta
MonitorElement * hHCAL_D3_Occvsieta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
MonitorElement * hHCAL_D2_Minenergy_ieta_iphi
MonitorElement * hHCAL_D4_METvsieta
MonitorElement * hHCAL_D4_energyvsieta
MonitorElement * hHCAL_D4_Maxenergyvsieta
MonitorElement * hHCAL_D1_Minenergy_ieta_iphi
std::vector< HBHERecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
MonitorElement * hHCAL_D4_Occvsieta
MonitorElement * hHCAL_D3_Minenergyvsieta
MonitorElement * hHCAL_D3_Occ_ieta_iphi
MonitorElement * hHCAL_D4_Occ_ieta_iphi
MonitorElement * hHCAL_D2_Minenergyvsieta
MonitorElement * hHCAL_ieta_iphi_etaMap
MonitorElement * hHCAL_D4_MEyvsieta
MonitorElement * hHCAL_D4_SETvsieta
MonitorElement * hHCAL_D3_METvsieta
MonitorElement * hHCAL_D3_MExvsieta
void Fill(long long x)
MonitorElement * hHCAL_D1_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D1_Occ_ieta_iphi
MonitorElement * hHCAL_D4_METPhivsieta
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
MonitorElement * hHCAL_D4_Minenergyvsieta
MonitorElement * hHCAL_D2_METvsieta
MonitorElement * hHCAL_D1_Occvsieta
MonitorElement * hHCAL_D1_Minenergyvsieta
MonitorElement * hHCAL_D1_METPhivsieta
MonitorElement * hHCAL_D1_METvsieta
MonitorElement * hHCAL_D1_Maxenergyvsieta
MonitorElement * hHCAL_D3_energyvsieta
MonitorElement * hHCAL_D2_Maxenergyvsieta
MonitorElement * hHCAL_D2_energyvsieta
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
HcalSubdetector
Definition: HcalAssistant.h:31
edm::EDGetTokenT< HFRecHitCollection > hFRecHitsLabel_
MonitorElement * hHCAL_D2_METPhivsieta
MonitorElement * hHCAL_D2_Occvsieta
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * hHCAL_D2_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D3_METPhivsieta
MonitorElement * hHCAL_D1_energyvsieta
MonitorElement * hHCAL_D2_energy_ieta_iphi
const_iterator end() const
MonitorElement * hHCAL_D1_energy_ieta_iphi
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
MonitorElement * hHCAL_D4_Minenergy_ieta_iphi
MonitorElement * hHCAL_D3_SETvsieta
edm::EDGetTokenT< HORecHitCollection > hORecHitsLabel_
MonitorElement * hHCAL_D1_MExvsieta
MonitorElement * hHCAL_D4_MExvsieta
MonitorElement * hHCAL_D2_MEyvsieta
T const * product() const
Definition: Handle.h:81
#define DEBUG(X)
MonitorElement * hHCAL_D1_MEyvsieta
edm::EDGetTokenT< HBHERecHitCollection > hBHERecHitsLabel_
MonitorElement * hHCAL_D4_energy_ieta_iphi
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * hHCAL_D3_energy_ieta_iphi
MonitorElement * hHCAL_D2_Occ_ieta_iphi
MonitorElement * hHCAL_Nevents
MonitorElement * hHCAL_D3_Minenergy_ieta_iphi
MonitorElement * hHCAL_D2_SETvsieta
#define ET
MonitorElement * hHCAL_D2_MExvsieta
MonitorElement * hHCAL_D3_MEyvsieta
const_iterator begin() const
void HCALRecHitAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 67 of file HCALRecHitAnalyzer.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), finebinning_, FolderName_, hHCAL_D1_energy_ieta_iphi, hHCAL_D1_energyvsieta, hHCAL_D1_Maxenergy_ieta_iphi, hHCAL_D1_Maxenergyvsieta, hHCAL_D1_METPhivsieta, hHCAL_D1_METvsieta, hHCAL_D1_MExvsieta, hHCAL_D1_MEyvsieta, hHCAL_D1_Minenergy_ieta_iphi, hHCAL_D1_Minenergyvsieta, hHCAL_D1_Occ_ieta_iphi, hHCAL_D1_Occvsieta, hHCAL_D1_SETvsieta, hHCAL_D2_energy_ieta_iphi, hHCAL_D2_energyvsieta, hHCAL_D2_Maxenergy_ieta_iphi, hHCAL_D2_Maxenergyvsieta, hHCAL_D2_METPhivsieta, hHCAL_D2_METvsieta, hHCAL_D2_MExvsieta, hHCAL_D2_MEyvsieta, hHCAL_D2_Minenergy_ieta_iphi, hHCAL_D2_Minenergyvsieta, hHCAL_D2_Occ_ieta_iphi, hHCAL_D2_Occvsieta, hHCAL_D2_SETvsieta, hHCAL_D3_energy_ieta_iphi, hHCAL_D3_energyvsieta, hHCAL_D3_Maxenergy_ieta_iphi, hHCAL_D3_Maxenergyvsieta, hHCAL_D3_METPhivsieta, hHCAL_D3_METvsieta, hHCAL_D3_MExvsieta, hHCAL_D3_MEyvsieta, hHCAL_D3_Minenergy_ieta_iphi, hHCAL_D3_Minenergyvsieta, hHCAL_D3_Occ_ieta_iphi, hHCAL_D3_Occvsieta, hHCAL_D3_SETvsieta, hHCAL_D4_energy_ieta_iphi, hHCAL_D4_energyvsieta, hHCAL_D4_Maxenergy_ieta_iphi, hHCAL_D4_Maxenergyvsieta, hHCAL_D4_METPhivsieta, hHCAL_D4_METvsieta, hHCAL_D4_MExvsieta, hHCAL_D4_MEyvsieta, hHCAL_D4_Minenergy_ieta_iphi, hHCAL_D4_Minenergyvsieta, hHCAL_D4_Occ_ieta_iphi, hHCAL_D4_Occvsieta, hHCAL_D4_SETvsieta, hHCAL_ieta_detaMap, hHCAL_ieta_dphiMap, hHCAL_ieta_iphi_etaMap, hHCAL_ieta_iphi_HBMap, hHCAL_ieta_iphi_HEMap, hHCAL_ieta_iphi_HFMap, hHCAL_ieta_iphi_HOMap, hHCAL_ieta_iphi_phiMap, hHCAL_Nevents, mps_fire::i, MonitorElement::setBinContent(), and DQMStore::IBooker::setCurrentFolder().

69  {
70  // get ahold of back-end interface
71  // dbe_ = edm::Service<DQMStore>().operator->();
72 
73  ibooker.setCurrentFolder(FolderName_+"/geometry");
74  hHCAL_ieta_iphi_HBMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HBMap","",83,-41,42,72,1,73);
75  hHCAL_ieta_iphi_HEMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HEMap","",83,-41,42,72,1,73);
76  hHCAL_ieta_iphi_HFMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HFMap","",83,-41,42,72,1,73);
77  hHCAL_ieta_iphi_HOMap = ibooker.book2D("METTask_HCAL_ieta_iphi_HOMap","",83,-41,42,72,1,73);
78  hHCAL_ieta_iphi_etaMap = ibooker.book2D("METTask_HCAL_ieta_iphi_etaMap","",83,-41,42,72,1,73);
79  hHCAL_ieta_iphi_phiMap = ibooker.book2D("METTask_HCAL_ieta_iphi_phiMap","",83,-41,42,72,1,73);
80  hHCAL_ieta_detaMap = ibooker.book1D("METTask_HCAL_ieta_detaMap","",83,-41,42);
81  hHCAL_ieta_dphiMap = ibooker.book1D("METTask_HCAL_ieta_dphiMap","",83,-41,42);
82 
83  // Initialize bins for geometry to -999 because z = 0 is a valid entry
84  for (int i = 1; i <= 83; i++) {
85 
88 
89  for (int j = 1; j <= 72; j++) {
90 
97 
98  }
99 
100  }
101 
102  // ibooker.setCurrentFolder("RecoMETV/MET_HCAL/data");
103  ibooker.setCurrentFolder(FolderName_);
104  //--Store number of events used
105  hHCAL_Nevents = ibooker.book1D("METTask_HCAL_Nevents","",1,0,1);
106  //--Data integrated over all events and stored by HCAL(ieta,iphi)
107 
108  hHCAL_D1_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_energy_ieta_iphi","",83,-41,42,72,1,73);
109  hHCAL_D2_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_energy_ieta_iphi","",83,-41,42,72,1,73);
110  hHCAL_D3_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_energy_ieta_iphi","",83,-41,42,72,1,73);
111  hHCAL_D4_energy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_energy_ieta_iphi","",83,-41,42,72,1,73);
112 
113  hHCAL_D1_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Minenergy_ieta_iphi","",83,-41,42,72,1,73);
114  hHCAL_D2_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Minenergy_ieta_iphi","",83,-41,42,72,1,73);
115  hHCAL_D3_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Minenergy_ieta_iphi","",83,-41,42,72,1,73);
116  hHCAL_D4_Minenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Minenergy_ieta_iphi","",83,-41,42,72,1,73);
117 
118  hHCAL_D1_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Maxenergy_ieta_iphi","",83,-41,42,72,1,73);
119  hHCAL_D2_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Maxenergy_ieta_iphi","",83,-41,42,72,1,73);
120  hHCAL_D3_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Maxenergy_ieta_iphi","",83,-41,42,72,1,73);
121  hHCAL_D4_Maxenergy_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Maxenergy_ieta_iphi","",83,-41,42,72,1,73);
122 
123  // need to initialize those
124  for (int i=1; i<=83; i++)
125  for (int j=1; j<=73; j++)
126  {
131 
136  }
137 
138  hHCAL_D1_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D1_Occ_ieta_iphi","",83,-41,42,72,1,73);
139  hHCAL_D2_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D2_Occ_ieta_iphi","",83,-41,42,72,1,73);
140  hHCAL_D3_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D3_Occ_ieta_iphi","",83,-41,42,72,1,73);
141  hHCAL_D4_Occ_ieta_iphi = ibooker.book2D("METTask_HCAL_D4_Occ_ieta_iphi","",83,-41,42,72,1,73);
142  //--Data over eta-rings
143 
144 
145  // CaloTower values
146 
147  if(finebinning_)
148  {
149  hHCAL_D1_energyvsieta = ibooker.book2D("METTask_HCAL_D1_energyvsieta","",83,-41,42,20101,-100,2001);
150  hHCAL_D2_energyvsieta = ibooker.book2D("METTask_HCAL_D2_energyvsieta","",83,-41,42,20101,-100,2001);
151  hHCAL_D3_energyvsieta = ibooker.book2D("METTask_HCAL_D3_energyvsieta","",83,-41,42,20101,-100,2001);
152  hHCAL_D4_energyvsieta = ibooker.book2D("METTask_HCAL_D4_energyvsieta","",83,-41,42,20101,-100,2001);
153 
154  hHCAL_D1_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Minenergyvsieta","",83,-41,42,20101,-100,2001);
155  hHCAL_D2_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Minenergyvsieta","",83,-41,42,20101,-100,2001);
156  hHCAL_D3_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Minenergyvsieta","",83,-41,42,20101,-100,2001);
157  hHCAL_D4_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Minenergyvsieta","",83,-41,42,20101,-100,2001);
158 
159  hHCAL_D1_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Maxenergyvsieta","",83,-41,42,20101,-100,2001);
160  hHCAL_D2_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Maxenergyvsieta","",83,-41,42,20101,-100,2001);
161  hHCAL_D3_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Maxenergyvsieta","",83,-41,42,20101,-100,2001);
162  hHCAL_D4_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Maxenergyvsieta","",83,-41,42,20101,-100,2001);
163 
164  // Integrated over phi
165  hHCAL_D1_Occvsieta = ibooker.book2D("METTask_HCAL_D1_Occvsieta","",83,-41,42,73,0,73);
166  hHCAL_D2_Occvsieta = ibooker.book2D("METTask_HCAL_D2_Occvsieta","",83,-41,42,73,0,73);
167  hHCAL_D3_Occvsieta = ibooker.book2D("METTask_HCAL_D3_Occvsieta","",83,-41,42,73,0,73);
168  hHCAL_D4_Occvsieta = ibooker.book2D("METTask_HCAL_D4_Occvsieta","",83,-41,42,73,0,73);
169 
170  hHCAL_D1_SETvsieta = ibooker.book2D("METTask_HCAL_D1_SETvsieta","",83,-41,42,20001,0,2001);
171  hHCAL_D2_SETvsieta = ibooker.book2D("METTask_HCAL_D2_SETvsieta","",83,-41,42,20001,0,2001);
172  hHCAL_D3_SETvsieta = ibooker.book2D("METTask_HCAL_D3_SETvsieta","",83,-41,42,20001,0,2001);
173  hHCAL_D4_SETvsieta = ibooker.book2D("METTask_HCAL_D4_SETvsieta","",83,-41,42,20001,0,2001);
174 
175  hHCAL_D1_METvsieta = ibooker.book2D("METTask_HCAL_D1_METvsieta","",83,-41,42,20001,0,2001);
176  hHCAL_D2_METvsieta = ibooker.book2D("METTask_HCAL_D2_METvsieta","",83,-41,42,20001,0,2001);
177  hHCAL_D3_METvsieta = ibooker.book2D("METTask_HCAL_D3_METvsieta","",83,-41,42,20001,0,2001);
178  hHCAL_D4_METvsieta = ibooker.book2D("METTask_HCAL_D4_METvsieta","",83,-41,42,20001,0,2001);
179 
180  hHCAL_D1_METPhivsieta = ibooker.book2D("METTask_HCAL_D1_METPhivsieta","",83,-41,42, 80, -4,4);
181  hHCAL_D2_METPhivsieta = ibooker.book2D("METTask_HCAL_D2_METPhivsieta","",83,-41,42, 80, -4,4);
182  hHCAL_D3_METPhivsieta = ibooker.book2D("METTask_HCAL_D3_METPhivsieta","",83,-41,42, 80, -4,4);
183  hHCAL_D4_METPhivsieta = ibooker.book2D("METTask_HCAL_D4_METPhivsieta","",83,-41,42, 80, -4,4);
184 
185  hHCAL_D1_MExvsieta = ibooker.book2D("METTask_HCAL_D1_MExvsieta","",83,-41,42, 10001,-500,501);
186  hHCAL_D2_MExvsieta = ibooker.book2D("METTask_HCAL_D2_MExvsieta","",83,-41,42, 10001,-500,501);
187  hHCAL_D3_MExvsieta = ibooker.book2D("METTask_HCAL_D3_MExvsieta","",83,-41,42, 10001,-500,501);
188  hHCAL_D4_MExvsieta = ibooker.book2D("METTask_HCAL_D4_MExvsieta","",83,-41,42, 10001,-500,501);
189 
190  hHCAL_D1_MEyvsieta = ibooker.book2D("METTask_HCAL_D1_MEyvsieta","",83,-41,42, 10001,-500,501);
191  hHCAL_D2_MEyvsieta = ibooker.book2D("METTask_HCAL_D2_MEyvsieta","",83,-41,42, 10001,-500,501);
192  hHCAL_D3_MEyvsieta = ibooker.book2D("METTask_HCAL_D3_MEyvsieta","",83,-41,42, 10001,-500,501);
193  hHCAL_D4_MEyvsieta = ibooker.book2D("METTask_HCAL_D4_MEyvsieta","",83,-41,42, 10001,-500,501);
194  }
195  else
196  {
197  hHCAL_D1_energyvsieta = ibooker.book2D("METTask_HCAL_D1_energyvsieta","",83,-41,42,1000,-10,1990);
198  hHCAL_D2_energyvsieta = ibooker.book2D("METTask_HCAL_D2_energyvsieta","",83,-41,42,1000,-10,1990);
199  hHCAL_D3_energyvsieta = ibooker.book2D("METTask_HCAL_D3_energyvsieta","",83,-41,42,1000,-10,1990);
200  hHCAL_D4_energyvsieta = ibooker.book2D("METTask_HCAL_D4_energyvsieta","",83,-41,42,1000,-10,1990);
201 
202  hHCAL_D1_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Minenergyvsieta","",83,-41,42,1000,-10,1990);
203  hHCAL_D2_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Minenergyvsieta","",83,-41,42,1000,-10,1990);
204  hHCAL_D3_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Minenergyvsieta","",83,-41,42,1000,-10,1990);
205  hHCAL_D4_Minenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Minenergyvsieta","",83,-41,42,1000,-10,1990);
206 
207  hHCAL_D1_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D1_Maxenergyvsieta","",83,-41,42,1000,-10,1990);
208  hHCAL_D2_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D2_Maxenergyvsieta","",83,-41,42,1000,-10,1990);
209  hHCAL_D3_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D3_Maxenergyvsieta","",83,-41,42,1000,-10,1990);
210  hHCAL_D4_Maxenergyvsieta = ibooker.book2D("METTask_HCAL_D4_Maxenergyvsieta","",83,-41,42,1000,-10,1990);
211 
212  // Integrated over phi
213  hHCAL_D1_Occvsieta = ibooker.book2D("METTask_HCAL_D1_Occvsieta","",83,-41,42,73,0,73);
214  hHCAL_D2_Occvsieta = ibooker.book2D("METTask_HCAL_D2_Occvsieta","",83,-41,42,73,0,73);
215  hHCAL_D3_Occvsieta = ibooker.book2D("METTask_HCAL_D3_Occvsieta","",83,-41,42,73,0,73);
216  hHCAL_D4_Occvsieta = ibooker.book2D("METTask_HCAL_D4_Occvsieta","",83,-41,42,73,0,73);
217 
218  hHCAL_D1_SETvsieta = ibooker.book2D("METTask_HCAL_D1_SETvsieta","",83,-41,42,1000,0,2000);
219  hHCAL_D2_SETvsieta = ibooker.book2D("METTask_HCAL_D2_SETvsieta","",83,-41,42,1000,0,2000);
220  hHCAL_D3_SETvsieta = ibooker.book2D("METTask_HCAL_D3_SETvsieta","",83,-41,42,1000,0,2000);
221  hHCAL_D4_SETvsieta = ibooker.book2D("METTask_HCAL_D4_SETvsieta","",83,-41,42,1000,0,2000);
222 
223  hHCAL_D1_METvsieta = ibooker.book2D("METTask_HCAL_D1_METvsieta","",83,-41,42,1000,0,2000);
224  hHCAL_D2_METvsieta = ibooker.book2D("METTask_HCAL_D2_METvsieta","",83,-41,42,1000,0,2000);
225  hHCAL_D3_METvsieta = ibooker.book2D("METTask_HCAL_D3_METvsieta","",83,-41,42,1000,0,2000);
226  hHCAL_D4_METvsieta = ibooker.book2D("METTask_HCAL_D4_METvsieta","",83,-41,42,1000,0,2000);
227 
228  hHCAL_D1_METPhivsieta = ibooker.book2D("METTask_HCAL_D1_METPhivsieta","",83,-41,42, 80, -4,4);
229  hHCAL_D2_METPhivsieta = ibooker.book2D("METTask_HCAL_D2_METPhivsieta","",83,-41,42, 80, -4,4);
230  hHCAL_D3_METPhivsieta = ibooker.book2D("METTask_HCAL_D3_METPhivsieta","",83,-41,42, 80, -4,4);
231  hHCAL_D4_METPhivsieta = ibooker.book2D("METTask_HCAL_D4_METPhivsieta","",83,-41,42, 80, -4,4);
232 
233  hHCAL_D1_MExvsieta = ibooker.book2D("METTask_HCAL_D1_MExvsieta","",83,-41,42, 500,-500,500);
234  hHCAL_D2_MExvsieta = ibooker.book2D("METTask_HCAL_D2_MExvsieta","",83,-41,42, 500,-500,500);
235  hHCAL_D3_MExvsieta = ibooker.book2D("METTask_HCAL_D3_MExvsieta","",83,-41,42, 500,-500,500);
236  hHCAL_D4_MExvsieta = ibooker.book2D("METTask_HCAL_D4_MExvsieta","",83,-41,42, 500,-500,500);
237 
238  hHCAL_D1_MEyvsieta = ibooker.book2D("METTask_HCAL_D1_MEyvsieta","",83,-41,42, 500,-500,500);
239  hHCAL_D2_MEyvsieta = ibooker.book2D("METTask_HCAL_D2_MEyvsieta","",83,-41,42, 500,-500,500);
240  hHCAL_D3_MEyvsieta = ibooker.book2D("METTask_HCAL_D3_MEyvsieta","",83,-41,42, 500,-500,500);
241  hHCAL_D4_MEyvsieta = ibooker.book2D("METTask_HCAL_D4_MEyvsieta","",83,-41,42, 500,-500,500);
242 
243  }
244  // Inspect Setup for CaloTower Geometry
245  // FillGeometry(iSetup);
246 }
MonitorElement * hHCAL_D4_Maxenergy_ieta_iphi
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hHCAL_ieta_iphi_HFMap
MonitorElement * hHCAL_D3_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D3_Maxenergyvsieta
MonitorElement * hHCAL_ieta_iphi_phiMap
MonitorElement * hHCAL_D1_SETvsieta
MonitorElement * hHCAL_D3_Occvsieta
MonitorElement * hHCAL_D2_Minenergy_ieta_iphi
MonitorElement * hHCAL_D4_METvsieta
MonitorElement * hHCAL_D4_energyvsieta
MonitorElement * hHCAL_D4_Maxenergyvsieta
MonitorElement * hHCAL_D1_Minenergy_ieta_iphi
MonitorElement * hHCAL_D4_Occvsieta
MonitorElement * hHCAL_D3_Minenergyvsieta
MonitorElement * hHCAL_D3_Occ_ieta_iphi
MonitorElement * hHCAL_D4_Occ_ieta_iphi
MonitorElement * hHCAL_D2_Minenergyvsieta
MonitorElement * hHCAL_ieta_iphi_etaMap
MonitorElement * hHCAL_D4_MEyvsieta
MonitorElement * hHCAL_D4_SETvsieta
MonitorElement * hHCAL_ieta_iphi_HBMap
MonitorElement * hHCAL_D3_METvsieta
MonitorElement * hHCAL_ieta_iphi_HOMap
MonitorElement * hHCAL_D3_MExvsieta
MonitorElement * hHCAL_D1_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D1_Occ_ieta_iphi
MonitorElement * hHCAL_D4_METPhivsieta
MonitorElement * hHCAL_D4_Minenergyvsieta
MonitorElement * hHCAL_D2_METvsieta
MonitorElement * hHCAL_D1_Occvsieta
MonitorElement * hHCAL_D1_Minenergyvsieta
MonitorElement * hHCAL_D1_METPhivsieta
MonitorElement * hHCAL_D1_METvsieta
MonitorElement * hHCAL_D1_Maxenergyvsieta
MonitorElement * hHCAL_D3_energyvsieta
MonitorElement * hHCAL_D2_Maxenergyvsieta
MonitorElement * hHCAL_D2_energyvsieta
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * hHCAL_D2_METPhivsieta
MonitorElement * hHCAL_D2_Occvsieta
MonitorElement * hHCAL_D2_Maxenergy_ieta_iphi
MonitorElement * hHCAL_D3_METPhivsieta
MonitorElement * hHCAL_D1_energyvsieta
MonitorElement * hHCAL_ieta_detaMap
MonitorElement * hHCAL_D2_energy_ieta_iphi
MonitorElement * hHCAL_D1_energy_ieta_iphi
MonitorElement * hHCAL_D4_Minenergy_ieta_iphi
MonitorElement * hHCAL_D3_SETvsieta
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * hHCAL_D1_MExvsieta
MonitorElement * hHCAL_D4_MExvsieta
MonitorElement * hHCAL_D2_MEyvsieta
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * hHCAL_D1_MEyvsieta
MonitorElement * hHCAL_D4_energy_ieta_iphi
MonitorElement * hHCAL_D3_energy_ieta_iphi
MonitorElement * hHCAL_D2_Occ_ieta_iphi
MonitorElement * hHCAL_Nevents
MonitorElement * hHCAL_D3_Minenergy_ieta_iphi
MonitorElement * hHCAL_D2_SETvsieta
MonitorElement * hHCAL_D2_MExvsieta
MonitorElement * hHCAL_D3_MEyvsieta
MonitorElement * hHCAL_ieta_iphi_HEMap
MonitorElement * hHCAL_ieta_dphiMap
void HCALRecHitAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Definition at line 61 of file HCALRecHitAnalyzer.cc.

References FillGeometry(), and Nevents.

62 {
63  Nevents = 0;
64  FillGeometry(iSetup);
65 }
void FillGeometry(const edm::EventSetup &)
void HCALRecHitAnalyzer::FillGeometry ( const edm::EventSetup iSetup)
private

Definition at line 248 of file HCALRecHitAnalyzer.cc.

References PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), objects.autophobj::float, edm::EventSetup::get(), MonitorElement::getBinContent(), CaloSubdetectorGeometry::getGeometry(), HcalGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), HcalGeometry::getValidDetIds(), CaloSubdetectorGeometry::getValidDetIds(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hHCAL_ieta_detaMap, hHCAL_ieta_dphiMap, hHCAL_ieta_iphi_etaMap, hHCAL_ieta_iphi_phiMap, mps_fire::i, HcalDetId::ieta(), HcalDetId::iphi(), edm::ESHandleBase::isValid(), M_PI, phi, PV3DBase< T, PVType, FrameType >::phi(), and MonitorElement::setBinContent().

Referenced by dqmBeginRun().

249 {
250 
251  // ==========================================================
252  // Retrieve!
253  // ==========================================================
254 
256  iSetup.get<CaloGeometryRecord>().get(pG);
257 
258  if (!pG.isValid() )
259  {
260  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Setup Handle, Aborting Task "
261  << "HCALRecHitAnalyzer::FillGeometry!\n";
262  return;
263  }
264 
265  const CaloGeometry cG = *pG;
266 
267  const HcalGeometry* HBgeom = dynamic_cast<const HcalGeometry*>(cG.getSubdetectorGeometry(DetId::Hcal,HcalBarrel));
268  const HcalGeometry* HEgeom = dynamic_cast<const HcalGeometry*>(cG.getSubdetectorGeometry(DetId::Hcal,HcalEndcap));
271 
272 
273  // ==========================================================
274  // Fill Histograms!
275  // ==========================================================
276 
277  std::vector<DetId>::iterator i;
278 
279  int HBmin_ieta = 99, HBmax_ieta = -99;
280  int HBmin_iphi = 99, HBmax_iphi = -99;
281 
282  // Loop Over all Hcal Barrel DetId's
283  int nHBdetid = 0;
284  std::vector<DetId> HBids = HBgeom->getValidDetIds(DetId::Hcal,HcalBarrel);
285 
286  for (i = HBids.begin(); i != HBids.end(); i++) {
287 
288  nHBdetid++;
289 
290  HcalDetId HcalID(*i);
291 
292  int Calo_ieta = 42 + HcalID.ieta();
293  int Calo_iphi = HcalID.iphi();
294  double Calo_eta = HBgeom->getPosition(HcalID).eta();
295  double Calo_phi = HBgeom->getPosition(HcalID).phi();
296 
297  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
298 
299  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
300  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
301 
302  }
303 
304  if (Calo_ieta > HBmax_ieta) HBmax_ieta = Calo_ieta;
305  if (Calo_ieta < HBmin_ieta) HBmin_ieta = Calo_ieta;
306  if (Calo_iphi > HBmax_iphi) HBmax_iphi = Calo_iphi;
307  if (Calo_iphi > HBmax_iphi) HBmin_iphi = Calo_iphi;
308 
309  }
310 
311  int HEmin_ieta = 99, HEmax_ieta = -99;
312  int HEmin_iphi = 99, HEmax_iphi = -99;
313 
314  // Loop Over all Hcal Endcap DetId's
315  int nHEdetid = 0;
316  std::vector<DetId> HEids = HEgeom->getValidDetIds(DetId::Hcal,HcalEndcap);
317 
318  for (i = HEids.begin(); i != HEids.end(); i++) {
319 
320  nHEdetid++;
321 
322  HcalDetId HcalID(*i);
323 
324  int Calo_ieta = 42 + HcalID.ieta();
325  int Calo_iphi = HcalID.iphi();
326  double Calo_eta = HEgeom->getPosition(HcalID).eta();
327  double Calo_phi = HEgeom->getPosition(HcalID).phi();
328 
329  // HCAL to HE eta, phi map comparison
330  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
331  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
332  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
333  }
334 
335  if (Calo_ieta > HEmax_ieta) HEmax_ieta = Calo_ieta;
336  if (Calo_ieta < HEmin_ieta) HEmin_ieta = Calo_ieta;
337  if (Calo_iphi > HEmax_iphi) HEmax_iphi = Calo_iphi;
338  if (Calo_iphi > HEmax_iphi) HEmin_iphi = Calo_iphi;
339 
340  }
341 
342  int HFmin_ieta = 99, HFmax_ieta = -99;
343  int HFmin_iphi = 99, HFmax_iphi = -99;
344 
345  // Loop Over all Hcal Forward DetId's
346  int nHFdetid = 0;
347  std::vector<DetId> HFids = HFgeom->getValidDetIds(DetId::Hcal,HcalForward);
348 
349  for (i = HFids.begin(); i != HFids.end(); i++) {
350 
351  nHFdetid++;
352 
353  auto cell = HFgeom->getGeometry(*i);
354  HcalDetId HcalID(i->rawId());
355  //GlobalPoint p = cell->getPosition();
356 
357  int Calo_ieta = 42 + HcalID.ieta();
358  int Calo_iphi = HcalID.iphi();
359  double Calo_eta = cell->getPosition().eta();
360  double Calo_phi = cell->getPosition().phi();
361 
362  // HCAL to HF eta, phi map comparison
363  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
364  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
365  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
366  }
367 
368  if (Calo_ieta > HFmax_ieta) HFmax_ieta = Calo_ieta;
369  if (Calo_ieta < HFmin_ieta) HFmin_ieta = Calo_ieta;
370  if (Calo_iphi > HFmax_iphi) HFmax_iphi = Calo_iphi;
371  if (Calo_iphi > HFmax_iphi) HFmin_iphi = Calo_iphi;
372 
373  }
374 
375  int HOmin_ieta = 99, HOmax_ieta = -99;
376  int HOmin_iphi = 99, HOmax_iphi = -99;
377 
378  // Loop Over all Hcal Outer DetId's
379  int nHOdetid = 0;
380  std::vector<DetId> HOids = HOgeom->getValidDetIds(DetId::Hcal,HcalOuter);
381 
382  for (i = HOids.begin(); i != HOids.end(); i++) {
383 
384  nHOdetid++;
385 
386  auto cell = HOgeom->getGeometry(*i);
387  HcalDetId HcalID(i->rawId());
388  //GlobalPoint p = cell->getPosition();
389 
390  int Calo_ieta = 42 + HcalID.ieta();
391  int Calo_iphi = HcalID.iphi();
392  double Calo_eta = cell->getPosition().eta();
393  double Calo_phi = cell->getPosition().phi();
394 
395  // HCAL to HO eta, phi map comparison
396  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
397  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
398  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
399  }
400 
401  if (Calo_ieta > HOmax_ieta) HOmax_ieta = Calo_ieta;
402  if (Calo_ieta < HOmin_ieta) HOmin_ieta = Calo_ieta;
403  if (Calo_iphi > HOmax_iphi) HOmax_iphi = Calo_iphi;
404  if (Calo_iphi > HOmax_iphi) HOmin_iphi = Calo_iphi;
405 
406  }
407 
408  // Set the Cell Size for each (ieta, iphi) Bin
409  double currentLowEdge_eta = 0; //double currentHighEdge_eta = 0;
410  for (int ieta = 1; ieta < 42 ; ieta++) {
411 
412  int ieta_ = 42 + ieta;
413  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(ieta_,3);
414  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(ieta_,3);
415  double deta = 2.0*(eta-currentLowEdge_eta);
416  deta = ((float)((int)(1.0E3*deta + 0.5)))/1.0E3;
417  double dphi = 2.0*phi;
418  if (ieta==40 || ieta==41) dphi = 20;
419  if (ieta<=39 && ieta>=21) dphi = 10;
420  if (ieta<=20) dphi = 5;
421  // BS: This is WRONG...need to correct overlap
422  if (ieta == 28) deta = 0.218;
423  if (ieta == 29) deta= 0.096;
424  currentLowEdge_eta += deta;
425 
426  // BS: This is WRONG...need to correct overlap
427  if (ieta == 29) currentLowEdge_eta = 2.964;
428 
429  hHCAL_ieta_detaMap->setBinContent(ieta_,deta); // positive rings
430  hHCAL_ieta_dphiMap->setBinContent(ieta_,dphi); // positive rings
431  hHCAL_ieta_detaMap->setBinContent(42-ieta,deta); // negative rings
432  hHCAL_ieta_dphiMap->setBinContent(42-ieta,dphi); // negative rings
433 
434  } // end loop over ieta
435 
436  edm::LogInfo("OutputInfo") << "HB ieta range: " << HBmin_ieta << " " << HBmax_ieta;
437  edm::LogInfo("OutputInfo") << "HB iphi range: " << HBmin_iphi << " " << HBmax_iphi;
438  edm::LogInfo("OutputInfo") << "HE ieta range: " << HEmin_ieta << " " << HEmax_ieta;
439  edm::LogInfo("OutputInfo") << "HE iphi range: " << HEmin_iphi << " " << HEmax_iphi;
440  edm::LogInfo("OutputInfo") << "HF ieta range: " << HFmin_ieta << " " << HFmax_ieta;
441  edm::LogInfo("OutputInfo") << "HF iphi range: " << HFmin_iphi << " " << HFmax_iphi;
442  edm::LogInfo("OutputInfo") << "HO ieta range: " << HOmin_ieta << " " << HOmax_ieta;
443  edm::LogInfo("OutputInfo") << "HO iphi range: " << HOmin_iphi << " " << HOmax_iphi;
444 
445 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:44
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hHCAL_ieta_iphi_phiMap
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
Definition: HcalGeometry.cc:76
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
MonitorElement * hHCAL_ieta_iphi_etaMap
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
MonitorElement * hHCAL_ieta_detaMap
GlobalPoint getPosition(const DetId &id) const
#define M_PI
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const T & get() const
Definition: EventSetup.h:59
T eta() const
Definition: PV3DBase.h:76
double getBinContent(int binx) const
get content of bin (1-D)
bool isValid() const
Definition: ESHandle.h:47
MonitorElement * hHCAL_ieta_dphiMap

Member Data Documentation

bool HCALRecHitAnalyzer::debug_
private

Definition at line 43 of file HCALRecHitAnalyzer.h.

Referenced by HCALRecHitAnalyzer().

bool HCALRecHitAnalyzer::finebinning_
private

Definition at line 44 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms(), and HCALRecHitAnalyzer().

std::string HCALRecHitAnalyzer::FolderName_
private

Definition at line 45 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms(), and HCALRecHitAnalyzer().

edm::EDGetTokenT<HBHERecHitCollection> HCALRecHitAnalyzer::hBHERecHitsLabel_
private

Definition at line 40 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and HCALRecHitAnalyzer().

edm::EDGetTokenT<HFRecHitCollection> HCALRecHitAnalyzer::hFRecHitsLabel_
private

Definition at line 41 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and HCALRecHitAnalyzer().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_energy_ieta_iphi
private

Definition at line 63 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_energyvsieta
private

Definition at line 83 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Maxenergy_ieta_iphi
private

Definition at line 73 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Maxenergyvsieta
private

Definition at line 93 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_METPhivsieta
private

Definition at line 113 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_METvsieta
private

Definition at line 108 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_MExvsieta
private

Definition at line 118 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_MEyvsieta
private

Definition at line 123 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Minenergy_ieta_iphi
private

Definition at line 68 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Minenergyvsieta
private

Definition at line 88 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Occ_ieta_iphi
private

Definition at line 78 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_Occvsieta
private

Definition at line 98 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D1_SETvsieta
private

Definition at line 103 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_energy_ieta_iphi
private

Definition at line 64 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_energyvsieta
private

Definition at line 84 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Maxenergy_ieta_iphi
private

Definition at line 74 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Maxenergyvsieta
private

Definition at line 94 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_METPhivsieta
private

Definition at line 114 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_METvsieta
private

Definition at line 109 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_MExvsieta
private

Definition at line 119 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_MEyvsieta
private

Definition at line 124 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Minenergy_ieta_iphi
private

Definition at line 69 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Minenergyvsieta
private

Definition at line 89 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Occ_ieta_iphi
private

Definition at line 79 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_Occvsieta
private

Definition at line 99 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D2_SETvsieta
private

Definition at line 104 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_energy_ieta_iphi
private

Definition at line 65 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_energyvsieta
private

Definition at line 85 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Maxenergy_ieta_iphi
private

Definition at line 75 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Maxenergyvsieta
private

Definition at line 95 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_METPhivsieta
private

Definition at line 115 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_METvsieta
private

Definition at line 110 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_MExvsieta
private

Definition at line 120 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_MEyvsieta
private

Definition at line 125 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Minenergy_ieta_iphi
private

Definition at line 70 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Minenergyvsieta
private

Definition at line 90 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Occ_ieta_iphi
private

Definition at line 80 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_Occvsieta
private

Definition at line 100 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D3_SETvsieta
private

Definition at line 105 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_energy_ieta_iphi
private

Definition at line 66 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_energyvsieta
private

Definition at line 86 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Maxenergy_ieta_iphi
private

Definition at line 76 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Maxenergyvsieta
private

Definition at line 96 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_METPhivsieta
private

Definition at line 116 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_METvsieta
private

Definition at line 111 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_MExvsieta
private

Definition at line 121 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_MEyvsieta
private

Definition at line 126 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Minenergy_ieta_iphi
private

Definition at line 71 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Minenergyvsieta
private

Definition at line 91 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Occ_ieta_iphi
private

Definition at line 81 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_Occvsieta
private

Definition at line 101 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_D4_SETvsieta
private

Definition at line 106 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_detaMap
private

Definition at line 58 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms(), and FillGeometry().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_dphiMap
private

Definition at line 59 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms(), and FillGeometry().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_etaMap
private

Definition at line 56 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), bookHistograms(), and FillGeometry().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_HBMap
private

Definition at line 52 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_HEMap
private

Definition at line 53 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_HFMap
private

Definition at line 54 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_HOMap
private

Definition at line 55 of file HCALRecHitAnalyzer.h.

Referenced by bookHistograms().

MonitorElement* HCALRecHitAnalyzer::hHCAL_ieta_iphi_phiMap
private

Definition at line 57 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), bookHistograms(), and FillGeometry().

MonitorElement* HCALRecHitAnalyzer::hHCAL_Nevents
private

Definition at line 61 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<HORecHitCollection> HCALRecHitAnalyzer::hORecHitsLabel_
private

Definition at line 42 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and HCALRecHitAnalyzer().

int HCALRecHitAnalyzer::Nevents
private

Definition at line 49 of file HCALRecHitAnalyzer.h.

Referenced by analyze(), and dqmBeginRun().