diff --git a/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Endcaps_v02.cpp b/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Endcaps_v02.cpp
index 06db6d6b24c1962dfdca06a2ca2bf5b184717fc2..0e81909250f59640ac44493677ebb54551bc03ac 100644
--- a/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Endcaps_v02.cpp
+++ b/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Endcaps_v02.cpp
@@ -315,7 +315,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 }
                 else if (single_elongation >= short_elongation_esr_out.at(0))
                 {
-//                    scintillator_unit = slice.placeVolume(odd_0_scintillator, transform_scintillator);
                     scintillator_unit = slice.placeVolume(odd_0_scintillator, Transform3D(RotationZ(pi),
                                 Position((-0.5 * (Ncells_phi + 1) + iphi) * wrapped_scintillator_xy - 0.5 * short_elongation_esr_in.at(0),
                                          scintillator_pos_z,
@@ -347,7 +346,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 }
                 else if (single_elongation >= short_elongation_esr_out.at(0))
                 {
-//                    scintillator_unit = slice.placeVolume(odd_0_scintillator, position_scintillator);
                     scintillator_unit = slice.placeVolume(odd_0_scintillator,
                                 Position((-0.5 * (Ncells_phi + 1) + iphi) * wrapped_scintillator_xy + 0.5 * short_elongation_esr_in.at(0),
                                          scintillator_pos_z,
diff --git a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_Short_v02.xml b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_Short_v02.xml
index 30f14a456930df770ce3fa98c9cbbf2d93278d3b..7b0331263e80707d09ec97a70d95db8495d70519 100644
--- a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_Short_v02.xml
+++ b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Barrel_Short_v02.xml
@@ -12,20 +12,20 @@
 
         <constant name="crystal_r" value="4.1*cm"/>
         <constant name="crystal_phi" value="1*cm"/>
-        <constant name="crystal_z" value="1*cm"/>
+        <constant name="crystal_z_barrel" value="1*cm"/>
 
-        <constant name="esr_thickness" value="0.1*mm"/>
+        <constant name="esr_thickness_barrel" value="0.1*mm"/>
         <constant name="sipm_r" value="0.8*mm"/>
         <constant name="sipm_phi" value="3*mm"/>
-        <constant name="sipm_z" value="3*mm"/>
-        <constant name="pcb_thickness" value="2.2*mm"/>
-        <constant name="cu_thickness" value="1*mm"/>
-        <constant name="fibre_thickness" value="0.1*mm"/>
+        <constant name="sipm_z_barrel" value="3*mm"/>
+        <constant name="pcb_thickness_barrel" value="2.2*mm"/>
+        <constant name="cu_thickness_barrel" value="1*mm"/>
+        <constant name="fibre_thickness_barrel" value="0.1*mm"/>
 
         <constant name="collection_width" value="300*mm"/>
         <constant name="collection_thickness" value="10*mm"/>
 
-        <constant name="boundary_safety" value="1*nm"/>
+        <constant name="boundary_safety_barrel" value="1*nm"/>
     </define>
 
     <regions>
diff --git a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Endcap_Short_v01.xml b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Endcap_Short_v01.xml
index 73c5c6e7838c5df6e7f9adee4ac724f461b1c6fe..2a2138aae9aeac94d737aa70917a4cd44b24190a 100644
--- a/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Endcap_Short_v01.xml
+++ b/Detector/DetCRD/compact/CRD_common_v01/Ecal_Crystal_Endcap_Short_v01.xml
@@ -24,16 +24,16 @@
         <!-- CrystalXY = CellXY - 2 * BoundarySafety - 2 * ESRThickness-->
         <!-- CrystalZ = CellZ - 2 * BoundarySafety - 2 * ESRThickness-->
         <constant name="Ncell_xy" value="35"/>
-        <constant name="crystal_z" value="4.1*cm"/>
+        <constant name="crystal_z_endcap" value="4.1*cm"/>
 
-        <constant name="esr_thickness" value="0.1*mm"/>
+        <constant name="esr_thickness_endcap" value="0.1*mm"/>
         <constant name="sipm_x" value="3*mm"/>
         <constant name="sipm_y" value="3*mm"/>
-        <constant name="sipm_z" value="0.8*mm"/>
-        <constant name="pcb_thickness" value="2.2*mm"/>
-        <constant name="cu_thickness" value="1*mm"/>
-        <constant name="fibre_thickness" value="0.1*mm"/>
-        <constant name="boundary_safety" value="1*nm"/>
+        <constant name="sipm_z_endcap" value="0.8*mm"/>
+        <constant name="pcb_thickness_endcap" value="2.2*mm"/>
+        <constant name="cu_thickness_endcap" value="1*mm"/>
+        <constant name="fibre_thickness_endcap" value="0.1*mm"/>
+        <constant name="boundary_safety_endcap" value="1*nm"/>
     </define>
 
     <regions>
diff --git a/Detector/DetCRD/compact/TDR_o1_v01/TDR_o1_v01.xml b/Detector/DetCRD/compact/TDR_o1_v01/TDR_o1_v01.xml
index 8d0ca52d5601f1db442f615613d600beaac16d04..1f5a7d3e6a0391ddf5a2472f75764e408be5ec67 100644
--- a/Detector/DetCRD/compact/TDR_o1_v01/TDR_o1_v01.xml
+++ b/Detector/DetCRD/compact/TDR_o1_v01/TDR_o1_v01.xml
@@ -39,11 +39,9 @@
   <include ref="../CRD_common_v01/SET_SimplePixel_v01_01.xml"/>
 
   <include ref="../CRD_common_v01/Ecal_Crystal_Barrel_v01_02.xml"/>
-  <!--preliminary EcalEndcaps/-->
-  <include ref="../CRD_common_v02/EcalEndcaps_Polyhedra_v01_01.xml"/>
+  <include ref="../CRD_common_v01/Ecal_Crystal_Endcap_v01_01.xml"/>
   <include ref="../CRD_common_v01/SHcalGlass_Barrel_v05.xml"/>
-  <!--preliminary HcalEndcaps/-->
-  <include ref="../CRD_common_v02/HcalEndcaps_Polyhedra_v01_01.xml"/>
+  <include ref="../CRD_common_v01/SHcalGlass_Endcaps_v01.xml"/>
 
   <!--Lumical to update-->
   <include ref="../CRD_common_v01/Lumical_o1_v01.xml"/>
diff --git a/Detector/DetCRD/src/Calorimeter/CRDEcal_Endcap_Short_v01.cpp b/Detector/DetCRD/src/Calorimeter/CRDEcal_Endcap_Short_v01.cpp
index ca728e5f6e75ac041b28172f38a6d3ed59c3ac25..37fb38741bfff3f255ff2f583e6a6c7e823c0305 100644
--- a/Detector/DetCRD/src/Calorimeter/CRDEcal_Endcap_Short_v01.cpp
+++ b/Detector/DetCRD/src/Calorimeter/CRDEcal_Endcap_Short_v01.cpp
@@ -65,7 +65,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     MYDEBUGVAL(det_id)
 
     // To prevent overlapping
-    const double boundary_safety = theDetector.constant<double>("boundary_safety");
+    const double boundary_safety_endcap = theDetector.constant<double>("boundary_safety_endcap");
 
     // Global geometry
     const double r_in = theDetector.constant<double>("ecalendcap_inner_radius");
@@ -95,21 +95,21 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
 
     // Unit size
     const int Ncell_xy = theDetector.constant<int>("Ncell_xy");
-    const double crystal_z = theDetector.constant<double>("crystal_z");
+    const double crystal_z_endcap = theDetector.constant<double>("crystal_z_endcap");
     const double cell_xy = block_xy_in / Ncell_xy;
 
-    const double esr_thickness = theDetector.constant<double>("esr_thickness");    // Wrapper
+    const double esr_thickness_endcap = theDetector.constant<double>("esr_thickness_endcap");    // Wrapper
     const double sipm_x = theDetector.constant<double>("sipm_x");
     const double sipm_y = theDetector.constant<double>("sipm_y");
-    const double sipm_z = theDetector.constant<double>("sipm_z");
-    const double pcb_thickness = theDetector.constant<double>("pcb_thickness");
-    const double cu_thickness = theDetector.constant<double>("cu_thickness");    // Cooling material: Cu
-    const double fibre_thickness = theDetector.constant<double>("fibre_thickness");    // Mechanical structure: carbon fibre
+    const double sipm_z_endcap = theDetector.constant<double>("sipm_z_endcap");
+    const double pcb_thickness_endcap = theDetector.constant<double>("pcb_thickness_endcap");
+    const double cu_thickness_endcap = theDetector.constant<double>("cu_thickness_endcap");    // Cooling material: Cu
+    const double fibre_thickness_endcap = theDetector.constant<double>("fibre_thickness_endcap");    // Mechanical structure: carbon fibre
 
-    const double crystal_xy = cell_xy - 4 * boundary_safety - 2 * esr_thickness - fibre_thickness;
-    const double cell_z = crystal_z + 4 * boundary_safety + 2 * esr_thickness + fibre_thickness;
+    const double crystal_xy = cell_xy - 4 * boundary_safety_endcap - 2 * esr_thickness_endcap - fibre_thickness_endcap;
+    const double cell_z = crystal_z_endcap + 4 * boundary_safety_endcap + 2 * esr_thickness_endcap + fibre_thickness_endcap;
 
-    const double layer_thickness = cell_z + sipm_z + pcb_thickness + cu_thickness + 4 * boundary_safety;
+    const double layer_thickness = cell_z + sipm_z_endcap + pcb_thickness_endcap + cu_thickness_endcap + 4 * boundary_safety_endcap;
     const int Nlayers = (int) (block_z / layer_thickness);
 
     MYDEBUGVAL(layer_thickness)
@@ -129,7 +129,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     Volume motherVol = theDetector.pickMotherVolume(ECAL);
 
     // Create two tube-like envelopes to represent the end-cap volumes
-    Tube envelope_tube(0, r_out, 0.5 * block_z + boundary_safety);
+    Tube envelope_tube(0, r_out, 0.5 * block_z + boundary_safety_endcap);
     Box envelope_box(r_in, r_in, block_z);
     SubtractionSolid envelope_side(envelope_tube, envelope_box, Position(0, 0, 0));
     UnionSolid envelope(envelope_side, envelope_side, Position(0, 0, 2 * pos_z));
@@ -141,13 +141,13 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     DetElement blockdet(ECAL, "box", det_id);
 
     // Sector
-    Tube sector_tube(0, r_out, 0.5 * block_z + boundary_safety, 0, 0.5 * pi);
+    Tube sector_tube(0, r_out, 0.5 * block_z + boundary_safety_endcap, 0, 0.5 * pi);
     SubtractionSolid sector(sector_tube, envelope_box, Position(0, 0, 0));
     Volume sector_vol("sector_vol", sector, mat_air);
     sector_vol.setVisAttributes(theDetector, "GreenVis");
 
     // Main block
-    Box block(0.5 * block_xy_out, 0.5 * block_xy_out, 0.5 * block_z + boundary_safety);
+    Box block(0.5 * block_xy_out, 0.5 * block_xy_out, 0.5 * block_z + boundary_safety_endcap);
     Volume block_vol("block_vol", block, mat_air);
     block_vol.setVisAttributes(theDetector, "GreenVis");
 
@@ -156,7 +156,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     block_cf.setVisAttributes(theDetector, "GreenVis");
 
     // Rectangle block for filling the space
-    Box block_rect(0.5 * block_xy_out, 0.5 * block_rect_short_out, 0.5 * block_z + boundary_safety);
+    Box block_rect(0.5 * block_xy_out, 0.5 * block_rect_short_out, 0.5 * block_z + boundary_safety_endcap);
     Volume block_rect_vol("block_rect_vol", block_rect, mat_air);
     block_rect_vol.setVisAttributes(theDetector, "GreenVis");
 
@@ -166,7 +166,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
 
     // Square blocks for filling the space
     // Square 1
-    Box block_sq1(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * block_z + boundary_safety);
+    Box block_sq1(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * block_z + boundary_safety_endcap);
     Volume block_sq1_vol("block_sq1_vol", block_sq1, mat_air);
     block_sq1_vol.setVisAttributes(theDetector, "GreenVis");
 
@@ -175,7 +175,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     block_cf_sq1.setVisAttributes(theDetector, "GreenVis");
 
     // Square 2
-    Box block_sq2(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * block_z + boundary_safety);
+    Box block_sq2(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * block_z + boundary_safety_endcap);
     Volume block_sq2_vol("block_sq2_vol", block_sq2, mat_air);
     block_sq2_vol.setVisAttributes(theDetector, "GreenVis");
 
@@ -184,20 +184,20 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     block_cf_sq2.setVisAttributes(theDetector, "GreenVis");
 
     // Crystal, SiPM, ESR, and carbon fibre
-    Volume crystal("crystal", Box(0.5 * crystal_xy, 0.5 * crystal_xy, 0.5 * crystal_z), mat_sensitive);
+    Volume crystal("crystal", Box(0.5 * crystal_xy, 0.5 * crystal_xy, 0.5 * crystal_z_endcap), mat_sensitive);
     crystal.setVisAttributes(theDetector, "SeeThrough");
     crystal.setSensitiveDetector(sens);
 
-    Volume sipm("SiPM", Box(0.5 * sipm_x, 0.5 * sipm_y, 0.5 * sipm_z), mat_SiPM);
+    Volume sipm("SiPM", Box(0.5 * sipm_x, 0.5 * sipm_y, 0.5 * sipm_z_endcap), mat_SiPM);
     sipm.setVisAttributes(theDetector, "SeeThrough");
 
-    Box esr_out(0.5 * crystal_xy + esr_thickness + boundary_safety, 0.5 * crystal_xy + esr_thickness + boundary_safety, 0.5 * crystal_z + esr_thickness + boundary_safety);
-    Box esr_in(0.5 * crystal_xy + boundary_safety, 0.5 * crystal_xy + boundary_safety, 0.5 * crystal_z + boundary_safety);
+    Box esr_out(0.5 * crystal_xy + esr_thickness_endcap + boundary_safety_endcap, 0.5 * crystal_xy + esr_thickness_endcap + boundary_safety_endcap, 0.5 * crystal_z_endcap + esr_thickness_endcap + boundary_safety_endcap);
+    Box esr_in(0.5 * crystal_xy + boundary_safety_endcap, 0.5 * crystal_xy + boundary_safety_endcap, 0.5 * crystal_z_endcap + boundary_safety_endcap);
     Volume esr("esr", SubtractionSolid(esr_out, esr_in, Position(0, 0, 0)), mat_ESR);
     esr.setVisAttributes(theDetector, "SeeThrough");
 
     Box cf_out(0.5 * cell_xy, 0.5 * cell_xy, 0.5 * cell_z);
-    Box cf_in(0.5 * (cell_xy - fibre_thickness), 0.5 * (cell_xy - fibre_thickness), 0.5 * (cell_z - fibre_thickness));
+    Box cf_in(0.5 * (cell_xy - fibre_thickness_endcap), 0.5 * (cell_xy - fibre_thickness_endcap), 0.5 * (cell_z - fibre_thickness_endcap));
     Volume cf("cf", SubtractionSolid(cf_out, cf_in, Position(0, 0, 0)), mat_CF);
     cf.setVisAttributes(theDetector, "SeeThrough");
 
@@ -205,9 +205,9 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     const double crystal_pos_z = -0.5 * layer_thickness + 0.5 * cell_z;
     const double esr_pos_z = crystal_pos_z;
     const double cf_pos_z = esr_pos_z;
-    const double sipm_pos_z = cf_pos_z + 0.5 * cell_z + boundary_safety + 0.5 * sipm_z;
-    const double pcb_pos_z = sipm_pos_z + 0.5 * sipm_z + boundary_safety + 0.5 * pcb_thickness;
-    const double cu_pos_z = pcb_pos_z + 0.5 * (pcb_thickness + cu_thickness);
+    const double sipm_pos_z = cf_pos_z + 0.5 * cell_z + boundary_safety_endcap + 0.5 * sipm_z_endcap;
+    const double pcb_pos_z = sipm_pos_z + 0.5 * sipm_z_endcap + boundary_safety_endcap + 0.5 * pcb_thickness_endcap;
+    const double cu_pos_z = pcb_pos_z + 0.5 * (pcb_thickness_endcap + cu_thickness_endcap);
 
     // Loop for placing the units in a block
     // Normal block
@@ -218,10 +218,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename = "Slice_" + to_string(ilayer);
         DetElement sd(blockdet, slicename, det_id);
 
-        Volume slice_pcb("slice_pcb", Box(0.5 * block_xy_in, 0.5 * block_xy_in, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb("slice_pcb", Box(0.5 * block_xy_in, 0.5 * block_xy_in, 0.5 * pcb_thickness_endcap), mat_PCB);
         slice_pcb.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu("slice_cu", Box(0.5 * block_xy_in, 0.5 * block_xy_in, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu("slice_cu", Box(0.5 * block_xy_in, 0.5 * block_xy_in, 0.5 * cu_thickness_endcap), mat_Cu);
         slice_cu.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit = slice.placeVolume(slice_pcb, Position(0, 0, pcb_pos_z));
@@ -260,7 +260,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 unit.setPlacement(crystal_unit);
             }
 
-        PlacedVolume plv = block_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety));
+        PlacedVolume plv = block_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety_endcap));
         plv.addPhysVolID("layer", ilayer);
         sd.setPlacement(plv);
     }
@@ -273,10 +273,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename = "Rect_Slice_" + to_string(ilayer);
         DetElement sd(blockdet, slicename, det_id);
 
-        Volume slice_pcb("slice_pcb", Box(0.5 * block_xy_in, 0.5 * block_rect_short_in, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb("slice_pcb", Box(0.5 * block_xy_in, 0.5 * block_rect_short_in, 0.5 * pcb_thickness_endcap), mat_PCB);
         slice_pcb.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu("slice_cu", Box(0.5 * block_xy_in, 0.5 * block_rect_short_in, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu("slice_cu", Box(0.5 * block_xy_in, 0.5 * block_rect_short_in, 0.5 * cu_thickness_endcap), mat_Cu);
         slice_cu.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit = slice.placeVolume(slice_pcb, Position(0, 0, pcb_pos_z));
@@ -315,7 +315,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 unit.setPlacement(crystal_unit);
             }
 
-        PlacedVolume plv = block_rect_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety));
+        PlacedVolume plv = block_rect_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety_endcap));
         plv.addPhysVolID("layer", ilayer);
         sd.setPlacement(plv);
     }
@@ -328,10 +328,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename = "Sq1_Slice_" + to_string(ilayer);
         DetElement sd(blockdet, slicename, det_id);
 
-        Volume slice_pcb("slice_pcb", Box(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb("slice_pcb", Box(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * pcb_thickness_endcap), mat_PCB);
         slice_pcb.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu("slice_cu", Box(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu("slice_cu", Box(0.5 * block_sq1_width, 0.5 * block_sq1_width, 0.5 * cu_thickness_endcap), mat_Cu);
         slice_cu.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit = slice.placeVolume(slice_pcb, Position(0, 0, pcb_pos_z));
@@ -370,7 +370,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 unit.setPlacement(crystal_unit);
             }
 
-        PlacedVolume plv = block_sq1_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety));
+        PlacedVolume plv = block_sq1_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety_endcap));
         plv.addPhysVolID("layer", ilayer);
         sd.setPlacement(plv);
     }
