From 84b256d6a9cb1b011d98682900bbc58912de29c6 Mon Sep 17 00:00:00 2001 From: Markus FRANK <Markus.Frank@cern.ch> Date: Fri, 13 Nov 2020 13:49:48 +0100 Subject: [PATCH] Improve examples DDCMS and DDG4_MySensDet --- examples/DDCMS/CMakeLists.txt | 8 +- examples/DDCMS/data/dd4hep-config.xml | 117 ++++++++++++++++++++------ 2 files changed, 95 insertions(+), 30 deletions(-) diff --git a/examples/DDCMS/CMakeLists.txt b/examples/DDCMS/CMakeLists.txt index 07d20133d..ba410fb50 100644 --- a/examples/DDCMS/CMakeLists.txt +++ b/examples/DDCMS/CMakeLists.txt @@ -86,7 +86,7 @@ dd4hep_add_test_reg( DDCMS_TestShapes dd4hep_add_test_reg( DDCMS_NamespaceConstants COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_DDCMS.sh" EXEC_ARGS geoPluginRun -destroy -print WARNING - -input file:${CMAKE_CURRENT_SOURCE_DIR}/data/cms_tracker.xml + -input file:${CMAKE_CURRENT_SOURCE_DIR}/data/dd4hep-config.xml -plugin DD4hep_TestConstantsMultiplier REGEX_PASS "Tested 2553 numeric constants for expression evaluation" REGEX_FAIL "Exception" @@ -96,9 +96,9 @@ dd4hep_add_test_reg( DDCMS_NamespaceConstants # Test CMS tracker detector construction dd4hep_add_test_reg( DDCMS_LoadGeometry COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_DDCMS.sh" - EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/data/cms_tracker.xml -destroy -print WARNING - -plugin DD4hep_PlacedVolumeProcessor -recursive -processor DDCMS_DetElementCreator + EXEC_ARGS geoDisplay + -input file:${CMAKE_CURRENT_SOURCE_DIR}/data/dd4hep-config.xml + -destroy -print WARNING -load REGEX_PASS "Instrumented 5 subdetectors with 36091 DetElements 25776 sensitives out of 224404 volumes and 1161 sensitive placements." REGEX_FAIL "Exception" REGEX_FAIL "FAILED" diff --git a/examples/DDCMS/data/dd4hep-config.xml b/examples/DDCMS/data/dd4hep-config.xml index 1d4b494f9..55b627836 100644 --- a/examples/DDCMS/data/dd4hep-config.xml +++ b/examples/DDCMS/data/dd4hep-config.xml @@ -90,17 +90,24 @@ <vis name="solid-light-grey" alpha="0.5" r="0.5" g="0.5" b="0.5" showDaughters="true" visible="false"/> <vis name="solid-verylight-grey" alpha="0.6" r="0.5" g="0.5" b="0.5" showDaughters="true" visible="true"/> + <vis name="solid-red" alpha="1.0" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> - <vis name="solid-verylight-red" alpha="0.6" r="1.0" g="0.8" b="0.8" showDaughters="true" visible="true"/> + <vis name="solid-light-red" alpha="0.6" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> + <vis name="solid-verylight-red" alpha="0.4" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> + <vis name="solid-green" alpha="1.0" r="0.0" g="0.9" b="0.2" showDaughters="true" visible="true"/> - <vis name="solid-light-green" alpha="0.4" r="0.0" g="0.4" b="0.0" showDaughters="true" visible="false"/> - <vis name="solid-verylight-green" alpha="0.6" r="0.8" g="1.0" b="0.8" showDaughters="true" visible="true"/> + <vis name="solid-light-green" alpha="0.6" r="0.0" g="0.9" b="0.2" showDaughters="true" visible="false"/> + <vis name="solid-verylight-green" alpha="0.4" r="0.0" g="0.9" b="0.2" showDaughters="true" visible="true"/> + <vis name="solid-blue" alpha="1.0" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/> - <vis name="solid-light-blue" alpha="1.0" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/> - <vis name="solid-verylight-blue" alpha="0.6" r="0.8" g="0.8" b="1.0" showDaughters="true" visible="true"/> - <vis name="solid-verylight-yellow" alpha="0.3" r="1.0" g="1.0" b="0.2" showDaughters="true" visible="true"/> - <vis name="CMS_Invisible" alpha="0.5" r="0.9" g="0.9" b="0.9" showDaughters="true" visible="false"/> + <vis name="solid-light-blue" alpha="0.6" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/> + <vis name="solid-verylight-blue" alpha="0.4" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/> + + <vis name="solid-yellow" alpha="1.0" r="1.0" g="1.0" b="0.2" showDaughters="true" visible="true"/> + <vis name="solid-light-yellow" alpha="0.6" r="1.0" g="1.0" b="0.2" showDaughters="true" visible="true"/> + <vis name="solid-verylight-yellow" alpha="0.4" r="1.0" g="1.0" b="0.2" showDaughters="true" visible="true"/> + <vis name="CMS_Invisible" alpha="0.5" r="0.9" g="0.9" b="0.9" showDaughters="true" visible="false"/> <vis name="vis-active-material" alpha="1.0" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> <vis name="vis-invisible-daughters" alpha="1.0" r="0.1" g="0.1" b="0.8" showDaughters="true" visible="false"/> </display> @@ -120,6 +127,50 @@ <plugin name="DD4hep_VolumeManager"/> <plugin name="DD4hep_InteractiveUI"/> + + <!-- + <plugin name="DD4hep_PlacedVolumeProcessor"> + <arg value="-recursive"/> + <arg value="-processor"/> <arg value="DD4hep_VisVolNameProcessor"/> + <arg value="-match"/> <arg value="tec.(.*)"/> + <arg value="-match"/> <arg value="tib.(.*)"/> + <arg value="-match"/> <arg value="tob.(.*)"/> + <arg value="-match"/> <arg value="tid.(.*)"/> + <arg value="-vis"/> <arg value="vis-invisible-daughters"/> + <arg value="-show"/> + </plugin> + + <plugin name="DD4hep_PlacedVolumeProcessor"> + <arg value="-recursive"/> + <arg value="-detector"/> + <arg value="Tracker_2"/> + <arg value="-processor"/> + <arg value="DD4hep_VisMaterialProcessor"/> + <arg value="-name"/> + <arg value="Si_Vis"/> + <arg value="-vis-active"/> + <arg value="solid-light-red"/> + <arg value="-mat-active"/> + <arg value="materials:Silicon"/> + <arg value="-show"/> + </plugin> + + <plugin name="DD4hep_PlacedVolumeProcessor"> + <arg value="-recursive"/> + <arg value="-detector"/> + <arg value="Tracker_2/TOB_1"/> + <arg value="-processor"/> + <arg value="DD4hep_VisMaterialProcessor"/> + <arg value="-vis-active"/> + <arg value="solid-light-green"/> + + <arg value="-elt-active"/> + <arg value="SI"/> + <arg value="-fraction"/> + <arg value="0.7"/> + <arg value="-show"/> + </plugin> + <plugin name="DD4hep_PlacedVolumeProcessor"> <arg value="-recursive"/> <arg value="-detector"/> @@ -138,6 +189,20 @@ <arg value="-show"/> </plugin> + + <plugin name="DD4hep_PlacedVolumeProcessor"> + <arg value="-recursive"/> + <arg value="-detector"/> + <arg value="Tracker_2/TIB_1"/> + <arg value="-processor"/> + <arg value="DD4hep_VisMaterialProcessor"/> + <arg value="-vis-active"/> + <arg value="solid-verylight-blue"/> + <arg value="-mat-active"/> + <arg value="Silicon"/> + <arg value="-show"/> + </plugin> + <plugin name="DD4hep_PlacedVolumeProcessor"> <arg value="-recursive"/> <arg value="-detector"/> @@ -193,7 +258,7 @@ <arg value="solid-verylight-yellow"/> <arg value="-show"/> </plugin> -<!-- + <plugin name="DD4hep_PlacedVolumeProcessor"> <arg value="-recursive"/> <arg value="-detector"/> @@ -237,7 +302,7 @@ <arg value="0.7"/> <arg value="-show"/> </plugin> ---> + <plugin name="DD4hep_PlacedVolumeProcessor"> <arg value="-recursive"/> <arg value="-detector"/> @@ -319,31 +384,31 @@ <arg value="vis-invisible-daughters"/> <arg value="-show"/> </plugin> - +--> <!-- - <plugin name="DD4hep_PlacedVolumeProcessor"> - <arg value="-recursive"/> - <arg value="-detector"/> - <arg value="Tracker_2"/> - - <arg value="-processor"/> - <arg value="DD4hep_VisVolNameProcessor"/> - <arg value="-name"/> - <arg value="VolName_Vis"/> - <arg value="-show"/> - </plugin> - <plugin name="DD4hep_DetectorDump"> <arg value="-sensitive"/> </plugin> <plugin name="DD4hep_GeometryDisplay"/> - <plugin name="DD4hep_VolumeDump"> - <arg value="-sensitive"/> - <arg value="-volids"/> +--> + + <!-- + <plugin name="DD4hep_PlacedVolumeProcessor"> + <arg value="-recursive"/> + <arg value="-processor"/> <arg value="DD4hep_VisVolNameProcessor"/> + <arg value="-match"/> <arg value="tec.(.*)"/> + <arg value="-vis"/> <arg value="vis-solid-red"/> + <arg value="-show"/> </plugin> --> - <plugin name="DD4hep_XMLLoader"> +<plugin name="DD4hep_XMLLoader"> <arg value="file:${DD4hepExamplesINSTALL}/examples/DDCMS/data/world-close.xml"/> </plugin> +<!-- + <plugin name="DD4hep_VolumeDump"> + <arg value="-materials"/> + <arg value="-vis"/> + </plugin> +--> </plugins> -- GitLab