test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &)
 
 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
 
 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
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void FillGeometry (const edm::EventSetup &)
 

Private Attributes

bool debug_
 
bool finebinning_
 
std::string FolderName_
 
edm::EDGetTokenT
< HBHERecHitCollection
hBHERecHitsLabel_
 
edm::EDGetTokenT
< HFRecHitCollection
hFRecHitsLabel_
 
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
< HORecHitCollection
hORecHitsLabel_
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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 46 of file HCALRecHitAnalyzer.cc.

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

47 {
48 
49  // Retrieve Information from the Configuration File
50  hBHERecHitsLabel_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("HBHERecHitsLabel"));
51  hORecHitsLabel_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("HORecHitsLabel"));
52  hFRecHitsLabel_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("HFRecHitsLabel"));
53 
54  debug_ = iConfig.getParameter<bool>("Debug");
55  finebinning_ = iConfig.getUntrackedParameter<bool>("FineBinning");
56  FolderName_ = iConfig.getUntrackedParameter<std::string>("FolderName");
57 
58 }
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 
)
virtual

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 455 of file HCALRecHitAnalyzer.cc.

References edm::SortedCollection< T, SORT >::begin(), DEBUG, HcalDetId::depth(), HLT_25ns10e33_v2_cff::depth, edm::SortedCollection< T, SORT >::end(), ET, eta, create_public_lumi_plots::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_, i, HcalDetId::ieta(), HcalDetId::iphi(), edm::HandleBase::isValid(), j, Nevents, phi, colinearityKinematic::Phi, edm::Handle< T >::product(), reco::tau::disc::Pt(), MonitorElement::setBinContent(), HcalDetId::subdet(), and theta().

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

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

Reimplemented from DQMEDAnalyzer.

Definition at line 60 of file HCALRecHitAnalyzer.cc.

References FillGeometry(), and Nevents.

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

Definition at line 247 of file HCALRecHitAnalyzer.cc.

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

Referenced by dqmBeginRun().

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