@@ -383,10 +383,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename = "Sq2_Slice_" + to_string(ilayer);
         DetElement sd(blockdet, slicename, det_id);
 
-        Volume slice_pcb("slice_pcb", Box(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb("slice_pcb", Box(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * pcb_thickness_endcap), mat_PCB);
         slice_pcb.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu("slice_cu", Box(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu("slice_cu", Box(0.5 * block_sq2_width, 0.5 * block_sq2_width, 0.5 * cu_thickness_endcap), mat_Cu);
         slice_cu.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit = slice.placeVolume(slice_pcb, Position(0, 0, pcb_pos_z));
@@ -425,7 +425,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
                 unit.setPlacement(crystal_unit);
             }
 
-        PlacedVolume plv = block_sq2_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety));
+        PlacedVolume plv = block_sq2_vol.placeVolume(slice, Position(0, 0, (ilayer - 0.5) * layer_thickness - 0.5 * block_z + boundary_safety_endcap));
         plv.addPhysVolID("layer", ilayer);
         sd.setPlacement(plv);
     }
diff --git a/Detector/DetCRD/src/Calorimeter/CRDEcal_Short_v02.cpp b/Detector/DetCRD/src/Calorimeter/CRDEcal_Short_v02.cpp
index dd3ac9a57d5a9ea3d2c73c9914f6310084594f7f..0027b8d7d0f346f3966864f5bff32564d24689b3 100644
--- a/Detector/DetCRD/src/Calorimeter/CRDEcal_Short_v02.cpp
+++ b/Detector/DetCRD/src/Calorimeter/CRDEcal_Short_v02.cpp
@@ -68,7 +68,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     MYDEBUGVAL(detid)
 
     // To prevent overlapping
