From 24ec59856efe43d9630c90b7abe02d0bb9210adf Mon Sep 17 00:00:00 2001 From: Sunanda Date: Mon, 29 Feb 2016 23:28:26 +0100 Subject: [PATCH] Modify the code/xml files to define BH --- .../cmsExtendedGeometry2023DevXML_cfi.py | 4 +- .../PhaseII/HGCal/hcalRecNumberingRebuild.xml | 2 +- .../data/PhaseII/hcalRecNumbering.xml | 2 +- .../data/PhaseII/hcalRecNumberingRebuild.xml | 37 +++++++++++++++++++ .../data/PhaseII/hcalSimNumbering.xml | 8 +++- .../HcalCommonData/src/HcalDDDRecConstants.cc | 19 ++++++---- .../HcalCommonData/src/HcalDDDSimConstants.cc | 1 + .../python/runHcalRecNumberingTester_cfg.py | 2 +- 8 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 Geometry/HcalCommonData/data/PhaseII/hcalRecNumberingRebuild.xml diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023DevXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023DevXML_cfi.py index 4f293c005cf5b..4d043bc49862e 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023DevXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023DevXML_cfi.py @@ -215,8 +215,8 @@ 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalendcapalgo.xml', 'Geometry/HcalCommonData/data/hcalouteralgo.xml', 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalSimNumbering.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumbering.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml', 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', 'Geometry/HGCalCommonData/data/v7/hgcal.xml', 'Geometry/HGCalCommonData/data/v7/hgcalEE.xml', diff --git a/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml b/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml index 22c13074cbefb..5ac0d74386c11 100644 --- a/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml +++ b/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml @@ -24,7 +24,7 @@ 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 - + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7 diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalRecNumbering.xml b/Geometry/HcalCommonData/data/PhaseII/hcalRecNumbering.xml index 3af1415230566..edfe51c387641 100644 --- a/Geometry/HcalCommonData/data/PhaseII/hcalRecNumbering.xml +++ b/Geometry/HcalCommonData/data/PhaseII/hcalRecNumbering.xml @@ -12,7 +12,7 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 4 + 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4 diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalRecNumberingRebuild.xml b/Geometry/HcalCommonData/data/PhaseII/hcalRecNumberingRebuild.xml new file mode 100644 index 0000000000000..ba4ec7aba9312 --- /dev/null +++ b/Geometry/HcalCommonData/data/PhaseII/hcalRecNumberingRebuild.xml @@ -0,0 +1,37 @@ + + + + + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 4 + + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5 + + + 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 1, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12 + + + + + + + + + + + + + diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml index 4b7d7ad611505..dcd394a1e95af 100644 --- a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml +++ b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml @@ -24,9 +24,13 @@ 40.60*cm, 48.30*cm, 57.60*cm, 68.60*cm, 81.80*cm, 97.50*cm, 116.20*cm, 130.00*cm - + 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, - 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 1.0*deg, + 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, + 5.0*deg, 5.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, + 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, + 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, + 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, 1.0*deg, diff --git a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc index 0111c9d673b83..ee1a1aaae9680 100644 --- a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc +++ b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc @@ -50,10 +50,11 @@ HcalDDDRecConstants::getEtaBins(const int itype) const { lmax = l + 1; } else if ((int)layerGroup( ieta-1, l ) > dep) { if (dstart < 0) dstart = dep; + int lmax0 = (lmax >= lmin) ? lmax : lmin; if (type == 1 && ieta+1 == hpar->noff[1] && dep > hcons.getDepthEta29(0)) { - etabin0.layer.push_back(std::pair(lmin,lmax)); + etabin0.layer.push_back(std::pair(lmin,lmax0)); } else { - etabin.layer.push_back(std::pair(lmin,lmax)); + etabin.layer.push_back(std::pair(lmin,lmax0)); } lmin = (l + 1); lmax = l; @@ -291,8 +292,10 @@ HcalDDDRecConstants::getThickActive(const int type) const { for (unsigned int i = 0; i < bins[k].layer.size(); ++i) { double thick(0); for (int j = bins[k].layer[i].first; j <= bins[k].layer[i].second; ++j) { - if (type == 0 || j > 1) - thick += ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second); + if (type == 0 || j > 1) { + double t = ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second); + if (t > 0) thick += t; + } } thick *= (2.*scale); HcalDDDRecConstants::HcalActiveLength active(ieta,depth,eta,thick); @@ -429,7 +432,7 @@ void HcalDDDRecConstants::initialize(void) { iEtaMin = hpar->etaMin; iEtaMax = hpar->etaMax; etaTable.clear(); ietaMap.clear(); etaSimValu.clear(); - int ieta(0), ietaHB(0), ietaHE(0); + int ieta(0), ietaHB(0), ietaHE(0), ietaHEM(0); etaTable.push_back(hpar->etaTable[ieta]); for (int i=0; ietagroup[i]); ++k) ietaMap.push_back(i+1); if (ieta <= hpar->etaMax[0]) ietaHB = i+1; if (ieta <= hpar->etaMin[1]) ietaHE = i+1; + if (ieta <= hpar->etaMax[1]) ietaHEM= i+1; } iEtaMin[1] = ietaHE; iEtaMax[0] = ietaHB; + iEtaMax[1] = ietaHEM; // Then Phi bins ieta = 0; @@ -461,8 +466,8 @@ void HcalDDDRecConstants::initialize(void) { phibin.push_back(dphi); ieta += (hpar->etagroup[i]); } - for (unsigned int i=1; ietaTable.size(); ++i) { - int unit = hcons.unitPhi(hpar->phibin[i-1]); + for (unsigned int i=1; i