diff --git a/.github/workflows/downstream-build.yaml b/.github/workflows/downstream-build.yaml
index e763bb47a..df5bac57d 100644
--- a/.github/workflows/downstream-build.yaml
+++ b/.github/workflows/downstream-build.yaml
@@ -5,11 +5,10 @@ on:
workflow_dispatch:
jobs:
- test:
+ downstream-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- - uses: actions/checkout@v3
- - uses: cvmfs-contrib/github-action-cvmfs@v3
+ - uses: actions/checkout@v4
- uses: key4hep/key4hep-actions/downstream-build@main
diff --git a/.github/workflows/key4hep-build.yaml b/.github/workflows/key4hep-build.yaml
new file mode 100644
index 000000000..5ba768a48
--- /dev/null
+++ b/.github/workflows/key4hep-build.yaml
@@ -0,0 +1,26 @@
+name: Key4hep build
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ workflow_dispatch:
+ schedule:
+ - cron: '17 5 * * *'
+
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ build_type: ["release", "nightly"]
+ image: ["alma9", "ubuntu22", "centos7"]
+ fail-fast: false
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: key4hep/key4hep-actions/key4hep-build@main
+ with:
+ build_type: ${{ matrix.build_type }}
+ image: ${{ matrix.image }}
diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml
deleted file mode 100644
index e41729bd8..000000000
--- a/.github/workflows/key4hep.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: key4hep-stack
-
-on: [push, pull_request]
-
-jobs:
- test:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
- steps:
- - uses: actions/checkout@v3
- - uses: cvmfs-contrib/github-action-cvmfs@v3
- - name: Start container
- run: |
- docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
- - name: CMake Configure
- run: |
- docker exec CI_container /bin/bash -c 'cd Package;\
- mkdir -p build install;\
- source ${{ matrix.SETUP }};\
- cd build;\
- cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -G Ninja ..;'
- - name: Compile
- run: |
- docker exec CI_container /bin/bash -c 'cd ./Package;\
- source ${{ matrix.SETUP }};\
- cd build;\
- ninja -k0;'
- - name: Install
- run: |
- docker exec CI_container /bin/bash -c 'cd ./Package;\
- source ${{ matrix.SETUP }};\
- cd build;\
- ninja -k0 install;'
- - name: Test
- run: |
- docker exec CI_container /bin/bash -c 'cd ./Package;\
- source ${{ matrix.SETUP }};\
- cd build;\
- ninja -k0 && ctest --output-on-failure;'
-
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4ea58880..055f89736 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ project(${PackageName})
# project version
SET( ${PackageName}_VERSION_MAJOR 0 )
-SET( ${PackageName}_VERSION_MINOR 19 )
+SET( ${PackageName}_VERSION_MINOR 20 )
SET( ${PackageName}_VERSION_PATCH 0 )
SET( ${PackageName}_VERSION "${${PackageName}_VERSION_MAJOR}.${${PackageName}_VERSION_MINOR}" )
@@ -51,10 +51,19 @@ find_package ( ROOT REQUIRED COMPONENTS Geom GenVector)
message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" )
find_package( Geant4 REQUIRED )
-find_package( LCIO REQUIRED)
-
-add_subdirectory(detectorSegmentations)
-add_subdirectory(detectorCommon)
+OPTION(K4GEO_USE_LCIO "Enable or disable the use of LCIO, which is needed for some detector constructors and plugins" ON)
+if(K4GEO_USE_LCIO)
+ find_package(LCIO REQUIRED)
+ # Shim for older LCIO versions
+ if(NOT TARGET LCIO::lcio)
+ add_library(LCIO::lcio INTERFACE IMPORTED GLOBAL)
+ set_target_properties(LCIO::lcio
+ PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${LCIO_INCLUDE_DIRS}"
+ INTERFACE_LINK_LIBRARIES "${LCIO_LIBRARIES}"
+ )
+ endif()
+endif()
file(GLOB sources
./detector/tracker/*.cpp
@@ -68,9 +77,29 @@ file(GLOB sources
./detector/PID/ARC_geo_o1_v01.cpp
)
+if(NOT K4GEO_USE_LCIO)
+ set(lcio_sources # in ./detector/tracker
+ TrackerEndcap_o2_v05_geo.cpp
+ SiTrackerEndcap_o2_v02ext_geo.cpp
+ TrackerBarrel_o1_v03_geo.cpp
+ TrackerBarrel_o1_v04_geo.cpp
+ TrackerBarrel_o1_v05_geo.cpp
+ TrackerEndcap_o1_v05_geo.cpp
+ TrackerEndcap_o2_v06_geo.cpp
+ VertexBarrel_detailed_o1_v01_geo.cpp
+ VertexEndcap_o1_v05_geo.cpp
+ ZPlanarTracker_geo.cpp
+ )
+ foreach(lcio_source ${lcio_sources})
+ list(FILTER sources EXCLUDE REGEX "${lcio_source}")
+ endforeach()
+ message(STATUS "Use of LCIO is DISABLED, some detectors that depend on LCIO will not be built: ${lcio_sources}")
+endif()
+
file(GLOB G4sources
./plugins/TPCSDAction.cpp
./plugins/CaloPreShowerSDAction.cpp
+ ./plugins/FiberDRcaloSDAction.cpp
)
if(DD4HEP_USE_PYROOT)
@@ -89,12 +118,21 @@ target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detect
target_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout/include )
target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout/include )
-target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ROOT::Core LCIO::LCIO detectorSegmentations)
-target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core ${Geant4_LIBRARIES} LCIO::LCIO)
+target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ROOT::Core detectorSegmentations)
+target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core ${Geant4_LIBRARIES})
+
+if(K4GEO_USE_LCIO)
+ target_link_libraries(${PackageName} LCIO::lcio)
+ target_link_libraries(${PackageName}G4 LCIO::lcio)
+endif()
+
#Create this_package.sh file, and install
dd4hep_instantiate_package(${PackageName})
+add_subdirectory(detectorSegmentations)
+add_subdirectory(detectorCommon)
+
# Destination directories are hardcoded because GNUdirectories are not included
install(TARGETS ${PackageName} ${PackageName}G4
EXPORT ${PROJECT_NAME}Targets
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ALLEGRO_o1_v02.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ALLEGRO_o1_v02.xml
index ff4266dd9..bf4b652fe 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ALLEGRO_o1_v02.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ALLEGRO_o1_v02.xml
@@ -28,7 +28,7 @@
-
+
@@ -36,11 +36,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectDimensions.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectDimensions.xml
similarity index 96%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectDimensions.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectDimensions.xml
index 439e20cdd..237223204 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectDimensions.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectDimensions.xml
@@ -84,9 +84,9 @@
-
-
-
+
+
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectEmptyMaster.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectEmptyMaster.xml
similarity index 83%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectEmptyMaster.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectEmptyMaster.xml
index a5ad3e23b..263dcce4d 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_DectEmptyMaster.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DectEmptyMaster.xml
@@ -6,8 +6,8 @@
-
-
+
+
-
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DriftChamber.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DriftChamber.xml
new file mode 100644
index 000000000..b24fa784f
--- /dev/null
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/DriftChamber.xml
@@ -0,0 +1,110 @@
+
+
+
+ Detector description for the IDEA Drift Chamber. To understand the free parameters below, look e.g. at https://indico.cern.ch/event/932973/contributions/4041314/attachments/2139657/3664808/primavera_FCCworkshop_2020.pdf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ system:4,superLayer:5,layer:5,phi:11,hitorigin:3,stereo:1,layerInCell:2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged.xml
similarity index 93%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged.xml
index 2a0beb3e8..9cf284bf0 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged.xml
@@ -23,8 +23,8 @@
-
-
+
+
@@ -42,24 +42,22 @@
-
-
+
+
-
-
+
+
-
-
@@ -119,7 +117,7 @@
-
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_calibration.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_calibration.xml
similarity index 90%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_calibration.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_calibration.xml
index be8770709..027f20800 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_calibration.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_calibration.xml
@@ -15,11 +15,11 @@
-
-
+
+
-
+
@@ -34,19 +34,22 @@
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
@@ -99,10 +102,14 @@
+
+
+
+
-
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_upstream.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_upstream.xml
similarity index 90%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_upstream.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_upstream.xml
index 8c96a5939..962746659 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_ECalBarrel_thetamodulemerged_upstream.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalBarrel_thetamodulemerged_upstream.xml
@@ -15,17 +15,17 @@
-
-
+
+
-
+
-
+
@@ -34,19 +34,22 @@
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
@@ -99,10 +102,14 @@
+
+
+
+
-
+
@@ -133,4 +140,4 @@
-
\ No newline at end of file
+
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_EcalEndcaps_coneCryo.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalEndcaps_coneCryo.xml
similarity index 100%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_EcalEndcaps_coneCryo.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ECalEndcaps_coneCryo.xml
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_HCalBarrel_TileCal.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/HCalBarrel_TileCal.xml
similarity index 100%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_HCalBarrel_TileCal.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/HCalBarrel_TileCal.xml
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_HCalEndcaps_ThreeParts_TileCal.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/HCalEndcaps_ThreeParts_TileCal.xml
similarity index 100%
rename from FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/FCCee_HCalEndcaps_ThreeParts_TileCal.xml
rename to FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/HCalEndcaps_ThreeParts_TileCal.xml
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/SimplifiedDriftChamber.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/SimplifiedDriftChamber.xml
deleted file mode 100644
index 9d13d0176..000000000
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/SimplifiedDriftChamber.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- A simplified implementation of the drift chamber for the FCCee-IDEA concept
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${GlobalTrackerReadoutID_DCH}
-
-
-
-
-
-
-
- Dimensions for the drift chamber
-
-
-
-
-
-
-
diff --git a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/materials.xml b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/materials.xml
index a899266c3..7fe008147 100644
--- a/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/materials.xml
+++ b/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/materials.xml
@@ -225,14 +225,118 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FCCee/ALLEGRO/compact/README.md b/FCCee/ALLEGRO/compact/README.md
index 9a6ded62d..aecc08265 100644
--- a/FCCee/ALLEGRO/compact/README.md
+++ b/FCCee/ALLEGRO/compact/README.md
@@ -2,4 +2,6 @@ ALLEGRO
========================
ALLEGRO_o1_v01: it is a liquid Noble gas based detector. This version picked from the latest version in FCCDetectors repo.
-ALLEGRO_o1_v02: evolves from o1_v01, replacing the barrel ECAL. This version has a constant cell size in theta for the ECAL barrel (instead of eta as in o1_v01) and now it is possible to have a different number of cells merged for each longitudinal layer.
+ALLEGRO_o1_v02: evolves from o1_v01, replacing the barrel ECAL and adding a detailed version drift chamber.
+This version has a constant cell size in theta for the ECAL barrel (instead of eta as in o1_v01) and now it is possible to have a different number of cells merged for each longitudinal layer.
+Known caveat: the drift chamber has a larger z extent than in the IDEA detector but the wire spacing was not re-optimized. It is ok software-wise but the currently implemented design is not fully compliant with R&D considerations, will need a new drift chamber layout from the detector concept team.
diff --git a/FCCee/IDEA/compact/IDEA_o1_v02/DectDimensions_IDEA_o1_v01.xml b/FCCee/IDEA/compact/IDEA_o1_v02/DectDimensions_IDEA_o1_v01.xml
index 27a5bb4fc..225b3a740 100644
--- a/FCCee/IDEA/compact/IDEA_o1_v02/DectDimensions_IDEA_o1_v01.xml
+++ b/FCCee/IDEA/compact/IDEA_o1_v02/DectDimensions_IDEA_o1_v01.xml
@@ -53,6 +53,9 @@
+
+
+
@@ -92,45 +95,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -206,6 +170,15 @@
+
+
+
+
+
+
+
+
+
@@ -222,6 +195,8 @@
+
+
@@ -254,6 +229,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/FCCee/IDEA/compact/IDEA_o1_v02/FiberDualReadoutCalo_o1_v01.xml b/FCCee/IDEA/compact/IDEA_o1_v02/FiberDualReadoutCalo_o1_v01.xml
new file mode 100644
index 000000000..c1bb2c80e
--- /dev/null
+++ b/FCCee/IDEA/compact/IDEA_o1_v02/FiberDualReadoutCalo_o1_v01.xml
@@ -0,0 +1,653 @@
+
+
+
+
+
+
+
+
+ The compact format for the dual-readout calorimeter (for FCCee IDEA)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ system:5,eta:-8,phi:9,x:32:-11,y:-9,c:1,module:2
+
+
+
+
diff --git a/FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml b/FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml
index 5ea3592ad..569610739 100644
--- a/FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml
+++ b/FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml
@@ -47,6 +47,9 @@
+
+
+
diff --git a/FCCee/IDEA/compact/IDEA_o1_v02/materials_o1_v01.xml b/FCCee/IDEA/compact/IDEA_o1_v02/materials_o1_v01.xml
index f68afa8b4..22a1a3f98 100644
--- a/FCCee/IDEA/compact/IDEA_o1_v02/materials_o1_v01.xml
+++ b/FCCee/IDEA/compact/IDEA_o1_v02/materials_o1_v01.xml
@@ -459,4 +459,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmake/k4geoConfig.cmake.in b/cmake/k4geoConfig.cmake.in
index eb98cb140..6b2985f6d 100644
--- a/cmake/k4geoConfig.cmake.in
+++ b/cmake/k4geoConfig.cmake.in
@@ -12,3 +12,6 @@ find_dependency(ROOT REQUIRED COMPONENTS Geom GenVector)
find_dependency(LCIO REQUIRED)
include(${k4geo_CMAKE_DIR}/k4geoConfig-targets.cmake)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(k4geo DEFAULT_MSG CMAKE_CURRENT_LIST_FILE)
diff --git a/detector/calorimeter/ECalBarrel_NobleLiquid_InclinedTrapezoids_o1_v01_geo.cpp b/detector/calorimeter/ECalBarrel_NobleLiquid_InclinedTrapezoids_o1_v01_geo.cpp
index dece89dde..2f3777384 100644
--- a/detector/calorimeter/ECalBarrel_NobleLiquid_InclinedTrapezoids_o1_v01_geo.cpp
+++ b/detector/calorimeter/ECalBarrel_NobleLiquid_InclinedTrapezoids_o1_v01_geo.cpp
@@ -568,21 +568,19 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd,
caloData->extent[0] = Rmin;
caloData->extent[1] = Rmax; // or r_max ?
caloData->extent[2] = 0.; // NN: for barrel detectors this is 0
- caloData->extent[3] = caloDim.dz()/2;
+ caloData->extent[3] = caloDim.dz();
// Set type flags
dd4hep::xml::setDetectorTypeFlag(xmlDetElem, caloDetElem);
dd4hep::rec::MaterialManager matMgr(envelopeVol);
dd4hep::rec::LayeredCalorimeterData::Layer caloLayer;
- double nRadiationLengths = 0.;
- double nInteractionLengths = 0.;
double rad_first = Rmin;
double rad_last = 0;
double scale_fact = dR / (-Rmin * cos(angle) + sqrt(pow(Rmax, 2) - pow(Rmin * sin(angle), 2)));
// since the layer height is given along the electrode and not along the radius it needs to be scaled to get the values of layer height radially
std::cout << "Scaling factor " << scale_fact << std::endl;
- for (auto il = 0; il < layerHeight.size(); il++) {
+ for (size_t il = 0; il < layerHeight.size(); il++) {
double thickness_sen = 0.;
double absorberThickness = 0.;
@@ -600,7 +598,7 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd,
const double value_of_lambda = layerHeight[il] / nInteractionLengths;
std::string str1("LAr");
- for (auto imat = 0; imat < materials.size(); imat++) {
+ for (size_t imat = 0; imat < materials.size(); imat++) {
std::string str2(materials.at(imat).first.name());
if (str1.compare(str2) == 0){
diff --git a/detector/calorimeter/ECalBarrel_o2_v01_geo.cpp b/detector/calorimeter/ECalBarrel_o2_v01_geo.cpp
index 2cce0befa..c05626be8 100644
--- a/detector/calorimeter/ECalBarrel_o2_v01_geo.cpp
+++ b/detector/calorimeter/ECalBarrel_o2_v01_geo.cpp
@@ -71,8 +71,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
- int totalRepeat = 0;
- int totalSlices = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
@@ -107,14 +105,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
caloData->gap1 = 0.; //FIXME
caloData->gap2 = 0.; //FIXME
-
- for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
- xml_comp_t x_layer = c;
- int repeat = x_layer.repeat();
- totalRepeat += repeat;
- totalSlices += x_layer.numChildren(_U(slice));
- }
-
// --- create an envelope volume and position it into the world ---------------------
Volume envelopeVol = dd4hep::xml::createPlacedEnvelope(theDetector, e , sdet) ;
diff --git a/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp b/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp
index d78650fd6..f27941378 100644
--- a/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp
+++ b/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp
@@ -184,7 +184,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
// Loop over the sets of layer elements in the detector
double check_thick = 0.0;
int l_num = 1;
- int l_set = 0;
for(xml_coll_t li(x_det,_U(layer)); li; ++li) {
xml_comp_t x_layer = li;
@@ -281,7 +280,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
// Increment layer number
++l_num;
}
- l_set++;
}
std::cout << "Total slice thickness check " << check_thick << " cm" << std::endl;
diff --git a/detector/calorimeter/GenericCalBarrel_o1_v01_geo.cpp b/detector/calorimeter/GenericCalBarrel_o1_v01_geo.cpp
index 3b199f76c..77a718c61 100644
--- a/detector/calorimeter/GenericCalBarrel_o1_v01_geo.cpp
+++ b/detector/calorimeter/GenericCalBarrel_o1_v01_geo.cpp
@@ -74,8 +74,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
- int totalRepeat = 0;
- int totalSlices = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
@@ -110,14 +108,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
caloData->gap1 = 0.; //FIXME
caloData->gap2 = 0.; //FIXME
-
- for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
- xml_comp_t x_layer = c;
- int repeat = x_layer.repeat();
- totalRepeat += repeat;
- totalSlices += x_layer.numChildren(_U(slice));
- }
-
// --- create an envelope volume and position it into the world ---------------------
Volume envelopeVol = dd4hep::xml::createPlacedEnvelope( theDetector, e , sdet ) ;
diff --git a/detector/calorimeter/HCalBarrel_o1_v01_geo.cpp b/detector/calorimeter/HCalBarrel_o1_v01_geo.cpp
index dbee8243b..060606e5b 100644
--- a/detector/calorimeter/HCalBarrel_o1_v01_geo.cpp
+++ b/detector/calorimeter/HCalBarrel_o1_v01_geo.cpp
@@ -22,7 +22,7 @@ using dd4hep::Layer;
using dd4hep::Layering;
using dd4hep::Material;
using dd4hep::PlacedVolume;
-using dd4hep::PolyhedraRegular;
+// using dd4hep::PolyhedraRegular;
using dd4hep::Position;
using dd4hep::Readout;
using dd4hep::Ref_t;
@@ -70,8 +70,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
- int totalRepeat = 0;
- int totalSlices = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
@@ -106,14 +104,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
caloData->gap1 = 0.; //FIXME
caloData->gap2 = 0.; //FIXME
-
- for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
- xml_comp_t x_layer = c;
- int repeat = x_layer.repeat();
- totalRepeat += repeat;
- totalSlices += x_layer.numChildren(_U(slice));
- }
-
// --- create an envelope volume and position it into the world ---------------------
Volume envelopeVol = dd4hep::xml::createPlacedEnvelope( theDetector, e , sdet ) ;
diff --git a/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp b/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp
index e02d4bfea..34544c2e2 100644
--- a/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp
+++ b/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp
@@ -5,7 +5,6 @@
#define endmsg std::endl
#define lLog std::cout
namespace MSG {
-const std::string ERROR = " Error: ";
const std::string DEBUG = " Debug: ";
const std::string INFO = " Info: ";
}
@@ -216,7 +215,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
layerVolume.setVisAttributes(aLcdd.invisible());
unsigned int idxSubMod = 0;
- unsigned int idxActMod = 0;
dd4hep::Position moduleOffset1 (0,0,sign * extBarrelOffset1);
@@ -248,7 +246,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
if (xComp.isSensitive()) {
tileVol.setSensitiveDetector(sensDet);
tilesPerLayer.push_back(placedTileVol);
- idxActMod++;
}
tileZOffset += xComp.thickness();
}
@@ -290,7 +287,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
layerVolume.setVisAttributes(aLcdd.invisible());
unsigned int idxSubMod = 0;
- unsigned int idxActMod = 0;
double tileZOffset = - 0.5* dzSequence;
@@ -311,7 +307,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
if (xComp.isSensitive()) {
tileVol.setSensitiveDetector(sensDet);
tilesPerLayer.push_back(placedTileVol);
- idxActMod++;
}
tileZOffset += xComp.thickness();
}
@@ -361,7 +356,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
layerVolume.setVisAttributes(aLcdd.invisible());
unsigned int idxSubMod = 0;
- unsigned int idxActMod = 0;
double tileZOffset = - 0.5* dzSequence;
@@ -382,7 +376,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he
if (xComp.isSensitive()) {
tileVol.setSensitiveDetector(sensDet);
tilesPerLayer.push_back(placedTileVol);
- idxActMod++;
}
tileZOffset += xComp.thickness();
}
diff --git a/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp b/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp
index e6d67caa8..89be7154d 100644
--- a/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp
+++ b/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp
@@ -12,7 +12,6 @@ using dd4hep::PlacedVolume;
#define endmsg std::endl
#define lLog std::cout
namespace MSG {
-const std::string ERROR = " Error: ";
const std::string DEBUG = " Debug: ";
const std::string INFO = " Info: ";
}
@@ -168,7 +167,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_det_t xmlDet, dd4hep
layerVolume.setVisAttributes(lcdd.invisible());
unsigned int idxSubMod = 0;
- unsigned int idxActMod = 0;
dd4hep::PlacedVolume placedLayerVolume = envelopeVolume.placeVolume(layerVolume);
@@ -192,7 +190,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_det_t xmlDet, dd4hep
if (xComp.isSensitive()) {
tileVol.setSensitiveDetector(sensDet);
tilesPerLayer.push_back(placedTileVol);
- idxActMod++;
}
tileZOffset += xComp.thickness();
}
diff --git a/detector/calorimeter/SECalEndcap_o1_v01_geo.cpp b/detector/calorimeter/SECalEndcap_o1_v01_geo.cpp
index 338282826..bf16d0348 100644
--- a/detector/calorimeter/SECalEndcap_o1_v01_geo.cpp
+++ b/detector/calorimeter/SECalEndcap_o1_v01_geo.cpp
@@ -193,7 +193,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
// Loop over the sets of layer elements in the detector
double check_thick = 0.0;
int l_num = 1;
- int l_set = 0;
for(xml_coll_t li(x_det,_U(layer)); li; ++li) {
xml_comp_t x_layer = li;
@@ -289,7 +288,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
// Increment layer number
++l_num;
}
- l_set++;
}
std::cout << "Total slice thickness check " << check_thick << " cm" << std::endl;
diff --git a/detector/calorimeter/SEcal05_ECRing.cpp b/detector/calorimeter/SEcal05_ECRing.cpp
index aee2e0b16..186ad7605 100644
--- a/detector/calorimeter/SEcal05_ECRing.cpp
+++ b/detector/calorimeter/SEcal05_ECRing.cpp
@@ -210,7 +210,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete
//
//====================================================================
- int Number_of_Si_Layers_in_Barrel = 0;
+ int Number_of_Si_Layers_in_Barrel [[maybe_unused]] = 0;
#ifdef VERBOSE
std::cout << " Ecal total number of Silicon layers = " << Number_of_Si_Layers_in_Barrel << std::endl;
diff --git a/detector/calorimeter/SteppedMuonBarrel_o2_v02_geo.cpp b/detector/calorimeter/SteppedMuonBarrel_o2_v02_geo.cpp
index 11df5cee7..0d8e42da6 100644
--- a/detector/calorimeter/SteppedMuonBarrel_o2_v02_geo.cpp
+++ b/detector/calorimeter/SteppedMuonBarrel_o2_v02_geo.cpp
@@ -52,8 +52,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
- int totalRepeat = 0;
- int totalSlices = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
@@ -93,13 +91,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
caloData->gap1 = 0.; //FIXME
caloData->gap2 = 0.; //FIXME
- for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
- xml_comp_t x_layer = c;
- int repeat = x_layer.repeat();
- totalRepeat += repeat;
- totalSlices += x_layer.numChildren(_U(slice));
- }
-
// CHECK THIS!
// --- create an envelope volume and position it into the world ---------------------
diff --git a/detector/calorimeter/YokeBarrel_o1_v01_geo.cpp b/detector/calorimeter/YokeBarrel_o1_v01_geo.cpp
index 673a5dd63..5be170b91 100644
--- a/detector/calorimeter/YokeBarrel_o1_v01_geo.cpp
+++ b/detector/calorimeter/YokeBarrel_o1_v01_geo.cpp
@@ -22,7 +22,7 @@ using dd4hep::Layer;
using dd4hep::Layering;
using dd4hep::Material;
using dd4hep::PlacedVolume;
-using dd4hep::PolyhedraRegular;
+// using dd4hep::PolyhedraRegular;
using dd4hep::Position;
using dd4hep::Readout;
using dd4hep::Ref_t;
@@ -70,8 +70,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
- int totalRepeat = 0;
- int totalSlices = 0;
double gap = xml_dim_t(x_det).gap();
int numSides = dim.numsides();
double detZ = dim.z();
@@ -98,14 +96,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
caloData->gap1 = 0.; //FIXME
caloData->gap2 = 0.; //FIXME
-
- for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
- xml_comp_t x_layer = c;
- int repeat = x_layer.repeat();
- totalRepeat += repeat;
- totalSlices += x_layer.numChildren(_U(slice));
- }
-
// --- create an envelope volume and position it into the world ---------------------
Volume envelopeVol = dd4hep::xml::createPlacedEnvelope( theDetector, e , sdet ) ;
diff --git a/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp b/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp
index 169ee3082..2f957424c 100644
--- a/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp
+++ b/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp
@@ -20,7 +20,6 @@ using dd4hep::RotationZYX;
using dd4hep::Segmentation;
using dd4hep::SensitiveDetector;
using dd4hep::Transform3D;
-using dd4hep::Tube;
using dd4hep::Volume;
using dd4hep::_toString;
@@ -114,7 +113,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
double sliceZ = -l_thick/2;
double totalAbsorberThickness=0.;
- double th_i(0.), th_o(-1.) ;
for(xml_coll_t s(x_layer,_U(slice)); s; ++s) {
xml_comp_t x_slice = s;
string s_name = _toString(s_num,"slice%d");
@@ -132,15 +130,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
s_phv.addPhysVolID("submodule",sensor_num);
sensor_num++;
- th_i += s_thick / 2. ;
- th_o = s_thick / 2. ;
- } else {
- if( th_o < 0. ){
- th_i += s_thick;
- } else {
- th_o += s_thick;
- }
- }
+ }
if( x_slice.isRadiator() ==true)
totalAbsorberThickness+= s_thick;
diff --git a/detector/calorimeter/dual-readout/src/FiberDualReadoutCalo_o1_v01.cpp b/detector/calorimeter/dual-readout/src/FiberDualReadoutCalo_o1_v01.cpp
new file mode 100644
index 000000000..79b66def7
--- /dev/null
+++ b/detector/calorimeter/dual-readout/src/FiberDualReadoutCalo_o1_v01.cpp
@@ -0,0 +1,75 @@
+#include "detectorSegmentations/DRparamBarrel_k4geo.h"
+#include "detectorSegmentations/DRparamEndcap_k4geo.h"
+#include "detectorSegmentations/GridDRcaloHandle_k4geo.h"
+
+#include "DRconstructor.h"
+
+#include "DD4hep/DetFactoryHelper.h"
+#include "DD4hep/OpticalSurfaces.h"
+#include "DD4hep/Printout.h"
+#include "DD4hep/Detector.h"
+
+namespace ddDRcalo {
+ static dd4hep::Ref_t create_detector( dd4hep::Detector &description, xml_h xmlElement, dd4hep::SensitiveDetector sensDet ) {
+ // Get the detector description from the xml-tree
+ xml_det_t x_det = xmlElement;
+ std::string name = x_det.nameStr();
+ // Create the detector element
+ dd4hep::DetElement drDet( name, x_det.id() );
+ // set the sensitive detector type to the DD4hep calorimeter
+ dd4hep::xml::Dimension sensDetType = xmlElement.child(_Unicode(sensitive));
+ sensDet.setType(sensDetType.typeStr());
+ // Get the world volume
+ dd4hep::Assembly experimentalHall("hall");
+ // Get the dimensions defined in the xml-tree
+ xml_comp_t x_barrel ( x_det.child( _Unicode(barrel) ) );
+ xml_comp_t x_endcap ( x_det.child( _Unicode(endcap) ) );
+ xml_comp_t x_structure ( x_det.child( _Unicode(structure) ) );
+ xml_comp_t x_dim ( x_structure.child( _Unicode(dim) ) );
+ xml_comp_t x_sipmDim ( x_det.child( _Unicode(sipmDim) ) );
+
+ dd4hep::OpticalSurfaceManager surfMgr = description.surfaceManager();
+ dd4hep::OpticalSurface sipmSurfProp = surfMgr.opticalSurface("/world/"+name+"#SiPMSurf");
+ dd4hep::OpticalSurface mirrorSurfProp = surfMgr.opticalSurface("/world/"+name+"#MirrorSurf");
+ surfMgr.opticalSurface("/world/"+name+"#FilterSurf"); // actual filtering applied in the stepping action
+
+ auto segmentation = dynamic_cast( sensDet.readout().segmentation().segmentation() );
+ segmentation->setGridSize( x_dim.distance() );
+ segmentation->setSipmSize( x_dim.dx() );
+
+ auto paramBarrel = segmentation->paramBarrel();
+ paramBarrel->SetInnerX(x_barrel.rmin());
+ paramBarrel->SetTowerH(x_barrel.height());
+ paramBarrel->SetNumZRot(x_barrel.nphi());
+ paramBarrel->SetSipmHeight(x_sipmDim.height());
+
+ auto paramEndcap = segmentation->paramEndcap();
+ paramEndcap->SetInnerX(x_endcap.rmin());
+ paramEndcap->SetTowerH(x_endcap.height());
+ paramEndcap->SetNumZRot(x_endcap.nphi());
+ paramEndcap->SetSipmHeight(x_sipmDim.height());
+
+ auto constructor = DRconstructor(x_det);
+ constructor.setExpHall(&experimentalHall);
+ constructor.setDRparamBarrel(paramBarrel);
+ constructor.setDRparamEndcap(paramEndcap);
+ constructor.setDescription(&description);
+ constructor.setDetElement(&drDet);
+ constructor.setSipmSurf(&sipmSurfProp);
+ constructor.setMirrorSurf(&mirrorSurfProp);
+ constructor.setSensDet(&sensDet);
+ constructor.construct(); // right
+
+ dd4hep::Volume worldVol = description.pickMotherVolume(drDet);
+ dd4hep::PlacedVolume hallPlace = worldVol.placeVolume(experimentalHall);
+ hallPlace.addPhysVolID("system",x_det.id());
+ // connect placed volume and physical volume
+ drDet.setPlacement( hallPlace );
+
+ paramBarrel->finalized();
+ paramEndcap->finalized();
+
+ return drDet;
+ }
+} // namespace detector
+DECLARE_DETELEMENT(FiberDualReadoutCalo_o1_v01, ddDRcalo::create_detector) // factory method
\ No newline at end of file
diff --git a/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp b/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp
index 9ade326c0..cc9704eb5 100644
--- a/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp
+++ b/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp
@@ -43,10 +43,10 @@ using dd4hep::Translation3D;
using dd4hep::Trapezoid;
using dd4hep::Volume;
using dd4hep::_toString;
-using dd4hep::rec::Vector3D;
-using dd4hep::rec::SurfaceType;
+// using dd4hep::rec::Vector3D;
+// using dd4hep::rec::SurfaceType;
using dd4hep::rec::VolPlane;
-using dd4hep::rec::volSurfaceList;
+// using dd4hep::rec::volSurfaceList;
static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector sens) {
@@ -55,7 +55,7 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se
std::string det_name = x_det.nameStr();
DetElement sdet( det_name, x_det.id() ) ;
- PlacedVolume pv;
+ // PlacedVolume pv;
// put the whole detector into an assembly
// - should be replaced by an envelope volume ...
@@ -182,7 +182,8 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se
m.sensor_thickness = xml_comp_t(c_sensor).thickness();
xml_coll_t c_component = xml_coll_t(c_sensor,_U(component));
- int iSensitive, iPassive = 0;
+ // Is iSensitive being used later with this default value in a call to _toString?
+ int iSensitive = 0, iPassive = 0;
for(c_component.reset(); c_component; ++c_component){
xml_comp_t component = c_component;
m.sensor_sensitives.push_back(component.isSensitive());
@@ -341,7 +342,7 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se
// passivesDE.setPlacement(pv);
// Place all sensor parts
- int iSensitive = 0, iPassive = 0;
+ int iSensitive = 0;
for(int i=0; idetElement().extension();
+ para = ddsurf->detElement().extension(false);
+ if(not para) {
+ para = new dd4hep::rec::DoubleParameters;
+ ddsurf->detElement().addExtension(para);
+ }
para->doubleParameters["SortingPolicy"] = rValue;
- } catch(...){
+ } catch(...) {
para = new dd4hep::rec::DoubleParameters;
para->doubleParameters["SortingPolicy"] = rValue;
ddsurf->detElement().addExtension(para);