Skip to content

Commit 1eae11c

Browse files
committed
reverting DigitizerBase changes
1 parent 8665f72 commit 1eae11c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ namespace hgc_digi_utils {
3232
using hgc::HGCCellInfo;
3333

3434
inline void addCellMetadata(HGCCellInfo& info, const HGCalGeometry* geom, const DetId& detid) {
35-
if (detid.det() == DetId::HGCalHSc) {
36-
HGCScintillatorDetId sipmdetid(detid);
37-
info.size = sipmdetid.sipm();
38-
info.thickness = sipmdetid.granularity();
39-
} else {
40-
HGCSiliconDetId sidetid(detid);
41-
info.size = sidetid.highDensity() ? 0.5 : 1.0;
42-
info.thickness = sidetid.type();
43-
}
35+
const auto& dddConst = geom->topology().dddConstants();
36+
bool isHalf = (((dddConst.geomMode() == HGCalGeometryMode::Hexagon) ||
37+
(dddConst.geomMode() == HGCalGeometryMode::HexagonFull))
38+
? dddConst.isHalfCell(HGCalDetId(detid).wafer(), HGCalDetId(detid).cell())
39+
: false);
40+
//base time samples for each DetId, initialized to 0
41+
info.size = (isHalf ? 0.5 : 1.0);
42+
info.thickness = 1 + dddConst.waferType(detid, false);
4443
}
4544

4645
inline void addCellMetadata(HGCCellInfo& info, const CaloSubdetectorGeometry* geom, const DetId& detid) {

0 commit comments

Comments
 (0)