File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
SimCalorimetry/HGCalSimProducers/interface Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments