From d1b46e018a9d6cf12057e8f571e4c059f63d3653 Mon Sep 17 00:00:00 2001
From: "songwz@ihep.ac.cn" <songwz@ihep.ac.cn>
Date: Thu, 19 Sep 2024 13:16:54 +0000
Subject: [PATCH] "LongCrystalBarEndcapCalorimeter overlap fix

---
 .../src/Calorimeter/LongCrystalBarEndcapCalorimeter_v01.cpp   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v01.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v01.cpp
index 5fba0ab7..26bd4347 100755
--- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v01.cpp
+++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v01.cpp
@@ -231,11 +231,11 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
 
     double last_bar = length_crystal - (Nbar-1)*width_crystal;
 
-    dd4hep::Volume bar_s0("bar_s0", dd4hep::Box(length_crystal/2, width_crystal/2-crystal_wrapping, width_crystal/2-crystal_wrapping), mat_BGO); 
+    dd4hep::Volume bar_s0("bar_s0", dd4hep::Box(length_crystal/2-photoelectronic-crystal_wrapping, width_crystal/2-crystal_wrapping, width_crystal/2-crystal_wrapping), mat_BGO); 
     bar_s0.setVisAttributes(theDetector, "EcalBarrelVis");
     bar_s0.setSensitiveDetector(sens);
 
-    dd4hep::Volume bar_s1("bar_s1", dd4hep::Box(length_crystal/2, last_bar/2-crystal_wrapping, width_crystal/2-crystal_wrapping), mat_BGO); 
+    dd4hep::Volume bar_s1("bar_s1", dd4hep::Box(length_crystal/2-photoelectronic-crystal_wrapping, last_bar/2-crystal_wrapping, width_crystal/2-crystal_wrapping), mat_BGO); 
     bar_s1.setVisAttributes(theDetector, "EcalBarrelVis");
     bar_s1.setSensitiveDetector(sens);
 
-- 
GitLab