diff --git a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_01.xml b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_01.xml index e439461d9ca5f824e321e0e43b2fc833232f88bd..02e2244c08ba6e60b85c85f087248fb1c8f5fdc4 100644 --- a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_01.xml +++ b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_01.xml @@ -15,6 +15,7 @@ <detectors> <detector id="DetID_ECAL" name="CaloDetector" type="CRDEcalBarrel_v01" readout="EcalBarrelCollection" vis="Invisible" sensitive="true" region="EcalBarrelRegion"> + <sensitive type="scintillator"/> <!-- Use cm as unit if you want to use Pandora for reconstruction --> </detector> </detectors> diff --git a/Detector/DetCRD/src/Calorimeter/CRDEcal.cpp b/Detector/DetCRD/src/Calorimeter/CRDEcal.cpp index 9d1b6b79d8733d0977925bd1c5c429bf9bbe9eb7..65602b45772baec41534983a53e505751a671dce 100644 --- a/Detector/DetCRD/src/Calorimeter/CRDEcal.cpp +++ b/Detector/DetCRD/src/Calorimeter/CRDEcal.cpp @@ -128,7 +128,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, sd.setPlacement(plv); } - sens.setType("calorimeter"); + xml_dim_t sd_typ = x_det.child(_U(sensitive)); + sens.setType(sd_typ.typeStr()); MYDEBUG("create_detector DONE. "); return ECAL; diff --git a/Detector/DetCRD/src/Calorimeter/CRDEcal_v01.cpp b/Detector/DetCRD/src/Calorimeter/CRDEcal_v01.cpp index f75648822cdf44352cd3cec502d292c1157b7d2c..a11717c0c63252adca4bace361d919bca203b887 100644 --- a/Detector/DetCRD/src/Calorimeter/CRDEcal_v01.cpp +++ b/Detector/DetCRD/src/Calorimeter/CRDEcal_v01.cpp @@ -182,8 +182,9 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, DetElement sd(ECAL, _toString(i,"trap%3d"), detid); sd.setPlacement(plv); } - - sens.setType("calorimeter"); + + xml_dim_t sd_typ = x_det.child(_U(sensitive)); + sens.setType(sd_typ.typeStr()); ECAL.addExtension< LayeredCalorimeterData >( caloData ) ; MYDEBUG("create_detector DONE. ");