From 200e1dd39e92c69b22fe9a91c4a95b7f4e638890 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 29 May 2014 17:52:21 +0200 Subject: [PATCH] Clean up the HCal numbering code and add one additional functionality --- .../interface/HcalDDDRecConstants.h | 14 +- .../interface/HcalDDDSimConstants.h | 5 +- .../HcalCommonData/src/HcalDDDRecConstants.cc | 161 ++++++++++-------- .../HcalCommonData/src/HcalDDDSimConstants.cc | 87 +++------- .../test/HcalRecNumberingTester.cc | 90 ++++------ 5 files changed, 162 insertions(+), 195 deletions(-) diff --git a/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h b/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h index 70f90f1bcdccb..8bdab4e90b7ca 100644 --- a/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h +++ b/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h @@ -27,7 +27,6 @@ class HcalDDDRecConstants { public: - HcalDDDRecConstants(); HcalDDDRecConstants(const DDCompactView& cpv, const HcalDDDSimConstants& hcons); ~HcalDDDRecConstants(); @@ -45,6 +44,12 @@ class HcalDDDRecConstants { double df=0) : ieta(eta), nPhi(nf),depthStart(0), etaMin(et1), etaMax(et2), phi0(fi0), dphi(df) {} }; + struct HcalActiveLength { + int ieta, depth; + double eta, thick; + HcalActiveLength(int ie=0, int d=0, double et=0, + double t=0) : ieta(ie), depth(d), eta(et), thick(t) {} + }; std::vector > getConstHBHE(const int type) const { if (type == 0) return gconsHB; @@ -68,16 +73,15 @@ class HcalDDDRecConstants { std::vector getPhiOffs() const {return phioff;} std::vector getPhiTable() const {return phibin;} std::vector getPhiTableHF() const {return phibinHF;} + std::vector getThickActive(const int type) const; std::string getTopoMode() const {return modeTopo;} std::vector HcalCellTypes(HcalSubdetector) const; - void initialize(const DDCompactView& cpv, - const HcalDDDSimConstants& hcons); unsigned int numberOfCells(HcalSubdetector) const; unsigned int nCells(HcalSubdetector) const; unsigned int nCells() const; private: - void checkInitialized() const; + void initialize(const DDCompactView& cpv); void loadSpecPars(const DDFilteredView& fv); void loadSimConst(); std::vector getDDDArray(const char *, const DDsvalues_type &, @@ -87,7 +91,7 @@ class HcalDDDRecConstants { bool tobeInitialized; static const int nEtaMax=100; - const HcalDDDSimConstants *hcons; + const HcalDDDSimConstants & hcons; std::string modeTopo; // Mode for topology std::vector phioff; // Phi offset for barrel, endcap, forward std::vector etaGroup; // Eta Grouping diff --git a/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h b/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h index 9b86ac2409993..24afeeac568c5 100644 --- a/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h +++ b/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h @@ -26,7 +26,6 @@ class HcalDDDSimConstants { public: - HcalDDDSimConstants(); HcalDDDSimConstants( const DDCompactView& cpv ); ~HcalDDDSimConstants(); @@ -54,7 +53,6 @@ class HcalDDDSimConstants { std::vector HcalCellTypes() const; std::vector HcalCellTypes(HcalSubdetector, int ieta=-1, int depth=-1) const; - void initialize(const DDCompactView& cpv); int getMaxDepth(const int type) const {return maxDepth[type];} unsigned int numberOfCells(HcalSubdetector) const; int phiNumber(int phi, int unit) const; @@ -63,7 +61,7 @@ class HcalDDDSimConstants { int unitPhi(double dphi) const; private: - void checkInitialized() const; + void initialize(const DDCompactView& cpv); void loadSpecPars(const DDFilteredView& fv); void loadGeometry(const DDFilteredView& fv); std::vector getDDDArray(const std::string &, @@ -77,7 +75,6 @@ class HcalDDDSimConstants { void printTileHB(int eta, int depth) const; void printTileHE(int eta, int depth) const; - bool tobeInitialized; static const int nEtaMax=100; static const int nDepthMax=9; int maxDepth[4]; // Maximum depths in HB/HE/HF/HO diff --git a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc index 7ef1dc66187f8..6392a437978ff 100644 --- a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc +++ b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc @@ -14,19 +14,13 @@ //#define DebugLog -HcalDDDRecConstants::HcalDDDRecConstants() : tobeInitialized(true), hcons(0) { -#ifdef DebugLog - std::cout << "HcalDDDRecConstants::HcalDDDRecConstants() constructor" << std::endl; -#endif -} - -HcalDDDRecConstants::HcalDDDRecConstants(const DDCompactView& cpv, const HcalDDDSimConstants& hconst) : tobeInitialized(true), hcons(0) { +HcalDDDRecConstants::HcalDDDRecConstants(const DDCompactView& cpv, const HcalDDDSimConstants& hconst) : hcons(hconst) { #ifdef DebugLog std::cout << "HcalDDDRecConstants::HcalDDDRecConstants (const DDCompactView& cpv, const HcalDDDSimConstants& hconst) constructor" << std::endl; #endif - initialize(cpv, hconst); + initialize(cpv); } HcalDDDRecConstants::~HcalDDDRecConstants() { @@ -36,7 +30,6 @@ HcalDDDRecConstants::~HcalDDDRecConstants() { std::vector HcalDDDRecConstants::getEtaBins(const int itype) const { - checkInitialized(); std::vector bins; unsigned int type = (itype == 0) ? 0 : 1; unsigned int lymax = (type == 0) ? 17 : 19; @@ -96,11 +89,10 @@ HcalDDDRecConstants::getEtaBins(const int itype) const { return bins; } -HcalDDDRecConstants::HcalID HcalDDDRecConstants::getHCID(int subdet,int ieta, - int iphi, int lay, - int idepth) const { +HcalDDDRecConstants::HcalID +HcalDDDRecConstants::getHCID(int subdet,int ieta, int iphi, int lay, + int idepth) const { - checkInitialized(); int eta(ieta), phi(iphi), depth(idepth); if ((subdet == static_cast(HcalOuter)) || ((subdet == static_cast(HcalBarrel)) && (lay > 17))) { @@ -119,8 +111,8 @@ HcalDDDRecConstants::HcalID HcalDDDRecConstants::getHCID(int subdet,int ieta, phi0 = (phi0-1)/phiGroup[eta-1]; } ++phi0; - unit = hcons->unitPhi(phibin[eta-1]); - phi = hcons->phiNumber(phi0,unit); + unit = hcons.unitPhi(phibin[eta-1]); + phi = hcons.phiNumber(phi0,unit); depth = layerGroup[eta-1][lay-1]; if (eta == iEtaMin[1]) { if (subdet == static_cast(HcalBarrel)) { @@ -144,9 +136,44 @@ HcalDDDRecConstants::HcalID HcalDDDRecConstants::getHCID(int subdet,int ieta, return HcalDDDRecConstants::HcalID(subdet,eta,phi,depth); } -std::vector HcalDDDRecConstants::HcalCellTypes(HcalSubdetector subdet) const { +std::vector +HcalDDDRecConstants::getThickActive(const int type) const { + + std::vector actives; + std::vector bins = getEtaBins(type); +#ifdef DebugLog + unsigned int kount(0); +#endif + for (unsigned int k=0; k 1) + thick += ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second); + } + thick *= (2.*scale); + HcalDDDRecConstants::HcalActiveLength active(ieta,depth,eta,thick); + actives.push_back(active); + ++depth; +#ifdef DebugLog + kount++; + std::cout << "getThickActive: [" << kount << "] eta:" << active.ieta + << ":" << active.eta << " depth " << active.depth << " thick " + << active.thick << std::endl; +#endif + } + } + return actives; +} + +std::vector +HcalDDDRecConstants::HcalCellTypes(HcalSubdetector subdet) const { - checkInitialized(); if (subdet == HcalBarrel || subdet == HcalEndcap) { std::vector cells; int isub = (subdet == HcalBarrel) ? 0 : 1; @@ -165,7 +192,7 @@ std::vector HcalDDDRecConstants::HcalCellTypes(HcalSubdetector sub int ieta = etabins[bin].ieta; for (int keta=etaSimValu[ieta-1].first; keta<=etaSimValu[ieta-1].second; ++keta) { - std::vector cells = hcons->HcalCellTypes(subdet,keta,-1); + std::vector cells = hcons.HcalCellTypes(subdet,keta,-1); for (unsigned int ic=0; ic= etabins[bin].layer[il].first && @@ -183,7 +210,7 @@ std::vector HcalDDDRecConstants::HcalCellTypes(HcalSubdetector sub } } } - int unit = hcons->unitPhi(etabins[bin].dphi); + int unit = hcons.unitPhi(etabins[bin].dphi); for (unsigned int il=0; il HcalDDDRecConstants::HcalCellTypes(HcalSubdetector sub #endif return cells; } else { - return hcons->HcalCellTypes(subdet,-1,-1); - } -} - -void HcalDDDRecConstants::initialize(const DDCompactView& cpv, - const HcalDDDSimConstants& hconst) { - if (tobeInitialized) { - tobeInitialized = false; - hcons = &(hconst); - std::string attribute = "OnlyForHcalRecNumbering"; - std::string value = "any"; - DDValue val(attribute, value, 0.0); - - DDSpecificsFilter filter; - filter.setCriteria(val, DDSpecificsFilter::not_equals, - DDSpecificsFilter::AND, true, // compare strings - true // use merged-specifics or simple-specifics - ); - DDFilteredView fv(cpv); - fv.addFilter(filter); - bool ok = fv.firstChild(); - - if (ok) { - //Load the SpecPars - loadSpecPars(fv); - - //Load the Sim Constants - loadSimConst(); - } else { - edm::LogError("HCalGeom") << "HcalDDDRecConstants: cannot get filtered " - << " view for " << attribute << " not matching " - << value; - throw cms::Exception("DDException") << "HcalDDDRecConstants: cannot match " << attribute << " to " << value; - } + return hcons.HcalCellTypes(subdet,-1,-1); } } unsigned int HcalDDDRecConstants::numberOfCells(HcalSubdetector subdet) const { - checkInitialized(); if (subdet == HcalBarrel || subdet == HcalEndcap) { unsigned int num = 0; std::vector cellTypes = HcalCellTypes(subdet); @@ -256,14 +249,13 @@ unsigned int HcalDDDRecConstants::numberOfCells(HcalSubdetector subdet) const { #endif return num; } else { - return hcons->numberOfCells(subdet); + return hcons.numberOfCells(subdet); } } unsigned int HcalDDDRecConstants::nCells(HcalSubdetector subdet) const { - checkInitialized(); if (subdet == HcalBarrel || subdet == HcalEndcap) { int isub = (subdet == HcalBarrel) ? 0 : 1; std::vector etabins = getEtaBins(isub); @@ -282,16 +274,37 @@ unsigned int HcalDDDRecConstants::nCells(HcalSubdetector subdet) const { } unsigned int HcalDDDRecConstants::nCells() const { - checkInitialized(); return (nCells(HcalBarrel)+nCells(HcalEndcap)+nCells(HcalOuter)+nCells(HcalForward)); } -void HcalDDDRecConstants::checkInitialized() const { - if (tobeInitialized) { - edm::LogError("HcalGeom") << "HcalDDDRecConstants : to be initialized correctly"; - throw cms::Exception("DDException") << "HcalDDDRecConstants: to be initialized"; +void HcalDDDRecConstants::initialize(const DDCompactView& cpv) { + + std::string attribute = "OnlyForHcalRecNumbering"; + std::string value = "any"; + DDValue val(attribute, value, 0.0); + + DDSpecificsFilter filter; + filter.setCriteria(val, DDSpecificsFilter::not_equals, + DDSpecificsFilter::AND, true, // compare strings + true // use merged-specifics or simple-specifics + ); + DDFilteredView fv(cpv); + fv.addFilter(filter); + bool ok = fv.firstChild(); + + if (ok) { + //Load the SpecPars + loadSpecPars(fv); + + //Load the Sim Constants + loadSimConst(); + } else { + edm::LogError("HCalGeom") << "HcalDDDRecConstants: cannot get filtered " + << " view for " << attribute << " not matching " + << value; + throw cms::Exception("DDException") << "HcalDDDRecConstants: cannot match " << attribute << " to " << value; } -} +} void HcalDDDRecConstants::loadSpecPars(const DDFilteredView& fv) { @@ -344,7 +357,7 @@ void HcalDDDRecConstants::loadSpecPars(const DDFilteredView& fv) { void HcalDDDRecConstants::loadSimConst() { for (int i=0; i<4; ++i) { - std::pair ieta = hcons->getiEtaRange(i); + std::pair ieta = hcons.getiEtaRange(i); iEtaMin[i] = ieta.first; iEtaMax[i] = ieta.second; maxDepth[i]= 0; @@ -353,7 +366,7 @@ void HcalDDDRecConstants::loadSimConst() { maxDepth[3] = 4; // First eta table - std::vector etas = hcons->getEtaTable(); + std::vector etas = hcons.getEtaTable(); etaTable.clear(); ietaMap.clear(); etaSimValu.clear(); int ieta(0), ietaHB(0), ietaHE(0); etaTable.push_back(etas[ieta]); @@ -378,21 +391,21 @@ void HcalDDDRecConstants::loadSimConst() { } iEtaMin[1] = ietaHE; iEtaMax[0] = ietaHB; - etaTableHF = hcons->getEtaTableHF(); + etaTableHF = hcons.getEtaTableHF(); // Then Phi bins ieta = 0; phibin.clear(); phiUnitS.clear(); for (int i=0; igetPhiBin(ieta); + double dphi = phiGroup[i]*hcons.getPhiBin(ieta); phibin.push_back(dphi); ieta += etaGroup[i]; } for (unsigned int i=1; iunitPhi(hcons->getPhiBin(i-1)); + int unit = hcons.unitPhi(hcons.getPhiBin(i-1)); phiUnitS.push_back(unit); } - phibinHF = hcons->getPhiTableHF(); + phibinHF = hcons.getPhiTableHF(); #ifdef DebugLog std::cout << "Modified eta/deltaphi table for " << nEta << " bins" << std::endl; for (int i=0; igetPhiOffs(); - nOff = hcons->getNOff(); + phioff = hcons.getPhiOffs(); + nOff = hcons.getNOff(); //Now the depths for (int i=0; i nmodz = hcons->getModHalfHBHE(0); + std::pair nmodz = hcons.getModHalfHBHE(0); nModule[0] = nmodz.first; nHalves[0] = nmodz.second; - gconsHB = hcons->getConstHBHE(0); + gconsHB = hcons.getConstHBHE(0); for (unsigned int i=0; igetModHalfHBHE(1); + nmodz = hcons.getModHalfHBHE(1); nModule[1] = nmodz.first; nHalves[1] = nmodz.second; - gconsHE= hcons->getConstHBHE(1); + gconsHE= hcons.getConstHBHE(1); for (unsigned int i=0; i(HcalEndcap)) { @@ -142,7 +133,6 @@ HcalCellType::HcalCell HcalDDDSimConstants::cell(int idet, int zside, std::vector > HcalDDDSimConstants::getConstHBHE(const int type) const { - checkInitialized(); std::vector > gcons; if (type == 0) { for (unsigned int i=0; i > HcalDDDSimConstants::getConstHBHE(const i std::pair HcalDDDSimConstants::getDetEta(double eta, int depth) { - checkInitialized(); int hsubdet(0), ieta(0); double etaR(0); double heta = fabs(eta); @@ -183,7 +172,6 @@ std::pair HcalDDDSimConstants::getDetEta(double eta, int depth) { int HcalDDDSimConstants::getEta(int det,int lay, double hetaR) { - checkInitialized(); int ieta(0); if (det == static_cast(HcalForward)) { // Forward HCal ieta = etaMax[2]; @@ -208,7 +196,6 @@ int HcalDDDSimConstants::getEta(int det,int lay, double hetaR) { std::pair HcalDDDSimConstants::getEtaDepth(int det, int etaR, int phi, int depth, int lay) { - checkInitialized(); //Modify the depth index if (det == static_cast(HcalForward)) { // Forward HCal } else if (det == static_cast(HcalOuter)) { @@ -240,7 +227,6 @@ std::pair HcalDDDSimConstants::getEtaDepth(int det, int etaR, int phi, double HcalDDDSimConstants::getEtaHO(double& etaR, double& x, double& y, double& z) const { - checkInitialized(); if (zho.size() > 4) { double eta = fabs(etaR); double r = std::sqrt(x*x+y*y); @@ -265,7 +251,6 @@ double HcalDDDSimConstants::getEtaHO(double& etaR, double& x, double& y, std::vector HcalDDDSimConstants::getEtaTableHF() const { - checkInitialized(); std::vector etas; for (unsigned int i=0; i HcalDDDSimConstants::getEtaTableHF() const { std::pair HcalDDDSimConstants::getModHalfHBHE(const int type) const { - checkInitialized(); if (type == 0) { return std::pair(nmodHB,nzHB); } else { @@ -287,7 +271,6 @@ std::pair HcalDDDSimConstants::getModHalfHBHE(const int type) const { std::pair HcalDDDSimConstants::getPhiCons(int det, int ieta) { - checkInitialized(); double fioff(0), fibin(0); if (det == static_cast(HcalForward)) { // Forward HCal fioff = phioff[2]; @@ -349,7 +332,6 @@ std::vector HcalDDDSimConstants::HcalCellTypes() const{ std::vector HcalDDDSimConstants::HcalCellTypes(HcalSubdetector subdet, int ieta, int depthl) const { - checkInitialized(); std::vector cellTypes; if (subdet == HcalForward) { if (dzVcal < 0) return cellTypes; @@ -414,39 +396,6 @@ std::vector HcalDDDSimConstants::HcalCellTypes(HcalSubdetector sub return cellTypes; } -void HcalDDDSimConstants::initialize(const DDCompactView& cpv) { - - if (tobeInitialized) { - tobeInitialized = false; - - std::string attribute = "OnlyForHcalSimNumbering"; - std::string value = "any"; - DDValue val(attribute, value, 0.0); - - DDSpecificsFilter filter; - filter.setCriteria(val, DDSpecificsFilter::not_equals, - DDSpecificsFilter::AND, true, // compare strings otherwise doubles - true // use merged-specifics or simple-specifics - ); - DDFilteredView fv(cpv); - fv.addFilter(filter); - bool ok = fv.firstChild(); - - if (ok) { - //Load the SpecPars - loadSpecPars(fv); - - //Load the Geometry parameters - loadGeometry(fv); - } else { - edm::LogError("HCalGeom") << "HcalDDDSimConstants: cannot get filtered " - << " view for " << attribute << " not matching " - << value; - throw cms::Exception("DDException") << "HcalDDDSimConstants: cannot match " << attribute << " to " << value; - } - } -} - unsigned int HcalDDDSimConstants::numberOfCells(HcalSubdetector subdet) const{ unsigned int num = 0; @@ -476,7 +425,6 @@ int HcalDDDSimConstants::phiNumber(int phi, int units) const { void HcalDDDSimConstants::printTiles() const { - checkInitialized(); std::cout << "Tile Information for HB:\n" << "========================\n\n"; for (int eta=etaMin[0]; eta<= etaMax[0]; eta++) { int dmax = 1; @@ -502,7 +450,6 @@ void HcalDDDSimConstants::printTiles() const { int HcalDDDSimConstants::unitPhi(int det, int etaR) const { - checkInitialized(); double dphi = (det == static_cast(HcalForward)) ? phitable[etaR-etaMin[2]] : phibin[etaR-1]; return unitPhi(dphi); } @@ -514,12 +461,34 @@ int HcalDDDSimConstants::unitPhi(double dphi) const { return units; } -void HcalDDDSimConstants::checkInitialized() const { - if (tobeInitialized) { - edm::LogError("HcalGeom") << "HcalDDDSimConstants : to be initialized correctly"; - throw cms::Exception("DDException") << "HcalDDDSimConstants: to be initialized"; +void HcalDDDSimConstants::initialize(const DDCompactView& cpv) { + + std::string attribute = "OnlyForHcalSimNumbering"; + std::string value = "any"; + DDValue val(attribute, value, 0.0); + + DDSpecificsFilter filter; + filter.setCriteria(val, DDSpecificsFilter::not_equals, + DDSpecificsFilter::AND, true, // compare strings otherwise doubles + true // use merged-specifics or simple-specifics + ); + DDFilteredView fv(cpv); + fv.addFilter(filter); + bool ok = fv.firstChild(); + + if (ok) { + //Load the SpecPars + loadSpecPars(fv); + + //Load the Geometry parameters + loadGeometry(fv); + } else { + edm::LogError("HCalGeom") << "HcalDDDSimConstants: cannot get filtered " + << " view for " << attribute << " not matching " + << value; + throw cms::Exception("DDException") << "HcalDDDSimConstants: cannot match " << attribute << " to " << value; } -} +} void HcalDDDSimConstants::loadSpecPars(const DDFilteredView& fv) { diff --git a/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc b/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc index 66c28e94ef2ce..2f7acf57f9849 100644 --- a/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc +++ b/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc @@ -81,59 +81,43 @@ HcalRecNumberingTester::~HcalRecNumberingTester() {} // ------------ method called to produce the data ------------ void HcalRecNumberingTester::analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup ) { - using namespace edm; - - std::cout << "Here I am " << std::endl; - - edm::ESHandle pHSNDC; - edm::ESTransientHandle pDD; - iSetup.get().get( pDD ); - iSetup.get().get( pHSNDC ); - - try { - DDExpandedView epv(*pDD); - std::cout << " without firstchild or next... epv.logicalPart() =" << epv.logicalPart() << std::endl; - }catch(const DDLogicalPart& iException){ - throw cms::Exception("Geometry") - <<"DDORAReader::readDB caught a DDLogicalPart exception: \""< pHSNDC" << std::endl; - const HcalDDDRecConstants hdc (*pHSNDC); - std::cout << "about to getPhiOff and getPhiBin for 0..2" << std::endl; - int neta = hdc.getNEta(); - std::cout << neta << " eta bins with phi off set for barrel = " - << hdc.getPhiOff(0) << ", endcap = " << hdc.getPhiOff(1) - << std::endl; - for (int i=0; i etas = hdc.getEtaLimit(i); - double fbin = hdc.getPhiBin(i); - std::vector depths = hdc.getDepth(i); - std::cout << "EtaBin[" << i << "]: EtaLimit = (" << etas.first << ":" - << etas.second << ") phiBin = " << fbin << " depths = ("; - for (unsigned int k=0; k hbar = hdc.getEtaBins(0); - std::vector hcap = hdc.getEtaBins(1); - std::cout << "Topology Mode " << hdc.getTopoMode() - << " HB with " << hbar.size() << " eta sectors and HE with " - << hcap.size() << " eta sectors" << std::endl; - std::vector hbcell = hdc.HcalCellTypes(HcalBarrel); - std::vector hecell = hdc.HcalCellTypes(HcalEndcap); - std::cout << "HB with " << hbcell.size() << " cells and HE with " - << hecell.size() << " cells" << std::endl; + + edm::ESHandle pHSNDC; + iSetup.get().get( pHSNDC ); + + std::cout << "about to de-reference the edm::ESHandle pHSNDC" << std::endl; + const HcalDDDRecConstants hdc (*pHSNDC); + std::cout << "about to getPhiOff and getPhiBin for 0..2" << std::endl; + int neta = hdc.getNEta(); + std::cout << neta << " eta bins with phi off set for barrel = " + << hdc.getPhiOff(0) << ", endcap = " << hdc.getPhiOff(1) + << std::endl; + for (int i=0; i etas = hdc.getEtaLimit(i); + double fbin = hdc.getPhiBin(i); + std::vector depths = hdc.getDepth(i); + std::cout << "EtaBin[" << i << "]: EtaLimit = (" << etas.first << ":" + << etas.second << ") phiBin = " << fbin << " depths = ("; + for (unsigned int k=0; k hbar = hdc.getEtaBins(0); + std::vector hcap = hdc.getEtaBins(1); + std::cout << "Topology Mode " << hdc.getTopoMode() + << " HB with " << hbar.size() << " eta sectors and HE with " + << hcap.size() << " eta sectors" << std::endl; + std::vector hbcell = hdc.HcalCellTypes(HcalBarrel); + std::vector hecell = hdc.HcalCellTypes(HcalEndcap); + std::cout << "HB with " << hbcell.size() << " cells and HE with " + << hecell.size() << " cells" << std::endl; + for (int type=0; type <= 1; ++type ) { + std::vector act = hdc.getThickActive(type); + std::cout << "Hcal type " << type << " has " << act.size() + << " eta/depth segment " << std::endl; + } }