-    const double boundary_safety = theDetector.constant<double>("boundary_safety");
+    const double boundary_safety_barrel = theDetector.constant<double>("boundary_safety_barrel");
 
     // Global geometry
     const double r_in = theDetector.constant<double>("ecalbarrel_inner_radius");
@@ -83,26 +83,26 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     // Unit size
     const double crystal_r = theDetector.constant<double>("crystal_r");
     const double crystal_phi = theDetector.constant<double>("crystal_phi");
-    const double crystal_z = theDetector.constant<double>("crystal_z");
+    const double crystal_z_barrel = theDetector.constant<double>("crystal_z_barrel");
     const double block_z = Z0 / Nblock_z;    // Length of a block in z direction
 
     MYDEBUGVAL(block_z)
 
-    const double esr_thickness = theDetector.constant<double>("esr_thickness");    // Wrapper
+    const double esr_thickness_barrel = theDetector.constant<double>("esr_thickness_barrel");    // Wrapper
     const double sipm_r = theDetector.constant<double>("sipm_r");
     const double sipm_phi = theDetector.constant<double>("sipm_phi");
-    const double sipm_z = theDetector.constant<double>("sipm_z");
-    const double pcb_thickness = theDetector.constant<double>("pcb_thickness");
-    const double cu_thickness = theDetector.constant<double>("cu_thickness");    // Cooling material: Cu
-    const double fibre_thickness = theDetector.constant<double>("fibre_thickness");    // Mechanical structure: carbon fibre
+    const double sipm_z_barrel = theDetector.constant<double>("sipm_z_barrel");
+    const double pcb_thickness_barrel = theDetector.constant<double>("pcb_thickness_barrel");
+    const double cu_thickness_barrel = theDetector.constant<double>("cu_thickness_barrel");    // Cooling material: Cu
+    const double fibre_thickness_barrel = theDetector.constant<double>("fibre_thickness_barrel");    // Mechanical structure: carbon fibre
     const double collection_width = theDetector.constant<double>("collection_width");
     const double collection_thickness = theDetector.constant<double>("collection_thickness");
 
