diff --git a/Geometry/HGCalCommonData/data/hgcal/v18/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v18/hgcal.xml
index 5b41459a20bbb..d4acf974881ef 100644
--- a/Geometry/HGCalCommonData/data/hgcal/v18/hgcal.xml
+++ b/Geometry/HGCalCommonData/data/hgcal/v18/hgcal.xml
@@ -23,6 +23,8 @@
+
+
diff --git a/Geometry/HGCalCommonData/data/hgcalCons/v18/hgcalCons.xml b/Geometry/HGCalCommonData/data/hgcalCons/v18/hgcalCons.xml
index 169a52238569e..aaed194611aad 100644
--- a/Geometry/HGCalCommonData/data/hgcalCons/v18/hgcalCons.xml
+++ b/Geometry/HGCalCommonData/data/hgcalCons/v18/hgcalCons.xml
@@ -18,13 +18,27 @@
0, 6, 0, 6, 0, 6, 0,
2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1
+
+ [hgcal:CalibCellRHD], [hgcal:CalibCellRLD]
+
+ 203, 209, 514, 902, 908, 1114, 1321, 1404, 1512, 1921, 2010, 2118
+
+
+ 202, 208, 615, 802, 807, 1115, 1221, 1505, 1612, 1821, 2111, 2117
+
+
+ 104, 509, 603, 1104, 1114, 1210
+
+
+ 103, 508, 704, 1014, 1110, 1205
+
-
+
@@ -88,7 +102,7 @@
-
+
diff --git a/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h b/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
index 962ee9d376127..1fb9a00d9a8ed 100644
--- a/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
+++ b/Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
@@ -165,14 +165,15 @@ class HGCalDDDConstants {
inline bool waferHexagon8() const {
return ((mode_ == HGCalGeometryMode::Hexagon8) || (mode_ == HGCalGeometryMode::Hexagon8Full) ||
(mode_ == HGCalGeometryMode::Hexagon8File) || (mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (mode_ == HGCalGeometryMode::Hexagon8Cassette));
+ (mode_ == HGCalGeometryMode::Hexagon8Cassette) || (mode_ == HGCalGeometryMode::Hexagon8CalibCell));
}
inline bool waferHexagon8File() const {
return ((mode_ == HGCalGeometryMode::Hexagon8File) || (mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (mode_ == HGCalGeometryMode::Hexagon8Cassette));
+ (mode_ == HGCalGeometryMode::Hexagon8Cassette) || (mode_ == HGCalGeometryMode::Hexagon8CalibCell));
}
inline bool waferHexagon8Module() const {
- return ((mode_ == HGCalGeometryMode::Hexagon8Module) || (mode_ == HGCalGeometryMode::Hexagon8Cassette));
+ return ((mode_ == HGCalGeometryMode::Hexagon8Module) || (mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (mode_ == HGCalGeometryMode::Hexagon8CalibCell));
}
bool waferInLayer(int wafer, int lay, bool reco) const;
bool waferFullInLayer(int wafer, int lay, bool reco) const;
diff --git a/Geometry/HGCalCommonData/interface/HGCalGeometryMode.h b/Geometry/HGCalCommonData/interface/HGCalGeometryMode.h
index 5789be5828d5c..5b7206baa3889 100644
--- a/Geometry/HGCalCommonData/interface/HGCalGeometryMode.h
+++ b/Geometry/HGCalCommonData/interface/HGCalGeometryMode.h
@@ -36,6 +36,7 @@ namespace HGCalGeometryMode {
TrapezoidModule = 9,
Hexagon8Cassette = 10,
TrapezoidCassette = 11,
+ Hexagon8CalibCell = 12,
};
enum WaferMode { Polyhedra = 0, ExtrudedPolygon = 1 };
diff --git a/Geometry/HGCalCommonData/interface/HGCalParameters.h b/Geometry/HGCalCommonData/interface/HGCalParameters.h
index 6b10a0ffab4b0..6983f99678178 100644
--- a/Geometry/HGCalCommonData/interface/HGCalParameters.h
+++ b/Geometry/HGCalCommonData/interface/HGCalParameters.h
@@ -196,6 +196,12 @@ class HGCalParameters {
int nphiCassette_;
int phiOffset_;
std::vector cassetteShift_;
+ double calibCellRHD_;
+ std::vector calibCellFullHD_;
+ std::vector calibCellPartHD_;
+ double calibCellRLD_;
+ std::vector calibCellFullLD_;
+ std::vector calibCellPartLD_;
COND_SERIALIZABLE;
diff --git a/Geometry/HGCalCommonData/src/HGCalGeomParameters.cc b/Geometry/HGCalCommonData/src/HGCalGeomParameters.cc
index 3fd84d1892ee9..9645a8be4acb1 100644
--- a/Geometry/HGCalCommonData/src/HGCalGeomParameters.cc
+++ b/Geometry/HGCalCommonData/src/HGCalGeomParameters.cc
@@ -1264,7 +1264,8 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const DDFilteredView& fv, HGCalPa
DDsvalues_type sv(fv.mergedSpecifics());
php.cellThickness_ = getDDDArray("CellThickness", sv, 3);
rescale(php.cellThickness_, HGCalParameters::k_ScaleFromDDD);
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
php.waferThickness_ = getDDDArray("WaferThickness", sv, 3);
rescale(php.waferThickness_, HGCalParameters::k_ScaleFromDDD);
} else {
@@ -1303,6 +1304,16 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const DDFilteredView& fv, HGCalPa
php.layerOffset_ = dummy2[0];
php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));
+ if (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell) {
+ const auto& dummy3 = fv.vector("CalibCellRadius");
+ php.calibCellRHD_ = HGCalParameters::k_ScaleFromDDD * dummy3[0];
+ php.calibCellFullHD_ = dbl_to_int(fv.vector("CalibCellFullHD"));
+ php.calibCellPartHD_ = dbl_to_int(fv.vector("CalibCellPartHD"));
+ php.calibCellRLD_ = HGCalParameters::k_ScaleFromDDD * dummy3[1];
+ php.calibCellFullLD_ = dbl_to_int(fv.vector("CalibCellFullLD"));
+ php.calibCellPartLD_ = dbl_to_int(fv.vector("CalibCellPartLD"));
+ }
+
loadSpecParsHexagon8(php);
// Read in parameters from Philip's file
@@ -1324,7 +1335,8 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const DDFilteredView& fv, HGCalPa
waferProperties = dbl_to_int(fv.vector("WaferPropertiesHE"));
cassetteShift = fv.vector("CassetteShiftHE");
}
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
if ((php.waferMaskMode_ == siliconFileEE) || (php.waferMaskMode_ == siliconCassetteEE)) {
layerType = dbl_to_int(fv.vector("LayerTypesEE"));
} else if ((php.waferMaskMode_ == siliconFileHE) || (php.waferMaskMode_ == siliconCassetteHE)) {
@@ -1344,7 +1356,8 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView& fv,
const std::string& sdTag1) {
php.cellThickness_ = fv.get >(sdTag1, "CellThickness");
rescale(php.cellThickness_, HGCalParameters::k_ScaleFromDD4hep);
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
php.waferThickness_ = fv.get >(sdTag1, "WaferThickness");
rescale(php.waferThickness_, HGCalParameters::k_ScaleFromDD4hep);
} else {
@@ -1397,6 +1410,21 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView& fv,
} else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerCenter")) {
for (const auto& i : it.second)
php.layerCenter_.emplace_back(std::round(i));
+ } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "CalibCellRadius")) {
+ php.calibCellRHD_ = HGCalParameters::k_ScaleFromDD4hep * it.second[0];
+ php.calibCellRLD_ = HGCalParameters::k_ScaleFromDDD * it.second[1];
+ } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "CalibCellFullHD")) {
+ for (const auto& i : it.second)
+ php.calibCellFullHD_.emplace_back(std::round(i));
+ } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "CalibCellPartHD")) {
+ for (const auto& i : it.second)
+ php.calibCellPartHD_.emplace_back(std::round(i));
+ } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "CalibCellFullLD")) {
+ for (const auto& i : it.second)
+ php.calibCellFullLD_.emplace_back(std::round(i));
+ } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "CalibCellPartLD")) {
+ for (const auto& i : it.second)
+ php.calibCellPartLD_.emplace_back(std::round(i));
}
}
@@ -1443,7 +1471,8 @@ void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView& fv,
}
}
}
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
if ((php.waferMaskMode_ == siliconFileEE) || (php.waferMaskMode_ == siliconFileHE)) {
for (auto const& it : vmap) {
if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerTypesEE")) {
@@ -1500,6 +1529,16 @@ void HGCalGeomParameters::loadSpecParsHexagon8(HGCalParameters& php) {
<< php.layerCenter_.size();
for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
+ edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Calibration cells in HD having radius " << php.calibCellRHD_
+ << " in arrays of size " << php.calibCellFullHD_.size() << ":"
+ << php.calibCellPartHD_.size();
+ for (unsigned int k = 0; k < php.calibCellFullHD_.size(); ++k)
+ edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.calibCellFullHD_[k] << ":" << php.calibCellPartHD_[k];
+ edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Calibration cells in LD having radius " << php.calibCellRLD_
+ << " in arrays of size " << php.calibCellFullLD_.size() << ":"
+ << php.calibCellPartLD_.size();
+ for (unsigned int k = 0; k < php.calibCellFullLD_.size(); ++k)
+ edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.calibCellFullLD_[k] << ":" << php.calibCellPartLD_[k];
#endif
}
@@ -1526,7 +1565,7 @@ void HGCalGeomParameters::loadSpecParsHexagon8(HGCalParameters& php,
for (unsigned int k = 0; k < waferIndex.size(); ++k) {
int partial = HGCalProperty::waferPartial(waferProperties[k]);
int orient =
- (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)
+ ((php.mode_ == HGCalGeometryMode::Hexagon8Cassette) || (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell))
? HGCalProperty::waferOrient(waferProperties[k])
: HGCalWaferMask::getRotation(php.waferZSide_, partial, HGCalProperty::waferOrient(waferProperties[k]));
php.waferInfoMap_[waferIndex[k]] = HGCalParameters::waferInfo(HGCalProperty::waferThick(waferProperties[k]),
@@ -1969,7 +2008,7 @@ void HGCalGeomParameters::loadWaferHexagon8(HGCalParameters& php) {
int kndx = HGCalWaferIndex::waferIndex(lay, u, v);
int type(-1);
if ((php.mode_ == HGCalGeometryMode::Hexagon8File) || (php.mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (php.mode_ == HGCalGeometryMode::Hexagon8Cassette))
+ (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) || (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell))
type = wType->getType(kndx, php.waferInfoMap_);
if (type < 0)
type = wType->getType(HGCalParameters::k_ScaleToDDD * xpos0,
@@ -2003,12 +2042,14 @@ void HGCalGeomParameters::loadWaferHexagon8(HGCalParameters& php) {
std::pair corner0 = HGCalWaferMask::getTypeMode(
xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], type, php.waferMaskMode_);
if ((php.mode_ == HGCalGeometryMode::Hexagon8File) || (php.mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
auto itr = php.waferInfoMap_.find(wl);
if (itr != php.waferInfoMap_.end()) {
int part = (itr->second).part;
int orient = (itr->second).orient;
- bool ok = (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)
+ bool ok = ((php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell))
? true
: HGCalWaferMask::goodTypeMode(
xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], part, orient, false);
diff --git a/Geometry/HGCalCommonData/src/HGCalGeometryMode.cc b/Geometry/HGCalCommonData/src/HGCalGeometryMode.cc
index d4e1a37b9b0bc..33015cddcb9d6 100644
--- a/Geometry/HGCalCommonData/src/HGCalGeometryMode.cc
+++ b/Geometry/HGCalCommonData/src/HGCalGeometryMode.cc
@@ -15,6 +15,7 @@ HGCalStringToEnumParser::HGCalStringToEnumParse
enumMap["HGCalGeometryMode::TrapezoidModule"] = HGCalGeometryMode::TrapezoidModule;
enumMap["HGCalGeometryMode::Hexagon8Cassette"] = HGCalGeometryMode::Hexagon8Cassette;
enumMap["HGCalGeometryMode::TrapezoidCassette"] = HGCalGeometryMode::TrapezoidCassette;
+ enumMap["HGCalGeometryMode::Hexagon8CalibCell"] = HGCalGeometryMode::Hexagon8CalibCell;
}
template <>
diff --git a/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc b/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc
index dacc848fb8632..98ca5129c55dc 100644
--- a/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc
+++ b/Geometry/HGCalCommonData/src/HGCalParametersFromDD.cc
@@ -52,6 +52,8 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv,
php.cassettes_ = 0; // default number of cassettes
php.nphiCassette_ = 0; // default number of phi's per cassette
php.phiOffset_ = 0; // default value of phi offset for cassette
+ php.calibCellRHD_ = 0; // default value of R of HD calibration cells
+ php.calibCellRLD_ = 0; // default value of R of LD calibration cells
std::unique_ptr geom = std::make_unique();
if ((php.mode_ == HGCalGeometryMode::Hexagon) || (php.mode_ == HGCalGeometryMode::HexagonFull)) {
attribute = "OnlyForHGCalNumbering";
@@ -74,7 +76,7 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv,
}
if ((php.mode_ == HGCalGeometryMode::Hexagon8) || (php.mode_ == HGCalGeometryMode::Hexagon8Full) ||
(php.mode_ == HGCalGeometryMode::Hexagon8File) || (php.mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) || (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
php.levelT_ = dbl_to_int(getDDDArray("LevelTop", sv));
php.levelZSide_ = static_cast(getDDDValue("LevelZSide", sv));
php.nCellsFine_ = php.nCellsCoarse_ = 0;
@@ -84,7 +86,8 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv,
php.minTileSize_ = 0;
php.waferMaskMode_ = static_cast(getDDDValue("WaferMaskMode", sv));
php.waferZSide_ = static_cast(getDDDValue("WaferZside", sv));
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
php.useSimWt_ = static_cast(getDDDValue("UseSimWt", sv));
php.layerRotation_ = getDDDValue("LayerRotation", sv);
}
@@ -173,7 +176,8 @@ bool HGCalParametersFromDD::build(const DDCompactView* cpv,
php.defineFull_ = true;
// Load wafer positions
geom->loadWaferHexagon8(php);
- } else if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ } else if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
// Load the SpecPars
geom->loadSpecParsHexagon8(fv, php);
// Load Geometry parameters
@@ -267,7 +271,8 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv,
<< HGCalGeometryMode::Hexagon8File << ":" << HGCalGeometryMode::Hexagon8Module << ":"
<< HGCalGeometryMode::Trapezoid << ":" << HGCalGeometryMode::TrapezoidFile << ":"
<< HGCalGeometryMode::TrapezoidModule << ":" << HGCalGeometryMode::Hexagon8Cassette
- << ":" << HGCalGeometryMode::TrapezoidCassette;
+ << ":" << HGCalGeometryMode::TrapezoidCassette << ":"
+ << HGCalGeometryMode::Hexagon8CalibCell;
#endif
php.levelZSide_ = 3; // Default level for ZSide
php.detectorType_ = 0; // These two parameters are
@@ -290,7 +295,7 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv,
}
if ((php.mode_ == HGCalGeometryMode::Hexagon8) || (php.mode_ == HGCalGeometryMode::Hexagon8Full) ||
(php.mode_ == HGCalGeometryMode::Hexagon8File) || (php.mode_ == HGCalGeometryMode::Hexagon8Module) ||
- (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) || (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
php.levelT_ = dbl_to_int(fv.get >(name, "LevelTop"));
tempD = fv.get >(name, "LevelZSide");
php.levelZSide_ = static_cast(tempD[0]);
@@ -305,7 +310,8 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv,
php.waferMaskMode_ = static_cast(tempD[0]);
tempD = fv.get >(name, "WaferZside");
php.waferZSide_ = static_cast(tempD[0]);
- if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
tempD = fv.get >(name, "LayerRotation");
php.layerRotation_ = tempD[0];
tempD = fv.get >(name, "UseSimWt");
@@ -401,7 +407,8 @@ bool HGCalParametersFromDD::build(const cms::DDCompactView* cpv,
php.defineFull_ = true;
// Load wafer positions
geom->loadWaferHexagon8(php);
- } else if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette)) {
+ } else if ((php.mode_ == HGCalGeometryMode::Hexagon8Module) || (php.mode_ == HGCalGeometryMode::Hexagon8Cassette) ||
+ (php.mode_ == HGCalGeometryMode::Hexagon8CalibCell)) {
// Load the SpecPars
geom->loadSpecParsHexagon8(fv, vmap, php, name);
// Load Geometry parameters