From 2921def88df64f64da370534ba780e3d8e7edf8a Mon Sep 17 00:00:00 2001 From: Sunanda Date: Sun, 29 May 2016 19:41:26 +0200 Subject: [PATCH 1/2] Try to work find BH segmentation --- .../interface/CaloTowerTopology.h | 2 +- .../CaloTopology/interface/HcalTopology.h | 1 + .../CaloTopology/src/CaloTowerTopology.cc | 15 +- Geometry/CaloTopology/src/HcalTopology.cc | 2 +- .../data/PhaseII/HGCal/hcalSimNumbering.xml | 4 +- .../data/PhaseII/hcalSimNumbering.xml | 4 +- .../PhaseII/hcalSimNumberingRebuildHE.xml | 4 +- .../interface/HcalDDDRecConstants.h | 1 + .../interface/HcalDDDSimConstants.h | 2 + .../python/testPhase2GeometryFineReco_cff.py | 53 ++++++ .../python/testPhase2GeometryFineXML_cfi.py | 166 ++++++++++++++++++ .../python/testPhase2GeometryFine_cff.py | 13 ++ .../HcalCommonData/src/HcalDDDRecConstants.cc | 5 +- .../HcalCommonData/src/HcalDDDSimConstants.cc | 7 + .../src/HcalFlexiHardcodeGeometryLoader.cc | 1 + .../test/runHcalGeometryTester_cfg.py | 2 +- 16 files changed, 263 insertions(+), 19 deletions(-) create mode 100644 Geometry/HcalCommonData/python/testPhase2GeometryFineReco_cff.py create mode 100644 Geometry/HcalCommonData/python/testPhase2GeometryFineXML_cfi.py create mode 100644 Geometry/HcalCommonData/python/testPhase2GeometryFine_cff.py diff --git a/Geometry/CaloTopology/interface/CaloTowerTopology.h b/Geometry/CaloTopology/interface/CaloTowerTopology.h index afd37131f81fe..0c1e56c17eca6 100644 --- a/Geometry/CaloTopology/interface/CaloTowerTopology.h +++ b/Geometry/CaloTopology/interface/CaloTowerTopology.h @@ -63,7 +63,7 @@ class CaloTowerTopology final : public CaloSubdetectorTopology { int firstHFRing_, lastHFRing_; int firstHORing_, lastHORing_; int firstHEDoublePhiRing_, firstHEQuadPhiRing_, firstHFQuadPhiRing_; - int nSinglePhi_, nDoublePhi_, nQuadPhi_; + int nSinglePhi_, nDoublePhi_, nQuadPhi_, nEtaHE_; uint32_t kSizeForDenseIndexing; }; diff --git a/Geometry/CaloTopology/interface/HcalTopology.h b/Geometry/CaloTopology/interface/HcalTopology.h index fb24e4809b176..3ada40d700f12 100644 --- a/Geometry/CaloTopology/interface/HcalTopology.h +++ b/Geometry/CaloTopology/interface/HcalTopology.h @@ -145,6 +145,7 @@ class HcalTopology : public CaloSubdetectorTopology { unsigned int detId2denseIdCALIB(const DetId& id) const; unsigned int getNumberOfShapes() const { return numberOfShapes_; } + bool isBH() const { return ((hcons_ == 0) ? false : hcons_->isBH()); } const HcalDDDRecConstants* dddConstants () const {return hcons_;} diff --git a/Geometry/CaloTopology/src/CaloTowerTopology.cc b/Geometry/CaloTopology/src/CaloTowerTopology.cc index be155d7684bd9..d92b3ba3308db 100644 --- a/Geometry/CaloTopology/src/CaloTowerTopology.cc +++ b/Geometry/CaloTopology/src/CaloTowerTopology.cc @@ -5,9 +5,10 @@ CaloTowerTopology::CaloTowerTopology(const HcalTopology * topology) : hcaltopo(topology) { //get number of towers in each hcal subdet from hcaltopo - int nEtaHB, nEtaHE, nEtaHO, nEtaHF; + int nEtaHB, nEtaHO, nEtaHF; nEtaHB = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1; - nEtaHE = hcaltopo->lastHERing() - hcaltopo->firstHERing() + 1; + nEtaHE_= hcaltopo->lastHERing() - hcaltopo->firstHERing() + 1; + if (hcaltopo->isBH()) nEtaHE_ = 0; nEtaHO = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1; nEtaHF = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1; @@ -15,8 +16,8 @@ CaloTowerTopology::CaloTowerTopology(const HcalTopology * topology) : hcaltopo(t firstHBRing_ = 1; lastHBRing_ = firstHBRing_ + nEtaHB - 1; firstHERing_ = lastHBRing_; //crossover - lastHERing_ = firstHERing_ + nEtaHE - 1; - firstHFRing_ = lastHERing_ + 1; //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower + lastHERing_ = firstHERing_ + nEtaHE_ - 1; + firstHFRing_ = (nEtaHE_ == 0) ? hcaltopo->firstHFRing() : (lastHERing_ + 1); //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower lastHFRing_ = firstHFRing_ + (nEtaHF - 1) - 1; //nEtaHF - 1 to account for no crossover firstHORing_ = 1; lastHORing_ = firstHORing_ + nEtaHO - 1; @@ -29,8 +30,8 @@ CaloTowerTopology::CaloTowerTopology(const HcalTopology * topology) : hcaltopo(t //number of etas per phi segmentation type int nEtaSinglePhi_, nEtaDoublePhi_, nEtaQuadPhi_; - nEtaSinglePhi_ = firstHEDoublePhiRing_ - firstHBRing_; - nEtaDoublePhi_ = firstHFQuadPhiRing_ - firstHEDoublePhiRing_; + nEtaSinglePhi_ = (nEtaHE_ == 0) ? nEtaHB : (firstHEDoublePhiRing_ - firstHBRing_); + nEtaDoublePhi_ = (nEtaHE_ == 0) ? (firstHFQuadPhiRing_- firstHFRing_) : (firstHFQuadPhiRing_ - firstHEDoublePhiRing_); nEtaQuadPhi_ = lastHFRing_ - firstHFQuadPhiRing_ + 1; //include lastHFRing //total number of towers per phi segmentation type @@ -57,7 +58,7 @@ int CaloTowerTopology::convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) co return hcal_ieta - hcaltopo->firstHBRing() + firstHBRing_; } else if(subdet == HcalEndcap && hcal_ieta >= hcaltopo->firstHERing() && hcal_ieta <= hcaltopo->lastHERing()){ - return hcal_ieta - hcaltopo->firstHERing() + firstHERing_; + return ((nEtaHE_ == 0) ? 0 : (hcal_ieta - hcaltopo->firstHERing() + firstHERing_)); } else if(subdet == HcalForward && hcal_ieta >= hcaltopo->firstHFRing() && hcal_ieta <= hcaltopo->lastHFRing()) { if(hcal_ieta == hcaltopo->firstHFRing()) hcal_ieta++; //account for no HF crossover diff --git a/Geometry/CaloTopology/src/HcalTopology.cc b/Geometry/CaloTopology/src/HcalTopology.cc index d741a77c1bee4..7888485de9782 100644 --- a/Geometry/CaloTopology/src/HcalTopology.cc +++ b/Geometry/CaloTopology/src/HcalTopology.cc @@ -60,7 +60,7 @@ HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons) : HESize_ = nEtaHE_*maxPhiHE_*maxDepthHE_*2; HOSize_ = (lastHORing_-firstHORing_+1)*IPHI_MAX*2; // ieta * iphi * 2 HFSize_ = (lastHFRing_-firstHFRing_+1)*IPHI_MAX*maxDepthHF_*2; // ieta * iphi * depth * 2 - numberOfShapes_ = 500; + numberOfShapes_ = (maxPhiHE_ > 72) ? 1200 : 500; } maxEta_ = (lastHERing_ > lastHFRing_) ? lastHERing_ : lastHFRing_; if (triggerMode_ == HcalTopologyMode::tm_LHC_RCT) { diff --git a/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalSimNumbering.xml b/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalSimNumbering.xml index 0f0f34013e0aa..ed5c08f46bcd7 100644 --- a/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalSimNumbering.xml +++ b/Geometry/HcalCommonData/data/PhaseII/HGCal/hcalSimNumbering.xml @@ -59,8 +59,8 @@ 22.0*cm, 165.0*cm, 30.0*cm, 0.0*cm, 1115.0*cm, 0.375*cm, 1137.0*cm - - 15, 99, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 3, 1, 0 + + 15, 99, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 3, 1, 0, 1 1.2, 1.2 diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml index 7651e8dbcdc1b..339a50c7b10e3 100644 --- a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml +++ b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml @@ -80,8 +80,8 @@ 22.0*cm, 165.0*cm, 30.0*cm, 0.0*cm, 1115.0*cm, 0.375*cm, 1137.0*cm - - 15, 99, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 53, 4, 0 + + 15, 99, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 53, 4, 0, 1 1.2, 1.2 diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumberingRebuildHE.xml b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumberingRebuildHE.xml index b649c5d3e8a5f..ebc0e55372c91 100644 --- a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumberingRebuildHE.xml +++ b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumberingRebuildHE.xml @@ -62,8 +62,8 @@ 22.0*cm, 165.0*cm, 30.0*cm, 0.0*cm, 1115.0*cm, 0.375*cm, 1137.0*cm - - 15, 29, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 3, 1, 0 + + 15, 29, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 3, 1, 0, 0 1.2, 1.2 diff --git a/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h b/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h index 40a74ec31a175..c4f8cccc98545 100644 --- a/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h +++ b/Geometry/HcalCommonData/interface/HcalDDDRecConstants.h @@ -88,6 +88,7 @@ class HcalDDDRecConstants { int getTopoMode() const {return ((hpar->topologyMode)&0xFF);} int getTriggerMode() const {return (((hpar->topologyMode)>>8)&0xFF);} std::vector HcalCellTypes(HcalSubdetector) const; + bool isBH() const {return hcons.isBH();} int maxHFDepth(int ieta, int iphi) const {return hcons.maxHFDepth(ieta,iphi);} unsigned int numberOfCells(HcalSubdetector) const; unsigned int nCells(HcalSubdetector) const; diff --git a/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h b/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h index 1246d08ea2f9b..6b92d30922810 100644 --- a/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h +++ b/Geometry/HcalCommonData/interface/HcalDDDSimConstants.h @@ -52,6 +52,7 @@ class HcalDDDSimConstants { std::vector HcalCellTypes() const; std::vector HcalCellTypes(HcalSubdetector, int ieta=-1, int depth=-1) const; + bool isBH() const {return isBH_;} int maxHFDepth(int ieta, int iphi) const; unsigned int numberOfCells(HcalSubdetector) const; int phiNumber(int phi, int unit) const; @@ -88,6 +89,7 @@ class HcalDDDSimConstants { double dlShort; // Diference of length between long and short int depthEta16[2]; // depth index of ieta=16 for HBmax, HEMin int depthEta29[2]; // maximum depth index for ieta=29 + bool isBH_; // if HE is BH std::vector idHF2QIE; // DetId's of HF modules with 2 QIE's }; diff --git a/Geometry/HcalCommonData/python/testPhase2GeometryFineReco_cff.py b/Geometry/HcalCommonData/python/testPhase2GeometryFineReco_cff.py new file mode 100644 index 0000000000000..fdbf33cab5f4a --- /dev/null +++ b/Geometry/HcalCommonData/python/testPhase2GeometryFineReco_cff.py @@ -0,0 +1,53 @@ +import FWCore.ParameterSet.Config as cms + +# Ideal geometry, needed for transient ECAL alignement +from Geometry.HcalCommonData.testPhase2GeometryFine_cff import * + +# Reconstruction geometry services +# Tracking Geometry +#bah - well, this is not a cfi! +from Geometry.CommonDetUnit.globalTrackingGeometry_cfi import * + +#Tracker +from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * +from Geometry.TrackerGeometryBuilder.trackerParameters_cfi import * +from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import * + +#Muon +from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * +from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * +from Geometry.GEMGeometryBuilder.gemGeometry_cfi import * +from Geometry.GEMGeometryBuilder.me0Geometry_cfi import * + +# Alignment +from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import * +from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * +from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * +trackerGeometry.applyAlignment = cms.bool(False) + +# Calorimeters +from Geometry.CaloEventSetup.HGCalV6Topology_cfi import * +from Geometry.HGCalGeometry.HGCalV6GeometryESProducer_cfi import * +from Geometry.CaloEventSetup.CaloTopology_cfi import * +from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * + +CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", + SelectedCalos = cms.vstring('HCAL' , + 'ZDC' , + 'CASTOR' , + 'EcalBarrel' , + 'TOWER' ) +) + +from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * +from Geometry.HcalEventSetup.HcalGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * +from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import * +from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import * +from Geometry.ForwardGeometry.ForwardGeometry_cfi import * + +from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * +from Geometry.EcalMapping.EcalMapping_cfi import * +from Geometry.EcalMapping.EcalMappingRecord_cfi import * + diff --git a/Geometry/HcalCommonData/python/testPhase2GeometryFineXML_cfi.py b/Geometry/HcalCommonData/python/testPhase2GeometryFineXML_cfi.py new file mode 100644 index 0000000000000..2db1de96ddc4e --- /dev/null +++ b/Geometry/HcalCommonData/python/testPhase2GeometryFineXML_cfi.py @@ -0,0 +1,166 @@ +import FWCore.ParameterSet.Config as cms + +## Everything that is currently in the PostLS1 geometry (rpc,csc,beampipe) + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/PhaseII/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/cmsextent.xml', + 'Geometry/CMSCommonData/data/PhaseI/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/PhaseII/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/PhaseII/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/PhaseII/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern.xml', + 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdMaterials.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdCylinder.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdDisks.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk8.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk9.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk10.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade8.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade9.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade10.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarmaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixbar.xml', + 'Geometry/TrackerCommonData/data/trackermaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/tracker.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerbar.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseII/FlatTracker/trackersens.xml', + 'Geometry/TrackerRecoData/data/PhaseII/FlatTracker/trackerRecoMaterial.xml', + 'Geometry/TrackerSimData/data/PhaseII/FlatTracker/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/EcalCommonData/data/ectkcable.xml', + 'Geometry/EcalCommonData/data/PhaseII/eregalgo.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/PhaseII/escon.xml', + 'Geometry/EcalCommonData/data/PhaseII/esalgo.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalRecNumberingRebuild.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HGCalCommonData/data/v7/hgcal.xml', + 'Geometry/HGCalCommonData/data/v7/hgcalEE.xml', + 'Geometry/HGCalCommonData/data/v7/hgcalHEsil.xml', + 'Geometry/HGCalCommonData/data/v7/hgcalwafer.xml', + 'Geometry/HGCalCommonData/data/v7/hgcalCons.xml', + 'Geometry/MuonCommonData/data/v1/mbCommon.xml', + 'Geometry/MuonCommonData/data/v1/mb1.xml', + 'Geometry/MuonCommonData/data/v1/mb2.xml', + 'Geometry/MuonCommonData/data/v1/mb3.xml', + 'Geometry/MuonCommonData/data/v1/mb4.xml', + 'Geometry/MuonCommonData/data/design/muonYoke.xml', + 'Geometry/MuonCommonData/data/PhaseII/mf.xml', + 'Geometry/MuonCommonData/data/PhaseII/rpcf.xml', + 'Geometry/MuonCommonData/data/v2/gemf.xml', + 'Geometry/MuonCommonData/data/v7/gem11.xml', + 'Geometry/MuonCommonData/data/v7/gem21.xml', + 'Geometry/MuonCommonData/data/v2/csc.xml', + 'Geometry/MuonCommonData/data/PhaseII/mfshield.xml', + 'Geometry/MuonCommonData/data/v8/me0.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/v2/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/brm.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/ForwardCommonData/data/castor.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( + #'Geometry/ForwardCommonData/data/bhm.xml', + ##'Geometry/ForwardCommonData/data/bhmsens.xml', #not needed for geomtery purposes only + ########'Geometry/ForwardCommonData/data/pltbcm.xml', + #'Geometry/ForwardCommonData/data/bcm1f.xml', + #'Geometry/ForwardSimData/data/bcm1fsens.xml', + #'Geometry/ForwardCommonData/data/plt.xml', + 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', + 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil.xml', + 'Geometry/HGCalSimData/data/hgcsensv6.xml', + 'Geometry/HGCalSimData/data/hgccons.xml', + 'Geometry/HGCalSimData/data/hgcProdCuts.xml', + 'Geometry/MuonSimData/data/PhaseII/muonSens.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml', + 'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml', + 'Geometry/ForwardCommonData/data/brmsens.xml', + 'Geometry/ForwardSimData/data/castorsens.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/HcalSimData/data/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', + 'Geometry/ForwardSimData/data/CastorProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml'), + rootNodeName = cms.string('cms:OCMS') +) + + diff --git a/Geometry/HcalCommonData/python/testPhase2GeometryFine_cff.py b/Geometry/HcalCommonData/python/testPhase2GeometryFine_cff.py new file mode 100644 index 0000000000000..067e00998a241 --- /dev/null +++ b/Geometry/HcalCommonData/python/testPhase2GeometryFine_cff.py @@ -0,0 +1,13 @@ +import FWCore.ParameterSet.Config as cms + +# +# Geometry master configuration +# +# Ideal geometry, needed for simulation +from Geometry.HcalCommonData.testPhase2GeometryFineXML_cfi import * +from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +from Geometry.HcalCommonData.hcalParameters_cfi import * +from Geometry.HcalCommonData.hcalDDDSimConstants_cfi import * +from Geometry.HGCalCommonData.hgcalV6ParametersInitialization_cfi import * +from Geometry.HGCalCommonData.hgcalV6NumberingInitialization_cfi import * +from Geometry.CaloEventSetup.HGCalTopology_cfi import * diff --git a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc index 003683ac37e4b..8d7f318621e64 100644 --- a/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc +++ b/Geometry/HcalCommonData/src/HcalDDDRecConstants.cc @@ -109,19 +109,18 @@ HcalDDDRecConstants::getEtaBins(const int itype) const { std::pair HcalDDDRecConstants::getEtaPhi(int subdet, int ieta, int iphi) const { int ietaAbs = (ieta > 0) ? ieta : -ieta; - const double fiveDegInRad = 2*M_PI/72; double eta(0), phi(0); if ((subdet == static_cast(HcalBarrel)) || (subdet == static_cast(HcalEndcap)) || (subdet == static_cast(HcalOuter))) { // Use Eta Table - int unit = (int)(phibin[ietaAbs-1]/fiveDegInRad+0.5); + int unit = hcons.unitPhi(phibin[ietaAbs-1]); int kphi = (unit == 2) ? ((iphi-1)/2 + 1) : iphi; double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1]; eta = 0.5*(etaTable[ietaAbs-1]+etaTable[ietaAbs]); phi = foff + (kphi-0.5)*phibin[ietaAbs-1]; } else { ietaAbs -= iEtaMin[2]; - int unit = (int)(hpar->phitable[ietaAbs-1]/fiveDegInRad+0.5); + int unit = hcons.unitPhi(hpar->phitable[ietaAbs-1]); int kphi = (unit == 4) ? ((iphi-3)/4 + 1) : ((iphi-1)/2 + 1); double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2]; eta = 0.5*(hpar->etaTableHF[ietaAbs-1]+hpar->etaTableHF[ietaAbs]); diff --git a/Geometry/HcalCommonData/src/HcalDDDSimConstants.cc b/Geometry/HcalCommonData/src/HcalDDDSimConstants.cc index d415fcae3b7ed..07d9454419271 100644 --- a/Geometry/HcalCommonData/src/HcalDDDSimConstants.cc +++ b/Geometry/HcalCommonData/src/HcalDDDSimConstants.cc @@ -501,6 +501,7 @@ void HcalDDDSimConstants::initialize( void ) { nEta = hpar->etaTable.size(); nR = hpar->rTable.size(); nPhiF = nR - 1; + isBH_ = false; #ifdef DebugLog for (int i=0; inoff[5] + hpar->noff[6]; + int noffl(noffsize); if ((int)(hpar->noff.size()) > (noffsize+3)) { depthEta16[0] = hpar->noff[noffsize]; depthEta16[1] = hpar->noff[noffsize+1]; depthEta29[0] = hpar->noff[noffsize+2]; depthEta29[1] = hpar->noff[noffsize+3]; + if ((int)(hpar->noff.size()) > (noffsize+4)) { + noffl += (5+hpar->noff[noffsize+4]); + if ((int)(hpar->noff.size()) > noffl) isBH_ = (hpar->noff[noffl] > 0); + } } else { depthEta16[0] = 2; depthEta16[1] = 3; depthEta29[0] = 2; depthEta29[1] = 1; } + std::cout << "isBH_ " << hpar->noff.size() << ":" << noffsize << ":" << noffl << ":" << isBH_ << std::endl; #ifdef DebugLog std::cout << "Depth index at ieta = 16 for HB (max) " << depthEta16[0] << " HE (min) " << depthEta16[1] << "; max depth for itea = 29 : (" diff --git a/Geometry/HcalTowerAlgo/src/HcalFlexiHardcodeGeometryLoader.cc b/Geometry/HcalTowerAlgo/src/HcalFlexiHardcodeGeometryLoader.cc index 69ad3da8ef618..00aebe862eaeb 100644 --- a/Geometry/HcalTowerAlgo/src/HcalFlexiHardcodeGeometryLoader.cc +++ b/Geometry/HcalTowerAlgo/src/HcalFlexiHardcodeGeometryLoader.cc @@ -186,6 +186,7 @@ std::vector HcalFlexiHardcode int depth = etabins[i].depthStart; double dphi = etabins[i].dphi; int units = int(((dphi*72)/(2*M_PI))+0.5); + if (units < 1) units = 1; int fioff = (units == 4) ? 3 : 1; nphi *= units; #ifdef DebugLog diff --git a/Geometry/HcalTowerAlgo/test/runHcalGeometryTester_cfg.py b/Geometry/HcalTowerAlgo/test/runHcalGeometryTester_cfg.py index 68a5373aed92a..95f46b89bacc0 100644 --- a/Geometry/HcalTowerAlgo/test/runHcalGeometryTester_cfg.py +++ b/Geometry/HcalTowerAlgo/test/runHcalGeometryTester_cfg.py @@ -2,7 +2,7 @@ process = cms.Process("HcalGeometryTest") -process.load("Geometry.HcalCommonData.testPhase0GeometryXML_cfi") +process.load("Geometry.HcalCommonData.testPhase2GeometryFineXML_cfi") process.load("Geometry.HcalCommonData.hcalDDConstants_cff") process.load("Geometry.HcalEventSetup.hcalTopologyIdeal_cfi") From 0e53ebf35e12899e4c0549f5163c09a3d6f2c5d2 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Mon, 30 May 2016 16:01:28 +0200 Subject: [PATCH 2/2] Bug fix - thanks to Paul --- Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml index 339a50c7b10e3..bdcebf86a1192 100644 --- a/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml +++ b/Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml @@ -12,7 +12,7 @@ 1.5834,1.6008,1.6182,1.6356, 1.653,1.6704,1.6878,1.7052,1.7226, 1.740, 1.7574,1.7748,1.7922,1.8096, 1.827,1.8444,1.8618,1.8792, 1.8966, 1.914,1.9314,1.9488,1.9662,1.9836, 2.001,2.0184,2.0358, - 2.0532,2.0706, 2.088,2.1054,2.1228,2.1402,2.1516, 2.175,2.1924, + 2.0532,2.0706, 2.088,2.1054,2.1228,2.1402,2.1576, 2.175,2.1924, 2.2098,2.2272,2.2446, 2.262,2.2794,2.2968,2.3142,2.3316, 2.349, 2.3664,2.3838,2.4012,2.4186, 2.436,2.4534,2.4708,2.4882,2.5056, 2.523, 2.5404,2.5578,2.5752,2.5926, 2.610,2.6274,2.6448,2.6622,