-    const double cell_r = crystal_r + 4 * boundary_safety + 2 * esr_thickness + fibre_thickness;
-    const double cell_phi = crystal_phi + 4 * boundary_safety + 2 * esr_thickness + fibre_thickness;
-    const double cell_z = crystal_z + 4 * boundary_safety + 2 * esr_thickness + fibre_thickness;
+    const double cell_r = crystal_r + 4 * boundary_safety_barrel + 2 * esr_thickness_barrel + fibre_thickness_barrel;
+    const double cell_phi = crystal_phi + 4 * boundary_safety_barrel + 2 * esr_thickness_barrel + fibre_thickness_barrel;
+    const double cell_z = crystal_z_barrel + 4 * boundary_safety_barrel + 2 * esr_thickness_barrel + fibre_thickness_barrel;
 
-    const double layer_thickness = cell_r + sipm_r + pcb_thickness + cu_thickness + 4 * boundary_safety;
+    const double layer_thickness = cell_r + sipm_r + pcb_thickness_barrel + cu_thickness_barrel + 4 * boundary_safety_barrel;
     MYDEBUGVAL(layer_thickness)
 
     // Adjustments for the positive trapezia
@@ -184,20 +184,20 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     block_neg_vol.setVisAttributes(theDetector, "CyanVis");
 
     // Crystal, ESR, SiPM, carbon fibre and collection board
