diff --git a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_02.xml b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_02.xml index e969095d19972baaa03cde91e773c9d77f8eee3f..6706d19b337f9d5dc8f0929e08add6a1fa00f27f 100755 --- a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_02.xml +++ b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_v01_02.xml @@ -30,7 +30,7 @@ </regions> <detectors> - <detector id="DetID_ECAL" name="CaloDetector" type="LongCrystalBarBarrelCalorimeter32Polygon_v01" readout="EcalBarrelCollection" vis="Invisible" sensitive="true" region="EcalBarrelRegion"> + <detector id="DetID_ECAL" name="EcalBarrel" type="LongCrystalBarBarrelCalorimeter32Polygon_v01" readout="EcalBarrelCollection" vis="Invisible" sensitive="true" region="EcalBarrelRegion"> <!-- Use cm as unit if you want to use Pandora for reconstruction --> </detector> </detectors> diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp index 1391dc64337e71d46e887cc1109dfc956ebe820e..cd884987a1fdee1d223e4048dd650df76b76de69 100755 --- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp +++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp @@ -160,6 +160,21 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::DetElement stavedet(ECAL, "trap",detid); + + // Create extension objects for reconstruction + LayeredCalorimeterData* caloData = new LayeredCalorimeterData ; + caloData->layoutType = LayeredCalorimeterData::BarrelLayout ; + caloData->inner_symmetry = n_module; + caloData->outer_symmetry = n_module; + caloData->phi0 = 0 ; // hardcoded + + // extent of the calorimeter in the r-z-plane [ rmin, rmax, zmin, zmax ] in mm. + caloData->extent[0] = radius_inner; + caloData->extent[1] = radius_outer; + caloData->extent[2] = 0.; + caloData->extent[3] = length_z; + + // ################################## // ### SiPM PCB ASIC Cable Carbon ### // ################################## @@ -1220,6 +1235,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, } sens.setType("calorimeter"); + ECAL.addExtension< LayeredCalorimeterData >( caloData ) ; MYDEBUG("create_detector DONE. "); return ECAL;