Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2-hgx251 Add the algorithm for next version of HGCal geometry description #30486

Merged
merged 8 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Geometry/HGCalCommonData/interface/HGCalGeometryMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ class HGCalStringToEnumParser {
};

namespace HGCalGeometryMode {
enum GeometryMode { Square = 0, Hexagon = 1, HexagonFull = 2, Hexagon8 = 3, Hexagon8Full = 4, Trapezoid = 5 };
enum GeometryMode {
Square = 0,
Hexagon = 1,
HexagonFull = 2,
Hexagon8 = 3,
Hexagon8Full = 4,
Trapezoid = 5,
HexagonFullPart = 6
};
enum WaferMode { Polyhedra = 0, ExtrudedPolygon = 1 };
} // namespace HGCalGeometryMode

Expand Down
1 change: 1 addition & 0 deletions Geometry/HGCalCommonData/interface/HGCalWaferType.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class HGCalWaferType {
double cutFracArea);
~HGCalWaferType();
int getType(double xpos, double ypos, double zpos);
static int getType(int index, const std::vector<int>& indices, const std::vector<int>& types);
std::pair<double, double> rLimits(double zpos);

private:
Expand Down
422 changes: 422 additions & 0 deletions Geometry/HGCalCommonData/plugins/DDHGCalEEFileAlgo.cc

Large diffs are not rendered by default.

606 changes: 606 additions & 0 deletions Geometry/HGCalCommonData/plugins/DDHGCalHEFileAlgo.cc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/python/testHGCalV10XML_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'Geometry/CMSCommonData/data/cmsCalo.xml',
'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml',
'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml',
'Geometry/CMSCommonData/data/cavernData/2017/v1/cavernData.xml',
'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml',
'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml',
'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml',
'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml',
Expand Down
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/python/testHGCalV11XML_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'Geometry/CMSCommonData/data/cmsCalo.xml',
'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml',
'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml',
'Geometry/CMSCommonData/data/cavernData/2017/v1/cavernData.xml',
'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml',
'Geometry/CMSCommonData/data/muonBase/2026/v2/muonBase.xml',
'Geometry/CMSCommonData/data/cmsMuon.xml',
'Geometry/CMSCommonData/data/mgnt.xml',
Expand Down
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/python/testHGCalV12XML_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'Geometry/CMSCommonData/data/cmsCalo.xml',
'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml',
'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml',
'Geometry/CMSCommonData/data/cavernData/2017/v1/cavernData.xml',
'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml',
'Geometry/CMSCommonData/data/muonBase/2026/v4/muonBase.xml',
'Geometry/CMSCommonData/data/cmsMuon.xml',
'Geometry/CMSCommonData/data/mgnt.xml',
Expand Down
89 changes: 89 additions & 0 deletions Geometry/HGCalCommonData/python/testHGCalV14XML_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import FWCore.ParameterSet.Config as cms

# This config was generated automatically using generate2026Geometry.py
# If you notice a mistake, please update the generating script, not just this config

XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring(
'Geometry/CMSCommonData/data/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/extend/cmsextent.xml',
'Geometry/CMSCommonData/data/cms/2026/v4/cms.xml',
'Geometry/CMSCommonData/data/eta3/etaMax.xml',
'Geometry/CMSCommonData/data/cmsMother.xml',
'Geometry/CMSCommonData/data/caloBase/2026/v4/caloBase.xml',
'Geometry/CMSCommonData/data/cmsCalo.xml',
'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml',
'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml',
'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml',
'Geometry/CMSCommonData/data/muonBase/2026/v5/muonBase.xml',
'Geometry/CMSCommonData/data/cmsMuon.xml',
'Geometry/CMSCommonData/data/mgnt.xml',
'Geometry/CMSCommonData/data/muonMB.xml',
'Geometry/CMSCommonData/data/muonMagnet.xml',
'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml',
'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml',
'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml',
'Geometry/EcalCommonData/data/ebalgo.xml',
'Geometry/EcalCommonData/data/ebcon.xml',
'Geometry/EcalCommonData/data/ebrot.xml',
'Geometry/HcalCommonData/data/hcalrotations.xml',
'Geometry/HcalCommonData/data/hcal/v2/hcalalgo.xml',
'Geometry/HcalCommonData/data/hcalbarrelalgo.xml',
'Geometry/HcalCommonData/data/hcalcablealgo/v2/hcalcablealgo.xml',
'Geometry/HcalCommonData/data/hcalouteralgo.xml',
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/NoHE/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml',
'Geometry/HGCalCommonData/data/hgcal/v13/hgcal.xml',
'Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml',
'Geometry/HGCalCommonData/data/hgcalEE/v14/hgcalEE.xml',
'Geometry/HGCalCommonData/data/hgcalHEsil/v14/hgcalHEsil.xml',
'Geometry/HGCalCommonData/data/hgcalHEmix/v14/hgcalHEmix.xml',
'Geometry/HGCalCommonData/data/hgcalCons/v13/hgcalCons.xml',
'Geometry/HGCalCommonData/data/hgcalConsData/v13/hgcalConsData.xml',
'Geometry/ForwardCommonData/data/forwardshield/2017/v1/forwardshield.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v1/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2015/v2/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2015/v2/mb2.xml',
'Geometry/MuonCommonData/data/mb3/2015/v2/mb3.xml',
'Geometry/MuonCommonData/data/mb4/2015/v2/mb4.xml',
'Geometry/MuonCommonData/data/mb4Shield/2021/v1/mb4Shield.xml',
'Geometry/MuonCommonData/data/muonYoke/2021/v3/muonYoke.xml',
'Geometry/MuonCommonData/data/csc/2021/v2/csc.xml',
'Geometry/MuonCommonData/data/mfshield/2017/v2/mfshield.xml',
'Geometry/MuonCommonData/data/mf/2026/v6/mf.xml',
'Geometry/MuonCommonData/data/rpcf/2026/v3/rpcf.xml',
'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml',
'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml',
'Geometry/MuonCommonData/data/gem21/TDR_Dev/gem21.xml',
'Geometry/MuonCommonData/data/mfshield/2026/v3/mfshield.xml',
'Geometry/MuonCommonData/data/me0/TDR_Dev/v3/me0.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/muonNumbering/TDR_DeV/v1/muonNumbering.xml',
'Geometry/EcalSimData/data/PhaseII/ecalsens.xml',
'Geometry/HcalCommonData/data/hcalsens/NoHE/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/hgcsensv9.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/2026/v1/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
'Geometry/EcalSimData/data/EcalProdCuts.xml',
'Geometry/HGCalSimData/data/hgcProdCutsv9.xml',
'Geometry/CMSCommonData/data/FieldParameters.xml',
'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml',
),
rootNodeName = cms.string('cms:OCMS')
)
1 change: 1 addition & 0 deletions Geometry/HGCalCommonData/src/HGCalGeometryMode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ HGCalStringToEnumParser<HGCalGeometryMode::GeometryMode>::HGCalStringToEnumParse
enumMap["HGCalGeometryMode::Hexagon8"] = HGCalGeometryMode::Hexagon8;
enumMap["HGCalGeometryMode::Hexagon8Full"] = HGCalGeometryMode::Hexagon8Full;
enumMap["HGCalGeometryMode::Trapezoid"] = HGCalGeometryMode::Trapezoid;
enumMap["HGCalGeometryMode::HexagonFullPart"] = HGCalGeometryMode::HexagonFullPart;
}

template <>
Expand Down
6 changes: 6 additions & 0 deletions Geometry/HGCalCommonData/src/HGCalWaferType.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ int HGCalWaferType::getType(double xpos, double ypos, double zpos) {
return type;
}

int HGCalWaferType::getType(int index, const std::vector<int>& indices, const std::vector<int>& types) {
auto itr = static_cast<unsigned int>(std::find(std::begin(indices), std::end(indices), index) - std::begin(indices));
int type = (itr < indices.size()) ? types[itr] : -1;
return type;
}

std::pair<double, double> HGCalWaferType::rLimits(double zpos) {
double zz = std::abs(zpos);
if (zz < zMin_)
Expand Down