-    Volume crystal("crystal", Box(0.5 * crystal_phi, 0.5 * crystal_z, 0.5 * crystal_r), mat_sensitive);    // Order: phi → z → R.
+    Volume crystal("crystal", Box(0.5 * crystal_phi, 0.5 * crystal_z_barrel, 0.5 * crystal_r), mat_sensitive);    // Order: phi → z → R.
     crystal.setVisAttributes(theDetector, "SeeThrough");
     crystal.setSensitiveDetector(sens);
 
-    Box esr_out(0.5 * crystal_phi + esr_thickness + boundary_safety, 0.5 * crystal_z + esr_thickness + boundary_safety, 0.5 * crystal_r + esr_thickness + boundary_safety);
-    Box esr_in(0.5 * crystal_phi + boundary_safety, 0.5 * crystal_z + boundary_safety, 0.5 * crystal_r + boundary_safety);
+    Box esr_out(0.5 * crystal_phi + esr_thickness_barrel + boundary_safety_barrel, 0.5 * crystal_z_barrel + esr_thickness_barrel + boundary_safety_barrel, 0.5 * crystal_r + esr_thickness_barrel + boundary_safety_barrel);
+    Box esr_in(0.5 * crystal_phi + boundary_safety_barrel, 0.5 * crystal_z_barrel + boundary_safety_barrel, 0.5 * crystal_r + boundary_safety_barrel);
     Volume esr("esr", SubtractionSolid(esr_out, esr_in, Position(0, 0, 0)), mat_ESR);
     esr.setVisAttributes(theDetector, "SeeThrough");
 
