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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual 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
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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
 
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
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)
 

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 
)
overridevirtual

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

Definition at line 452 of file HCALRecHitAnalyzer.cc.

References edm::SortedCollection< T, SORT >::begin(), DEBUG, particleFlowClusterECALTimeSelected_cfi::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().

453 {
454  Nevents++;
455  hHCAL_Nevents->Fill(0);
456  // ==========================================================
457  // Retrieve!
458  // ==========================================================
459 
461  const HORecHitCollection *HORecHits;
463 
464  edm::Handle<HBHERecHitCollection> HBHERecHitsHandle;
465  iEvent.getByToken(hBHERecHitsLabel_,HBHERecHitsHandle);
466  if (!HBHERecHitsHandle.isValid()) {
467  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
468  << "HCALRecHitAnalyzer::analyze!\n"; return;
469  } else {
470  HBHERecHits = HBHERecHitsHandle.product();
471  }
472  edm::Handle<HORecHitCollection> HORecHitsHandle;
473  iEvent.getByToken(hORecHitsLabel_,HORecHitsHandle);
474  if (!HORecHitsHandle.isValid()) {
475  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
476  << "HCALRecHitAnalyzer::analyze!\n"; return;
477  } else {
478  HORecHits = HORecHitsHandle.product();
479  }
480  edm::Handle<HFRecHitCollection> HFRecHitsHandle;
481  iEvent.getByToken(hFRecHitsLabel_,HFRecHitsHandle);
482  if (!HFRecHitsHandle.isValid()) {
483  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task "
484  << "HCALRecHitAnalyzer::analyze!\n"; return;
485  } else {
486  HFRecHits = HFRecHitsHandle.product();
487  }
488 
489  // ==========================================================
490  // Fill Histograms!
491  // ==========================================================
492 
493  TLorentzVector vHBHEMET_EtaRing[83][4];
494  int HBHEActiveRing[83][4];
495  int HBHENActiveCells[83][4];
496  double HBHESET_EtaRing[83][4];
497  double HBHEMinEnergy_EtaRing[83][4];
498  double HBHEMaxEnergy_EtaRing[83][4];
499 
500  for (int i = 0; i < 83; i++) {
501  for (int j = 0; j < 4; j++) {
502 
503  HBHEActiveRing[i][j] = 0;
504  HBHENActiveCells[i][j] = 0;
505  HBHESET_EtaRing[i][j] = 0;
506  HBHEMinEnergy_EtaRing[i][j] = 14E3;
507  HBHEMaxEnergy_EtaRing[i][j] = -999;
508  }
509  }
510 
511  // Loop over HBHERecHit's
513  int nHBrechit = 0, nHErechit = 0;
514 
515  for (hbherechit = HBHERecHits->begin(); hbherechit != HBHERecHits->end(); hbherechit++) {
516 
517  HcalDetId det = hbherechit->id();
518  double Energy = hbherechit->energy();
519  Int_t depth = det.depth();
520  Int_t ieta = det.ieta();
521  Int_t iphi = det.iphi();
522  int EtaRing = 41 + ieta; // this counts from 0
523  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
524  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
525  double theta = 2*TMath::ATan(exp(-1*eta));
526  double ET = Energy*TMath::Sin(theta);
527  HcalSubdetector HcalNum = det.subdet();
528  TLorentzVector v_;
529 
530 
531 
532  if (Energy>0) // zero suppress
533  {
534  HBHEActiveRing[EtaRing][depth-1] = 1;
535  HBHENActiveCells[EtaRing][depth-1]++;
536  HBHESET_EtaRing[EtaRing][depth-1]+=ET;
537  v_.SetPtEtaPhiE(ET, 0, phi, ET);
538  vHBHEMET_EtaRing[EtaRing][depth-1]-=v_;
539 
540 
541  DEBUG( EtaRing << " " << Energy << " " << ET << " " << theta << " " << eta << " " << phi << " : " << vHBHEMET_EtaRing[EtaRing][depth-1].Phi() << " " << vHBHEMET_EtaRing[EtaRing][depth-1].Pt() );
542 
543  switch (depth) {
544  case 1:
545  hHCAL_D1_Occ_ieta_iphi->Fill(ieta,iphi);
546  break;
547  case 2:
548  hHCAL_D2_Occ_ieta_iphi->Fill(ieta,iphi);
549  break;
550  case 3:
551  hHCAL_D3_Occ_ieta_iphi->Fill(ieta,iphi);
552  break;
553  } // end switch
554  }
555 
556  if (Energy > HBHEMaxEnergy_EtaRing[EtaRing][depth-1])
557  HBHEMaxEnergy_EtaRing[EtaRing][depth-1] = Energy;
558  if (Energy < HBHEMinEnergy_EtaRing[EtaRing][depth-1])
559  HBHEMinEnergy_EtaRing[EtaRing][depth-1] = Energy;
560 
561  switch (depth) {
562  case 1:
563  hHCAL_D1_energy_ieta_iphi->Fill(ieta,iphi,Energy);
564  hHCAL_D1_energyvsieta->Fill(ieta,Energy);
565  if (Energy>hHCAL_D1_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
566  hHCAL_D1_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
567  if (Energy<hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
568  hHCAL_D1_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
569 
570  break;
571  case 2:
572  hHCAL_D2_energy_ieta_iphi->Fill(ieta,iphi,Energy);
573 
574  hHCAL_D2_energyvsieta->Fill(ieta,Energy);
575  if (Energy>hHCAL_D2_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
576  hHCAL_D2_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
577  if (Energy<hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
578  hHCAL_D2_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
579  break;
580  case 3:
581  hHCAL_D3_energy_ieta_iphi->Fill(ieta,iphi,Energy);
582 
583  hHCAL_D3_energyvsieta->Fill(ieta,Energy);
584  if (Energy>hHCAL_D3_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
585  hHCAL_D3_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
586  if (Energy<hHCAL_D3_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
587  hHCAL_D3_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
588  break;
589  } // end switch
590 
591 
592  if (HcalNum == HcalBarrel) {
593  nHBrechit++;
594  } else { // HcalEndcap
595  nHErechit++;
596  }
597  } // end loop over HBHERecHit's
598 
599  // Fill eta-ring MET quantities
600  for (int iEtaRing=0; iEtaRing < 83; iEtaRing++) {
601  for (int jDepth=0; jDepth < 3; jDepth++) {
602 
603  switch (jDepth+1) {
604  case 1:
605  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
606  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
607  break;
608  case 2:
609  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
610  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
611  break;
612  case 3:
613  hHCAL_D3_Maxenergyvsieta->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]);
614  hHCAL_D3_Minenergyvsieta->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]);
615  break;
616  }
617 
618  if (HBHEActiveRing[iEtaRing][jDepth]) {
619 
620  switch (jDepth+1) {
621  case 1:
622  hHCAL_D1_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
623  hHCAL_D1_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
624  hHCAL_D1_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
625  hHCAL_D1_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
626  hHCAL_D1_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
627  hHCAL_D1_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
628  break;
629  case 2:
630  hHCAL_D2_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
631  hHCAL_D2_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
632  hHCAL_D2_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
633  hHCAL_D2_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
634  hHCAL_D2_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
635  hHCAL_D2_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
636  break;
637  case 3:
638  hHCAL_D3_METPhivsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi());
639  hHCAL_D3_MExvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px());
640  hHCAL_D3_MEyvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py());
641  hHCAL_D3_METvsieta->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt());
642  hHCAL_D3_SETvsieta->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]);
643  hHCAL_D3_Occvsieta->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]);
644  break;
645  } //switch
646  } //activering
647  }//depth
648  } //etaring
649 
650 
651  //-------------------------------------------------HO
652  TLorentzVector vHOMET_EtaRing[83];
653  int HOActiveRing[83];
654  int HONActiveCells[83];
655  double HOSET_EtaRing[83];
656  double HOMinEnergy_EtaRing[83];
657  double HOMaxEnergy_EtaRing[83];
658 
659  for (int i=0;i<83; i++) {
660 
661  HOActiveRing[i] = 0;
662  HONActiveCells[i] = 0;
663  HOSET_EtaRing[i] = 0;
664  HOMinEnergy_EtaRing[i] = 14E3;
665  HOMaxEnergy_EtaRing[i] = -999;
666  }
667 
668  // Loop over HORecHit's
670  int nHOrechit = 0;
671 
672  for (horechit = HORecHits->begin(); horechit != HORecHits->end(); horechit++) {
673 
674  nHOrechit++;
675 
676  HcalDetId det = horechit->id();
677  double Energy = horechit->energy();
679  Int_t ieta = det.ieta();
680  Int_t iphi = det.iphi();
681  int EtaRing = 41+ieta; // this counts from 0
682  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
683  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
684  double theta = 2*TMath::ATan(exp(-1*eta));
685  double ET = Energy*TMath::Sin(theta);
686  TLorentzVector v_;
687 
688 
689  if (Energy>0) // zero suppress
690  {
691  HOActiveRing[EtaRing] = 1;
692  HONActiveCells[EtaRing]++;
693  HOSET_EtaRing[EtaRing]+=ET;
694  v_.SetPtEtaPhiE(ET, 0, phi, ET);
695  vHOMET_EtaRing[EtaRing]-=v_;
696 
697  hHCAL_D4_Occ_ieta_iphi->Fill(ieta,iphi);
698  }
699 
700  if (Energy > HOMaxEnergy_EtaRing[EtaRing])
701  HOMaxEnergy_EtaRing[EtaRing] = Energy;
702  if (Energy < HOMinEnergy_EtaRing[EtaRing])
703  HOMinEnergy_EtaRing[EtaRing] = Energy;
704 
705  hHCAL_D4_energy_ieta_iphi->Fill(ieta,iphi,Energy);
706 
707  hHCAL_D4_energyvsieta->Fill(ieta,Energy);
708  if (Energy>hHCAL_D4_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
709  hHCAL_D4_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
710  if (Energy<hHCAL_D4_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
711  hHCAL_D4_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
712 
713  } // end loop over HORecHit's
714 
715  // Fill eta-ring MET quantities
716  for (int iEtaRing=0; iEtaRing<83; iEtaRing++) {
717  hHCAL_D4_Maxenergyvsieta->Fill(iEtaRing-41, HOMaxEnergy_EtaRing[iEtaRing]);
718  hHCAL_D4_Minenergyvsieta->Fill(iEtaRing-41, HOMinEnergy_EtaRing[iEtaRing]);
719 
720  if (HOActiveRing[iEtaRing]) {
721 
722  hHCAL_D4_METPhivsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Phi());
723  hHCAL_D4_MExvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Px());
724  hHCAL_D4_MEyvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Py());
725  hHCAL_D4_METvsieta->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Pt());
726  hHCAL_D4_SETvsieta->Fill(iEtaRing-41, HOSET_EtaRing[iEtaRing]);
727  hHCAL_D4_Occvsieta->Fill(iEtaRing-41, HONActiveCells[iEtaRing]);
728 
729  }
730 
731  }
732 
733  //------------------------------------------------HF
734 
735  TLorentzVector vHFMET_EtaRing[83][2];
736  int HFActiveRing[83][2];
737  int HFNActiveCells[83][2];
738  double HFSET_EtaRing[83][2];
739  double HFMinEnergy_EtaRing[83][2];
740  double HFMaxEnergy_EtaRing[83][2];
741 
742  for (int i=0;i<83; i++) {
743  for (int j=0;j<2; j++) {
744 
745  HFActiveRing[i][j] = 0;
746  HFNActiveCells[i][j] = 0;
747  HFSET_EtaRing[i][j] = 0;
748  HFMinEnergy_EtaRing[i][j] = 14E3;
749  HFMaxEnergy_EtaRing[i][j] = -999;
750 
751  }
752  }
753 
754  // Loop over HFRecHit's
756  int nHFrechit = 0;
757 
758  for (hfrechit = HFRecHits->begin(); hfrechit != HFRecHits->end(); hfrechit++) {
759 
760  nHFrechit++;
761 
762  HcalDetId det = hfrechit->id();
763  double Energy = hfrechit->energy();
764  Int_t depth = det.depth();
765  Int_t ieta = det.ieta();
766  Int_t iphi = det.iphi();
767  int EtaRing = 41+ieta; // this counts from 0
768  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(EtaRing+1,iphi);
769  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(EtaRing+1,iphi);
770  double theta = 2*TMath::ATan(exp(-1*eta));
771  double ET = Energy*TMath::Sin(theta);
772 
773  TLorentzVector v_;
774  if (Energy>0) // zero suppress
775  {
776  HFActiveRing[EtaRing][depth-1] = 1;
777  HFNActiveCells[EtaRing][depth-1]++;
778  HFSET_EtaRing[EtaRing][depth-1]+=ET;
779  v_.SetPtEtaPhiE(ET, 0, phi, ET);
780  vHFMET_EtaRing[EtaRing][depth-1]-=v_;
781 
782  switch (depth) {
783  case 1:
784  hHCAL_D1_Occ_ieta_iphi->Fill(ieta,iphi);
785  break;
786  case 2:
787  hHCAL_D2_Occ_ieta_iphi->Fill(ieta,iphi);
788  break;
789 
790  }
791  }
792 
793  if (Energy > HFMaxEnergy_EtaRing[EtaRing][depth-1])
794  HFMaxEnergy_EtaRing[EtaRing][depth-1] = Energy;
795  if (Energy < HFMinEnergy_EtaRing[EtaRing][depth-1])
796  HFMinEnergy_EtaRing[EtaRing][depth-1] = Energy;
797 
798 
799  switch (depth) {
800  case 1:
801  hHCAL_D1_energy_ieta_iphi->Fill(ieta,iphi,Energy);
802 
803  hHCAL_D1_energyvsieta->Fill(ieta,Energy);
804  if (Energy>hHCAL_D1_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
805  hHCAL_D1_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
806  if (Energy<hHCAL_D1_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
807  hHCAL_D1_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
808  break;
809  case 2:
810  hHCAL_D2_energy_ieta_iphi->Fill(ieta,iphi,Energy);
811 
812  hHCAL_D2_energyvsieta->Fill(ieta,Energy);
813  if (Energy>hHCAL_D2_Maxenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
814  hHCAL_D2_Maxenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
815  if (Energy<hHCAL_D2_Minenergy_ieta_iphi->getBinContent(EtaRing+1, iphi))
816  hHCAL_D2_Minenergy_ieta_iphi->setBinContent(EtaRing+1, iphi, Energy);
817  break;
818  }
819 
820  } // end loop over HFRecHit's
821 
822  // Fill eta-ring MET quantities
823  for (int iEtaRing=0; iEtaRing<83; iEtaRing++) {
824  for (int jDepth=0; jDepth<2; jDepth++) {
825  switch (jDepth+1) {
826  case 1:
827  hHCAL_D1_Maxenergyvsieta->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
828  hHCAL_D1_Minenergyvsieta->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
829  break;
830  case 2:
831  hHCAL_D2_Maxenergyvsieta->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]);
832  hHCAL_D2_Minenergyvsieta->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]);
833  break;
834  }
835 
836 
837  if (HFActiveRing[iEtaRing][jDepth]) {
838 
839  switch (jDepth+1) {
840  case 1:
841 
842  hHCAL_D1_METPhivsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
843  hHCAL_D1_MExvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
844  hHCAL_D1_MEyvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
845  hHCAL_D1_METvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
846  hHCAL_D1_SETvsieta->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]);
847  hHCAL_D1_Occvsieta->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]);
848  break;
849 
850  case 2:
851 
852  hHCAL_D2_METPhivsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi());
853  hHCAL_D2_MExvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px());
854  hHCAL_D2_MEyvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py());
855  hHCAL_D2_METvsieta->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt());
856  hHCAL_D2_SETvsieta->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]);
857  hHCAL_D2_Occvsieta->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]);
858  break;
859 
860  }
861  }
862  }
863  }
864 
865 
866 
867 }
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:460
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:115
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:277
MonitorElement * hHCAL_D1_MExvsieta
MonitorElement * hHCAL_D4_MExvsieta
MonitorElement * hHCAL_D2_MEyvsieta
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
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(), CaloCellGeometry::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 
255  const HcalGeometry* HBgeom;
256  const HcalGeometry* HEgeom;
257  const CaloSubdetectorGeometry* HOgeom;
258  const CaloSubdetectorGeometry* HFgeom;
259 
261  iSetup.get<CaloGeometryRecord>().get(pG);
262 
263  if (!pG.isValid() )
264  {
265  edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Setup Handle, Aborting Task "
266  << "HCALRecHitAnalyzer::FillGeometry!\n";
267  return;
268  }
269 
270  const CaloGeometry cG = *pG;
271 
276 
277 
278  // ==========================================================
279  // Fill Histograms!
280  // ==========================================================
281 
282  std::vector<DetId>::iterator i;
283 
284  int HBmin_ieta = 99, HBmax_ieta = -99;
285  int HBmin_iphi = 99, HBmax_iphi = -99;
286 
287  // Loop Over all Hcal Barrel DetId's
288  int nHBdetid = 0;
289  std::vector<DetId> HBids = HBgeom->getValidDetIds(DetId::Hcal,HcalBarrel);
290 
291  for (i = HBids.begin(); i != HBids.end(); i++) {
292 
293  nHBdetid++;
294 
295  HcalDetId HcalID(*i);
296 
297  int Calo_ieta = 42 + HcalID.ieta();
298  int Calo_iphi = HcalID.iphi();
299  double Calo_eta = HBgeom->getPosition(HcalID).eta();
300  double Calo_phi = HBgeom->getPosition(HcalID).phi();
301 
302  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
303 
304  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
305  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
306 
307  }
308 
309  if (Calo_ieta > HBmax_ieta) HBmax_ieta = Calo_ieta;
310  if (Calo_ieta < HBmin_ieta) HBmin_ieta = Calo_ieta;
311  if (Calo_iphi > HBmax_iphi) HBmax_iphi = Calo_iphi;
312  if (Calo_iphi > HBmax_iphi) HBmin_iphi = Calo_iphi;
313 
314  }
315 
316  int HEmin_ieta = 99, HEmax_ieta = -99;
317  int HEmin_iphi = 99, HEmax_iphi = -99;
318 
319  // Loop Over all Hcal Endcap DetId's
320  int nHEdetid = 0;
321  std::vector<DetId> HEids = HEgeom->getValidDetIds(DetId::Hcal,HcalEndcap);
322 
323  for (i = HEids.begin(); i != HEids.end(); i++) {
324 
325  nHEdetid++;
326 
327  HcalDetId HcalID(*i);
328 
329  int Calo_ieta = 42 + HcalID.ieta();
330  int Calo_iphi = HcalID.iphi();
331  double Calo_eta = HEgeom->getPosition(HcalID).eta();
332  double Calo_phi = HEgeom->getPosition(HcalID).phi();
333 
334  // HCAL to HE eta, phi map comparison
335  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
336  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
337  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
338  }
339 
340  if (Calo_ieta > HEmax_ieta) HEmax_ieta = Calo_ieta;
341  if (Calo_ieta < HEmin_ieta) HEmin_ieta = Calo_ieta;
342  if (Calo_iphi > HEmax_iphi) HEmax_iphi = Calo_iphi;
343  if (Calo_iphi > HEmax_iphi) HEmin_iphi = Calo_iphi;
344 
345  }
346 
347  int HFmin_ieta = 99, HFmax_ieta = -99;
348  int HFmin_iphi = 99, HFmax_iphi = -99;
349 
350  // Loop Over all Hcal Forward DetId's
351  int nHFdetid = 0;
352  std::vector<DetId> HFids = HFgeom->getValidDetIds(DetId::Hcal,HcalForward);
353 
354  for (i = HFids.begin(); i != HFids.end(); i++) {
355 
356  nHFdetid++;
357 
358  const CaloCellGeometry* cell = HFgeom->getGeometry(*i);
359  HcalDetId HcalID(i->rawId());
360  //GlobalPoint p = cell->getPosition();
361 
362  int Calo_ieta = 42 + HcalID.ieta();
363  int Calo_iphi = HcalID.iphi();
364  double Calo_eta = cell->getPosition().eta();
365  double Calo_phi = cell->getPosition().phi();
366 
367  // HCAL to HF eta, phi map comparison
368  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
369  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
370  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
371  }
372 
373  if (Calo_ieta > HFmax_ieta) HFmax_ieta = Calo_ieta;
374  if (Calo_ieta < HFmin_ieta) HFmin_ieta = Calo_ieta;
375  if (Calo_iphi > HFmax_iphi) HFmax_iphi = Calo_iphi;
376  if (Calo_iphi > HFmax_iphi) HFmin_iphi = Calo_iphi;
377 
378  }
379 
380  int HOmin_ieta = 99, HOmax_ieta = -99;
381  int HOmin_iphi = 99, HOmax_iphi = -99;
382 
383  // Loop Over all Hcal Outer DetId's
384  int nHOdetid = 0;
385  std::vector<DetId> HOids = HOgeom->getValidDetIds(DetId::Hcal,HcalOuter);
386 
387  for (i = HOids.begin(); i != HOids.end(); i++) {
388 
389  nHOdetid++;
390 
391  const CaloCellGeometry* cell = HOgeom->getGeometry(*i);
392  HcalDetId HcalID(i->rawId());
393  //GlobalPoint p = cell->getPosition();
394 
395  int Calo_ieta = 42 + HcalID.ieta();
396  int Calo_iphi = HcalID.iphi();
397  double Calo_eta = cell->getPosition().eta();
398  double Calo_phi = cell->getPosition().phi();
399 
400  // HCAL to HO eta, phi map comparison
401  if (hHCAL_ieta_iphi_etaMap->getBinContent(Calo_ieta,Calo_iphi) == -999) {
402  hHCAL_ieta_iphi_etaMap->setBinContent(Calo_ieta,Calo_iphi,Calo_eta);
403  hHCAL_ieta_iphi_phiMap->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI);
404  }
405 
406  if (Calo_ieta > HOmax_ieta) HOmax_ieta = Calo_ieta;
407  if (Calo_ieta < HOmin_ieta) HOmin_ieta = Calo_ieta;
408  if (Calo_iphi > HOmax_iphi) HOmax_iphi = Calo_iphi;
409  if (Calo_iphi > HOmax_iphi) HOmin_iphi = Calo_iphi;
410 
411  }
412 
413  // Set the Cell Size for each (ieta, iphi) Bin
414  double currentLowEdge_eta = 0; //double currentHighEdge_eta = 0;
415  for (int ieta = 1; ieta < 42 ; ieta++) {
416 
417  int ieta_ = 42 + ieta;
418  double eta = hHCAL_ieta_iphi_etaMap->getBinContent(ieta_,3);
419  double phi = hHCAL_ieta_iphi_phiMap->getBinContent(ieta_,3);
420  double deta = 2.0*(eta-currentLowEdge_eta);
421  deta = ((float)((int)(1.0E3*deta + 0.5)))/1.0E3;
422  double dphi = 2.0*phi;
423  if (ieta==40 || ieta==41) dphi = 20;
424  if (ieta<=39 && ieta>=21) dphi = 10;
425  if (ieta<=20) dphi = 5;
426  // BS: This is WRONG...need to correct overlap
427  if (ieta == 28) deta = 0.218;
428  if (ieta == 29) deta= 0.096;
429  currentLowEdge_eta += deta;
430 
431  // BS: This is WRONG...need to correct overlap
432  if (ieta == 29) currentLowEdge_eta = 2.964;
433 
434  hHCAL_ieta_detaMap->setBinContent(ieta_,deta); // positive rings
435  hHCAL_ieta_dphiMap->setBinContent(ieta_,dphi); // positive rings
436  hHCAL_ieta_detaMap->setBinContent(42-ieta,deta); // negative rings
437  hHCAL_ieta_dphiMap->setBinContent(42-ieta,dphi); // negative rings
438 
439  } // end loop over ieta
440 
441  edm::LogInfo("OutputInfo") << "HB ieta range: " << HBmin_ieta << " " << HBmax_ieta;
442  edm::LogInfo("OutputInfo") << "HB iphi range: " << HBmin_iphi << " " << HBmax_iphi;
443  edm::LogInfo("OutputInfo") << "HE ieta range: " << HEmin_ieta << " " << HEmax_ieta;
444  edm::LogInfo("OutputInfo") << "HE iphi range: " << HEmin_iphi << " " << HEmax_iphi;
445  edm::LogInfo("OutputInfo") << "HF ieta range: " << HFmin_ieta << " " << HFmax_ieta;
446  edm::LogInfo("OutputInfo") << "HF iphi range: " << HFmin_iphi << " " << HFmax_iphi;
447  edm::LogInfo("OutputInfo") << "HO ieta range: " << HOmin_ieta << " " << HOmax_ieta;
448  edm::LogInfo("OutputInfo") << "HO iphi range: " << HOmin_iphi << " " << HOmax_iphi;
449 
450 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hHCAL_ieta_iphi_phiMap
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
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)
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
MonitorElement * hHCAL_ieta_detaMap
GlobalPoint getPosition(const DetId &id) const
#define M_PI
const T & get() const
Definition: EventSetup.h:55
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().