-    Volume SiPM("SiPM", Box(0.5 * sipm_phi, 0.5 * sipm_z, 0.5 * sipm_r), mat_SiPM);
+    Volume SiPM("SiPM", Box(0.5 * sipm_phi, 0.5 * sipm_z_barrel, 0.5 * sipm_r), mat_SiPM);
     SiPM.setVisAttributes(theDetector, "SeeThrough");
 
     Box cf_out(0.5 * cell_phi, 0.5 * cell_z, 0.5 * cell_r);
-    Box cf_in(0.5 * (cell_phi - fibre_thickness), 0.5 * (cell_z - fibre_thickness), 0.5 * (cell_r - fibre_thickness));
+    Box cf_in(0.5 * (cell_phi - fibre_thickness_barrel), 0.5 * (cell_z - fibre_thickness_barrel), 0.5 * (cell_r - fibre_thickness_barrel));
     Volume cf("cf", SubtractionSolid(cf_out, cf_in, Position(0, 0, 0)), mat_CF);
     cf.setVisAttributes(theDetector, "SeeThrough");
 
@@ -208,9 +208,9 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
     const double crystal_pos_r = -0.5 * layer_thickness + 0.5 * cell_r;
     const double esr_pos_r = crystal_pos_r;
     const double cf_pos_r = esr_pos_r;
-    const double sipm_pos_r = cf_pos_r + 0.5 * cell_r + boundary_safety + 0.5 * sipm_r;
-    const double pcb_pos_r = sipm_pos_r + 0.5 * sipm_r + boundary_safety + 0.5 * pcb_thickness;
-    const double cu_pos_r = pcb_pos_r + 0.5 * (pcb_thickness + cu_thickness);
+    const double sipm_pos_r = cf_pos_r + 0.5 * cell_r + boundary_safety_barrel + 0.5 * sipm_r;
+    const double pcb_pos_r = sipm_pos_r + 0.5 * sipm_r + boundary_safety_barrel + 0.5 * pcb_thickness_barrel;
+    const double cu_pos_r = pcb_pos_r + 0.5 * (pcb_thickness_barrel + cu_thickness_barrel);
 
     // Loop for placing the crystals in one positive trapezium block
     for (int ilayer = 1; ilayer <= Nlayers; ++ilayer)
@@ -224,10 +224,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename_pos = "Slice_pos_" + to_string(ilayer);
         DetElement sd_pos(blockdet, slicename_pos, detid);
 
-        Volume slice_pcb_pos("slice_pcb_pos", Box(0.5 * layer_phi_pos, 0.5 * block_z, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb_pos("slice_pcb_pos", Box(0.5 * layer_phi_pos, 0.5 * block_z, 0.5 * pcb_thickness_barrel), mat_PCB);
         slice_pcb_pos.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu_pos("slice_cu_pos", Box(0.5 * layer_phi_pos, 0.5 * block_z, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu_pos("slice_cu_pos", Box(0.5 * layer_phi_pos, 0.5 * block_z, 0.5 * cu_thickness_barrel), mat_Cu);
         slice_cu_pos.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit_pos = slice_pos.placeVolume(slice_pcb_pos, Position(0, 0, pcb_pos_r));
@@ -283,10 +283,10 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
         string slicename_neg = "Slice_neg_" + to_string(ilayer);
         DetElement sd_neg(blockdet, slicename_neg, detid);
 
-        Volume slice_pcb_neg("slice_pcb_neg", Box(0.5 * layer_phi_neg, 0.5 * block_z, 0.5 * pcb_thickness), mat_PCB);
+        Volume slice_pcb_neg("slice_pcb_neg", Box(0.5 * layer_phi_neg, 0.5 * block_z, 0.5 * pcb_thickness_barrel), mat_PCB);
         slice_pcb_neg.setVisAttributes(theDetector, "SeeThrough");
 
-        Volume slice_cu_neg("slice_cu_neg", Box(0.5 * layer_phi_neg, 0.5 * block_z, 0.5 * cu_thickness), mat_Cu);
+        Volume slice_cu_neg("slice_cu_neg", Box(0.5 * layer_phi_neg, 0.5 * block_z, 0.5 * cu_thickness_barrel), mat_Cu);
         slice_cu_neg.setVisAttributes(theDetector, "SeeThrough");
 
         PlacedVolume pcb_unit_neg = slice_neg.placeVolume(slice_pcb_neg, Position(0, 0, pcb_pos_r));