From 30c60b1b7c57ae931ebcc716701a5e9bfc46903f Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Tue, 8 Apr 2025 00:54:40 -0500 Subject: [PATCH 001/101] Updating dependencies --- CMakeLists.txt | 5 +---- ups/product_deps | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7dcd015d..82fd016e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.20.03 LANGUAGES CXX) - -#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.15.00) -#project(icaruscode LANGUAGES CXX) +project(icaruscode VERSION 10.04.07 LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 08af3cc6e..0a04eb587 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,12 +251,12 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v09_93_06 - -icarus_signal_processing v10_06_00_01 - -icarusalg v10_20_03 - +icarus_data v09_93_03 - +icarus_signal_processing v09_91_02_02 - +icarusalg v10_04_07 - icarusutil v09_88_00_02 - libwda v2_30_0a - -sbncode v10_20_03 - +sbncode v10_04_07 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From 84f703d7b109c3e052208d546bf00748fa3f2625 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 21 Apr 2025 06:54:24 -0500 Subject: [PATCH 002/101] Updating dependencies --- CMakeLists.txt | 2 +- ups/product_deps | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82fd016e4..71acc07c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.04.07 LANGUAGES CXX) +project(icaruscode VERSION 10.04.08 LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 0a04eb587..7bbb11579 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -253,10 +253,10 @@ product version qual flags fftw v3_3_10 - icarus_data v09_93_03 - icarus_signal_processing v09_91_02_02 - -icarusalg v10_04_07 - +icarusalg v10_04_08 - icarusutil v09_88_00_02 - libwda v2_30_0a - -sbncode v10_04_07 - +sbncode v10_04_08 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From 08fcd01fbb6733c60abde2056f74547df38eabdf Mon Sep 17 00:00:00 2001 From: Tracy Usher Date: Tue, 22 Apr 2025 13:31:51 -0700 Subject: [PATCH 003/101] The gauss hit finder operating on ChannelROIs has moved to sbncode, as well the modules converting from Wire to/from ChannelROI. Removing from icaruscode --- .../TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl | 1 - 1 file changed, 1 deletion(-) diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl index fdce3c80e..ef031da9b 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl +++ b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl @@ -114,7 +114,6 @@ gausshit_sbn.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2: @local::candhitfinder_standard gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.Plane: 2 gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 9. -gausshit_sbn.LongMaxHits: [ 1, 1, 1] # disable pulse trains icarus_hitconverter: { From 27b6b78c37dae6d6a041ca2728a9e2d63c75cb6b Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Tue, 6 May 2025 06:34:39 -0500 Subject: [PATCH 004/101] Updated icarus_data and sbncode dependencies --- ups/product_deps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ups/product_deps b/ups/product_deps index 7bbb11579..82a067e0a 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,12 +251,12 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v09_93_03 - +icarus_data v09_93_05 - icarus_signal_processing v09_91_02_02 - icarusalg v10_04_08 - icarusutil v09_88_00_02 - libwda v2_30_0a - -sbncode v10_04_08 - +sbncode v10_06_00 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From b0ba5371138010ff57fa55bee010ebd80f476e56 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Thu, 8 May 2025 17:26:52 -0500 Subject: [PATCH 005/101] Fix fhicl bugs and update G4 config names. --- test/ci/icarus_ci_intimecosmic_g4_quick_test_icaruscode.fcl | 2 +- test/ci/icarus_ci_nucosmics_g4_quick_test_icaruscode.fcl | 2 +- test/ci/icarus_ci_single_g4_quick_test_icaruscode.fcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ci/icarus_ci_intimecosmic_g4_quick_test_icaruscode.fcl b/test/ci/icarus_ci_intimecosmic_g4_quick_test_icaruscode.fcl index 1b7edd561..e3695ae4b 100644 --- a/test/ci/icarus_ci_intimecosmic_g4_quick_test_icaruscode.fcl +++ b/test/ci/icarus_ci_intimecosmic_g4_quick_test_icaruscode.fcl @@ -1 +1 @@ -#include "standard_mc_intime_g4_icarus.fcl" +#include "larg4_icarus_intime_sce.fcl" diff --git a/test/ci/icarus_ci_nucosmics_g4_quick_test_icaruscode.fcl b/test/ci/icarus_ci_nucosmics_g4_quick_test_icaruscode.fcl index b8bb21ee5..fc07b6aee 100644 --- a/test/ci/icarus_ci_nucosmics_g4_quick_test_icaruscode.fcl +++ b/test/ci/icarus_ci_nucosmics_g4_quick_test_icaruscode.fcl @@ -1 +1 @@ -#include "standard_mc_beamcosmics_g4_icarus.fcl" +#include "larg4_icarus.fcl" diff --git a/test/ci/icarus_ci_single_g4_quick_test_icaruscode.fcl b/test/ci/icarus_ci_single_g4_quick_test_icaruscode.fcl index b8bb21ee5..fc07b6aee 100644 --- a/test/ci/icarus_ci_single_g4_quick_test_icaruscode.fcl +++ b/test/ci/icarus_ci_single_g4_quick_test_icaruscode.fcl @@ -1 +1 @@ -#include "standard_mc_beamcosmics_g4_icarus.fcl" +#include "larg4_icarus.fcl" From 36b81f122bf83d2e5899cd358e099982f5af5da9 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Thu, 8 May 2025 17:27:04 -0500 Subject: [PATCH 006/101] Update SkipTesting list. --- fcl/SkipTesting.txt | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/fcl/SkipTesting.txt b/fcl/SkipTesting.txt index 9283fe989..d3206290e 100644 --- a/fcl/SkipTesting.txt +++ b/fcl/SkipTesting.txt @@ -82,17 +82,16 @@ job/var_50pe_5hits_3us_020ns.fcl job/var_50pe_5hits_5us_020ns.fcl job/var_50pe_5hits_7us_020ns.fcl # GRAY PUTNAM 5/8/25: BROKEN FCL FILES in Spring 2025 transition -magic_raw_to_triggeremu_icarus_Run1_data.fcl -trigger_eff_stage1_icarus.fcl -cafmakerjob_icarus_data_rereco_numi_Run1.fcl -cafmakerjob_icarus_data_rereco_numi.fcl -cafmakerjob_icarus_data_rereco_numi_Run2OnBeam.fcl -cafmakerjob_icarus_data_rereco_numi_Run2OffBeam.fcl -cafmakerjob_rereco_numi_icarus_systtools_and_fluxwgt.fcl -intime_gen_overlay_SimInfoMixer2.fcl -intime_gen_overlay_SimInfoMixer1.fcl -prodcorsika_proton_intime_filter_bnb_siminfomixer.fcl -prodcorsika_proton_intime_filter_bnb_siminfomixer2.fcl -prodcorsika_proton_intime_filter_bnb_siminfomixer1.fcl +job/magic_raw_to_triggeremu_icarus_Run1_data.fcl +job/trigger_eff_stage1_icarus.fcl +job/cafmakerjob_icarus_data_rereco_numi_Run1.fcl +job/cafmakerjob_icarus_data_rereco_numi.fcl +job/cafmakerjob_icarus_data_rereco_numi_Run2OnBeam.fcl +job/cafmakerjob_icarus_data_rereco_numi_Run2OffBeam.fcl +job/cafmakerjob_rereco_numi_icarus_systtools_and_fluxwgt.fcl +job/intime_gen_overlay_SimInfoMixer2.fcl +job/intime_gen_overlay_SimInfoMixer1.fcl +job/prodcorsika_proton_intime_filter_bnb_siminfomixer.fcl +job/prodcorsika_proton_intime_filter_bnb_siminfomixer2.fcl # GRAY PUTNAM 5/8/25: "Enabler" fcl files that should not be dump'd on their own -enable_overlay_sp.fcl +job/enable_overlay_sp.fcl From b29e8325dc71705da29c59922dd4d5a11b3d91ee Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 12 May 2025 07:01:55 -0500 Subject: [PATCH 007/101] Updating sbncode dependency --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 82a067e0a..fe3284e5c 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -256,7 +256,7 @@ icarus_signal_processing v09_91_02_02 - icarusalg v10_04_08 - icarusutil v09_88_00_02 - libwda v2_30_0a - -sbncode v10_06_00 - +sbncode v10_06_00_01 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From 5ffe5038fa9b686261e8917e32b802576057adc9 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 12 May 2025 13:36:34 -0500 Subject: [PATCH 008/101] Ignore another fcl. --- fcl/SkipTesting.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/fcl/SkipTesting.txt b/fcl/SkipTesting.txt index d3206290e..49f2ace95 100644 --- a/fcl/SkipTesting.txt +++ b/fcl/SkipTesting.txt @@ -93,5 +93,6 @@ job/intime_gen_overlay_SimInfoMixer2.fcl job/intime_gen_overlay_SimInfoMixer1.fcl job/prodcorsika_proton_intime_filter_bnb_siminfomixer.fcl job/prodcorsika_proton_intime_filter_bnb_siminfomixer2.fcl +job/prodcorsika_proton_intime_filter_bnb_siminfomixer1.fcl # GRAY PUTNAM 5/8/25: "Enabler" fcl files that should not be dump'd on their own job/enable_overlay_sp.fcl From aa230b90ef1b5097c8ee62741633b201bebd3a50 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 12 May 2025 16:21:41 -0500 Subject: [PATCH 009/101] Remove path in new configs in SkipTesting.txt --- fcl/SkipTesting.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fcl/SkipTesting.txt b/fcl/SkipTesting.txt index 49f2ace95..9283fe989 100644 --- a/fcl/SkipTesting.txt +++ b/fcl/SkipTesting.txt @@ -82,17 +82,17 @@ job/var_50pe_5hits_3us_020ns.fcl job/var_50pe_5hits_5us_020ns.fcl job/var_50pe_5hits_7us_020ns.fcl # GRAY PUTNAM 5/8/25: BROKEN FCL FILES in Spring 2025 transition -job/magic_raw_to_triggeremu_icarus_Run1_data.fcl -job/trigger_eff_stage1_icarus.fcl -job/cafmakerjob_icarus_data_rereco_numi_Run1.fcl -job/cafmakerjob_icarus_data_rereco_numi.fcl -job/cafmakerjob_icarus_data_rereco_numi_Run2OnBeam.fcl -job/cafmakerjob_icarus_data_rereco_numi_Run2OffBeam.fcl -job/cafmakerjob_rereco_numi_icarus_systtools_and_fluxwgt.fcl -job/intime_gen_overlay_SimInfoMixer2.fcl -job/intime_gen_overlay_SimInfoMixer1.fcl -job/prodcorsika_proton_intime_filter_bnb_siminfomixer.fcl -job/prodcorsika_proton_intime_filter_bnb_siminfomixer2.fcl -job/prodcorsika_proton_intime_filter_bnb_siminfomixer1.fcl +magic_raw_to_triggeremu_icarus_Run1_data.fcl +trigger_eff_stage1_icarus.fcl +cafmakerjob_icarus_data_rereco_numi_Run1.fcl +cafmakerjob_icarus_data_rereco_numi.fcl +cafmakerjob_icarus_data_rereco_numi_Run2OnBeam.fcl +cafmakerjob_icarus_data_rereco_numi_Run2OffBeam.fcl +cafmakerjob_rereco_numi_icarus_systtools_and_fluxwgt.fcl +intime_gen_overlay_SimInfoMixer2.fcl +intime_gen_overlay_SimInfoMixer1.fcl +prodcorsika_proton_intime_filter_bnb_siminfomixer.fcl +prodcorsika_proton_intime_filter_bnb_siminfomixer2.fcl +prodcorsika_proton_intime_filter_bnb_siminfomixer1.fcl # GRAY PUTNAM 5/8/25: "Enabler" fcl files that should not be dump'd on their own -job/enable_overlay_sp.fcl +enable_overlay_sp.fcl From 2f0525a53d59c6a88e6a8be0f3d1dcf38c223337 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Tue, 13 May 2025 17:04:42 -0500 Subject: [PATCH 010/101] Updating tag and dependencies for release --- CMakeLists.txt | 2 +- ups/product_deps | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71acc07c6..a30b5733e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.04.08 LANGUAGES CXX) +project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index fe3284e5c..80164911f 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -252,8 +252,8 @@ wpdir product_dir wire-cell-cfg product version qual flags fftw v3_3_10 - icarus_data v09_93_05 - -icarus_signal_processing v09_91_02_02 - -icarusalg v10_04_08 - +icarus_signal_processing v10_06_00_01 - +icarusalg v10_06_00_01 - icarusutil v09_88_00_02 - libwda v2_30_0a - sbncode v10_06_00_01 - From 15518875386b5e07bc7442bd5ab0a37fcbb920ec Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 16 May 2025 11:11:48 -0500 Subject: [PATCH 011/101] Reorganize standard fcls. Update to new MC path. Add in overlay path. --- fcl/standard/CMakeLists.txt | 11 ++++------- fcl/standard/data/CMakeLists.txt | 8 ++++++++ fcl/standard/{ => data}/standard_data_caf_icarus.fcl | 0 .../{ => data}/standard_data_larcv_icarus.fcl | 0 .../{ => data}/standard_data_stage0_icarus.fcl | 0 .../{ => data}/standard_data_stage1_icarus.fcl | 0 .../{ => data}/standard_data_stage1larcv_icarus.fcl | 0 fcl/standard/mc/CMakeLists.txt | 8 ++++++++ .../{ => mc}/standard_mc_all_detsim_icarus.fcl | 0 .../{ => mc}/standard_mc_all_larcv_icarus.fcl | 0 fcl/standard/mc/standard_mc_all_stage0_icarus.fcl | 1 + fcl/standard/mc/standard_mc_all_stage1_icarus.fcl | 1 + .../{ => mc}/standard_mc_beamcosmics_caf_icarus.fcl | 0 fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl | 1 + .../{ => mc}/standard_mc_intime_caf_icarus.fcl | 0 fcl/standard/mc/standard_mc_intime_g4_icarus.fcl | 1 + .../standard_mc_mpvmpr_stage1larcv_icarus.fcl | 0 fcl/standard/overlay/CMakeLists.txt | 8 ++++++++ fcl/standard/overlay/standard_overlay_caf_iarus.fcl | 1 + .../overlay/standard_overlay_detsim_icarus.fcl | 1 + .../overlay/standard_overlay_overlay_icarus.fcl | 1 + .../overlay/standard_overlay_stage0_icarus.fcl | 1 + .../overlay/standard_overlay_stage1_icarus.fcl | 1 + fcl/standard/standard_mc_all_stage0_icarus.fcl | 1 - fcl/standard/standard_mc_all_stage1_icarus.fcl | 1 - fcl/standard/standard_mc_all_stage1larcv_icarus.fcl | 1 - fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl | 1 - fcl/standard/standard_mc_intime_g4_icarus.fcl | 1 - 28 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 fcl/standard/data/CMakeLists.txt rename fcl/standard/{ => data}/standard_data_caf_icarus.fcl (100%) rename fcl/standard/{ => data}/standard_data_larcv_icarus.fcl (100%) rename fcl/standard/{ => data}/standard_data_stage0_icarus.fcl (100%) rename fcl/standard/{ => data}/standard_data_stage1_icarus.fcl (100%) rename fcl/standard/{ => data}/standard_data_stage1larcv_icarus.fcl (100%) create mode 100644 fcl/standard/mc/CMakeLists.txt rename fcl/standard/{ => mc}/standard_mc_all_detsim_icarus.fcl (100%) rename fcl/standard/{ => mc}/standard_mc_all_larcv_icarus.fcl (100%) create mode 100644 fcl/standard/mc/standard_mc_all_stage0_icarus.fcl create mode 100644 fcl/standard/mc/standard_mc_all_stage1_icarus.fcl rename fcl/standard/{ => mc}/standard_mc_beamcosmics_caf_icarus.fcl (100%) create mode 100644 fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl rename fcl/standard/{ => mc}/standard_mc_intime_caf_icarus.fcl (100%) create mode 100644 fcl/standard/mc/standard_mc_intime_g4_icarus.fcl rename fcl/standard/{ => mc}/standard_mc_mpvmpr_stage1larcv_icarus.fcl (100%) create mode 100644 fcl/standard/overlay/CMakeLists.txt create mode 100644 fcl/standard/overlay/standard_overlay_caf_iarus.fcl create mode 100644 fcl/standard/overlay/standard_overlay_detsim_icarus.fcl create mode 100644 fcl/standard/overlay/standard_overlay_overlay_icarus.fcl create mode 100644 fcl/standard/overlay/standard_overlay_stage0_icarus.fcl create mode 100644 fcl/standard/overlay/standard_overlay_stage1_icarus.fcl delete mode 100644 fcl/standard/standard_mc_all_stage0_icarus.fcl delete mode 100644 fcl/standard/standard_mc_all_stage1_icarus.fcl delete mode 100644 fcl/standard/standard_mc_all_stage1larcv_icarus.fcl delete mode 100644 fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl delete mode 100644 fcl/standard/standard_mc_intime_g4_icarus.fcl diff --git a/fcl/standard/CMakeLists.txt b/fcl/standard/CMakeLists.txt index 9714229ee..178294463 100644 --- a/fcl/standard/CMakeLists.txt +++ b/fcl/standard/CMakeLists.txt @@ -1,8 +1,5 @@ -# Install fcl files +cet_enable_asserts() -install_fhicl() - -# Also put a copy in the source tree. - -FILE(GLOB fcl_files *.fcl) -install_source( EXTRAS ${fcl_files} ) +add_subdirectory(mc) +add_subdirectory(data) +add_subdirectory(overlay) diff --git a/fcl/standard/data/CMakeLists.txt b/fcl/standard/data/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/data/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/standard_data_caf_icarus.fcl b/fcl/standard/data/standard_data_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_caf_icarus.fcl rename to fcl/standard/data/standard_data_caf_icarus.fcl diff --git a/fcl/standard/standard_data_larcv_icarus.fcl b/fcl/standard/data/standard_data_larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_larcv_icarus.fcl rename to fcl/standard/data/standard_data_larcv_icarus.fcl diff --git a/fcl/standard/standard_data_stage0_icarus.fcl b/fcl/standard/data/standard_data_stage0_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage0_icarus.fcl rename to fcl/standard/data/standard_data_stage0_icarus.fcl diff --git a/fcl/standard/standard_data_stage1_icarus.fcl b/fcl/standard/data/standard_data_stage1_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage1_icarus.fcl rename to fcl/standard/data/standard_data_stage1_icarus.fcl diff --git a/fcl/standard/standard_data_stage1larcv_icarus.fcl b/fcl/standard/data/standard_data_stage1larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage1larcv_icarus.fcl rename to fcl/standard/data/standard_data_stage1larcv_icarus.fcl diff --git a/fcl/standard/mc/CMakeLists.txt b/fcl/standard/mc/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/mc/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/standard_mc_all_detsim_icarus.fcl b/fcl/standard/mc/standard_mc_all_detsim_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_all_detsim_icarus.fcl rename to fcl/standard/mc/standard_mc_all_detsim_icarus.fcl diff --git a/fcl/standard/standard_mc_all_larcv_icarus.fcl b/fcl/standard/mc/standard_mc_all_larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_all_larcv_icarus.fcl rename to fcl/standard/mc/standard_mc_all_larcv_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl b/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl new file mode 100644 index 000000000..c90fdc3b2 --- /dev/null +++ b/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl @@ -0,0 +1 @@ +#include "stage0_run2_wcdnn_icarus_mc.fcl" diff --git a/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl b/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl new file mode 100644 index 000000000..7f5fe82b0 --- /dev/null +++ b/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl b/fcl/standard/mc/standard_mc_beamcosmics_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl rename to fcl/standard/mc/standard_mc_beamcosmics_caf_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl b/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl new file mode 100644 index 000000000..a42168087 --- /dev/null +++ b/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_cosmics_sce.fcl" diff --git a/fcl/standard/standard_mc_intime_caf_icarus.fcl b/fcl/standard/mc/standard_mc_intime_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_intime_caf_icarus.fcl rename to fcl/standard/mc/standard_mc_intime_caf_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl b/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl new file mode 100644 index 000000000..e3695ae4b --- /dev/null +++ b/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_intime_sce.fcl" diff --git a/fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl b/fcl/standard/mc/standard_mc_mpvmpr_stage1larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl rename to fcl/standard/mc/standard_mc_mpvmpr_stage1larcv_icarus.fcl diff --git a/fcl/standard/overlay/CMakeLists.txt b/fcl/standard/overlay/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/overlay/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/overlay/standard_overlay_caf_iarus.fcl b/fcl/standard/overlay/standard_overlay_caf_iarus.fcl new file mode 100644 index 000000000..ff0de4039 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_caf_iarus.fcl @@ -0,0 +1 @@ +#include "cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl b/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl new file mode 100644 index 000000000..d5a62b5cc --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl @@ -0,0 +1 @@ +#include "detsim_2d_icarus_refactored_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl b/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl new file mode 100644 index 000000000..6d70a1ace --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl @@ -0,0 +1 @@ +#include "overlay_waveforms.fcl" diff --git a/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl new file mode 100644 index 000000000..d91fab811 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl @@ -0,0 +1 @@ +#include "stage0_run2_wc_icarus_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl b/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl new file mode 100644 index 000000000..2ec9c1f23 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_icarus_overlay.fcl" diff --git a/fcl/standard/standard_mc_all_stage0_icarus.fcl b/fcl/standard/standard_mc_all_stage0_icarus.fcl deleted file mode 100644 index feb8aca63..000000000 --- a/fcl/standard/standard_mc_all_stage0_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage0_run2_icarus_mc.fcl" diff --git a/fcl/standard/standard_mc_all_stage1_icarus.fcl b/fcl/standard/standard_mc_all_stage1_icarus.fcl deleted file mode 100644 index 86d4b0eba..000000000 --- a/fcl/standard/standard_mc_all_stage1_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage1_run2_1d_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl b/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl deleted file mode 100644 index caf161ca4..000000000 --- a/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage1_run2_1d_larcv_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl b/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl deleted file mode 100644 index 687f1fe35..000000000 --- a/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "larg4_icarus_cosmics_sce_2d_drift.fcl" diff --git a/fcl/standard/standard_mc_intime_g4_icarus.fcl b/fcl/standard/standard_mc_intime_g4_icarus.fcl deleted file mode 100644 index 05c30a5c9..000000000 --- a/fcl/standard/standard_mc_intime_g4_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "larg4_icarus_intime_sce_2d_drift.fcl" From a095e2df8e50656cbfeb4bea22fc86441b40f703 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 16 May 2025 11:12:38 -0500 Subject: [PATCH 012/101] Fhicl file to convert ChannelROIs back into Wires --- fcl/reco/CMakeLists.txt | 1 + fcl/reco/wires/CMakeLists.txt | 3 ++ fcl/reco/wires/restorewires_icarus.fcl | 60 ++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 fcl/reco/wires/CMakeLists.txt create mode 100644 fcl/reco/wires/restorewires_icarus.fcl diff --git a/fcl/reco/CMakeLists.txt b/fcl/reco/CMakeLists.txt index de9682fc7..565e07219 100644 --- a/fcl/reco/CMakeLists.txt +++ b/fcl/reco/CMakeLists.txt @@ -13,6 +13,7 @@ add_subdirectory(ForCITests) #add_subdirectory(archive) add_subdirectory(Definitions) add_subdirectory(larcv) +add_subdirectory(wires) add_subdirectory(ntuple) add_subdirectory(Stage0) add_subdirectory(Stage1) diff --git a/fcl/reco/wires/CMakeLists.txt b/fcl/reco/wires/CMakeLists.txt new file mode 100644 index 000000000..2bda0f610 --- /dev/null +++ b/fcl/reco/wires/CMakeLists.txt @@ -0,0 +1,3 @@ +cet_enable_asserts() + +install_fhicl() diff --git a/fcl/reco/wires/restorewires_icarus.fcl b/fcl/reco/wires/restorewires_icarus.fcl new file mode 100644 index 000000000..723c92e43 --- /dev/null +++ b/fcl/reco/wires/restorewires_icarus.fcl @@ -0,0 +1,60 @@ +# Configuration for running the Calibration NTupler +# on a stage-1 reco file +# +#include "services_common_icarus.fcl" +#include "wirechannelroiconverters_sbn.fcl" + +process_name: ntuple + +services: +{ + @table::icarus_wirecalibration_services +} + +#source is a root file +source: +{ + module_type: RootInput + maxEvents: 10 # Number of events to create + saveMemoryObjectThreshold: 0 +} + +# only do analysis +physics: +{ + + producers: { + channel2wire: @local::channelroitowire + } + + filters: {} + + analyzers: + { + } + + out: [rootOutput] + reco: [channel2wire] + trigger_paths: [reco] + end_paths: [out] +} + +physics.producers.channel2wire.WireModuleLabelVec: ["wire2channelroi2d:PHYSCRATEDATATPCEE", "wire2channelroi2d:PHYSCRATEDATATPCEW", "wire2channelroi2d:PHYSCRATEDATATPCWE", "wire2channelroi2d:PHYSCRATEDATATPCWW"] +physics.producers.channel2wire.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] + +physics.analyzers.caloskimE.SelectEvents: [ ] +physics.analyzers.caloskimW.SelectEvents: [ ] +physics.analyzers.simpleLightAna.SelectEvents: [ ] +physics.analyzers.supera.SelectEvents: [ ] + +outputs: +{ + rootOutput: + { + module_type: RootOutput + dataTier: "reconstructed" + compressionLevel: 1 + saveMemoryObjectThreshold: 0 + fileName: "%ifb_%tc-%p.root" + } +} From fef597790c25e4ff3115feaf026283384d65d4d1 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Sat, 17 May 2025 12:23:05 -0500 Subject: [PATCH 013/101] Get non-YZ detsim configs working. Add in overlay option to non-YZ sim. --- fcl/detsim/detsim_2d_icarus_refactored.fcl | 2 +- .../detsim_2d_icarus_refactored_overlay.fcl | 3 +++ .../detsimmodules_wirecell_ICARUS.fcl | 8 ++++++++ ...titpc-sim-drift-simchannel-refactored.jsonnet | 16 +++++++++++++--- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl diff --git a/fcl/detsim/detsim_2d_icarus_refactored.fcl b/fcl/detsim/detsim_2d_icarus_refactored.fcl index 993ce8586..799170d15 100644 --- a/fcl/detsim/detsim_2d_icarus_refactored.fcl +++ b/fcl/detsim/detsim_2d_icarus_refactored.fcl @@ -19,7 +19,7 @@ physics: { crtdaq: @local::icarus_crtsim opdaq: @local::icarus_simpmt - daq: @local::icarus_simwire_wirecell_filtersed + daq: @local::icarus_simwire_wirecell_shifted rns: { module_type: "RandomNumberSaver" } } # producers diff --git a/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl b/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl new file mode 100644 index 000000000..bf9754683 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored.fcl" + +physics.producers.daq: @local::icarus_simwire_wirecell_shifted_overlay diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index 6bc7c326f..093261634 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -81,6 +81,14 @@ icarus_simwire_wirecell_SConly.wcls_main.outputers:[ icarus_simwire_wirecell_shifted: @local::icarus_simwire_wirecell icarus_simwire_wirecell_shifted.wcls_main.params.SimEnergyDepositLabel: "shifted" +icarus_simwire_wirecell_shifted_overlay: @local::icarus_simwire_wirecell_shifted +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.coh_noise_scale: 0.0 # disable noise +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.int_noise_scale: 0.0 # ditto +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.overlay_drifter: true +icarus_simwire_wirecell_shifted_overlay.wcls_main.plugins: [@sequence::icarus_simwire_wirecell_shifted_overlay.wcls_main.plugins, "WireCellICARUSDrifter"] +icarus_simwire_wirecell_shifted_overlay.wcls_main.inputers: ["wclsSimDepoSetSource:electron", "wclsICARUSDrifter:drifter"] +icarus_simwire_wirecell_shifted_overlay.wcls_main.params.cathode_input_format: "scalar" + icarus_simwire_wirecell_filtersed: @local::icarus_simwire_wirecell icarus_simwire_wirecell_filtersed.wcls_main.params.SimEnergyDepositLabel: "filtersed" diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet index e5a0210df..663f19860 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet @@ -166,12 +166,22 @@ local wcls_output = { sp_thresholds: wcls.output.thresholds(name='spthresholds', tags=['threshold']), }; -//local deposio = io.numpy.depos(output); -local drifter = sim.drifter; +local overlay_drifter = std.extVar("overlay_drifter"); + +local drifter = if overlay_drifter then { + local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), + type: "wclsICARUSDrifter", + name: "drifter", + data: params.lar + sim.overlay_drifter_data { + TPC: 0, + charge_scale: 1 + }, + } else sim.drifter; + local setdrifter = g.pnode({ type: 'DepoSetDrifter', data: { - drifter: "Drifter" + drifter: wc.tn(drifter) } }, nin=1, nout=1, uses=[drifter]); From fd478ddde848cc25bd7663480218f85d82dbf026 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Sat, 17 May 2025 12:24:30 -0500 Subject: [PATCH 014/101] Tune sim-reco timing offsets to 2D deconv. --- .../TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index 093261634..5da3c8673 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -62,11 +62,10 @@ icarus_simwire_wirecell: shaping1: 1.45 # us shaping2: 1.3 # us - # Time offsets for truth matching - time_offset_u: 0.0 # us - time_offset_v: 0.0 # us - time_offset_y: 0.0 # us - + # Time offsets for truth matching -- tuned to 2D deconvolution output + time_offset_u: 1.81 # us + time_offset_v: 2.08 # us + time_offset_y: 1.82 # us } } } From 8c0136d70708cb163608440050bc00544ba805b8 Mon Sep 17 00:00:00 2001 From: NathanielERowe Date: Tue, 20 May 2025 16:27:58 -0500 Subject: [PATCH 015/101] Add gpus configs --- fcl/reco/Definitions/stage0_icarus_defs.fcl | 8 +- ...-decode-to-sig-twofaced-dnnroi-gpu.jsonnet | 394 ++++++++++++++++++ 2 files changed, 398 insertions(+), 4 deletions(-) create mode 100644 icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet diff --git a/fcl/reco/Definitions/stage0_icarus_defs.fcl b/fcl/reco/Definitions/stage0_icarus_defs.fcl index 8fa8b5d67..11a73b8fb 100644 --- a/fcl/reco/Definitions/stage0_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_defs.fcl @@ -351,7 +351,7 @@ icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiEE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] @@ -361,7 +361,7 @@ icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiEW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] @@ -371,7 +371,7 @@ icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiWE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] @@ -381,7 +381,7 @@ icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiWW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] # Signal processing values diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet new file mode 100644 index 000000000..84e471d37 --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet @@ -0,0 +1,394 @@ +// This is a main entry point to configure a WC/LS job that applies +// noise filtering and signal processing to existing RawDigits. The +// FHiCL is expected to provide the following parameters as attributes +// in the "params" structure. +// +// epoch: the hardware noise fix expoch: "before", "after", "dynamic" or "perfect" +// reality: whether we are running on "data" or "sim"ulation. +// raw_input_label: the art::Event inputTag for the input RawDigit +// +// see the .fcl of the same name for an example Version 2 +// +// Manual testing, eg: +// +// jsonnet -V reality=data -V epoch=dynamic -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet +// +// jsonnet -V reality=sim -V epoch=perfect -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet + + +local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect" +local reality = std.extVar('reality'); +local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense" + +local wc = import 'wirecell.jsonnet'; +local g = import 'pgraph.jsonnet'; + +local raw_input_label = std.extVar('raw_input_label'); // eg "daq" +local volume_label = std.extVar('tpc_volume_label'); // eg "",0,1,2,3 +local volume = if volume_label == '' then -1 else std.parseInt(volume_label); + +// local data_params = import 'params.jsonnet'; +// local simu_params = import 'simparams.jsonnet'; +// local params_init = if reality == 'data' then data_params else simu_params; +local params_twofaced = import 'pgrapher/experiment/icarus/params_twofaced.jsonnet'; + +# Load the sim-params, overwrite the volume config for the two-faced version +local base_params = import 'pgrapher/experiment/icarus/simparams.jsonnet'; +local base = base_params + params_twofaced; + +// load the electronics response parameters +local er_params = [ + { + gain: std.extVar('gain0')*wc.mV/wc.fC, + shaping: std.extVar('shaping0')*wc.us, + }, + + { + gain: std.extVar('gain1')*wc.mV/wc.fC, + shaping: std.extVar('shaping1')*wc.us, + }, + + { + gain: std.extVar('gain2')*wc.mV/wc.fC, + shaping: std.extVar('shaping2')*wc.us, + }, +]; + + +local params = base { + files: super.files { + fields: [ std.extVar('files_fields'), ], + chresp: null, + }, + + rc_resp: if std.extVar('file_rcresp') != "" then + { + // "icarus_fnal_rc_tail.json" + filename: std.extVar('file_rcresp'), + postgain: 1.0, + start: 0.0, + tick: 0.4*wc.us, + nticks: params.daq.nticks,// 4255, + type: "JsonElecResponse", + } + else super.rc_resp, + + elec: std.mapWithIndex(function (n, eparam) + super.elec[n] + { + gain: eparam.gain, + shaping: eparam.shaping, + }, er_params), + +}; + +// local tools_maker = import 'pgrapher/common/tools.jsonnet'; +// local tools = tools_maker(params); change this for GPU +local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; +local default_tools = tools_maker(params); +local tools = std.mergePatch(default_tools, + {dft: {type: "TorchDFT", data: {device: "gpu"}}}); + + + +local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; +local wcls = wcls_maker(params, tools); + +local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; + +//local chndbm = chndb_maker(params, tools); +//local chndb = if epoch == "dynamic" then chndbm.wcls_multi(name="") else chndbm.wct(epoch); + + +// Collect the WC/LS input converters for use below. Make sure the +// "name" argument matches what is used in the FHiCL that loads this +// file. In particular if there is no ":" in the inputer then name +// must be the emtpy string. +local wcls_input = { + adc_digits: g.pnode({ + type: 'wclsRawFrameSource', + name: 'rfsrc%d' %volume, // to use multiple wirecell instances in a fhicl job + data: { + art_tag: raw_input_label, + frame_tags: ['orig'], // this is a WCT designator + tick: params.daq.tick, + // nticks: params.daq.nticks, + }, + }, nin=0, nout=1), + +}; + +// Collect all the wc/ls output converters for use below. Note the +// "name" MUST match what is used in theh "outputers" parameter in the +// FHiCL that loads this file. + +local this_anode = tools.anodes[volume]; + +local wcls_output = { + // The noise filtered "ADC" values. These are truncated for + // art::Event but left as floats for the WCT SP. Note, the tag + // "raw" is somewhat historical as the output is not equivalent to + // "raw data". + nf_digits: g.pnode({ + type: 'wclsFrameSaver', + name: 'nfsaver', + data: { + // anode: wc.tn(tools.anode), + anode: wc.tn(this_anode), + digitize: true, // true means save as RawDigit, else recob::Wire + frame_tags: ['raw'], + // nticks: params.daq.nticks, + chanmaskmaps: ['bad'], + plane_map: { + "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) + "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) + "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) + }, + }, + }, nin=1, nout=1, uses=[this_anode]), + + + // The output of signal processing. Note, there are two signal + // sets each created with its own filter. The "gauss" one is best + // for charge reconstruction, the "wiener" is best for S/N + // separation. Both are used in downstream WC code. + sp_signals: g.pnode({ + type: 'wclsFrameSaver', + name: 'spsaver%d' %volume, // to use multiple wirecell instances in a fhicl job + data: { + // anode: wc.tn(tools.anode), + anode: wc.tn(this_anode), + digitize: false, // true means save as RawDigit, else recob::Wire + // frame_tags: ['gauss', 'wiener', 'looseLf','shrinkROI','extendROI'], + // frame_scale: [0.1, 0.1, 0.1], + // frame_tags: ['gauss','wiener','looseLf','shrinkROI','extendROI','mp3ROI','mp2ROI', 'cleanupROI'], + // frame_scale: [0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009], + + frame_tags: ['dnnsp'], + frame_scale: [std.extVar('gain_ADC_per_e')], + + // nticks: params.daq.nticks, + chanmaskmaps: ['bad'], + nticks: -1, + plane_map: { + "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) + "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) + "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) + }, + }, + }, nin=1, nout=1, uses=[this_anode]), + + h5io: g.pnode({ + type: 'HDF5FrameTap', + name: 'hio_sp%d' % volume, + data: { + anode: wc.tn(this_anode), + trace_tags: ['gauss' + , 'wiener' + , 'tightLf' + , 'looseLf' + , 'decon' + , 'cleanupROI' + , 'breakROI1' + , 'breakROI2' + , 'shrinkROI' + , 'extendROI' + , 'mp3ROI' + , 'mp2ROI' + , 'dnnsp' + ], + filename: "wc-sp-%d.h5" % volume, + chunk: [0, 0], // ncol, nrow + gzip: 0, + high_throughput: true, + }, + }, nin=1, nout=1, uses=[this_anode]), + +}; + +// local perfect = import 'chndb-perfect.jsonnet'; +local base = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; +local chndb = [{ + type: 'OmniChannelNoiseDB', + name: 'ocndbperfect%d' % n, + // data: perfect(params, tools.anodes[n], tools.field, n), + data: base(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, + uses: [tools.anodes[n], tools.field, tools.dft], // pnode extension +} for n in std.range(0, std.length(tools.anodes) - 1)]; + +local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; +local nf_pipes = [nf_maker(tools.anodes[n], chndb[n], tools, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; + +local sp_override = { // assume all tages sets in base sp.jsonnet + sparse: sigoutform == 'sparse', + use_roi_refinement: true, + use_roi_debug_mode: true, + save_negtive_charge: true, + wiener_tag: "", + // gauss_tag: "", + tight_lf_tag: "", + // loose_lf_tag: "", + break_roi_loop1_tag: "", + break_roi_loop2_tag: "", + shrink_roi_tag: "", + extend_roi_tag: "", + // decon_charge_tag: "", + cleanup_roi_tag: "", + // mp2_roi_tag: "", + // mp3_roi_tag: "", + use_multi_plane_protection: true, + mp_tick_resolution: 8, + process_planes: [0, 1, 2], + isWrapped: true, + nwires_separate_planes: [ + [1056, 1056], [5600], [5600] + ], + troi_col_th_factor: std.parseJson(std.extVar('col_threshold_factor'))*1.0, // multiply by 1 to make into float + troi_ind_th_factor: std.parseJson(std.extVar('ind_threshold_factor'))*1.0 +}; +local sp = sp_maker(params, tools, sp_override); +local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; + +local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; +local chsel_pipes = [ + g.pnode({ + type: 'ChannelSelector', + name: 'chsel%d' % n, + data: { + channels: util.anode_channels_twofaced(n), + //tags: ['orig%d' % n], // traces tag + }, + }, nin=1, nout=1) + for n in std.range(0, std.length(tools.anodes) - 1) +]; + +local magoutput = 'icarus-data-check.root'; +local magnify = import 'pgrapher/experiment/icarus/magnify-sinks.jsonnet'; +local magnifyio = magnify(tools, magoutput); + +local dnnroi = import 'pgrapher/experiment/icarus/dnnroi.jsonnet'; +local ts_u = { + type: "TorchService", + name: "dnnroi_u", + data: { + model: "NNs/plane0.ts", + device: "gpu", + concurrency: 1, + }, +}; + +local ts_v = { + type: "TorchService", + name: "dnnroi_v", + data: { + model: "NNs/plane1.ts", + device: "gpu", + concurrency: 1, + }, +}; + +local nfsp_pipes = [ + g.pipeline([ + chsel_pipes[n], + // magnifyio.orig_pipe[n], + + nf_pipes[n], + // magnifyio.raw_pipe[n], + sp_pipes[n], + dnnroi(tools.anodes[n], ts_u, ts_v), + // magnifyio.decon_pipe[n], + // magnifyio.threshold_pipe[n], + // magnifyio.debug_pipe[n], // use_roi_debug_mode: true in sp.jsonnet + ], + 'nfsp_pipe_%d' % n) + for n in [volume] +]; + +local fanout_tag_rules = [ + { + frame: { + '.*': 'orig%d' % tools.anodes[n].data.ident, + }, + trace: { + // fake doing Nmult SP pipelines + //orig: ['wiener', 'gauss'], + //'.*': 'orig', + }, + } + for n in [volume] + ]; + +local fanin_tag_rules = [ + { + frame: { + //['number%d' % n]: ['output%d' % n, 'output'], + '.*': 'framefanin', + }, + trace: { + ['extend_roi%d'%ind]:'extend_roi%d'%ind, + ['shrink_roi%d'%ind]:'shrink_roi%d'%ind, + // ['break_roi_2nd%d'%ind]:'break_roi_2nd%d'%ind, + // ['break_roi_1st%d'%ind]:'break_roi_1st%d'%ind, + ['cleanup_roi%d'%ind]:'cleanup_roi%d'%ind, + ['mp2_roi%d'%ind]:'mp2_roi%d'%ind, + ['mp3_roi%d'%ind]:'mp3_roi%d'%ind, + ['gauss%d'%ind]:'gauss%d'%ind, + 'dnnsp\\d':'dnnsp%d'%ind, + ['wiener%d'%ind]:'wiener%d'%ind, + // ['threshold%d'%ind]:'threshold%d'%ind, + // ['tight_lf%d'%ind]:'tight_lf%d'%ind, + ['loose_lf%d'%ind]:'loose_lf%d'%ind, + // ['decon%d'%ind]:'decon%d'%ind, + }, + + } + for ind in [this_anode.data.ident] + ]; +local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp%d' % volume, [], fanout_tag_rules, fanin_tag_rules); + +local retagger = g.pnode({ + type: 'Retagger', + data: { + // Note: retagger keeps tag_rules an array to be like frame fanin/fanout. + tag_rules: [{ + // Retagger also handles "frame" and "trace" like fanin/fanout + // merge separately all traces like gaussXYZ to gauss. + frame: { + '.*': 'retagger', + }, + merge: { + 'dnnsp\\d': 'dnnsp', + 'gauss\\d': 'gauss', + 'wiener\\d': 'wiener', + // 'tight_lf\\d': 'tightLf', + 'loose_lf\\d': 'looseLf', + // 'decon\\d': 'decon', + 'cleanup_roi\\d': 'cleanupROI', + // 'break_roi_1st\\d': 'breakROI1', + // 'break_roi_2nd\\d': 'breakROI2', + 'shrink_roi\\d': 'shrinkROI', + 'extend_roi\\d': 'extendROI', + 'mp3_roi\\d': 'mp3ROI', + 'mp2_roi\\d': 'mp2ROI', + }, + }], + }, +}, nin=1, nout=1); + +local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); + +// local graph = g.pipeline([wcls_input.adc_digits, chsel_pipes[volume], sp_pipes[volume], dnnroi(this_anode, ts_u, ts_v, output_scale=1), retagger, wcls_output.h5io, wcls_output.sp_signals, sink]); +local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]); + +local app = { + type: 'Pgrapher', + data: { + edges: g.edges(graph), + }, +}; + +// Finally, the configuration sequence +g.uses(graph) + [app] From a6805b17a62a3464508898bfa09b77b5901cc5fd Mon Sep 17 00:00:00 2001 From: NathanielERowe Date: Tue, 20 May 2025 16:30:37 -0500 Subject: [PATCH 016/101] Revert "Add gpus configs" This reverts commit 4e902032db9d76cfa96228df5d3826aa9f8272c5. --- fcl/reco/Definitions/stage0_icarus_defs.fcl | 8 +- ...-decode-to-sig-twofaced-dnnroi-gpu.jsonnet | 394 ------------------ 2 files changed, 4 insertions(+), 398 deletions(-) delete mode 100644 icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet diff --git a/fcl/reco/Definitions/stage0_icarus_defs.fcl b/fcl/reco/Definitions/stage0_icarus_defs.fcl index 11a73b8fb..8fa8b5d67 100644 --- a/fcl/reco/Definitions/stage0_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_defs.fcl @@ -351,7 +351,7 @@ icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiEE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] @@ -361,7 +361,7 @@ icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiEW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] @@ -371,7 +371,7 @@ icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiWE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] @@ -381,7 +381,7 @@ icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiWW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] # Signal processing values diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet deleted file mode 100644 index 84e471d37..000000000 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet +++ /dev/null @@ -1,394 +0,0 @@ -// This is a main entry point to configure a WC/LS job that applies -// noise filtering and signal processing to existing RawDigits. The -// FHiCL is expected to provide the following parameters as attributes -// in the "params" structure. -// -// epoch: the hardware noise fix expoch: "before", "after", "dynamic" or "perfect" -// reality: whether we are running on "data" or "sim"ulation. -// raw_input_label: the art::Event inputTag for the input RawDigit -// -// see the .fcl of the same name for an example Version 2 -// -// Manual testing, eg: -// -// jsonnet -V reality=data -V epoch=dynamic -V raw_input_label=daq \\ -// -V signal_output_form=sparse \\ -// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet -// -// jsonnet -V reality=sim -V epoch=perfect -V raw_input_label=daq \\ -// -V signal_output_form=sparse \\ -// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet - - -local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect" -local reality = std.extVar('reality'); -local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense" - -local wc = import 'wirecell.jsonnet'; -local g = import 'pgraph.jsonnet'; - -local raw_input_label = std.extVar('raw_input_label'); // eg "daq" -local volume_label = std.extVar('tpc_volume_label'); // eg "",0,1,2,3 -local volume = if volume_label == '' then -1 else std.parseInt(volume_label); - -// local data_params = import 'params.jsonnet'; -// local simu_params = import 'simparams.jsonnet'; -// local params_init = if reality == 'data' then data_params else simu_params; -local params_twofaced = import 'pgrapher/experiment/icarus/params_twofaced.jsonnet'; - -# Load the sim-params, overwrite the volume config for the two-faced version -local base_params = import 'pgrapher/experiment/icarus/simparams.jsonnet'; -local base = base_params + params_twofaced; - -// load the electronics response parameters -local er_params = [ - { - gain: std.extVar('gain0')*wc.mV/wc.fC, - shaping: std.extVar('shaping0')*wc.us, - }, - - { - gain: std.extVar('gain1')*wc.mV/wc.fC, - shaping: std.extVar('shaping1')*wc.us, - }, - - { - gain: std.extVar('gain2')*wc.mV/wc.fC, - shaping: std.extVar('shaping2')*wc.us, - }, -]; - - -local params = base { - files: super.files { - fields: [ std.extVar('files_fields'), ], - chresp: null, - }, - - rc_resp: if std.extVar('file_rcresp') != "" then - { - // "icarus_fnal_rc_tail.json" - filename: std.extVar('file_rcresp'), - postgain: 1.0, - start: 0.0, - tick: 0.4*wc.us, - nticks: params.daq.nticks,// 4255, - type: "JsonElecResponse", - } - else super.rc_resp, - - elec: std.mapWithIndex(function (n, eparam) - super.elec[n] + { - gain: eparam.gain, - shaping: eparam.shaping, - }, er_params), - -}; - -// local tools_maker = import 'pgrapher/common/tools.jsonnet'; -// local tools = tools_maker(params); change this for GPU -local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; -local default_tools = tools_maker(params); -local tools = std.mergePatch(default_tools, - {dft: {type: "TorchDFT", data: {device: "gpu"}}}); - - - -local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; -local wcls = wcls_maker(params, tools); - -local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; - -//local chndbm = chndb_maker(params, tools); -//local chndb = if epoch == "dynamic" then chndbm.wcls_multi(name="") else chndbm.wct(epoch); - - -// Collect the WC/LS input converters for use below. Make sure the -// "name" argument matches what is used in the FHiCL that loads this -// file. In particular if there is no ":" in the inputer then name -// must be the emtpy string. -local wcls_input = { - adc_digits: g.pnode({ - type: 'wclsRawFrameSource', - name: 'rfsrc%d' %volume, // to use multiple wirecell instances in a fhicl job - data: { - art_tag: raw_input_label, - frame_tags: ['orig'], // this is a WCT designator - tick: params.daq.tick, - // nticks: params.daq.nticks, - }, - }, nin=0, nout=1), - -}; - -// Collect all the wc/ls output converters for use below. Note the -// "name" MUST match what is used in theh "outputers" parameter in the -// FHiCL that loads this file. - -local this_anode = tools.anodes[volume]; - -local wcls_output = { - // The noise filtered "ADC" values. These are truncated for - // art::Event but left as floats for the WCT SP. Note, the tag - // "raw" is somewhat historical as the output is not equivalent to - // "raw data". - nf_digits: g.pnode({ - type: 'wclsFrameSaver', - name: 'nfsaver', - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(this_anode), - digitize: true, // true means save as RawDigit, else recob::Wire - frame_tags: ['raw'], - // nticks: params.daq.nticks, - chanmaskmaps: ['bad'], - plane_map: { - "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) - "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) - "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) - }, - }, - }, nin=1, nout=1, uses=[this_anode]), - - - // The output of signal processing. Note, there are two signal - // sets each created with its own filter. The "gauss" one is best - // for charge reconstruction, the "wiener" is best for S/N - // separation. Both are used in downstream WC code. - sp_signals: g.pnode({ - type: 'wclsFrameSaver', - name: 'spsaver%d' %volume, // to use multiple wirecell instances in a fhicl job - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(this_anode), - digitize: false, // true means save as RawDigit, else recob::Wire - // frame_tags: ['gauss', 'wiener', 'looseLf','shrinkROI','extendROI'], - // frame_scale: [0.1, 0.1, 0.1], - // frame_tags: ['gauss','wiener','looseLf','shrinkROI','extendROI','mp3ROI','mp2ROI', 'cleanupROI'], - // frame_scale: [0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009], - - frame_tags: ['dnnsp'], - frame_scale: [std.extVar('gain_ADC_per_e')], - - // nticks: params.daq.nticks, - chanmaskmaps: ['bad'], - nticks: -1, - plane_map: { - "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) - "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) - "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) - }, - }, - }, nin=1, nout=1, uses=[this_anode]), - - h5io: g.pnode({ - type: 'HDF5FrameTap', - name: 'hio_sp%d' % volume, - data: { - anode: wc.tn(this_anode), - trace_tags: ['gauss' - , 'wiener' - , 'tightLf' - , 'looseLf' - , 'decon' - , 'cleanupROI' - , 'breakROI1' - , 'breakROI2' - , 'shrinkROI' - , 'extendROI' - , 'mp3ROI' - , 'mp2ROI' - , 'dnnsp' - ], - filename: "wc-sp-%d.h5" % volume, - chunk: [0, 0], // ncol, nrow - gzip: 0, - high_throughput: true, - }, - }, nin=1, nout=1, uses=[this_anode]), - -}; - -// local perfect = import 'chndb-perfect.jsonnet'; -local base = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; -local chndb = [{ - type: 'OmniChannelNoiseDB', - name: 'ocndbperfect%d' % n, - // data: perfect(params, tools.anodes[n], tools.field, n), - data: base(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, - uses: [tools.anodes[n], tools.field, tools.dft], // pnode extension -} for n in std.range(0, std.length(tools.anodes) - 1)]; - -local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; -local nf_pipes = [nf_maker(tools.anodes[n], chndb[n], tools, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; - -local sp_override = { // assume all tages sets in base sp.jsonnet - sparse: sigoutform == 'sparse', - use_roi_refinement: true, - use_roi_debug_mode: true, - save_negtive_charge: true, - wiener_tag: "", - // gauss_tag: "", - tight_lf_tag: "", - // loose_lf_tag: "", - break_roi_loop1_tag: "", - break_roi_loop2_tag: "", - shrink_roi_tag: "", - extend_roi_tag: "", - // decon_charge_tag: "", - cleanup_roi_tag: "", - // mp2_roi_tag: "", - // mp3_roi_tag: "", - use_multi_plane_protection: true, - mp_tick_resolution: 8, - process_planes: [0, 1, 2], - isWrapped: true, - nwires_separate_planes: [ - [1056, 1056], [5600], [5600] - ], - troi_col_th_factor: std.parseJson(std.extVar('col_threshold_factor'))*1.0, // multiply by 1 to make into float - troi_ind_th_factor: std.parseJson(std.extVar('ind_threshold_factor'))*1.0 -}; -local sp = sp_maker(params, tools, sp_override); -local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; - -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; -local chsel_pipes = [ - g.pnode({ - type: 'ChannelSelector', - name: 'chsel%d' % n, - data: { - channels: util.anode_channels_twofaced(n), - //tags: ['orig%d' % n], // traces tag - }, - }, nin=1, nout=1) - for n in std.range(0, std.length(tools.anodes) - 1) -]; - -local magoutput = 'icarus-data-check.root'; -local magnify = import 'pgrapher/experiment/icarus/magnify-sinks.jsonnet'; -local magnifyio = magnify(tools, magoutput); - -local dnnroi = import 'pgrapher/experiment/icarus/dnnroi.jsonnet'; -local ts_u = { - type: "TorchService", - name: "dnnroi_u", - data: { - model: "NNs/plane0.ts", - device: "gpu", - concurrency: 1, - }, -}; - -local ts_v = { - type: "TorchService", - name: "dnnroi_v", - data: { - model: "NNs/plane1.ts", - device: "gpu", - concurrency: 1, - }, -}; - -local nfsp_pipes = [ - g.pipeline([ - chsel_pipes[n], - // magnifyio.orig_pipe[n], - - nf_pipes[n], - // magnifyio.raw_pipe[n], - sp_pipes[n], - dnnroi(tools.anodes[n], ts_u, ts_v), - // magnifyio.decon_pipe[n], - // magnifyio.threshold_pipe[n], - // magnifyio.debug_pipe[n], // use_roi_debug_mode: true in sp.jsonnet - ], - 'nfsp_pipe_%d' % n) - for n in [volume] -]; - -local fanout_tag_rules = [ - { - frame: { - '.*': 'orig%d' % tools.anodes[n].data.ident, - }, - trace: { - // fake doing Nmult SP pipelines - //orig: ['wiener', 'gauss'], - //'.*': 'orig', - }, - } - for n in [volume] - ]; - -local fanin_tag_rules = [ - { - frame: { - //['number%d' % n]: ['output%d' % n, 'output'], - '.*': 'framefanin', - }, - trace: { - ['extend_roi%d'%ind]:'extend_roi%d'%ind, - ['shrink_roi%d'%ind]:'shrink_roi%d'%ind, - // ['break_roi_2nd%d'%ind]:'break_roi_2nd%d'%ind, - // ['break_roi_1st%d'%ind]:'break_roi_1st%d'%ind, - ['cleanup_roi%d'%ind]:'cleanup_roi%d'%ind, - ['mp2_roi%d'%ind]:'mp2_roi%d'%ind, - ['mp3_roi%d'%ind]:'mp3_roi%d'%ind, - ['gauss%d'%ind]:'gauss%d'%ind, - 'dnnsp\\d':'dnnsp%d'%ind, - ['wiener%d'%ind]:'wiener%d'%ind, - // ['threshold%d'%ind]:'threshold%d'%ind, - // ['tight_lf%d'%ind]:'tight_lf%d'%ind, - ['loose_lf%d'%ind]:'loose_lf%d'%ind, - // ['decon%d'%ind]:'decon%d'%ind, - }, - - } - for ind in [this_anode.data.ident] - ]; -local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp%d' % volume, [], fanout_tag_rules, fanin_tag_rules); - -local retagger = g.pnode({ - type: 'Retagger', - data: { - // Note: retagger keeps tag_rules an array to be like frame fanin/fanout. - tag_rules: [{ - // Retagger also handles "frame" and "trace" like fanin/fanout - // merge separately all traces like gaussXYZ to gauss. - frame: { - '.*': 'retagger', - }, - merge: { - 'dnnsp\\d': 'dnnsp', - 'gauss\\d': 'gauss', - 'wiener\\d': 'wiener', - // 'tight_lf\\d': 'tightLf', - 'loose_lf\\d': 'looseLf', - // 'decon\\d': 'decon', - 'cleanup_roi\\d': 'cleanupROI', - // 'break_roi_1st\\d': 'breakROI1', - // 'break_roi_2nd\\d': 'breakROI2', - 'shrink_roi\\d': 'shrinkROI', - 'extend_roi\\d': 'extendROI', - 'mp3_roi\\d': 'mp3ROI', - 'mp2_roi\\d': 'mp2ROI', - }, - }], - }, -}, nin=1, nout=1); - -local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); - -// local graph = g.pipeline([wcls_input.adc_digits, chsel_pipes[volume], sp_pipes[volume], dnnroi(this_anode, ts_u, ts_v, output_scale=1), retagger, wcls_output.h5io, wcls_output.sp_signals, sink]); -local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]); - -local app = { - type: 'Pgrapher', - data: { - edges: g.edges(graph), - }, -}; - -// Finally, the configuration sequence -g.uses(graph) + [app] From 8f6b363e5bda0735485195de12e5d6409ec9ae1b Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 20 May 2025 16:53:10 -0500 Subject: [PATCH 017/101] Update stage0_icarus_defs.fcl add stage0 plugins --- fcl/reco/Definitions/stage0_icarus_defs.fcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fcl/reco/Definitions/stage0_icarus_defs.fcl b/fcl/reco/Definitions/stage0_icarus_defs.fcl index 8fa8b5d67..11a73b8fb 100644 --- a/fcl/reco/Definitions/stage0_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_defs.fcl @@ -351,7 +351,7 @@ icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiEE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] @@ -361,7 +361,7 @@ icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiEW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] @@ -371,7 +371,7 @@ icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiWE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] @@ -381,7 +381,7 @@ icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] +icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] icarus_stage0_producers.decon2droiWW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] # Signal processing values From 36ad7849a9151e4293a43debcc305403fac78627 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 20 May 2025 16:56:57 -0500 Subject: [PATCH 018/101] Create wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet tools_maker + cpu->gpu --- ...-decode-to-sig-twofaced-dnnroi-gpu.jsonnet | 392 ++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet new file mode 100644 index 000000000..6759e8e48 --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet @@ -0,0 +1,392 @@ +// This is a main entry point to configure a WC/LS job that applies +// noise filtering and signal processing to existing RawDigits. The +// FHiCL is expected to provide the following parameters as attributes +// in the "params" structure. +// +// epoch: the hardware noise fix expoch: "before", "after", "dynamic" or "perfect" +// reality: whether we are running on "data" or "sim"ulation. +// raw_input_label: the art::Event inputTag for the input RawDigit +// +// see the .fcl of the same name for an example Version 2 +// +// Manual testing, eg: +// +// jsonnet -V reality=data -V epoch=dynamic -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet +// +// jsonnet -V reality=sim -V epoch=perfect -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet + + +local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect" +local reality = std.extVar('reality'); +local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense" + +local wc = import 'wirecell.jsonnet'; +local g = import 'pgraph.jsonnet'; + +local raw_input_label = std.extVar('raw_input_label'); // eg "daq" +local volume_label = std.extVar('tpc_volume_label'); // eg "",0,1,2,3 +local volume = if volume_label == '' then -1 else std.parseInt(volume_label); + +// local data_params = import 'params.jsonnet'; +// local simu_params = import 'simparams.jsonnet'; +// local params_init = if reality == 'data' then data_params else simu_params; +local params_twofaced = import 'pgrapher/experiment/icarus/params_twofaced.jsonnet'; + +# Load the sim-params, overwrite the volume config for the two-faced version +local base_params = import 'pgrapher/experiment/icarus/simparams.jsonnet'; +local base = base_params + params_twofaced; + +// load the electronics response parameters +local er_params = [ + { + gain: std.extVar('gain0')*wc.mV/wc.fC, + shaping: std.extVar('shaping0')*wc.us, + }, + + { + gain: std.extVar('gain1')*wc.mV/wc.fC, + shaping: std.extVar('shaping1')*wc.us, + }, + + { + gain: std.extVar('gain2')*wc.mV/wc.fC, + shaping: std.extVar('shaping2')*wc.us, + }, +]; + + +local params = base { + files: super.files { + fields: [ std.extVar('files_fields'), ], + chresp: null, + }, + + rc_resp: if std.extVar('file_rcresp') != "" then + { + // "icarus_fnal_rc_tail.json" + filename: std.extVar('file_rcresp'), + postgain: 1.0, + start: 0.0, + tick: 0.4*wc.us, + nticks: params.daq.nticks,// 4255, + type: "JsonElecResponse", + } + else super.rc_resp, + + elec: std.mapWithIndex(function (n, eparam) + super.elec[n] + { + gain: eparam.gain, + shaping: eparam.shaping, + }, er_params), + +}; + +// local tools_maker = import 'pgrapher/common/tools.jsonnet'; +local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; +// local tools = tools_maker(params); +local default_tools = tools_maker(params); +local tools = std.mergePatch(default_tools, + {dft: {type: "TorchDFT", data: {device: "gpu"}}}); + +local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; +local wcls = wcls_maker(params, tools); + +local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; + +//local chndbm = chndb_maker(params, tools); +//local chndb = if epoch == "dynamic" then chndbm.wcls_multi(name="") else chndbm.wct(epoch); + + +// Collect the WC/LS input converters for use below. Make sure the +// "name" argument matches what is used in the FHiCL that loads this +// file. In particular if there is no ":" in the inputer then name +// must be the emtpy string. +local wcls_input = { + adc_digits: g.pnode({ + type: 'wclsRawFrameSource', + name: 'rfsrc%d' %volume, // to use multiple wirecell instances in a fhicl job + data: { + art_tag: raw_input_label, + frame_tags: ['orig'], // this is a WCT designator + tick: params.daq.tick, + // nticks: params.daq.nticks, + }, + }, nin=0, nout=1), + +}; + +// Collect all the wc/ls output converters for use below. Note the +// "name" MUST match what is used in theh "outputers" parameter in the +// FHiCL that loads this file. + +local this_anode = tools.anodes[volume]; + +local wcls_output = { + // The noise filtered "ADC" values. These are truncated for + // art::Event but left as floats for the WCT SP. Note, the tag + // "raw" is somewhat historical as the output is not equivalent to + // "raw data". + nf_digits: g.pnode({ + type: 'wclsFrameSaver', + name: 'nfsaver', + data: { + // anode: wc.tn(tools.anode), + anode: wc.tn(this_anode), + digitize: true, // true means save as RawDigit, else recob::Wire + frame_tags: ['raw'], + // nticks: params.daq.nticks, + chanmaskmaps: ['bad'], + plane_map: { + "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) + "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) + "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) + }, + }, + }, nin=1, nout=1, uses=[this_anode]), + + + // The output of signal processing. Note, there are two signal + // sets each created with its own filter. The "gauss" one is best + // for charge reconstruction, the "wiener" is best for S/N + // separation. Both are used in downstream WC code. + sp_signals: g.pnode({ + type: 'wclsFrameSaver', + name: 'spsaver%d' %volume, // to use multiple wirecell instances in a fhicl job + data: { + // anode: wc.tn(tools.anode), + anode: wc.tn(this_anode), + digitize: false, // true means save as RawDigit, else recob::Wire + // frame_tags: ['gauss', 'wiener', 'looseLf','shrinkROI','extendROI'], + // frame_scale: [0.1, 0.1, 0.1], + // frame_tags: ['gauss','wiener','looseLf','shrinkROI','extendROI','mp3ROI','mp2ROI', 'cleanupROI'], + // frame_scale: [0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009], + + frame_tags: ['dnnsp'], + frame_scale: [std.extVar('gain_ADC_per_e')], + + // nticks: params.daq.nticks, + chanmaskmaps: ['bad'], + nticks: -1, + plane_map: { + "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) + "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) + "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) + }, + }, + }, nin=1, nout=1, uses=[this_anode]), + + h5io: g.pnode({ + type: 'HDF5FrameTap', + name: 'hio_sp%d' % volume, + data: { + anode: wc.tn(this_anode), + trace_tags: ['gauss' + , 'wiener' + , 'tightLf' + , 'looseLf' + , 'decon' + , 'cleanupROI' + , 'breakROI1' + , 'breakROI2' + , 'shrinkROI' + , 'extendROI' + , 'mp3ROI' + , 'mp2ROI' + , 'dnnsp' + ], + filename: "wc-sp-%d.h5" % volume, + chunk: [0, 0], // ncol, nrow + gzip: 0, + high_throughput: true, + }, + }, nin=1, nout=1, uses=[this_anode]), + +}; + +// local perfect = import 'chndb-perfect.jsonnet'; +local base = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; +local chndb = [{ + type: 'OmniChannelNoiseDB', + name: 'ocndbperfect%d' % n, + // data: perfect(params, tools.anodes[n], tools.field, n), + data: base(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, + uses: [tools.anodes[n], tools.field, tools.dft], // pnode extension +} for n in std.range(0, std.length(tools.anodes) - 1)]; + +local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; +local nf_pipes = [nf_maker(tools.anodes[n], chndb[n], tools, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; + +local sp_override = { // assume all tages sets in base sp.jsonnet + sparse: sigoutform == 'sparse', + use_roi_refinement: true, + use_roi_debug_mode: true, + save_negtive_charge: true, + wiener_tag: "", + // gauss_tag: "", + tight_lf_tag: "", + // loose_lf_tag: "", + break_roi_loop1_tag: "", + break_roi_loop2_tag: "", + shrink_roi_tag: "", + extend_roi_tag: "", + // decon_charge_tag: "", + cleanup_roi_tag: "", + // mp2_roi_tag: "", + // mp3_roi_tag: "", + use_multi_plane_protection: true, + mp_tick_resolution: 8, + process_planes: [0, 1, 2], + isWrapped: true, + nwires_separate_planes: [ + [1056, 1056], [5600], [5600] + ], + troi_col_th_factor: std.parseJson(std.extVar('col_threshold_factor'))*1.0, // multiply by 1 to make into float + troi_ind_th_factor: std.parseJson(std.extVar('ind_threshold_factor'))*1.0 +}; +local sp = sp_maker(params, tools, sp_override); +local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; + +local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; +local chsel_pipes = [ + g.pnode({ + type: 'ChannelSelector', + name: 'chsel%d' % n, + data: { + channels: util.anode_channels_twofaced(n), + //tags: ['orig%d' % n], // traces tag + }, + }, nin=1, nout=1) + for n in std.range(0, std.length(tools.anodes) - 1) +]; + +local magoutput = 'icarus-data-check.root'; +local magnify = import 'pgrapher/experiment/icarus/magnify-sinks.jsonnet'; +local magnifyio = magnify(tools, magoutput); + +local dnnroi = import 'pgrapher/experiment/icarus/dnnroi.jsonnet'; +local ts_u = { + type: "TorchService", + name: "dnnroi_u", + data: { + model: "NNs/plane0.ts", + device: "gpu", + concurrency: 1, + }, +}; + +local ts_v = { + type: "TorchService", + name: "dnnroi_v", + data: { + model: "NNs/plane1.ts", + device: "gpu", + concurrency: 1, + }, +}; + +local nfsp_pipes = [ + g.pipeline([ + chsel_pipes[n], + // magnifyio.orig_pipe[n], + + nf_pipes[n], + // magnifyio.raw_pipe[n], + sp_pipes[n], + dnnroi(tools.anodes[n], ts_u, ts_v), + // magnifyio.decon_pipe[n], + // magnifyio.threshold_pipe[n], + // magnifyio.debug_pipe[n], // use_roi_debug_mode: true in sp.jsonnet + ], + 'nfsp_pipe_%d' % n) + for n in [volume] +]; + +local fanout_tag_rules = [ + { + frame: { + '.*': 'orig%d' % tools.anodes[n].data.ident, + }, + trace: { + // fake doing Nmult SP pipelines + //orig: ['wiener', 'gauss'], + //'.*': 'orig', + }, + } + for n in [volume] + ]; + +local fanin_tag_rules = [ + { + frame: { + //['number%d' % n]: ['output%d' % n, 'output'], + '.*': 'framefanin', + }, + trace: { + ['extend_roi%d'%ind]:'extend_roi%d'%ind, + ['shrink_roi%d'%ind]:'shrink_roi%d'%ind, + // ['break_roi_2nd%d'%ind]:'break_roi_2nd%d'%ind, + // ['break_roi_1st%d'%ind]:'break_roi_1st%d'%ind, + ['cleanup_roi%d'%ind]:'cleanup_roi%d'%ind, + ['mp2_roi%d'%ind]:'mp2_roi%d'%ind, + ['mp3_roi%d'%ind]:'mp3_roi%d'%ind, + ['gauss%d'%ind]:'gauss%d'%ind, + 'dnnsp\\d':'dnnsp%d'%ind, + ['wiener%d'%ind]:'wiener%d'%ind, + // ['threshold%d'%ind]:'threshold%d'%ind, + // ['tight_lf%d'%ind]:'tight_lf%d'%ind, + ['loose_lf%d'%ind]:'loose_lf%d'%ind, + // ['decon%d'%ind]:'decon%d'%ind, + }, + + } + for ind in [this_anode.data.ident] + ]; +local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp%d' % volume, [], fanout_tag_rules, fanin_tag_rules); + +local retagger = g.pnode({ + type: 'Retagger', + data: { + // Note: retagger keeps tag_rules an array to be like frame fanin/fanout. + tag_rules: [{ + // Retagger also handles "frame" and "trace" like fanin/fanout + // merge separately all traces like gaussXYZ to gauss. + frame: { + '.*': 'retagger', + }, + merge: { + 'dnnsp\\d': 'dnnsp', + 'gauss\\d': 'gauss', + 'wiener\\d': 'wiener', + // 'tight_lf\\d': 'tightLf', + 'loose_lf\\d': 'looseLf', + // 'decon\\d': 'decon', + 'cleanup_roi\\d': 'cleanupROI', + // 'break_roi_1st\\d': 'breakROI1', + // 'break_roi_2nd\\d': 'breakROI2', + 'shrink_roi\\d': 'shrinkROI', + 'extend_roi\\d': 'extendROI', + 'mp3_roi\\d': 'mp3ROI', + 'mp2_roi\\d': 'mp2ROI', + }, + }], + }, +}, nin=1, nout=1); + +local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); + +// local graph = g.pipeline([wcls_input.adc_digits, chsel_pipes[volume], sp_pipes[volume], dnnroi(this_anode, ts_u, ts_v, output_scale=1), retagger, wcls_output.h5io, wcls_output.sp_signals, sink]); +local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]); + +local app = { + type: 'Pgrapher', + data: { + edges: g.edges(graph), + }, +}; + +// Finally, the configuration sequence +g.uses(graph) + [app] From 850a023b2b6ea737a5074bb1ec670af82be6b5db Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 21 May 2025 12:48:15 -0500 Subject: [PATCH 019/101] Add partial fcls back into icaruscode --- fcl/reco/Stage0/data/CMakeLists.txt | 2 + fcl/reco/Stage0/data/partial/CMakeLists.txt | 1 + .../Stage0/data/partial/decodePMT_icarus.fcl | 145 ++++++++++++++++++ .../partial/decodePMT_icarus_incomplete.fcl | 15 ++ .../partial/decodePMT_icarus_standalone.fcl | 69 +++++++++ .../partial/decodePMT_icarus_treeonly.fcl | 68 ++++++++ .../data/partial/decodeTrigger_icarus.fcl | 56 +++++++ .../partial/stage0_run2_icarus_opdetonly.fcl | 19 +++ 8 files changed, 375 insertions(+) create mode 100644 fcl/reco/Stage0/data/partial/CMakeLists.txt create mode 100644 fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl create mode 100644 fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl create mode 100644 fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl create mode 100644 fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl create mode 100644 fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl create mode 100644 fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl diff --git a/fcl/reco/Stage0/data/CMakeLists.txt b/fcl/reco/Stage0/data/CMakeLists.txt index 2bda0f610..9b8e98380 100644 --- a/fcl/reco/Stage0/data/CMakeLists.txt +++ b/fcl/reco/Stage0/data/CMakeLists.txt @@ -1,3 +1,5 @@ +add_subdirectory(partial) + cet_enable_asserts() install_fhicl() diff --git a/fcl/reco/Stage0/data/partial/CMakeLists.txt b/fcl/reco/Stage0/data/partial/CMakeLists.txt new file mode 100644 index 000000000..13355789a --- /dev/null +++ b/fcl/reco/Stage0/data/partial/CMakeLists.txt @@ -0,0 +1 @@ +install_fhicl() diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl new file mode 100644 index 000000000..d22be3e79 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl @@ -0,0 +1,145 @@ +# +# File: decodePMT_icarus.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: May 12, 2021 +# +# +# PMT waveform decoding is performed, extensive debugging messages are +# included in the `debug.log` log file, and ROOT trees are produced for studies. +# This configuration, as is, is not meant for production. +# +# +# Input +# ------ +# +# * artDAQ fragments from all 24 PMT readout boards, named +# `daq:ContainerCAENV1730` +# * trigger fragment `daq:ICARUSTriggerUDP` (will be decoded as well) +# * DAQ configuration as FHiCL in the art/ROOT input file +# +# This configuration requires a data fragment for each PMT readout board +# which is mentioned in `physics.producers.daqPMT.DecoderTool.BoardSetup`, +# which by default is all 24. If the input run misses some PMT readout boards, +# use `decodePMT_icarus_incomplete.fcl` instead. +# +# +# Output +# ------- +# +# Only new data products are written in the art/ROOT output file, including: +# +# * `daqPMT` (std::vector): decoded waveforms, +# with our best reconstruction for their time stamps in LArSoft reference +# +# +# The `Trees-*.root` file (from `TFileService`) includes ROOT tree +# `PMTfragments`. +# +# +# +# Service configuration +# ---------------------- +# +# * `DetectorClocksService` is essential to assign a correct waveform timestamp +# * `Geometry` service bundle is required by `DetectorClocksService` +# * `IICARUSChannelMap` to relate PMT fragment IDs to channels +# * `TFileService` used to write trees (not needed if all trees are disabled) +# +# + + +# ------------------------------------------------------------------------------ +#include "services_common_icarus.fcl" +#include "channelmapping_icarus.fcl" +#include "timing_icarus.fcl" + +#include "rootoutput_icarus.fcl" +#include "decoderdefs_icarus.fcl" + +# ------------------------------------------------------------------------------ +process_name: DecodePMT + + +# ------------------------------------------------------------------------------ +services: { + + @table::icarus_art_services + message: @local::icarus_message_services_interactive_debug + + @table::icarus_geometry_services + DetectorClocksService: @local::icarus_detectorclocks + IICARUSChannelMap: @local::icarus_channelmappinggservice + IPMTTimingCorrectionService: @local::icarus_pmttimingservice + + TFileService: { fileName: "Trees-%ifb_%tc-%p.root" } +} + + +# ------------------------------------------------------------------------------ +physics: { + + producers: { + + triggerconfig: @local::extractTriggerConfig + pmtconfig: @local::extractPMTconfig + + daqTrigger: @local::decodeTriggerAutodetect + + daqPMT: @local::decodePMT + + } + + decoding: [ triggerconfig, pmtconfig, daqTrigger, daqPMT ] + streams: [ rootoutput ] +} + + +# ------------------------------------------------------------------------------ +outputs: { + rootoutput: { + @table::icarus_rootoutput + dataTier: "decoded" + fileProperties: { maxInputFiles: 1 } + checkFileName: false + compressionLevel: 501 + + outputCommands: [ "drop *_*_*_*", "keep *_*_*_DecodePMT" ] + } # rootoutput +} # outputs + + +# ------------------------------------------------------------------------------ + +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqPMT.PMTconfigTag: pmtconfig # required +physics.producers.daqPMT.TriggerTag: daqTrigger # required + +# services.Geometry.Name: icarus_splitwires # for runs < 548x + +# +# customization of PMT decoding +# + +physics.producers.daqPMT.SurviveExceptions: false +physics.producers.daqPMT.DiagnosticOutput: true +physics.producers.daqPMT.PacketDump: false +physics.producers.daqPMT.RequireKnownBoards: true +physics.producers.daqPMT.RequireBoardConfig: true +physics.producers.daqPMT.DataTrees: [ "PMTfragments" ] + +# +# customization of trigger decoding +# + +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.Debug: false +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.Debug: false +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.Debug: false + + +# ------------------------------------------------------------------------------ diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl new file mode 100644 index 000000000..038a09480 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl @@ -0,0 +1,15 @@ +# +# File: decodePMT_icarus_incomplete.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: May 12, 2021 +# +# This is a version of `decodePMT_icarus.fcl` which will ignore missing PMT +# readout fragments. +# +# See the documentation on `decodePMT_icarus.fcl` for everything else. +# + +#include "decodePMT_icarus.fcl" + +physics.producers.daqPMT.RequireBoardConfig: false diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl new file mode 100644 index 000000000..fa70378a8 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl @@ -0,0 +1,69 @@ +# +# File: decodePMT_icarus_standalone.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: June 10, 2021 +# +# This configuration expects only PMT fragments, and not even all of them: +# as a consequence many timestamp corrections will be skipped. +# PMT waveform decoding is performed, extensive debugging messages are +# included in the `debug.log` log file, and ROOT trees are produced for studies. +# This configuration, as is, is not meant for production. +# +# +# Input +# ------ +# +# * artDAQ fragments from PMT readout boards, named +# `daq:ContainerCAENV1730` or `daq:CAENV1730` (not both!) +# +# +# Output +# ------- +# +# Only new data products are written in the art/ROOT output file, including: +# +# * `daqPMT` (std::vector): decoded waveforms, +# with our best reconstruction for their time stamps in LArSoft reference +# +# +# The `Trees-*.root` file (from `TFileService`) includes ROOT tree +# `PMTfragments`. +# +# +# +# Service configuration +# ---------------------- +# +# * `DetectorClocksService` is essential to assign a correct waveform timestamp +# * `Geometry` service bundle is required by `DetectorClocksService` +# * `IICARUSChannelMap` to relate PMT fragment IDs to channels +# * `TFileService` used to write trees (not needed if all trees are disabled) +# +# + + +# ------------------------------------------------------------------------------ +#include "decodePMT_icarus.fcl" + + +# ------------------------------------------------------------------------------ +physics.decoding: [ daqPMT ] + + +# ------------------------------------------------------------------------------ + +physics.producers.daqPMT.PMTconfigTag: @erase # required +physics.producers.daqPMT.TriggerTag: @erase # required + +# +# customization of PMT decoding +# + +physics.producers.daqPMT.SurviveExceptions: false +physics.producers.daqPMT.DiagnosticOutput: true +physics.producers.daqPMT.PacketDump: true +physics.producers.daqPMT.RequireKnownBoards: false +physics.producers.daqPMT.RequireBoardConfig: false + +# ------------------------------------------------------------------------------ diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl new file mode 100644 index 000000000..5e34eefad --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl @@ -0,0 +1,68 @@ +# +# File: decodePMT_icarus_treeonly.fcl +# Purpose: Runs PMT decoding to build a PMT diagnostic tree. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: September 25, 2022 +# +# It does not save any waveform. +# +# Input +# ------ +# +# * artDAQ fragments from all 24 PMT readout boards, named +# `daq:ContainerCAENV1730` (or any standard ICARUS name) +# * trigger fragment (autodetected among ICARUS standard names) +# * DAQ configuration as FHiCL in the art/ROOT input file +# +# This configuration requires a data fragment for each PMT readout board +# which is mentioned in `physics.producers.daqPMT.DecoderTool.BoardSetup`, +# which by default is all 24. +# +# +# Output +# ------- +# +# In the plain ROOT output file (names `Tree-....root`) a diagnostic tree +# is stored with one entry per PMT data fragment (see `decodePMT_icarus.fcl` +# and the decoder module `DaqDecodeICARUSPMT`), as `daqPMT/PMTfragments`. +# +# All standard trigger and PMT decoding data products are produced with the +# standard names (`daqTrigger` and `daqPMT` respectively). +# The noticeable exception is PMT raw waveforms not the corrections: +# neither are saved. +# +# The log file also dump the trigger information. +# +# + + +# ------------------------------------------------------------------------------ +#include "decodePMT_icarus.fcl" + +# add a trigger dumper to the output on console +physics.analyzers.dumptrigger: { + module_type: DumpTrigger + TriggerTag: "daqTrigger" +} + +physics.dumpers: [ dumptrigger ] +physics.end_paths: [ streams, dumpers ] + +outputs.rootoutput.fileProperties: @erase # don't go one output file per input file +outputs.rootoutput.outputCommands: [ + @sequence::outputs.rootoutput.outputCommands + , "drop raw::OpDetWaveforms_daqPMT_*_DecodePMT" +] + +# disable abundant output on console and the optical waveforms +physics.producers.daqPMT.SaveCorrectionsFrom: [] +physics.producers.daqPMT.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: false + +services.message.destinations.LogDebugFile: @erase +services.message.destinations.LogSeeds: @erase +services.TimeTracker: {} # no DB file +services.MemoryTracker: @erase + diff --git a/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl b/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl new file mode 100644 index 000000000..d041c0023 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl @@ -0,0 +1,56 @@ +#include "services_common_icarus.fcl" +#include "channelmapping_icarus.fcl" +#include "rootoutput_icarus.fcl" +#include "decoderdefs_icarus.fcl" + +process_name: DecodeTrg + +services: { + + @table::icarus_art_services + message: @local::icarus_message_services_interactive_debug + + @table::icarus_geometry_services + DetectorClocksService: @local::icarus_detectorclocks + IICARUSChannelMap: @local::icarus_channelmappinggservice # from channelmapping_icarus.fcl +} + + +physics: { + + producers: { + +// pmtconfig: @local::extractPMTconfig + triggerconfig: @local::extractTriggerConfig + + daqTrigger: @local::decodeTriggerAutodetect + +// daqPMT: @local::decodePMT + + } + +// decoding: [ PMTconfig, triggerconfig, daqTrigger, daqPMT ] + decoding: [ triggerconfig, daqTrigger ] + streams: [ rootoutput ] +} + +outputs: { + rootoutput: { + @table::icarus_rootoutput + dataTier: "decoded" + fileProperties: { maxInputFiles: 1 } + checkFileName: false + compressionLevel: 501 + + outputCommands: [ "drop *_*_*_*", "keep *_*_*_DecodeTrg" ] + } # rootoutput +} # outputs + + +physics.producers.daqTrigger.DecoderTool.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.Debug: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.Debug: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.Debug: true diff --git a/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl b/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl new file mode 100644 index 000000000..a7abf2d87 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl @@ -0,0 +1,19 @@ +# +# File: stage0_run2_icarus_opdetonly.fcl +# Purpose: Runs the optical detector and trigger reconstruction parts of Stage0 +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: August 29, 2023 +# +# Written for icaruscode v09_72_00_05p1. +# + +#include "stage0_run2_icarus.fcl" + +source.maxEvents: @erase + +physics.path: [ @sequence::icarus_stage0_PMT ] + +physics.end_paths: [ streamROOT ] + +# be unstoppable +physics.producers.daqPMT.SurviveExceptions: true From cc9bd56ed51923290949fca5f341bb4b2d5ac62d Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 21 May 2025 23:06:52 -0500 Subject: [PATCH 020/101] Updating version for CMake and ups dependencies --- CMakeLists.txt | 5 ++++- ups/product_deps | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a30b5733e..cc71739b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) +#project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) + +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p01) +project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 80164911f..442b50987 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v09_93_05 - +icarus_data v09_93_06 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_01 - icarusutil v09_88_00_02 - From 6c36b9cbe811281d9ea1cf8c97f1832ef2fabe4a Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Sun, 25 May 2025 15:48:54 -0500 Subject: [PATCH 021/101] Delete icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet --- ...-decode-to-sig-twofaced-dnnroi-gpu.jsonnet | 392 ------------------ 1 file changed, 392 deletions(-) delete mode 100644 icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet deleted file mode 100644 index 6759e8e48..000000000 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi-gpu.jsonnet +++ /dev/null @@ -1,392 +0,0 @@ -// This is a main entry point to configure a WC/LS job that applies -// noise filtering and signal processing to existing RawDigits. The -// FHiCL is expected to provide the following parameters as attributes -// in the "params" structure. -// -// epoch: the hardware noise fix expoch: "before", "after", "dynamic" or "perfect" -// reality: whether we are running on "data" or "sim"ulation. -// raw_input_label: the art::Event inputTag for the input RawDigit -// -// see the .fcl of the same name for an example Version 2 -// -// Manual testing, eg: -// -// jsonnet -V reality=data -V epoch=dynamic -V raw_input_label=daq \\ -// -V signal_output_form=sparse \\ -// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet -// -// jsonnet -V reality=sim -V epoch=perfect -V raw_input_label=daq \\ -// -V signal_output_form=sparse \\ -// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet - - -local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect" -local reality = std.extVar('reality'); -local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense" - -local wc = import 'wirecell.jsonnet'; -local g = import 'pgraph.jsonnet'; - -local raw_input_label = std.extVar('raw_input_label'); // eg "daq" -local volume_label = std.extVar('tpc_volume_label'); // eg "",0,1,2,3 -local volume = if volume_label == '' then -1 else std.parseInt(volume_label); - -// local data_params = import 'params.jsonnet'; -// local simu_params = import 'simparams.jsonnet'; -// local params_init = if reality == 'data' then data_params else simu_params; -local params_twofaced = import 'pgrapher/experiment/icarus/params_twofaced.jsonnet'; - -# Load the sim-params, overwrite the volume config for the two-faced version -local base_params = import 'pgrapher/experiment/icarus/simparams.jsonnet'; -local base = base_params + params_twofaced; - -// load the electronics response parameters -local er_params = [ - { - gain: std.extVar('gain0')*wc.mV/wc.fC, - shaping: std.extVar('shaping0')*wc.us, - }, - - { - gain: std.extVar('gain1')*wc.mV/wc.fC, - shaping: std.extVar('shaping1')*wc.us, - }, - - { - gain: std.extVar('gain2')*wc.mV/wc.fC, - shaping: std.extVar('shaping2')*wc.us, - }, -]; - - -local params = base { - files: super.files { - fields: [ std.extVar('files_fields'), ], - chresp: null, - }, - - rc_resp: if std.extVar('file_rcresp') != "" then - { - // "icarus_fnal_rc_tail.json" - filename: std.extVar('file_rcresp'), - postgain: 1.0, - start: 0.0, - tick: 0.4*wc.us, - nticks: params.daq.nticks,// 4255, - type: "JsonElecResponse", - } - else super.rc_resp, - - elec: std.mapWithIndex(function (n, eparam) - super.elec[n] + { - gain: eparam.gain, - shaping: eparam.shaping, - }, er_params), - -}; - -// local tools_maker = import 'pgrapher/common/tools.jsonnet'; -local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; -// local tools = tools_maker(params); -local default_tools = tools_maker(params); -local tools = std.mergePatch(default_tools, - {dft: {type: "TorchDFT", data: {device: "gpu"}}}); - -local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; -local wcls = wcls_maker(params, tools); - -local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; - -//local chndbm = chndb_maker(params, tools); -//local chndb = if epoch == "dynamic" then chndbm.wcls_multi(name="") else chndbm.wct(epoch); - - -// Collect the WC/LS input converters for use below. Make sure the -// "name" argument matches what is used in the FHiCL that loads this -// file. In particular if there is no ":" in the inputer then name -// must be the emtpy string. -local wcls_input = { - adc_digits: g.pnode({ - type: 'wclsRawFrameSource', - name: 'rfsrc%d' %volume, // to use multiple wirecell instances in a fhicl job - data: { - art_tag: raw_input_label, - frame_tags: ['orig'], // this is a WCT designator - tick: params.daq.tick, - // nticks: params.daq.nticks, - }, - }, nin=0, nout=1), - -}; - -// Collect all the wc/ls output converters for use below. Note the -// "name" MUST match what is used in theh "outputers" parameter in the -// FHiCL that loads this file. - -local this_anode = tools.anodes[volume]; - -local wcls_output = { - // The noise filtered "ADC" values. These are truncated for - // art::Event but left as floats for the WCT SP. Note, the tag - // "raw" is somewhat historical as the output is not equivalent to - // "raw data". - nf_digits: g.pnode({ - type: 'wclsFrameSaver', - name: 'nfsaver', - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(this_anode), - digitize: true, // true means save as RawDigit, else recob::Wire - frame_tags: ['raw'], - // nticks: params.daq.nticks, - chanmaskmaps: ['bad'], - plane_map: { - "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) - "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) - "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) - }, - }, - }, nin=1, nout=1, uses=[this_anode]), - - - // The output of signal processing. Note, there are two signal - // sets each created with its own filter. The "gauss" one is best - // for charge reconstruction, the "wiener" is best for S/N - // separation. Both are used in downstream WC code. - sp_signals: g.pnode({ - type: 'wclsFrameSaver', - name: 'spsaver%d' %volume, // to use multiple wirecell instances in a fhicl job - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(this_anode), - digitize: false, // true means save as RawDigit, else recob::Wire - // frame_tags: ['gauss', 'wiener', 'looseLf','shrinkROI','extendROI'], - // frame_scale: [0.1, 0.1, 0.1], - // frame_tags: ['gauss','wiener','looseLf','shrinkROI','extendROI','mp3ROI','mp2ROI', 'cleanupROI'], - // frame_scale: [0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009], - - frame_tags: ['dnnsp'], - frame_scale: [std.extVar('gain_ADC_per_e')], - - // nticks: params.daq.nticks, - chanmaskmaps: ['bad'], - nticks: -1, - plane_map: { - "1": 3, // front induction: WireCell::kULayer -> geo::kH (1 -> 3) - "2": 1, // middle induction: WireCell:kVLayer -> geo::kV (2 -> 1) - "4": 0, // collection: WireCell::kWLayer -> geo::kU (4 -> 0) - }, - }, - }, nin=1, nout=1, uses=[this_anode]), - - h5io: g.pnode({ - type: 'HDF5FrameTap', - name: 'hio_sp%d' % volume, - data: { - anode: wc.tn(this_anode), - trace_tags: ['gauss' - , 'wiener' - , 'tightLf' - , 'looseLf' - , 'decon' - , 'cleanupROI' - , 'breakROI1' - , 'breakROI2' - , 'shrinkROI' - , 'extendROI' - , 'mp3ROI' - , 'mp2ROI' - , 'dnnsp' - ], - filename: "wc-sp-%d.h5" % volume, - chunk: [0, 0], // ncol, nrow - gzip: 0, - high_throughput: true, - }, - }, nin=1, nout=1, uses=[this_anode]), - -}; - -// local perfect = import 'chndb-perfect.jsonnet'; -local base = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; -local chndb = [{ - type: 'OmniChannelNoiseDB', - name: 'ocndbperfect%d' % n, - // data: perfect(params, tools.anodes[n], tools.field, n), - data: base(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, - uses: [tools.anodes[n], tools.field, tools.dft], // pnode extension -} for n in std.range(0, std.length(tools.anodes) - 1)]; - -local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; -local nf_pipes = [nf_maker(tools.anodes[n], chndb[n], tools, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; - -local sp_override = { // assume all tages sets in base sp.jsonnet - sparse: sigoutform == 'sparse', - use_roi_refinement: true, - use_roi_debug_mode: true, - save_negtive_charge: true, - wiener_tag: "", - // gauss_tag: "", - tight_lf_tag: "", - // loose_lf_tag: "", - break_roi_loop1_tag: "", - break_roi_loop2_tag: "", - shrink_roi_tag: "", - extend_roi_tag: "", - // decon_charge_tag: "", - cleanup_roi_tag: "", - // mp2_roi_tag: "", - // mp3_roi_tag: "", - use_multi_plane_protection: true, - mp_tick_resolution: 8, - process_planes: [0, 1, 2], - isWrapped: true, - nwires_separate_planes: [ - [1056, 1056], [5600], [5600] - ], - troi_col_th_factor: std.parseJson(std.extVar('col_threshold_factor'))*1.0, // multiply by 1 to make into float - troi_ind_th_factor: std.parseJson(std.extVar('ind_threshold_factor'))*1.0 -}; -local sp = sp_maker(params, tools, sp_override); -local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; - -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; -local chsel_pipes = [ - g.pnode({ - type: 'ChannelSelector', - name: 'chsel%d' % n, - data: { - channels: util.anode_channels_twofaced(n), - //tags: ['orig%d' % n], // traces tag - }, - }, nin=1, nout=1) - for n in std.range(0, std.length(tools.anodes) - 1) -]; - -local magoutput = 'icarus-data-check.root'; -local magnify = import 'pgrapher/experiment/icarus/magnify-sinks.jsonnet'; -local magnifyio = magnify(tools, magoutput); - -local dnnroi = import 'pgrapher/experiment/icarus/dnnroi.jsonnet'; -local ts_u = { - type: "TorchService", - name: "dnnroi_u", - data: { - model: "NNs/plane0.ts", - device: "gpu", - concurrency: 1, - }, -}; - -local ts_v = { - type: "TorchService", - name: "dnnroi_v", - data: { - model: "NNs/plane1.ts", - device: "gpu", - concurrency: 1, - }, -}; - -local nfsp_pipes = [ - g.pipeline([ - chsel_pipes[n], - // magnifyio.orig_pipe[n], - - nf_pipes[n], - // magnifyio.raw_pipe[n], - sp_pipes[n], - dnnroi(tools.anodes[n], ts_u, ts_v), - // magnifyio.decon_pipe[n], - // magnifyio.threshold_pipe[n], - // magnifyio.debug_pipe[n], // use_roi_debug_mode: true in sp.jsonnet - ], - 'nfsp_pipe_%d' % n) - for n in [volume] -]; - -local fanout_tag_rules = [ - { - frame: { - '.*': 'orig%d' % tools.anodes[n].data.ident, - }, - trace: { - // fake doing Nmult SP pipelines - //orig: ['wiener', 'gauss'], - //'.*': 'orig', - }, - } - for n in [volume] - ]; - -local fanin_tag_rules = [ - { - frame: { - //['number%d' % n]: ['output%d' % n, 'output'], - '.*': 'framefanin', - }, - trace: { - ['extend_roi%d'%ind]:'extend_roi%d'%ind, - ['shrink_roi%d'%ind]:'shrink_roi%d'%ind, - // ['break_roi_2nd%d'%ind]:'break_roi_2nd%d'%ind, - // ['break_roi_1st%d'%ind]:'break_roi_1st%d'%ind, - ['cleanup_roi%d'%ind]:'cleanup_roi%d'%ind, - ['mp2_roi%d'%ind]:'mp2_roi%d'%ind, - ['mp3_roi%d'%ind]:'mp3_roi%d'%ind, - ['gauss%d'%ind]:'gauss%d'%ind, - 'dnnsp\\d':'dnnsp%d'%ind, - ['wiener%d'%ind]:'wiener%d'%ind, - // ['threshold%d'%ind]:'threshold%d'%ind, - // ['tight_lf%d'%ind]:'tight_lf%d'%ind, - ['loose_lf%d'%ind]:'loose_lf%d'%ind, - // ['decon%d'%ind]:'decon%d'%ind, - }, - - } - for ind in [this_anode.data.ident] - ]; -local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp%d' % volume, [], fanout_tag_rules, fanin_tag_rules); - -local retagger = g.pnode({ - type: 'Retagger', - data: { - // Note: retagger keeps tag_rules an array to be like frame fanin/fanout. - tag_rules: [{ - // Retagger also handles "frame" and "trace" like fanin/fanout - // merge separately all traces like gaussXYZ to gauss. - frame: { - '.*': 'retagger', - }, - merge: { - 'dnnsp\\d': 'dnnsp', - 'gauss\\d': 'gauss', - 'wiener\\d': 'wiener', - // 'tight_lf\\d': 'tightLf', - 'loose_lf\\d': 'looseLf', - // 'decon\\d': 'decon', - 'cleanup_roi\\d': 'cleanupROI', - // 'break_roi_1st\\d': 'breakROI1', - // 'break_roi_2nd\\d': 'breakROI2', - 'shrink_roi\\d': 'shrinkROI', - 'extend_roi\\d': 'extendROI', - 'mp3_roi\\d': 'mp3ROI', - 'mp2_roi\\d': 'mp2ROI', - }, - }], - }, -}, nin=1, nout=1); - -local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); - -// local graph = g.pipeline([wcls_input.adc_digits, chsel_pipes[volume], sp_pipes[volume], dnnroi(this_anode, ts_u, ts_v, output_scale=1), retagger, wcls_output.h5io, wcls_output.sp_signals, sink]); -local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]); - -local app = { - type: 'Pgrapher', - data: { - edges: g.edges(graph), - }, -}; - -// Finally, the configuration sequence -g.uses(graph) + [app] From 25ed5fa8b3798f4e45fd16cc32ead2f60067a1f7 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Sun, 25 May 2025 15:52:46 -0500 Subject: [PATCH 022/101] Update stage0_run2_wcdnn_icarus_overlay.fcl --- .../Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl index 8da82f89d..b8ecf7662 100644 --- a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl +++ b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl @@ -1,3 +1,9 @@ #include "stage0_run2_wcdnn_icarus_mc.fcl" #include "enable_overlay_sp.fcl" + +# for gpus, use stage0_run2_wcdnn_gpu_icarus.fcl instead +physics.producers.decon2droiEE.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiEW.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiWE.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiWW.wcls_main.params.wc_device: "cpu" From b16ea599681e15ca6da8bac95ac54bac2166c3c0 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Sun, 25 May 2025 15:53:43 -0500 Subject: [PATCH 023/101] Create stage0_run2_wcdnn_gpu_icarus.fcl --- .../Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl new file mode 100644 index 000000000..fb9a3977d --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl @@ -0,0 +1,13 @@ +#include "stage0_run2_wc_icarus.fcl" + +#include "enable_dnn_sp.fcl" + +physics.producers.decon2droiEE.wcls_main.params.wc_device: "gpu" +physics.producers.decon2droiEW.wcls_main.params.wc_device: "gpu" +physics.producers.decon2droiWE.wcls_main.params.wc_device: "gpu" +physics.producers.decon2droiWW.wcls_main.params.wc_device: "gpu" + +physics.producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellCuda"] +physics.producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellCuda"] +physics.producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellCuda"] +physics.producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellCuda"] From 29be32fde4f6648d8a6d36f448a1eec26e600223 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Sun, 25 May 2025 15:57:14 -0500 Subject: [PATCH 024/101] Update stage0_icarus_defs.fcl --- fcl/reco/Definitions/stage0_icarus_defs.fcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fcl/reco/Definitions/stage0_icarus_defs.fcl b/fcl/reco/Definitions/stage0_icarus_defs.fcl index 11a73b8fb..8fa8b5d67 100644 --- a/fcl/reco/Definitions/stage0_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_defs.fcl @@ -351,7 +351,7 @@ icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiEE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] @@ -361,7 +361,7 @@ icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiEW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiEW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiEW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiEW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] @@ -371,7 +371,7 @@ icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWE.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWE.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWE.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiWE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] @@ -381,7 +381,7 @@ icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: icarus_stage0_producers.decon2droiWW.wcls_main.params.signal_output_form: "dense" icarus_stage0_producers.decon2droiWW.wcls_main.logsinks: ["stdout"] icarus_stage0_producers.decon2droiWW.wcls_main.loglevels: ["debug", "pgraph:info"] -icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch", "WireCellCuda"] +icarus_stage0_producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellHio", "WireCellPytorch"] icarus_stage0_producers.decon2droiWW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] # Signal processing values From 211f90377afccba6764ebe333022bc8648dec39c Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 30 May 2025 04:13:22 -0500 Subject: [PATCH 025/101] Prune simChannelROI from 1D SP fcl. --- fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl | 1 - 1 file changed, 1 deletion(-) diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index 3456eee69..374fddd02 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -16,7 +16,6 @@ physics.producers: { @table::icarus_stage0_producers physics.path: [ @sequence::icarus_stage0_mc_PMT, MCDecodeTPCROI, @sequence::icarus_stage0_multiTPC, - simChannelROI, @sequence::icarus_stage0_mc_crthit, @sequence::icarus_stage0_mc_crtreco ] From 16636cfe3f85cf190e58ae9c0c13cf05182ceaa2 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 30 May 2025 08:37:09 -0500 Subject: [PATCH 026/101] Simple detsim jsonnet bugfix. --- .../wcls-multitpc-sim-drift-simchannel-refactored.jsonnet | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet index 663f19860..84e574bcb 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet @@ -171,7 +171,6 @@ local overlay_drifter = std.extVar("overlay_drifter"); local drifter = if overlay_drifter then { local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), type: "wclsICARUSDrifter", - name: "drifter", data: params.lar + sim.overlay_drifter_data { TPC: 0, charge_scale: 1 @@ -181,7 +180,7 @@ local drifter = if overlay_drifter then { local setdrifter = g.pnode({ type: 'DepoSetDrifter', data: { - drifter: wc.tn(drifter) + drifter: if overlay_drifter then "wclsICARUSDrifter" else "Drifter" } }, nin=1, nout=1, uses=[drifter]); From af17978545da5421422b3b3d5606a76e7bbf2bc0 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Sun, 1 Jun 2025 11:12:26 -0500 Subject: [PATCH 027/101] Remove mcreco from CAF stage. --- fcl/caf/cafmaker_add_detsim2d_icarus.fcl | 6 ------ fcl/caf/cafmaker_defs.fcl | 7 ++----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl index 005c164a6..11c7f0aba 100644 --- a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl +++ b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl @@ -4,12 +4,6 @@ physics.producers.cafmaker.SimChannelLabel: "merge" # 2D, YZ sim # SimChannel's get re-made by 2D drift simulation -- use these to backtrack services.BackTrackerService.BackTracker.SimChannelModuleLabel: "merge" -# MCReco also needs correct SimChannels -# need to use new config names to make MCParticle/SimChannel labels different -physics.producers.mcreco.G4ModName: @erase -physics.producers.mcreco.MCParticleLabel: "largeant" -physics.producers.mcreco.SimChannelLabel: "merge" - # Mini production, pre signal shape tuning # this_cal_constants: [1.343e-2, 1.338e-2, 0.01227] # Post signal shape tuning, post gain fixing diff --git a/fcl/caf/cafmaker_defs.fcl b/fcl/caf/cafmaker_defs.fcl index 50de910f3..feadf4f0d 100644 --- a/fcl/caf/cafmaker_defs.fcl +++ b/fcl/caf/cafmaker_defs.fcl @@ -14,7 +14,6 @@ #include "eventweight_genie_sbn.fcl" #include "eventweight_genie_systtools.fcl" #include "eventweight_flux_sbn.fcl" -#include "mcreco.fcl" #include "mcsproducer.fcl" #include "rangeproducer.fcl" #include "flashmatch_simple_icarus.fcl" @@ -87,8 +86,6 @@ recoana_datacalo_producers.vertexStubCryoW.NormTools: @local::icarus_calonormtoo # Producers for making analysis level products recoana_caf_preprocess_producers: { - mcreco: @local::standard_mcreco - pandoraTrackMCSCryoE: @local::mcs_sbn pandoraTrackMCSCryoW: @local::mcs_sbn @@ -228,7 +225,7 @@ caf_preprocess_sce_producers: { } # Sequences -caf_preprocess_sequence: [ mcreco, +caf_preprocess_sequence: [ # Calorimetry pandoraCaloGausCryoE, pandoraCaloGausCryoW, pandoraPidGausCryoE, pandoraPidGausCryoW, @@ -258,7 +255,7 @@ caf_preprocess_data_sequence: [ caf_preprocess_evtw_sequence: [@sequence::caf_preprocess_sequence, rns, genieweight, fluxweight] -caf_preprocess_sce_sequence: [ mcreco, +caf_preprocess_sce_sequence: [ # Run the SCE correction pandoraGausSCECryoE, pandoraGausSCECryoW, # Then remake tracks From 870ecf70b20b3fb3024cbaba0b432fcde7837082 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Sun, 1 Jun 2025 11:12:48 -0500 Subject: [PATCH 028/101] Stage1+CAF configs for non-YZ detsim. --- fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl | 4 ++++ fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl | 4 ++++ fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl | 6 ++++++ .../Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl | 6 ++++++ 4 files changed, 20 insertions(+) create mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl create mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl create mode 100644 fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl create mode 100644 fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl new file mode 100644 index 000000000..fe75e0903 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl @@ -0,0 +1,4 @@ +#include "cafmakerjob_icarus_detsim2d_overlay.fcl" + +physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl new file mode 100644 index 000000000..1c8b09582 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl @@ -0,0 +1,4 @@ +#include "cafmakerjob_icarus_detsim2d.fcl" + +physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl new file mode 100644 index 000000000..788f343ed --- /dev/null +++ b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl @@ -0,0 +1,6 @@ +#include "stage1_run2_icarus_MC.fcl" + +physics.producers.mcreco.SimChannelLabel: "shifted" +physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl new file mode 100644 index 000000000..4a8aafe51 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl @@ -0,0 +1,6 @@ +#include "stage1_run2_icarus_overlay.fcl" + +physics.producers.mcreco.SimChannelLabel: "sedlite" +physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" From 71e04e8869af040c7b768dc8098d8e32f26699f3 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Sun, 1 Jun 2025 11:13:08 -0500 Subject: [PATCH 029/101] Ignore mcreco logging. --- fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl | 4 ++++ fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index 374fddd02..cc45acfaa 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -63,3 +63,7 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" + +# avoid huge log files +services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } +services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } diff --git a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl index ed15d7f0d..93e2ef003 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl @@ -55,3 +55,7 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" + +# avoid huge log files +services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } +services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } From 73b99619e8c13ed85f5d5155adb63ea708b93f4c Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 4 Jun 2025 03:54:04 -0500 Subject: [PATCH 030/101] Correctly disable mcreco logging. --- fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl | 4 ---- fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl | 4 ---- fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl | 4 ++++ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index cc45acfaa..374fddd02 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -63,7 +63,3 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" - -# avoid huge log files -services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } -services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } diff --git a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl index 93e2ef003..ed15d7f0d 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl @@ -55,7 +55,3 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" - -# avoid huge log files -services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } -services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } diff --git a/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl index 0009c0806..0db3cffcb 100644 --- a/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl +++ b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl @@ -118,6 +118,10 @@ services.message.destinations : limit: -1 reportEvery: 1 } + SimDriftElectrons: + { + limit: 0 + } } } } From 3dc56157f51dfb6a7c84fe11d2a3ef548027784c Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 17 Jun 2025 08:39:38 -0500 Subject: [PATCH 031/101] Disable pusle trains. --- .../TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl | 1 + 1 file changed, 1 insertion(+) diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl index ef031da9b..fdce3c80e 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl +++ b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl @@ -114,6 +114,7 @@ gausshit_sbn.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2: @local::candhitfinder_standard gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.Plane: 2 gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 9. +gausshit_sbn.LongMaxHits: [ 1, 1, 1] # disable pulse trains icarus_hitconverter: { From 02ae7a8cc10ce86f648ac708398a08b1e5b70cad Mon Sep 17 00:00:00 2001 From: NathanielERowe Date: Tue, 17 Jun 2025 13:26:43 -0500 Subject: [PATCH 032/101] Move from overlay to mc --- .../Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl | 4 +++- fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl | 5 +++++ .../Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl | 13 ------------- .../overlay/stage0_run2_wcdnn_icarus_overlay.fcl | 6 ------ 4 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl index 8a1e7edc3..fb9a3977d 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl @@ -1,4 +1,6 @@ -#include "stage0_run2_wcdnn_icarus_mc.fcl" +#include "stage0_run2_wc_icarus.fcl" + +#include "enable_dnn_sp.fcl" physics.producers.decon2droiEE.wcls_main.params.wc_device: "gpu" physics.producers.decon2droiEW.wcls_main.params.wc_device: "gpu" diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl index 8e3c557f9..69c42a272 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl @@ -1,3 +1,8 @@ #include "stage0_run2_wc_icarus_mc.fcl" #include "enable_dnn_sp.fcl" + +physics.producers.decon2droiEE.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiEW.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiWE.wcls_main.params.wc_device: "cpu" +physics.producers.decon2droiWW.wcls_main.params.wc_device: "cpu" diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl deleted file mode 100644 index fb9a3977d..000000000 --- a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_gpu_icarus.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "stage0_run2_wc_icarus.fcl" - -#include "enable_dnn_sp.fcl" - -physics.producers.decon2droiEE.wcls_main.params.wc_device: "gpu" -physics.producers.decon2droiEW.wcls_main.params.wc_device: "gpu" -physics.producers.decon2droiWE.wcls_main.params.wc_device: "gpu" -physics.producers.decon2droiWW.wcls_main.params.wc_device: "gpu" - -physics.producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellCuda"] -physics.producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellCuda"] -physics.producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellCuda"] -physics.producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellCuda"] diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl index b8ecf7662..8da82f89d 100644 --- a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl +++ b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl @@ -1,9 +1,3 @@ #include "stage0_run2_wcdnn_icarus_mc.fcl" #include "enable_overlay_sp.fcl" - -# for gpus, use stage0_run2_wcdnn_gpu_icarus.fcl instead -physics.producers.decon2droiEE.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiEW.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiWE.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiWW.wcls_main.params.wc_device: "cpu" From 6311443f8d799cba0a36efe3cd3194bac733c451 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 18 Jun 2025 07:11:58 -0500 Subject: [PATCH 033/101] Updating version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc71739b5..5aec5de06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p01) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p02) project(icaruscode LANGUAGES CXX) message(STATUS From b293dcae8a530f2ebbc2534ad7a2f82facb0e270 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 18 Jun 2025 14:11:45 -0500 Subject: [PATCH 034/101] Fixup GPU enabled WC DNN configs. Move cpu setting into default fcl. --- fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl | 4 +--- fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl index fb9a3977d..8a1e7edc3 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_gpu_icarus_mc.fcl @@ -1,6 +1,4 @@ -#include "stage0_run2_wc_icarus.fcl" - -#include "enable_dnn_sp.fcl" +#include "stage0_run2_wcdnn_icarus_mc.fcl" physics.producers.decon2droiEE.wcls_main.params.wc_device: "gpu" physics.producers.decon2droiEW.wcls_main.params.wc_device: "gpu" diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl index 69c42a272..8e3c557f9 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl @@ -1,8 +1,3 @@ #include "stage0_run2_wc_icarus_mc.fcl" #include "enable_dnn_sp.fcl" - -physics.producers.decon2droiEE.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiEW.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiWE.wcls_main.params.wc_device: "cpu" -physics.producers.decon2droiWW.wcls_main.params.wc_device: "cpu" From c169b76fcd56dc442381129f1152d0994bf3e466 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 18 Jun 2025 16:40:29 -0500 Subject: [PATCH 035/101] Updating the package version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aec5de06..569acd58b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p02) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p03) project(icaruscode LANGUAGES CXX) message(STATUS From 2a3ce4f44c2bbe0dcf7c6fa9da27fd7be0141820 Mon Sep 17 00:00:00 2001 From: Giuseppe Cerati Date: Mon, 23 Jun 2025 14:43:34 -0500 Subject: [PATCH 036/101] keep PMT waveforms in stage and add fcl to drop them later --- fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl index 844c9871b..96ab2c1e6 100644 --- a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl +++ b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl @@ -8,7 +8,7 @@ outputs: { out1: { compressionLevel: 1 dataTier: "reconstructed" - fileName: "%ifb_%p.root" + fileName: "%ifb_%tc-%p.root" module_type: "RootOutput" outputCommands: [ "keep *_*_*_*", From efe6520ce673ebe24a9d1e77126602c27a9cd145 Mon Sep 17 00:00:00 2001 From: Giuseppe Cerati Date: Mon, 23 Jun 2025 15:56:04 -0500 Subject: [PATCH 037/101] no additional timestamp in file name --- fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl index 96ab2c1e6..844c9871b 100644 --- a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl +++ b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl @@ -8,7 +8,7 @@ outputs: { out1: { compressionLevel: 1 dataTier: "reconstructed" - fileName: "%ifb_%tc-%p.root" + fileName: "%ifb_%p.root" module_type: "RootOutput" outputCommands: [ "keep *_*_*_*", From 577da27dc9df2c023717d4c8fb7b18cc2504f15e Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 23 Jun 2025 17:56:50 -0500 Subject: [PATCH 038/101] Updated CMake tag for icarus release --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 569acd58b..c578aa17a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p03) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p04) project(icaruscode LANGUAGES CXX) message(STATUS From 04194fb1de4f65fa2d32560836338631c2d27bba Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 1 Jul 2025 09:44:17 -0500 Subject: [PATCH 039/101] Inject services necessary for metadata generation in production. --- fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl index 844c9871b..f8c65b010 100644 --- a/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl +++ b/fcl/reco/Stage0/data/stage0_daqPMT_drop.fcl @@ -2,6 +2,8 @@ ## This fhicl file is used to drop daqPMT from the stage0 file ## +#include "services_common_icarus.fcl" + process_name: daqPMTdrop outputs: { From 6f6e6f2a1ab3f9938fad8fb0a0680d705ed98d43 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Tue, 1 Jul 2025 11:03:51 -0500 Subject: [PATCH 040/101] Updating CMake tag --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c578aa17a..a8e236683 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p04) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p05) project(icaruscode LANGUAGES CXX) message(STATUS From 9e34864be7d9a0a68e689dfa77605f131ac12994 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:16:07 -0500 Subject: [PATCH 041/101] Update overlay reco to use same calibrations as data reco. --- fcl/caf/cafmaker_add_overlay_icarus.fcl | 4 ++++ fcl/caf/cafmakerjob_icarus_detsim2d_overlay.fcl | 9 +++++---- ..._icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl | 11 ++++++++--- 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 fcl/caf/cafmaker_add_overlay_icarus.fcl diff --git a/fcl/caf/cafmaker_add_overlay_icarus.fcl b/fcl/caf/cafmaker_add_overlay_icarus.fcl new file mode 100644 index 000000000..fda521683 --- /dev/null +++ b/fcl/caf/cafmaker_add_overlay_icarus.fcl @@ -0,0 +1,4 @@ +services.BackTrackerService.BackTracker.OverrideRealData: true +services.ParticleInventoryService.ParticleInventory.OverrideRealData: true + +physics.producers.cafmaker.OverrideRealData: true diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay.fcl index 171ce0b0b..f8d4e8652 100644 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_overlay.fcl +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay.fcl @@ -1,7 +1,8 @@ #include "cafmakerjob_icarus.fcl" -#include "cafmaker_add_detsim2d_icarus.fcl" -services.BackTrackerService.BackTracker.OverrideRealData: true -services.ParticleInventoryService.ParticleInventory.OverrideRealData: true +# overwrite the producers to use data versions +physics.producers: @local::caf_preprocess_data_producers +physics.runprod: [ @sequence::caf_preprocess_data_sequence, cafmaker] -physics.producers.cafmaker.OverrideRealData: true +#include "cafmaker_add_detsim2d_icarus.fcl" +#include "cafmaker_add_overlay_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl index ded9909e6..8577537b5 100644 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl @@ -1,5 +1,10 @@ #include "cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt.fcl" -services.BackTrackerService.BackTracker.OverrideRealData: true -services.ParticleInventoryService.ParticleInventory.OverrideRealData: true -physics.producers.cafmaker.OverrideRealData: true +# overwrite the producers to use data versions +physics.producers: @local::caf_preprocess_data_producers +physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, fluxweight, cafmaker] + +physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] + + +#include "cafmaker_add_overlay_icarus.fcl" From cf147ddeb3158a8936a499f74b7850ba34f36eca Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:17:48 -0500 Subject: [PATCH 042/101] Update calibrations for 2D+DNN signal processing for Run 2. --- ...calibration_database_GlobalTags_icarus.fcl | 2 +- ...alibration_database_TPC_TagSets_icarus.fcl | 11 ++ icaruscode/TPC/Calorimetry/CMakeLists.txt | 2 + .../NormalizeTPCPerPlaneSQL_tool.cc | 121 ++++++++++++++ .../Calorimetry/NormalizeTPCPerPlane_tool.cc | 158 ++++++++++++++++++ .../TPC/Calorimetry/normtools_icarus.fcl | 12 +- 6 files changed, 299 insertions(+), 7 deletions(-) create mode 100644 icaruscode/TPC/Calorimetry/NormalizeTPCPerPlaneSQL_tool.cc create mode 100644 icaruscode/TPC/Calorimetry/NormalizeTPCPerPlane_tool.cc diff --git a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl index 5d080878d..03f5d89a5 100644 --- a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl +++ b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl @@ -5,7 +5,7 @@ BEGIN_PROLOG ICARUS_Calibration_GlobalTags: { - @table::TPC_CalibrationTags_Jan2025 + @table::TPC_CalibrationTags_Jul2025 @table::PMT_CalibrationTags_Run3_Feb2025 @table::CRT_CalibrationTags_Oct2023 } diff --git a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl index 828e8d8a3..99d15c020 100644 --- a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl @@ -37,4 +37,15 @@ TPC_CalibrationTags_Jan2025: { } +## TPC_CalibrationTags_Jul2024 +# Update to 2D deconv tags. Change TPC equalization to be per-plane +TPC_CalibrationTags_Jul2025: { + + tpc_channelstatus_data: "v3r4" + tpc_elifetime_data: "v3r0" + tpc_dqdxcalibration_allplanes_data: "v1r0" + tpc_yz_correction_allplanes_data: "v2r0" + +} + END_PROLOG diff --git a/icaruscode/TPC/Calorimetry/CMakeLists.txt b/icaruscode/TPC/Calorimetry/CMakeLists.txt index a3b1709c5..45b214a16 100644 --- a/icaruscode/TPC/Calorimetry/CMakeLists.txt +++ b/icaruscode/TPC/Calorimetry/CMakeLists.txt @@ -47,6 +47,8 @@ cet_build_plugin(NormalizeDriftSQLite art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeDrift art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeTPCSQL art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeTPC art::tool LIBRARIES ${TOOL_LIBRARIES}) +cet_build_plugin(NormalizeTPCPerPlaneSQL art::tool LIBRARIES ${TOOL_LIBRARIES}) +cet_build_plugin(NormalizeTPCPerPlane art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeTPCLocal art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeWire art::tool LIBRARIES ${TOOL_LIBRARIES}) cet_build_plugin(NormalizeYZSQL art::tool LIBRARIES ${TOOL_LIBRARIES}) diff --git a/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlaneSQL_tool.cc b/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlaneSQL_tool.cc new file mode 100644 index 000000000..6ed734b13 --- /dev/null +++ b/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlaneSQL_tool.cc @@ -0,0 +1,121 @@ +// Framework Includes +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Persistency/Common/PtrMaker.h" +#include "art/Utilities/ToolMacros.h" +#include "cetlib/cpu_timer.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "larevt/CalibrationDBI/Providers/DBFolder.h" + +// Tool include +#include "larreco/Calorimetry/INormalizeCharge.h" + +// Services +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +// Lab helpers +#include "wda.h" + +// C++ +#include + +namespace icarus { + namespace calo { + +class NormalizeTPCPerPlaneSQL : public INormalizeCharge +{ +public: + NormalizeTPCPerPlaneSQL(fhicl::ParameterSet const &pset); + + void configure(const fhicl::ParameterSet& pset) override; + double Normalize(double dQdx, const art::Event &e, const recob::Hit &h, const geo::Point_t &location, const geo::Vector_t &direction, double t0) override; + +private: + // Configuration + std::string fDBFileName; + std::string fDBTag; + bool fVerbose; + + lariov::DBFolder fDB; + + // Class to hold data from DB + class ScaleInfo { + public: + std::map scale; + }; + + // Helpers + ScaleInfo GetScaleInfo(uint64_t run); + + // Cache run requests + std::map fScaleInfos; +}; + +DEFINE_ART_CLASS_TOOL(NormalizeTPCPerPlaneSQL) + + } // end namespace calo +} // end namespace icarus + + +icarus::calo::NormalizeTPCPerPlaneSQL::NormalizeTPCPerPlaneSQL(fhicl::ParameterSet const &pset): + fDBFileName(pset.get("DBFileName")), + fDBTag(pset.get("DBTag")), + fVerbose(pset.get("Verbose", false)), + fDB(fDBFileName, "", "", fDBTag, true, false) {} + +void icarus::calo::NormalizeTPCPerPlaneSQL::configure(const fhicl::ParameterSet& pset) {} + +icarus::calo::NormalizeTPCPerPlaneSQL::ScaleInfo icarus::calo::NormalizeTPCPerPlaneSQL::GetScaleInfo(uint64_t run) { + // check the cache + if (fScaleInfos.count(run)) { + return fScaleInfos.at(run); + } + + // Look up the run + // + // Translate the run into a fake "timestamp" + fDB.UpdateData((run+1000000000)*1000000000); + + // Collect the run info + ScaleInfo thisscale; + + // Iterate over the rows + for (unsigned ch = 0; ch < 12; ch++) { + double scale; + fDB.GetNamedChannelData(ch, "scale", scale); + + thisscale.scale[ch] = scale; + } + // Set the cache + fScaleInfos[run] = thisscale; + + return thisscale; +} + +double icarus::calo::NormalizeTPCPerPlaneSQL::Normalize(double dQdx, const art::Event &e, + const recob::Hit &hit, const geo::Point_t &location, const geo::Vector_t &direction, double t0) { + // Get the info + ScaleInfo i = GetScaleInfo(e.id().runID().run()); + + // Lookup the TPC, cryo + unsigned tpc = hit.WireID().TPC; + unsigned cryo = hit.WireID().Cryostat; + unsigned plane = hit.WireID().Plane; + + // Get the TPC-Plane index + unsigned itpc_plane = 2*cryo + tpc/2 + plane*4; + + double scale = 1; + + // TODO: what to do if no scale is found? throw an exception?? + if (i.scale.count(itpc_plane)) scale = i.scale.at(itpc_plane); + + if (fVerbose) std::cout << "NormalizeTPCPerPlaneSQL Tool -- Data at Cryo: " << cryo << " TPC: " << tpc << " Plane: " << plane << " itpc_plane: " << itpc_plane << " scale: " << scale << std::endl; + + return dQdx * scale; +} + diff --git a/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlane_tool.cc b/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlane_tool.cc new file mode 100644 index 000000000..6e61f7a6f --- /dev/null +++ b/icaruscode/TPC/Calorimetry/NormalizeTPCPerPlane_tool.cc @@ -0,0 +1,158 @@ +// Framework Includes +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Persistency/Common/PtrMaker.h" +#include "art/Utilities/ToolMacros.h" +#include "cetlib/cpu_timer.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +// Tool include +#include "larreco/Calorimetry/INormalizeCharge.h" + +// Services +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +// Lab helpers +#include "wda.h" + +// C++ +#include + +namespace icarus { + namespace calo { + +class NormalizeTPC : public INormalizeCharge +{ +public: + NormalizeTPC(fhicl::ParameterSet const &pset); + + void configure(const fhicl::ParameterSet& pset) override; + double Normalize(double dQdx, const art::Event &e, const recob::Hit &h, const geo::Point_t &location, const geo::Vector_t &direction, double t0) override; + +private: + // Configuration + int fTimeout; + std::string fURL; + bool fVerbose; + + // Class to hold data from DB + class ScaleInfo { + public: + std::map scale; + }; + + // Helpers + ScaleInfo GetScaleInfo(uint64_t run); + std::string URL(uint64_t run); + + // Cache run requests + std::map fScaleInfos; +}; + +DEFINE_ART_CLASS_TOOL(NormalizeTPC) + + } // end namespace calo +} // end namespace icarus + + +icarus::calo::NormalizeTPC::NormalizeTPC(fhicl::ParameterSet const &pset) { + this->configure(pset); +} + +void icarus::calo::NormalizeTPC::configure(const fhicl::ParameterSet& pset) { + fURL = pset.get("URL"); + fTimeout = pset.get("Timeout"); + fVerbose = pset.get("Verbose", false); +} + +std::string icarus::calo::NormalizeTPC::URL(uint64_t run) { + return fURL + std::to_string(run); +} + +icarus::calo::NormalizeTPC::ScaleInfo icarus::calo::NormalizeTPC::GetScaleInfo(uint64_t run) { + // check the cache + if (fScaleInfos.count(run)) { + return fScaleInfos.at(run); + } + + // Otherwise, look it up + int error = 0; + std::string url = URL(run); + + if (fVerbose) std::cout << "NormalizeTPC Tool -- New Scale info, requesting data from url:\n" << url << std::endl; + + Dataset d = getDataWithTimeout(url.c_str(), "", fTimeout, &error); + if (error) { + throw cet::exception("NormalizeTPC") << "Calibration Database access failed. URL: (" << url << ") Error Code: " << error; + } + + if (fVerbose) std::cout << "NormalizeTPC Tool -- Received HTTP response:\n" << getHTTPmessage(d) << std::endl; + + if (getHTTPstatus(d) != 200) { + throw cet::exception("NormalizeTPC") + << "Calibration Database access failed. URL: (" << url + << "). HTTP error status: " << getHTTPstatus(d) << ". HTTP error message: " << getHTTPmessage(d); + } + + // Collect the run info + ScaleInfo thisscale; + + // Number of rows + int n_tuple = getNtuples(d); + if (n_tuple < 0) { + throw cet::exception("NormalizeTPC") << "Calibration Database access failed. URL: (" << url << ") Bad Tuple Number: " << n_tuple; + } + + // Iterate over the rows + // The first 4 are metadata + for (unsigned row = 4; row < (unsigned)n_tuple; row++) { + Tuple tup = getTuple(d, row); + + int err = 0; + // Get the itpc number + int ch = getLongValue(tup, 0, &err); + if (error) { + throw cet::exception("NormalizeTPC") << "Calibration Database access failed. URL: (" << url << ") Failed on tuple access, row: " << row << ", col 0. Error Code: " << error; + } + + // and the scale + double scale = getDoubleValue(tup, 3, &err); + if (error) { + throw cet::exception("NormalizeTPC") << "Calibration Database access failed. URL: (" << url << ") Failed on tuple access, row: " << row << ", col 1. Error Code: " << error; + } + + thisscale.scale[ch] = scale; + } + + // Set the cache + fScaleInfos[run] = thisscale; + + return thisscale; +} + +double icarus::calo::NormalizeTPC::Normalize(double dQdx, const art::Event &e, + const recob::Hit &hit, const geo::Point_t &location, const geo::Vector_t &direction, double t0) { + // Get the info + ScaleInfo i = GetScaleInfo(e.id().runID().run()); + + // Lookup the TPC, cryo + unsigned tpc = hit.WireID().TPC; + unsigned cryo = hit.WireID().Cryostat; + unsigned plane = hit.WireID().Plane; + + // Get the TPC-Plane index + unsigned itpc_plane = 2*cryo + tpc/2 + plane*4; + + double scale = 1; + + // TODO: what to do if no scale is found? throw an exception?? + if (i.scale.count(itpc_plane)) scale = i.scale.at(itpc_plane); + + if (fVerbose) std::cout << "NormalizeTPCPerPlaneSQL Tool -- Data at Cryo: " << cryo << " TPC: " << tpc << " Plane: " << plane << " itpc_plane: " << itpc_plane << " scale: " << scale << std::endl; + + return dQdx * scale; +} + diff --git a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl index 2a69eb647..5443186cf 100644 --- a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl +++ b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl @@ -24,9 +24,9 @@ yznorm: { } tpcgain: { - tool_type: NormalizeTPC + tool_type: NormalizeTPCPerPlane Timeout: 200 - URL: "https://dbdata0vm.fnal.gov:9443/icarus_con_prod/app/data?f=tpc_dqdxcalibration_data&t=" + URL: "https://dbdata0vm.fnal.gov:9443/icarus_con_prod/app/data?f=tpc_dqdxcalibration_allplanes_data&t=" Verbose: false } @@ -38,9 +38,9 @@ driftnorm_sql: { } tpcgain_sql: { - tool_type: NormalizeTPCSQL - DBFileName: tpc_dqdxcalibration_data - DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_dqdxcalibration_data + tool_type: NormalizeTPCPerPlaneSQL + DBFileName: tpc_dqdxcalibration_allplanes_data + DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_dqdxcalibration_allplanes_data Verbose: false } @@ -59,7 +59,7 @@ yznorm_sql: { } #icarus_calonormtools: [@local::driftnorm, @local::yznorm, @local::tpcgain] - icarus_calonormtools: [@local::driftnorm_sql, @local::yznorm_sql, @local::tpcgain_sql] +icarus_calonormtools: [@local::driftnorm_sql, @local::yznorm_sql, @local::tpcgain_sql] # Gain with angular dep. recombination. Measurement from: https://arxiv.org/pdf/2407.12969 # Assume equal on planes -- this is __wrong__ -- will need to be fixed when they are calibrated From 9acee105db1262f04014c5fde858c148645b9d1d Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:19:13 -0500 Subject: [PATCH 043/101] Update reco1 processing chain. Pandora gets hits with 'long hits', combined (not cluster3D'd) between TPCs. SPINE gets hits with 'pulse trains', run through cluster 3D. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 37 ++++++++++-- .../HitFinder/HitMerger_module.cc | 58 ++++++++++++++++++- .../HitFinder/hitfindermodules_icarus.fcl | 10 ++++ 3 files changed, 98 insertions(+), 7 deletions(-) diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index 22b46744c..d5b1255c6 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -43,6 +43,10 @@ icarus_stage1_producers: cluster3DCryoW: @local::icarus_cluster3d cluster3DCryoE: @local::icarus_cluster3d + ### Hit combiner + combineHitsCryoE: @local::icarus_hitmerger_cryoE + combineHitsCryoW: @local::icarus_hitmerger_cryoW + ### pandora pandoraGausCryoW: @local::icarus_pandora pandoraTrackGausCryoW: @local::icarus_pandoraTrackCreation @@ -192,11 +196,17 @@ icarus_WestHits_TPC: [ gaushit1dTPCWW, gaushit1dTPCWE ] icarus_EastHits2d_TPC: [ gaushit2dTPCEW, - gaushit2dTPCEE + gaushit2dTPCEE, + combineHitsCryoE, + gaushitPT2dTPCEW, + gaushitPT2dTPCEE ] icarus_WestHits2d_TPC: [ gaushit2dTPCWW, - gaushit2dTPCWE + gaushit2dTPCWE, + combineHitsCryoW, + gaushitPT2dTPCWW, + gaushitPT2dTPCWE ] # Set up filtering of cluster3D hits by cryostat @@ -314,6 +324,16 @@ icarus_stage1_producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane1.RoiT icarus_stage1_producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 5. icarus_stage1_producers.gaushit2dTPCWW.HitFilterAlg.MinPulseHeight: [3., 3., 3.] +# Setup version of hit finder's with Pulse Trains ("PT"s) enabled +icarus_stage1_producers.gaushitPT2dTPCEE: @local::icarus_stage1_producers.gaushit2dTPCEE +icarus_stage1_producers.gaushitPT2dTPCEE.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCEW: @local::icarus_stage1_producers.gaushit2dTPCEW +icarus_stage1_producers.gaushitPT2dTPCEW.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCWE: @local::icarus_stage1_producers.gaushit2dTPCWE +icarus_stage1_producers.gaushitPT2dTPCWE.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCWW: @local::icarus_stage1_producers.gaushit2dTPCWW +icarus_stage1_producers.gaushitPT2dTPCWW.LongMaxHits: [25, 25, 25] + ## Overrides for filtering of cluster3D hits icarus_stage1_filters.TPCHitFilterCryoW.HitDataLabelVec: ["cluster3DCryoW"] icarus_stage1_filters.TPCHitFilterCryoW.MaximumHits: 60000 @@ -323,7 +343,8 @@ icarus_stage1_filters.TPCHitFilterCryoE.MaximumHits: 60000 ## Definitions for running the 3D clustering by Cryostat icarus_stage1_producers.cluster3DCryoW.MakeSpacePointsOnly: true -icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit2dTPCWW", "gaushit2dTPCWE"] +# use the "PT" (pulse train) hits as input to cluster3D +icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushitPT2dTPCWW", "gaushitPT2dTPCWE"] icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.PulseHeightFraction: 0. #0.75 #0.25 icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.PHLowSelection: 0. #4.0 # 20. icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.MaxHitChiSquare: 1000000. @@ -331,7 +352,7 @@ icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.MaxMythicalChiSquare: icarus_stage1_producers.cluster3DCryoW.Hit3DBuilderAlg.OutputHistograms: false icarus_stage1_producers.cluster3DCryoE.MakeSpacePointsOnly: true -icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit2dTPCEW", "gaushit2dTPCEE"] +icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushitPT2dTPCEW", "gaushitPT2dTPCEE"] icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.PulseHeightFraction: 0. #0.75 #0.25 icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.PHLowSelection: 0. #4.0 # 20. icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.MaxHitChiSquare: 1000000. @@ -339,13 +360,17 @@ icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.MaxMythicalChiSquare: icarus_stage1_producers.cluster3DCryoE.Hit3DBuilderAlg.OutputHistograms: false ### Definitions for a pandora by cryostat -icarus_stage1_producers.pandoraGausCryoW.HitFinderModuleLabel: "cluster3DCryoW" +icarus_stage1_producers.pandoraGausCryoW.HitFinderModuleLabel: "combineHitsCryoW" +# icarus_stage1_producers.pandoraGausCryoW.HitFinderModuleLabel: "" +# icarus_stage1_producers.pandoraGausCryoW.HitCollectionTool.OverrhideHitLabels: ["gaushit2dTPCWW", "gaushit2dTPCWE"] icarus_stage1_producers.pandoraTrackGausCryoW.PFParticleLabel: "pandoraGausCryoW" icarus_stage1_producers.pandoraTrackGausCryoW.UseAllParticles: true icarus_stage1_producers.pandoraKalmanTrackGausCryoW.inputCollection: "pandoraGausCryoW" icarus_stage1_producers.pandoraKalmanTrackGausCryoW.trackInputTag: "pandoraTrackGausCryoW" -icarus_stage1_producers.pandoraGausCryoE.HitFinderModuleLabel: "cluster3DCryoE" +icarus_stage1_producers.pandoraGausCryoE.HitFinderModuleLabel: "combineHitsCryoE" +# icarus_stage1_producers.pandoraGausCryoE.HitFinderModuleLabel: "" +# icarus_stage1_producers.pandoraGausCryoE.HitCollectionTool.OverrhideHitLabels: ["gaushit2dTPCEW", "gaushit2dTPCEE"] icarus_stage1_producers.pandoraTrackGausCryoE.PFParticleLabel: "pandoraGausCryoE" icarus_stage1_producers.pandoraTrackGausCryoE.UseAllParticles: true icarus_stage1_producers.pandoraKalmanTrackGausCryoE.inputCollection: "pandoraGausCryoE" diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/HitMerger_module.cc b/icaruscode/TPC/SignalProcessing/HitFinder/HitMerger_module.cc index 993b74ed3..90a6d9856 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/HitMerger_module.cc +++ b/icaruscode/TPC/SignalProcessing/HitFinder/HitMerger_module.cc @@ -37,6 +37,8 @@ #include "lardata/DetectorInfoServices/DetectorPropertiesService.h" #include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "sbnobj/ICARUS/TPC/ChannelROI.h" + class HitMerger : public art::EDProducer { public: @@ -62,8 +64,13 @@ class HitMerger : public art::EDProducer /** * @brief Create raw::RawDigit to recob::Hit associations */ - void makeRawDigitAssns(const art::Event&, art::Assns&, RecobHitToPtrMap&) const; + + /** + * @brief Create recob::ChannelROI to recob::Hit associatins + */ + void makeChanROIAssns(const art::Event&, art::Assns&, RecobHitToPtrMap&) const; + // define vector for hits to make sure of uniform use using HitPtrVector = std::vector>; @@ -87,6 +94,7 @@ HitMerger::HitMerger(fhicl::ParameterSet const & pset) : EDProducer{pset} produces< std::vector>(); produces< art::Assns>(); produces< art::Assns>(); + produces< art::Assns>(); // Report. mf::LogInfo("HitMerger") << "HitMerger configured\n"; @@ -139,6 +147,9 @@ void HitMerger::produce(art::Event & evt) /// Associations with raw digits. std::unique_ptr> rawDigitAssns(new art::Assns); + /// Associations with channel ROIs. + std::unique_ptr> chanROIAssns(new art::Assns); + RecobHitToPtrMap recobHitToPtrMap; // Use this handy art utility to make art::Ptr objects to the new recob::Hits for use in the output phase @@ -172,11 +183,14 @@ void HitMerger::produce(art::Event & evt) makeWireAssns(evt, *wireAssns, recobHitToPtrMap); makeRawDigitAssns(evt, *rawDigitAssns, recobHitToPtrMap); + + makeChanROIAssns(evt, *chanROIAssns, recobHitToPtrMap); // Move everything into the event evt.put(std::move(outputHitPtrVec)); evt.put(std::move(wireAssns)); evt.put(std::move(rawDigitAssns)); + evt.put(std::move(chanROIAssns)); return; } @@ -264,6 +278,48 @@ void HitMerger::makeRawDigitAssns(const art::Event& evt, art::Assns &chanROIAssns, RecobHitToPtrMap& recobHitPtrMap) const +{ + // Let's make sure the input associations container is empty + chanROIAssns = art::Assns(); + + // First task is to recover all of the previous chanROI <--> hit associations and map them by channel number + // Create the temporary container + std::unordered_map> channelToChanROIMap; + + // Go through the list of input sources and fill out the map + for(const auto& inputTag : HitMergerfHitProducerLabelVec) + { + art::ValidHandle> hitHandle = evt.getValidHandle>(inputTag); + + art::FindOneP hitToChanROIAssns(hitHandle, evt, inputTag); + + if (hitToChanROIAssns.isValid()) + { + for(size_t chanROIIdx = 0; chanROIIdx < hitToChanROIAssns.size(); chanROIIdx++) + { + art::Ptr chanROI = hitToChanROIAssns.at(chanROIIdx); + + channelToChanROIMap[chanROI->Channel()] = chanROI; + } + } + } + + // Now fill the container + for(const auto& hitPtrPair : recobHitPtrMap) + { + raw::ChannelID_t channel = hitPtrPair.first->Channel(); + + std::unordered_map>::iterator chanChanROIItr = channelToChanROIMap.find(channel); + + if (!(chanChanROIItr != channelToChanROIMap.end())) continue; + + chanROIAssns.addSingle(chanChanROIItr->second, hitPtrPair.second); + } + + return; +} //---------------------------------------------------------------------------- /// End job method. diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl index fdce3c80e..093524b07 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl +++ b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl @@ -124,5 +124,15 @@ icarus_hitconverter: DaignosticOutput: false } +icarus_hitmerger_cryoE: { + module_type: HitMerger + HitProducerLabelVec: ["gaushit2dTPCEW", "gaushit2dTPCEE"] +} + +icarus_hitmerger_cryoW: { + module_type: HitMerger + HitProducerLabelVec: ["gaushit2dTPCWW", "gaushit2dTPCWE"] +} + END_PROLOG From e4f996b9b1205ec487489be284323718b5eba774 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:19:54 -0500 Subject: [PATCH 044/101] Tune transverse diffusion constant. --- fcl/services/simulationservices_icarus.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/services/simulationservices_icarus.fcl b/fcl/services/simulationservices_icarus.fcl index b5e4d9718..788d1a4f4 100644 --- a/fcl/services/simulationservices_icarus.fcl +++ b/fcl/services/simulationservices_icarus.fcl @@ -16,7 +16,7 @@ BEGIN_PROLOG icarus_largeantparameters: @local::standard_largeantparameters # from simulationservices.fcl icarus_largeantparameters.UseCustomPhysics: true icarus_largeantparameters.LongitudinalDiffusion: 4.0e-9 #in cm^2/ns -icarus_largeantparameters.TransverseDiffusion: 8.8e-9 #in cm^2/ns +icarus_largeantparameters.TransverseDiffusion: 7.5e-9 #in cm^2/ns icarus_largeantparameters.ElectronClusterSize: 20.0 #number of ionization electrons to drift in a unit icarus_largeantparameters.EnabledPhysics: [ "Em", "SynchrotronAndGN", "Ion", "Hadron", "Decay", "HadronElastic", "Stopping" From 6bc393a3bd647d7fd0ee683b2a32e82416fd7204 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:20:18 -0500 Subject: [PATCH 045/101] Tune MC gain and sim-reco timing offsets. --- .../detsimmodules_wirecell_ICARUS.fcl | 12 +++---- ...-drift-simchannel-yzsim-refactored.jsonnet | 32 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index 5da3c8673..5aa603e41 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -54,18 +54,18 @@ icarus_simwire_wirecell: overlay_drifter: false # default drifter by default # Gain and shaping time - gain0: 17.05212 # mV/fC - gain1: 12.6181926 # mV/fC - gain2: 13.0261362 # mV/fC + gain0: 17.9488 # mV/fC + gain1: 12.4317 # mV/fC + gain2: 14.0976 # mV/fC shaping0: 1.3 # us shaping1: 1.45 # us shaping2: 1.3 # us # Time offsets for truth matching -- tuned to 2D deconvolution output - time_offset_u: 1.81 # us - time_offset_v: 2.08 # us - time_offset_y: 1.82 # us + time_offset_u: 2.53 # us + time_offset_v: 2.41 # us + time_offset_y: 2.53 # us } } } diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet index db363894c..ec6a74c84 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet @@ -44,22 +44,22 @@ local params = base { // fields: [ std.extVar('files_fields'), ] fields: [ - "icarus_fnal_fit_ks_P0nom_P1bin0.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin1.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin2.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin3.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin4.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin5.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin6.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin7.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin8.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin9.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin10.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin11.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin12.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin13.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin14.json.bz2", - "icarus_fnal_fit_ks_P0nom_P1bin15.json.bz2"] + "icarus_fnal_fit_ks_P0nom_P1bin0_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin1_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin2_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin3_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin4_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin5_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin6_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin7_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin8_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin9_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin10_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin11_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin12_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin13_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin14_shifted.json.bz2", + "icarus_fnal_fit_ks_P0nom_P1bin15_shifted.json.bz2"] }, rc_resp: if std.extVar('file_rcresp') != "" then From 24270ba30dc0ce8afba0e0d736535717535a92f1 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 30 Jul 2025 21:24:09 -0500 Subject: [PATCH 046/101] Fix stage0 mc no trigger simulation fcl file. --- fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl | 1 + 1 file changed, 1 insertion(+) diff --git a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl index 9d738f348..54f81872a 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl @@ -1,6 +1,7 @@ #include "stage0_run2_wc_icarus_mc.fcl" # restore non-shifted labels +physics.producers.ophit.InputModule: "opdaq" physics.producers.emuTrigger.BeamGates: "beamgate" physics.producers.mcophit.SimPhotonsProducer: "pdfastsim" physics.producers.opdetonbeam.Waveforms: "opdaq" From 2ab066e8df820b39cf8a3ee7586d66337f2b2b6f Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 1 Aug 2025 15:33:39 -0500 Subject: [PATCH 047/101] Update to new YZ gain map. --- .../wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet index ec6a74c84..42b0e9eba 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet @@ -221,7 +221,7 @@ local scalers = [{ type: "Scaler", name: "scaler%d" %n, //%std.floor(n/45), data: params.lar { - yzmap_scale_filename: 'yzmap_gain_icarus_v3_run2.json', + yzmap_scale_filename: 'yzmap_gain_icarus_v4_run2.json', bin_width: 10*wc.cm, tpc_width: 1500*wc.mm, bin_height: 10*wc.cm, From 124bec2848490b933540347d485cb02dcdb2bf70 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 1 Aug 2025 16:07:19 -0500 Subject: [PATCH 048/101] Revert "Tune transverse diffusion constant." This reverts commit 2f30b6c800f8c626d0c00bdfd0171d393705459f. --- fcl/services/simulationservices_icarus.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/services/simulationservices_icarus.fcl b/fcl/services/simulationservices_icarus.fcl index 788d1a4f4..b5e4d9718 100644 --- a/fcl/services/simulationservices_icarus.fcl +++ b/fcl/services/simulationservices_icarus.fcl @@ -16,7 +16,7 @@ BEGIN_PROLOG icarus_largeantparameters: @local::standard_largeantparameters # from simulationservices.fcl icarus_largeantparameters.UseCustomPhysics: true icarus_largeantparameters.LongitudinalDiffusion: 4.0e-9 #in cm^2/ns -icarus_largeantparameters.TransverseDiffusion: 7.5e-9 #in cm^2/ns +icarus_largeantparameters.TransverseDiffusion: 8.8e-9 #in cm^2/ns icarus_largeantparameters.ElectronClusterSize: 20.0 #number of ionization electrons to drift in a unit icarus_largeantparameters.EnabledPhysics: [ "Em", "SynchrotronAndGN", "Ion", "Hadron", "Decay", "HadronElastic", "Stopping" From 3e117bbcc172b2e997ca59cae6b8ec47bb840572 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 4 Aug 2025 08:11:00 -0500 Subject: [PATCH 049/101] MC gain fine tuning. --- .../TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index 5aa603e41..f01f766cc 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -54,9 +54,9 @@ icarus_simwire_wirecell: overlay_drifter: false # default drifter by default # Gain and shaping time - gain0: 17.9488 # mV/fC - gain1: 12.4317 # mV/fC - gain2: 14.0976 # mV/fC + gain0: 18.0839 # mV/fC + gain1: 12.2379 # mV/fC + gain2: 13.8819 # mV/fC shaping0: 1.3 # us shaping1: 1.45 # us From 95be875630ce468daafcc658c132e8b41611772f Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 4 Aug 2025 08:22:48 -0500 Subject: [PATCH 050/101] Set reco gain values. --- icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl | 9 +++++---- icaruscode/TPC/Calorimetry/normtools_icarus.fcl | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl b/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl index 6ca52f145..d482bb16e 100644 --- a/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl +++ b/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl @@ -6,10 +6,11 @@ BEGIN_PROLOG icarus_calorimetryalgdata: @local::standard_calorimetryalgdata icarus_calorimetryalgmc: @local::standard_calorimetryalgmc -# Calorimetry constants from G. Putnam (Nov 2022) -# Informed by MC calibration -- docdb 28639. -# NOTE: needs to be revisted if/when the data processing is updated -icarus_calorimetryalgmc.CalAreaConstants: [0.01343, 0.01338, 0.01219] +# GP 8/4/25: with re-calibration and application of EMB recombination, +# MC and data gains match. Note that we should not being making any +# updates to the MC that would cause the MC gain to differ from that of +# data. +icarus_calorimetryalgmc.CalAreaConstants: @local::icarus_data_calconst icarus_calorimetryalgmc.ModBoxA: 0.904 icarus_calorimetryalgmc.ModBoxBTF1: "[0]/TMath::Sqrt(TMath::Sin(x*TMath::Pi()/180)**2 + TMath::Cos(x*TMath::Pi()/180)**2/[1]**2)" icarus_calorimetryalgmc.ModBoxBParam: [0.204, 1.25] diff --git a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl index 5443186cf..21a0f2de2 100644 --- a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl +++ b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl @@ -61,8 +61,8 @@ yznorm_sql: { #icarus_calonormtools: [@local::driftnorm, @local::yznorm, @local::tpcgain] icarus_calonormtools: [@local::driftnorm_sql, @local::yznorm_sql, @local::tpcgain_sql] -# Gain with angular dep. recombination. Measurement from: https://arxiv.org/pdf/2407.12969 -# Assume equal on planes -- this is __wrong__ -- will need to be fixed when they are calibrated -icarus_data_calconst: [0.0133333, 0.0133333, 0.0133333] +# GP 8/4/25 -- Update gain to re-measurement with Run 2 stopping muons and +# fixed recombination. +icarus_data_calconst: [0.016751, 0.012755, 0.012513] END_PROLOG From 202fed7e352ffec4f4a8a826b87d6df8723120c5 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 4 Aug 2025 15:45:49 -0500 Subject: [PATCH 051/101] Update CMake and product dependency --- CMakeLists.txt | 6 +++--- ups/product_deps | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8e236683..12000ce3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -#project(icaruscode VERSION 10.06.00.01 LANGUAGES CXX) +project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p05) -project(icaruscode LANGUAGES CXX) +#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p05) +#project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 442b50987..fec8a1a65 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,12 +251,12 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v09_93_06 - +icarus_data v10_06_00 - icarus_signal_processing v10_06_00_01 - -icarusalg v10_06_00_01 - -icarusutil v09_88_00_02 - +icarusalg v10_06_00_03 - +icarusutil v10_06_00_04 - libwda v2_30_0a - -sbncode v10_06_00_01 - +sbncode v10_06_00_04 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From b52c99c144041af8dacf39526977eb3ed16d7fe9 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 4 Aug 2025 15:55:37 -0500 Subject: [PATCH 052/101] Corrected icarusalg version --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index fec8a1a65..735740258 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -253,7 +253,7 @@ product version qual flags fftw v3_3_10 - icarus_data v10_06_00 - icarus_signal_processing v10_06_00_01 - -icarusalg v10_06_00_03 - +icarusalg v10_06_00_04 - icarusutil v10_06_00_04 - libwda v2_30_0a - sbncode v10_06_00_04 - From 27c43aa02029550f7441422d79a84c486bbf93e5 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 6 Aug 2025 18:54:37 -0500 Subject: [PATCH 053/101] Remove CaloConst override in CAF. --- fcl/caf/cafmaker_add_detsim2d_icarus.fcl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl index 11c7f0aba..543a85f48 100644 --- a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl +++ b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl @@ -3,10 +3,3 @@ physics.producers.cafmaker.SimChannelLabel: "merge" # 2D, YZ sim # SimChannel's get re-made by 2D drift simulation -- use these to backtrack services.BackTrackerService.BackTracker.SimChannelModuleLabel: "merge" - -# Mini production, pre signal shape tuning -# this_cal_constants: [1.343e-2, 1.338e-2, 0.01227] -# Post signal shape tuning, post gain fixing -# See docdb 32139 -this_cal_constants: [1.343e-2, 1.338e-2, 0.0128041] -#include "set_caf_calconst.fcl" From 798f36c93b74195dca23a34ff0dc3ed86e231163 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 6 Aug 2025 22:11:11 -0500 Subject: [PATCH 054/101] Tag for production release --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12000ce3f..9bab463a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) +#project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) -#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.01-p05) -#project(icaruscode LANGUAGES CXX) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p01) +project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" From 527aaa0c5a015a09736045c0147f342a530cc799 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 11 Aug 2025 18:17:16 -0500 Subject: [PATCH 055/101] Put supera config in icaruscode with correct SimChannel input. Override in stage1 reco fcl file. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 3 + .../supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl | 199 ++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index d5b1255c6..49ca2ea09 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -389,4 +389,7 @@ icarus_stage1_producers.SBNShowerGausCryoW.UseAllParticles: icarus_stage1_producers.SBNShowerGausCryoE.PFParticleLabel: "pandoraGausCryoE" icarus_stage1_producers.SBNShowerGausCryoE.UseAllParticles: true +# Set supera input fcl files +icarus_stage1_analyzers.superaMC.supera_params: "supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl" + END_PROLOG diff --git a/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl new file mode 100644 index 000000000..0a6b52ed5 --- /dev/null +++ b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_v10.fcl @@ -0,0 +1,199 @@ +ProcessDriver: { + + Verbosity: 2 + EnableFilter: true + RandomAccess: false + ProcessType: ["SuperaMCTruth","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePoint","SuperaSpacePoint","Tensor3DFromCluster3D","CombineTensor3D","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3D","RescaleChargeTensor3D","SuperaOptical","SuperaCRT"] + ProcessName: ["MultiPartVrtx","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePointCryoE","SuperaSpacePointCryoW","Tensor3DFromCluster3D","CombineTensor3DGhost","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3DCryoE","RescaleChargeTensor3DCryoW","SuperaOptical","SuperaCRT"] + + IOManager: { + Verbosity: 2 + Name: "IOManager" + IOMode: 1 + OutFileName: "out_test.root" + InputFiles: [] + InputDirs: [] + StoreOnlyType: [] + StoreOnlyName: [] + } + + ProcessList: { + SuperaCRT: { + CRTHitProducers: ["crthit"] + CRTHitOutputs: ["crthit"] + } + + SuperaOptical: { + OpFlashProducers: ["opflashCryoE","opflashCryoW"] + OpFlashOutputs: ["cryoE","cryoW"] + } + + EmptyTensorFilter: { + Tensor3DProducerList: ["pcluster_semantics_ghost"] + MinVoxel3DCountList: [1] + } + + RescaleChargeTensor3DCryoE: { + HitKeyProducerList: ["reco_cryoE_hit_key0","reco_cryoE_hit_key1","reco_cryoE_hit_key2"] + HitChargeProducerList: ["reco_cryoE_hit_charge0","reco_cryoE_hit_charge1","reco_cryoE_hit_charge2"] + OutputProducer: "reco_cryoE_rescaled" + ReferenceProducer: "pcluster" + } + + RescaleChargeTensor3DCryoW: { + HitKeyProducerList: ["reco_cryoW_hit_key0","reco_cryoW_hit_key1","reco_cryoW_hit_key2"] + HitChargeProducerList: ["reco_cryoW_hit_charge0","reco_cryoW_hit_charge1","reco_cryoW_hit_charge2"] + OutputProducer: "reco_cryoW_rescaled" + ReferenceProducer: "pcluster" + } + + ThresholdTensor3D: { # fill with ghost value (5) + TargetProducer: "pcluster_semantics_ghost" + OutputProducer: "pcluster_semantics_ghost" + PaintValue: 5 + } + + CombineTensor3DGhost: { # Combine voxels of cryoE and cryoW + OutputProducer: "pcluster_semantics_ghost" + Tensor3DProducers: ["reco_cryoE","reco_cryoW"] + PoolType: 0 + } + + CombineTensor3D: { + Tensor3DProducers: ["pcluster_semantics_ghost","pcluster_semantics"] + OutputProducer: "pcluster_semantics_ghost" + PoolType: 0 + } + + SuperaMCParticleCluster: { + OutputLabel: "pcluster" + LArMCParticleProducer: "simplemerge" + LArMCShowerProducer: "mcreco" + LArMCTrackProducer: "mcreco" + #LArMCMiniPartProducer: #"largeant" + DeltaSize: 10 + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + Meta3DFromCluster3D: "mcst" + Meta2DFromTensor2D: "" + Verbosity: 2 + UseSimEnergyDeposit: false #true + UseSimEnergyDepositLite: false #true + UseSimEnergyDepositPoints: false #true + UseOrigTrackID: true + CryostatList: [0,0,0,0,1,1,1,1] + TPCList: [0,1,2,3,0,1,2,3] + PlaneList: [] + #SemanticPriority: [2,1,0,3,4] # 0-4 for shower track michel delta LE-scattering + SemanticPriority: [1,2,0,3,4] # 0-4 for shower track michel delta LE-scattering + CheckParticleValidity: false #set false, but this needs to be checked later + + SuperaTrue2RecoVoxel3D: { + DebugMode: false + Verbosity: 2 + Meta3DFromCluster3D: "pcluster" + #LArSimChProducer: "largeant" + LArSimChProducer: "merge" + LArSpacePointProducers: ["cluster3DCryoE","cluster3DCryoW"] + TwofoldMatching: true + UseTruePosition: true + HitThresholdNe: 100 + HitWindowTicks: 15 #5 + HitWindowNSigma: 3 + HitPeakFinding: false + PostAveraging: true + PostAveragingThreshold_cm: 0.425 + DumpToCSV: false + RecoChargeRange: [-1000,50000] + VoxelDistanceThreshold: 3. + UseOrigTrackID: true + } + } + + MultiPartVrtx: { + Verbosity: 2 + #LArMCTruthProducer: "generator" + MCTruthProducers: ["generator","cosmgen"] + OutParticleLabel: "mpv" + Origin: 0 + } + + SuperaBBoxInteraction: { + Verbosity: 2 + LArMCTruthProducer: "generator" + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + UseSEDLite: true + Origin: 0 + Cluster3DLabels: ["mcst","pcluster","sed","masked_true2reco"] + Tensor3DLabels: ["reco_cryoE","reco_cryoW","pcluster_index","masked_true"] + #BBoxSize: [230.4,230.4,230.4] + BBoxSize: [1843.2,1843.2,1843.2] # Covers the whole detector with the smallest possible cube -> yields 6144 = 1024*6 px + #BBoxBottom: [-460.8,-230.4,-921.6] + #BBoxSize: [1789.902,1789.902,1789.902] + #BBoxBottom: [-358.49,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml + #BBoxBottom: [-412.788,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml taking readout window into account + # 358.49+340*1.6/10 = 412.89 + BBoxBottom: [-412.89,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml taking readout window into account + UseFixedBBox: true + VoxelSize: [0.3,0.3,0.3] + CryostatList: [0,0,0,0,1,1,1,1] + TPCList: [0,1,2,3,0,1,2,3] + } + + SuperaSimEnergyDeposit: { + Verbosity: 2 + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + LArMCShowerProducer: "mcreco" + UseSEDLite: true + ParticleProducer: "pcluster" + OutCluster3DLabel: "sed" + StoreLength: false + StoreCharge: false + StorePhoton: false + StoreDiffTime: false + StoreAbsTime: true + StoreDEDX: false + TPCList: [0,1,2,3,0,1,2,3] + CryostatList: [0,0,0,0,1,1,1,1] + } + + ParticleCorrector: { + Verbosity: 2 + Cluster3DProducer: "pcluster_highE" + ParticleProducer: "pcluster" + OutputProducer: "corrected" + VoxelMinValue: -1000 + } + + + Tensor3DFromCluster3D: { + Verbosity: 2 + Cluster3DProducerList: ["pcluster","sed"] + OutputProducerList: ["pcluster","sed"] + PITypeList: [1,1] + FixedPIList: [0.,0.] + } + + SuperaSpacePointCryoE: { + Verbosity: 2 + SpacePointProducers: ["cluster3DCryoE"] + OutputLabel: "reco_cryoE" + DropOutput: ["hit_amp","hit_time","hit_rms","hit_mult","nhits","occupancy"] + StoreWireInfo: true + RecoChargeRange: [-1000, 50000] + } + + SuperaSpacePointCryoW: { + Verbosity: 2 + SpacePointProducers: ["cluster3DCryoW"] + OutputLabel: "reco_cryoW" + DropOutput: ["hit_amp","hit_time","hit_rms","hit_mult","nhits","occupancy"] + StoreWireInfo: true + RecoChargeRange: [-1000, 50000] + } + + } +} + From c9238a733838ad42ba33ef96a97d2984eb762dda Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 12 Aug 2025 10:18:26 -0500 Subject: [PATCH 056/101] Add in overlay supera config with correct CRT label. --- .../Definitions/enable_overlay_stage1.fcl | 3 + ...era_icarus_MC_all_cryo_PMT_CRT_overlay.fcl | 199 ++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl diff --git a/fcl/reco/Definitions/enable_overlay_stage1.fcl b/fcl/reco/Definitions/enable_overlay_stage1.fcl index 71707c38e..27ae256b5 100644 --- a/fcl/reco/Definitions/enable_overlay_stage1.fcl +++ b/fcl/reco/Definitions/enable_overlay_stage1.fcl @@ -12,3 +12,6 @@ physics.producers.crttrack.DataLabelHits: "overlayCRTHit" # overlay PMT waveforms physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["overlayOpWaveforms"] + +# Set Supera config +icarus_stage1_analyzers.superaMC.supera_params: "supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl" diff --git a/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl new file mode 100644 index 000000000..c04bb22a5 --- /dev/null +++ b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl @@ -0,0 +1,199 @@ +ProcessDriver: { + + Verbosity: 2 + EnableFilter: true + RandomAccess: false + ProcessType: ["SuperaMCTruth","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePoint","SuperaSpacePoint","Tensor3DFromCluster3D","CombineTensor3D","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3D","RescaleChargeTensor3D","SuperaOptical","SuperaCRT"] + ProcessName: ["MultiPartVrtx","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePointCryoE","SuperaSpacePointCryoW","Tensor3DFromCluster3D","CombineTensor3DGhost","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3DCryoE","RescaleChargeTensor3DCryoW","SuperaOptical","SuperaCRT"] + + IOManager: { + Verbosity: 2 + Name: "IOManager" + IOMode: 1 + OutFileName: "out_test.root" + InputFiles: [] + InputDirs: [] + StoreOnlyType: [] + StoreOnlyName: [] + } + + ProcessList: { + SuperaCRT: { + CRTHitProducers: ["overlayCRTHit"] + CRTHitOutputs: ["overlayCRTHit"] + } + + SuperaOptical: { + OpFlashProducers: ["opflashCryoE","opflashCryoW"] + OpFlashOutputs: ["cryoE","cryoW"] + } + + EmptyTensorFilter: { + Tensor3DProducerList: ["pcluster_semantics_ghost"] + MinVoxel3DCountList: [1] + } + + RescaleChargeTensor3DCryoE: { + HitKeyProducerList: ["reco_cryoE_hit_key0","reco_cryoE_hit_key1","reco_cryoE_hit_key2"] + HitChargeProducerList: ["reco_cryoE_hit_charge0","reco_cryoE_hit_charge1","reco_cryoE_hit_charge2"] + OutputProducer: "reco_cryoE_rescaled" + ReferenceProducer: "pcluster" + } + + RescaleChargeTensor3DCryoW: { + HitKeyProducerList: ["reco_cryoW_hit_key0","reco_cryoW_hit_key1","reco_cryoW_hit_key2"] + HitChargeProducerList: ["reco_cryoW_hit_charge0","reco_cryoW_hit_charge1","reco_cryoW_hit_charge2"] + OutputProducer: "reco_cryoW_rescaled" + ReferenceProducer: "pcluster" + } + + ThresholdTensor3D: { # fill with ghost value (5) + TargetProducer: "pcluster_semantics_ghost" + OutputProducer: "pcluster_semantics_ghost" + PaintValue: 5 + } + + CombineTensor3DGhost: { # Combine voxels of cryoE and cryoW + OutputProducer: "pcluster_semantics_ghost" + Tensor3DProducers: ["reco_cryoE","reco_cryoW"] + PoolType: 0 + } + + CombineTensor3D: { + Tensor3DProducers: ["pcluster_semantics_ghost","pcluster_semantics"] + OutputProducer: "pcluster_semantics_ghost" + PoolType: 0 + } + + SuperaMCParticleCluster: { + OutputLabel: "pcluster" + LArMCParticleProducer: "simplemerge" + LArMCShowerProducer: "mcreco" + LArMCTrackProducer: "mcreco" + #LArMCMiniPartProducer: #"largeant" + DeltaSize: 10 + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + Meta3DFromCluster3D: "mcst" + Meta2DFromTensor2D: "" + Verbosity: 2 + UseSimEnergyDeposit: false #true + UseSimEnergyDepositLite: false #true + UseSimEnergyDepositPoints: false #true + UseOrigTrackID: true + CryostatList: [0,0,0,0,1,1,1,1] + TPCList: [0,1,2,3,0,1,2,3] + PlaneList: [] + #SemanticPriority: [2,1,0,3,4] # 0-4 for shower track michel delta LE-scattering + SemanticPriority: [1,2,0,3,4] # 0-4 for shower track michel delta LE-scattering + CheckParticleValidity: false #set false, but this needs to be checked later + + SuperaTrue2RecoVoxel3D: { + DebugMode: false + Verbosity: 2 + Meta3DFromCluster3D: "pcluster" + #LArSimChProducer: "largeant" + LArSimChProducer: "merge" + LArSpacePointProducers: ["cluster3DCryoE","cluster3DCryoW"] + TwofoldMatching: true + UseTruePosition: true + HitThresholdNe: 100 + HitWindowTicks: 15 #5 + HitWindowNSigma: 3 + HitPeakFinding: false + PostAveraging: true + PostAveragingThreshold_cm: 0.425 + DumpToCSV: false + RecoChargeRange: [-1000,50000] + VoxelDistanceThreshold: 3. + UseOrigTrackID: true + } + } + + MultiPartVrtx: { + Verbosity: 2 + #LArMCTruthProducer: "generator" + MCTruthProducers: ["generator","cosmgen"] + OutParticleLabel: "mpv" + Origin: 0 + } + + SuperaBBoxInteraction: { + Verbosity: 2 + LArMCTruthProducer: "generator" + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + UseSEDLite: true + Origin: 0 + Cluster3DLabels: ["mcst","pcluster","sed","masked_true2reco"] + Tensor3DLabels: ["reco_cryoE","reco_cryoW","pcluster_index","masked_true"] + #BBoxSize: [230.4,230.4,230.4] + BBoxSize: [1843.2,1843.2,1843.2] # Covers the whole detector with the smallest possible cube -> yields 6144 = 1024*6 px + #BBoxBottom: [-460.8,-230.4,-921.6] + #BBoxSize: [1789.902,1789.902,1789.902] + #BBoxBottom: [-358.49,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml + #BBoxBottom: [-412.788,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml taking readout window into account + # 358.49+340*1.6/10 = 412.89 + BBoxBottom: [-412.89,-181.86,-894.951] # geometry from icarus_complete_20210527_no_overburden.gdml taking readout window into account + UseFixedBBox: true + VoxelSize: [0.3,0.3,0.3] + CryostatList: [0,0,0,0,1,1,1,1] + TPCList: [0,1,2,3,0,1,2,3] + } + + SuperaSimEnergyDeposit: { + Verbosity: 2 + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + LArMCShowerProducer: "mcreco" + UseSEDLite: true + ParticleProducer: "pcluster" + OutCluster3DLabel: "sed" + StoreLength: false + StoreCharge: false + StorePhoton: false + StoreDiffTime: false + StoreAbsTime: true + StoreDEDX: false + TPCList: [0,1,2,3,0,1,2,3] + CryostatList: [0,0,0,0,1,1,1,1] + } + + ParticleCorrector: { + Verbosity: 2 + Cluster3DProducer: "pcluster_highE" + ParticleProducer: "pcluster" + OutputProducer: "corrected" + VoxelMinValue: -1000 + } + + + Tensor3DFromCluster3D: { + Verbosity: 2 + Cluster3DProducerList: ["pcluster","sed"] + OutputProducerList: ["pcluster","sed"] + PITypeList: [1,1] + FixedPIList: [0.,0.] + } + + SuperaSpacePointCryoE: { + Verbosity: 2 + SpacePointProducers: ["cluster3DCryoE"] + OutputLabel: "reco_cryoE" + DropOutput: ["hit_amp","hit_time","hit_rms","hit_mult","nhits","occupancy"] + StoreWireInfo: true + RecoChargeRange: [-1000, 50000] + } + + SuperaSpacePointCryoW: { + Verbosity: 2 + SpacePointProducers: ["cluster3DCryoW"] + OutputLabel: "reco_cryoW" + DropOutput: ["hit_amp","hit_time","hit_rms","hit_mult","nhits","occupancy"] + StoreWireInfo: true + RecoChargeRange: [-1000, 50000] + } + + } +} + From ad8f8d4f9efabc551c69cfae82961e9507e3592e Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 12 Aug 2025 10:47:21 -0500 Subject: [PATCH 057/101] Set overload path correctly... --- fcl/reco/Definitions/enable_overlay_stage1.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/reco/Definitions/enable_overlay_stage1.fcl b/fcl/reco/Definitions/enable_overlay_stage1.fcl index 27ae256b5..68715ee7c 100644 --- a/fcl/reco/Definitions/enable_overlay_stage1.fcl +++ b/fcl/reco/Definitions/enable_overlay_stage1.fcl @@ -14,4 +14,4 @@ physics.producers.crttrack.DataLabelHits: "overlayCRTHit" physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["overlayOpWaveforms"] # Set Supera config -icarus_stage1_analyzers.superaMC.supera_params: "supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl" +physics.analyzers.superaMC.supera_params: "supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl" From b6d07880374c532bb4e13b56c0099b22a1a5a50e Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 13 Aug 2025 13:00:53 -0500 Subject: [PATCH 058/101] CMake tag for release --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bab463a5..8c6ee5596 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p01) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p02) project(icaruscode LANGUAGES CXX) message(STATUS From 047e42549d8722b1b5a99bb2e27ed57b112aba79 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 3 Sep 2025 08:10:21 -0500 Subject: [PATCH 059/101] Fixes to overlay CAF files. Use correct truth labels. Don't blind overlay MC. --- fcl/caf/cafmaker_add_overlay_icarus.fcl | 1 + ...afmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fcl/caf/cafmaker_add_overlay_icarus.fcl b/fcl/caf/cafmaker_add_overlay_icarus.fcl index fda521683..60ef8c4b5 100644 --- a/fcl/caf/cafmaker_add_overlay_icarus.fcl +++ b/fcl/caf/cafmaker_add_overlay_icarus.fcl @@ -2,3 +2,4 @@ services.BackTrackerService.BackTracker.OverrideRealData: true services.ParticleInventoryService.ParticleInventory.OverrideRealData: true physics.producers.cafmaker.OverrideRealData: true +physics.producers.cafmaker.CreateBlindedCAF: false diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl index 8577537b5..37193a73a 100644 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl @@ -6,5 +6,5 @@ physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, flux physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] - +#include "cafmaker_add_detsim2d_icarus.fcl" #include "cafmaker_add_overlay_icarus.fcl" From e4a1d5e80baf0324fd53e360eba50ed4f54127f6 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 3 Sep 2025 08:10:43 -0500 Subject: [PATCH 060/101] GENIE gen config with fiducial cut. --- ...tion_genie_icarus_bnb_overlays_volDetEnclosure_fiducial.fcl | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure_fiducial.fcl diff --git a/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure_fiducial.fcl b/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure_fiducial.fcl new file mode 100644 index 000000000..6ed23513d --- /dev/null +++ b/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure_fiducial.fcl @@ -0,0 +1,3 @@ +#include "simulation_genie_icarus_bnb_overlays_volDetEnclosure.fcl" + +physics.producers.generator.FiducialCut: "mbox: -378.49,-191.86,-904.950652270838,378.49,144.96,904.950652270838" From eb9be52b358b0094a2d1c848b523c44431c460f9 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 3 Sep 2025 10:50:50 -0500 Subject: [PATCH 061/101] Fix output supera CRT hit label. --- fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl index c04bb22a5..bf92f117f 100644 --- a/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl +++ b/fcl/supera/supera_icarus_MC_all_cryo_PMT_CRT_overlay.fcl @@ -20,7 +20,7 @@ ProcessDriver: { ProcessList: { SuperaCRT: { CRTHitProducers: ["overlayCRTHit"] - CRTHitOutputs: ["overlayCRTHit"] + CRTHitOutputs: ["crthit"] } SuperaOptical: { From be93c129b19c46ffc307a940b0bdd4cb0b3e39b2 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 3 Sep 2025 16:54:15 -0500 Subject: [PATCH 062/101] Updated Cmake tag --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c6ee5596..59c37cc7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p02) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p03) project(icaruscode LANGUAGES CXX) message(STATUS From c6b5e2b27d61053af5f5448d641d86a9783cf5f3 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 10 Sep 2025 13:25:19 -0500 Subject: [PATCH 063/101] Update products to save. Keep DAQ CRT hits and PMT waveforms. Drop MC and Overlaid PMT waveforms. --- fcl/overlays/overlay_waveforms.fcl | 1 - fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fcl/overlays/overlay_waveforms.fcl b/fcl/overlays/overlay_waveforms.fcl index f3ba7a1ae..48714f826 100644 --- a/fcl/overlays/overlay_waveforms.fcl +++ b/fcl/overlays/overlay_waveforms.fcl @@ -108,5 +108,4 @@ outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_gaushitTPC*_*_*", "drop *_ophit*_*_*", "drop *_opflash*_*_*", - "drop *_crthit*_*_*", "drop *_crttrack*_*_*"] #TODO: drop raw waveforms that arent from this module. Keep wf from this module to feed to later stages diff --git a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl index ed15d7f0d..d0a3118a0 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl @@ -33,7 +33,11 @@ outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_decon1droi_*_*", "drop *_decon2droi*_*_*", "drop recob::Wire*_roifinder*_*_*", - "keep *_daq_simpleSC*_*"] + "drop *_overlayOpWaveforms_*_*", + "drop raw::OpDetWaveform*_shifted_*_*", + "keep *_daq_simpleSC*_*", + "keep *_daqPMT_*_*" +] # Set the expected input for ophit physics.producers.ophit.InputModule: "shifted" From 9ee874809b4188c01ebe5ec052af15b743c32760 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 10 Sep 2025 13:47:21 -0500 Subject: [PATCH 064/101] Put product update into 1D SP stage0 reco. --- fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index 374fddd02..533e5d486 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -34,7 +34,11 @@ outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder*_*_*", - "keep *_daq_simpleSC*_*"] + "drop *_overlayOpWaveforms_*_*", + "drop raw::OpDetWaveform*_shifted_*_*", + "keep *_daq_simpleSC*_*", + "keep *_daqPMT_*_*" +] # Set the expected input for ophit physics.producers.ophit.InputModule: "shifted" From a335a79156afe8025346fcdb09206150b846e219 Mon Sep 17 00:00:00 2001 From: Tracy Usher Date: Wed, 10 Sep 2025 14:16:25 -0700 Subject: [PATCH 065/101] Make sure to move the tag! --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59c37cc7b..78279ed8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p03) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p04) project(icaruscode LANGUAGES CXX) message(STATUS From 5ca277503b7144a46395aa5d7124e8153096a1d5 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 15 Sep 2025 16:52:42 -0500 Subject: [PATCH 066/101] Use correct CRT Hit label in CAF making. --- fcl/caf/cafmaker_add_overlay_icarus.fcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fcl/caf/cafmaker_add_overlay_icarus.fcl b/fcl/caf/cafmaker_add_overlay_icarus.fcl index 60ef8c4b5..f45301336 100644 --- a/fcl/caf/cafmaker_add_overlay_icarus.fcl +++ b/fcl/caf/cafmaker_add_overlay_icarus.fcl @@ -1,3 +1,5 @@ +physics.producers.cafmaker.CRTHitLabel: overlayCRTHit + services.BackTrackerService.BackTracker.OverrideRealData: true services.ParticleInventoryService.ParticleInventory.OverrideRealData: true From dba9b05f887dd9f937fc0d6a5f7bcb8e672ed7fa Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 15 Sep 2025 16:56:20 -0500 Subject: [PATCH 067/101] New fcl files to enable Overlay pathway for Wiremod sample. --- ...larg4_icarus_cosmics_sce_filterwiremod.fcl | 8 ++ fcl/gen/corsika/prodwiremod_icarus.fcl | 76 +++++++++++++++++++ .../corsika/prodwiremod_icarus_overlays.fcl | 3 + .../mc/stage1_run2_icarus_MC_wiremod.fcl | 17 +++++ .../stage1_run2_icarus_overlay_wiremod.fcl | 4 + 5 files changed, 108 insertions(+) create mode 100644 fcl/g4/larg4_icarus_cosmics_sce_filterwiremod.fcl create mode 100644 fcl/gen/corsika/prodwiremod_icarus.fcl create mode 100644 fcl/gen/corsika/prodwiremod_icarus_overlays.fcl create mode 100644 fcl/reco/Stage1/mc/stage1_run2_icarus_MC_wiremod.fcl create mode 100644 fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_wiremod.fcl diff --git a/fcl/g4/larg4_icarus_cosmics_sce_filterwiremod.fcl b/fcl/g4/larg4_icarus_cosmics_sce_filterwiremod.fcl new file mode 100644 index 000000000..9233641b1 --- /dev/null +++ b/fcl/g4/larg4_icarus_cosmics_sce_filterwiremod.fcl @@ -0,0 +1,8 @@ +#include "filter_wiremod_sbn.fcl" +#include "larg4_icarus_cosmics_sce.fcl" + + +# Insert the sim channel filter and only save events that pass it +physics.filters.requiresimchan: @local::filter_primary_simchan +physics.simulate: [@sequence::physics.simulate, "requiresimchan"] +outputs.rootoutput.SelectEvents: ["simulate"] diff --git a/fcl/gen/corsika/prodwiremod_icarus.fcl b/fcl/gen/corsika/prodwiremod_icarus.fcl new file mode 100644 index 000000000..2ceb4ba7c --- /dev/null +++ b/fcl/gen/corsika/prodwiremod_icarus.fcl @@ -0,0 +1,76 @@ +#include "corsika_icarus.fcl" +#include "beamgates_icarus.fcl" +#include "services_common_icarus.fcl" +#include "services_icarus_simulation.fcl" +#include "wiremodmuon_sbn.fcl" + +process_name: WireModMuon + +services: +{ + #FileCatalogMetadata: @local::art_file_catalog_mc + @table::icarus_gen_services +} + +#Start each new event with an empty event. +source: +{ + module_type: EmptyEvent + timestampPlugin: { plugin_type: "GeneratedEventTimestamp" } + maxEvents: 10 # Number of events to create + firstRun: 1 # Run number to use for this file + firstEvent: 1 # number of first event in the file +} + +# Define and configure some modules to do work on each event. +# First modules are defined; they are scheduled later. +# Modules are grouped by type. +physics: +{ + + producers: + { + generator: { + @table::icarus_corsika_cmc + @table::wiremodmuon_icarus + } + beamgate: @local::icarus_standardbeamgate_BNB # from beamgates_icarus.fcl + rns: { module_type: "RandomNumberSaver" } + } + + #define the producer and filter modules for this path, order matters, + #filters reject all following items. see lines starting physics.producers below + simulate: [ rns, generator, beamgate ] + + #define the output stream, there could be more than one if using filters + stream1: [ out1 ] + + #trigger_paths is a keyword and contains the paths that modify the art::event, + #ie filters and producers + trigger_paths: [simulate] + + #end_paths is a keyword and contains the paths that do not modify the art::Event, + #ie analyzers and output streams. these all run simultaneously + end_paths: [stream1] +} + +#block to define where the output goes. if you defined a filter in the physics +#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} +#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "prodwiremod_standard_icarus_%tc-%p.root" + dataTier: "simulated" + compressionLevel: 1 + fastCloning: false + saveMemoryObjectThreshold: 0 + } +} + +# Allow info messages from generator +# services.message.destinations.LogStandardOut.categories.WireModMuon.limit: 0 + +services.TFileService.fileName: "Supplemental-prodwiremod_standard_icarus_%tc-%p.root" diff --git a/fcl/gen/corsika/prodwiremod_icarus_overlays.fcl b/fcl/gen/corsika/prodwiremod_icarus_overlays.fcl new file mode 100644 index 000000000..d15630731 --- /dev/null +++ b/fcl/gen/corsika/prodwiremod_icarus_overlays.fcl @@ -0,0 +1,3 @@ +#include "prodwiremod_icarus.fcl" + +#include "enable_overlay_gen.fcl" diff --git a/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_wiremod.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_wiremod.fcl new file mode 100644 index 000000000..ec614e45a --- /dev/null +++ b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_wiremod.fcl @@ -0,0 +1,17 @@ +#include "stage1_run2_icarus_MC.fcl" + +# select all T0-tagged tracks +physics.analyzers.caloskimE.SelectionTools: [ + { + tool_type: TrackCaloSkimmerSelectClearCosmicMuon + RequireT0: true + } +] + +physics.analyzers.caloskimW.SelectionTools: [ + { + tool_type: TrackCaloSkimmerSelectClearCosmicMuon + RequireT0: true + } +] + diff --git a/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_wiremod.fcl b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_wiremod.fcl new file mode 100644 index 000000000..300430f78 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_wiremod.fcl @@ -0,0 +1,4 @@ +#include "stage1_run2_icarus_MC_wiremod.fcl" + +#include "enable_overlay_stage1.fcl" + From 644eecd1765021fecf45eaed0c024e3e995a7d7c Mon Sep 17 00:00:00 2001 From: Jack Smedley Date: Fri, 26 Jul 2024 19:47:27 -0500 Subject: [PATCH 068/101] Add geant4 into CAFMaker defs --- fcl/caf/cafmaker_defs.fcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fcl/caf/cafmaker_defs.fcl b/fcl/caf/cafmaker_defs.fcl index feadf4f0d..284075be3 100644 --- a/fcl/caf/cafmaker_defs.fcl +++ b/fcl/caf/cafmaker_defs.fcl @@ -14,6 +14,7 @@ #include "eventweight_genie_sbn.fcl" #include "eventweight_genie_systtools.fcl" #include "eventweight_flux_sbn.fcl" +#include "eventweight_geant4_sbn.fcl" #include "mcsproducer.fcl" #include "rangeproducer.fcl" #include "flashmatch_simple_icarus.fcl" @@ -102,6 +103,7 @@ recoana_caf_preprocess_producers: { genieweight: @local::sbn_eventweight_genie systtools: @local::sbn_systtools fluxweight: @local::sbn_eventweight_flux + geant4weight: @local::sbn_eventweight_geant4 } # Overwrite labels @@ -121,6 +123,7 @@ recoana_caf_preprocess_producers.pandoraPidGausCryoW.CalorimetryModuleLabel: "pa recoana_caf_preprocess_producers.genieweight.weight_functions: @local::recoana_caf_preprocess_producers.genieweight.weight_functions_genie recoana_caf_preprocess_producers.fluxweight.weight_functions: @local::recoana_caf_preprocess_producers.fluxweight.weight_functions_flux +recoana_caf_preprocess_producers.geant4weight.weight_functions: @local::recoana_caf_preprocess_producers.geant4weight.weight_functions_reint # Producers for making SCE products recoana_sce_producers: { @@ -253,7 +256,7 @@ caf_preprocess_data_sequence: [ ShowerCosmicDistCryoE, ShowerCosmicDistCryoW ] -caf_preprocess_evtw_sequence: [@sequence::caf_preprocess_sequence, rns, genieweight, fluxweight] +caf_preprocess_evtw_sequence: [@sequence::caf_preprocess_sequence, rns, genieweight, fluxweight, geant4weight] caf_preprocess_sce_sequence: [ # Run the SCE correction @@ -275,7 +278,7 @@ caf_preprocess_sce_sequence: [ # TODO: rns?? ] -caf_preprocess_sce_evtw_sequence: [@sequence::caf_preprocess_sce_sequence, rns, genieweight, fluxweight] +caf_preprocess_sce_evtw_sequence: [@sequence::caf_preprocess_sce_sequence, rns, genieweight, fluxweight, geant4weight] # CAFMaker config cafmaker: @local::standard_cafmaker From dcda07d0c8c04fcbec917b5cb87a27fc5d7be1f7 Mon Sep 17 00:00:00 2001 From: Jack Smedley Date: Thu, 18 Sep 2025 14:21:12 -0500 Subject: [PATCH 069/101] Add G4Rewight configs to cafmaker --- ...makerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl | 2 ++ ..._icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl | 10 ++++++++++ fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl create mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl create mode 100644 fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl new file mode 100644 index 000000000..7c527db15 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl @@ -0,0 +1,2 @@ +#include "cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl" +#include "cafmaker_add_detsim2d_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl new file mode 100644 index 000000000..fa8790152 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl @@ -0,0 +1,10 @@ +#include "cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl" + +# overwrite the producers to use data versions +physics.producers: @local::caf_preprocess_data_producers +physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, fluxweight, geant4weight, cafmaker] + +physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight", "geant4weight"] + +#include "cafmaker_add_detsim2d_icarus.fcl" +#include "cafmaker_add_overlay_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl b/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl new file mode 100644 index 000000000..7ba1d48a3 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl @@ -0,0 +1,6 @@ +#include "cafmakerjob_icarus.fcl" + +physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, fluxweight, cafmaker ] + +physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] + From c69f596fbcb3bc756d981874cb457b830d8764cf Mon Sep 17 00:00:00 2001 From: Jack Smedley Date: Thu, 18 Sep 2025 17:52:46 -0500 Subject: [PATCH 070/101] Update sbncode dependency to get G4RW support --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 735740258..60310fa1f 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -256,7 +256,7 @@ icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_04 - icarusutil v10_06_00_04 - libwda v2_30_0a - -sbncode v10_06_00_04 - +sbncode v10_06_00_05 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From 858fa9fb707095b80501cd6dc6416923ac15465e Mon Sep 17 00:00:00 2001 From: Jack Smedley Date: Tue, 23 Sep 2025 17:18:53 -0500 Subject: [PATCH 071/101] Mash G4RW into all systtools cafmakerjobs --- ...b_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl | 4 ++-- ...makerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl | 2 -- ..._icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl | 10 ---------- fcl/caf/cafmakerjob_icarus_sce_systtools.fcl | 4 ++-- .../cafmakerjob_icarus_sce_systtools_and_fluxwgt.fcl | 4 ++-- fcl/caf/cafmakerjob_icarus_systtools.fcl | 4 ++-- fcl/caf/cafmakerjob_icarus_systtools_and_fluxwgt.fcl | 4 ++-- fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl | 6 ------ 8 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl delete mode 100644 fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl delete mode 100644 fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl index 37193a73a..a80878e66 100644 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl @@ -2,9 +2,9 @@ # overwrite the producers to use data versions physics.producers: @local::caf_preprocess_data_producers -physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, fluxweight, cafmaker] +physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, geant4weight, fluxweight, cafmaker] -physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] +physics.producers.cafmaker.SystWeightLabels: ["systtools", "geant4weight", "fluxweight"] #include "cafmaker_add_detsim2d_icarus.fcl" #include "cafmaker_add_overlay_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl deleted file mode 100644 index 7c527db15..000000000 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl +++ /dev/null @@ -1,2 +0,0 @@ -#include "cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl" -#include "cafmaker_add_detsim2d_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl deleted file mode 100644 index fa8790152..000000000 --- a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw_overlay.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "cafmakerjob_icarus_detsim2d_systtools_fluxwgt_g4rw.fcl" - -# overwrite the producers to use data versions -physics.producers: @local::caf_preprocess_data_producers -physics.runprod: [ @sequence::caf_preprocess_data_sequence, rns, systtools, fluxweight, geant4weight, cafmaker] - -physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight", "geant4weight"] - -#include "cafmaker_add_detsim2d_icarus.fcl" -#include "cafmaker_add_overlay_icarus.fcl" diff --git a/fcl/caf/cafmakerjob_icarus_sce_systtools.fcl b/fcl/caf/cafmakerjob_icarus_sce_systtools.fcl index 6b5e0cbc0..031ea2cfb 100644 --- a/fcl/caf/cafmakerjob_icarus_sce_systtools.fcl +++ b/fcl/caf/cafmakerjob_icarus_sce_systtools.fcl @@ -1,6 +1,6 @@ #include "cafmakerjob_icarus_sce.fcl" -physics.runprod: [ @sequence::caf_preprocess_sce_sequence, rns, systtools, cafmaker ] +physics.runprod: [ @sequence::caf_preprocess_sce_sequence, rns, systtools, geant4weight, cafmaker ] -physics.producers.cafmaker.SystWeightLabels: ["systtools"] +physics.producers.cafmaker.SystWeightLabels: ["systtools", "geant4weight"] diff --git a/fcl/caf/cafmakerjob_icarus_sce_systtools_and_fluxwgt.fcl b/fcl/caf/cafmakerjob_icarus_sce_systtools_and_fluxwgt.fcl index e4732e3ec..9a33ddb9c 100644 --- a/fcl/caf/cafmakerjob_icarus_sce_systtools_and_fluxwgt.fcl +++ b/fcl/caf/cafmakerjob_icarus_sce_systtools_and_fluxwgt.fcl @@ -1,6 +1,6 @@ #include "cafmakerjob_icarus_sce.fcl" -physics.runprod: [ @sequence::caf_preprocess_sce_sequence, rns, systtools, fluxweight, cafmaker ] +physics.runprod: [ @sequence::caf_preprocess_sce_sequence, rns, systtools, geant4weight, fluxweight, cafmaker ] -physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] +physics.producers.cafmaker.SystWeightLabels: ["systtools", "geant4weight", "fluxweight"] diff --git a/fcl/caf/cafmakerjob_icarus_systtools.fcl b/fcl/caf/cafmakerjob_icarus_systtools.fcl index 94ebf3e09..d5c0670ce 100644 --- a/fcl/caf/cafmakerjob_icarus_systtools.fcl +++ b/fcl/caf/cafmakerjob_icarus_systtools.fcl @@ -1,6 +1,6 @@ #include "cafmakerjob_icarus.fcl" -physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, cafmaker ] +physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, geant4weight, cafmaker ] -physics.producers.cafmaker.SystWeightLabels: ["systtools"] +physics.producers.cafmaker.SystWeightLabels: ["systtools", "geant4weight"] diff --git a/fcl/caf/cafmakerjob_icarus_systtools_and_fluxwgt.fcl b/fcl/caf/cafmakerjob_icarus_systtools_and_fluxwgt.fcl index 7ba1d48a3..b456f0c17 100644 --- a/fcl/caf/cafmakerjob_icarus_systtools_and_fluxwgt.fcl +++ b/fcl/caf/cafmakerjob_icarus_systtools_and_fluxwgt.fcl @@ -1,6 +1,6 @@ #include "cafmakerjob_icarus.fcl" -physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, fluxweight, cafmaker ] +physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, geant4weight, fluxweight, cafmaker ] -physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] +physics.producers.cafmaker.SystWeightLabels: ["systtools", "geant4weight", "fluxweight"] diff --git a/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl b/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl deleted file mode 100644 index 7ba1d48a3..000000000 --- a/fcl/caf/cafmakerjob_icarus_systtools_fluxwgt_g4rw.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "cafmakerjob_icarus.fcl" - -physics.runprod: [ @sequence::caf_preprocess_sequence, rns, systtools, fluxweight, cafmaker ] - -physics.producers.cafmaker.SystWeightLabels: ["systtools", "fluxweight"] - From 76d5f7526b39ab43516c1d1afe778edfaa2739de Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 30 Sep 2025 15:31:16 -0500 Subject: [PATCH 072/101] Fix hit labels for new hit merging. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index 49ca2ea09..9dfe86a1b 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -383,6 +383,13 @@ icarus_stage1_producers.caloskimCalorimetryCryoW.TrackModuleLabel: #icarus_stage1_producers.pandoraGausCryoW.ConfigFile: "PandoraSettings_Master_ICARUS_RawICARUS.xml" #icarus_stage1_producers.pandoraGausCryoE.ConfigFile: "PandoraSettings_Master_ICARUS_RawICARUS.xml" +# Also fix hit label for CRT-(pandora) TPC tagging +icarus_stage1_producers.CRTT0Tagging.HitLabels: ["combineHitsCryoE", "combineHitsCryoW"] + +# Override labels for ntupler +icarus_stage1_analyzers.caloskimE.HITproducer: "combineHitsCryoE" +icarus_stage1_analyzers.caloskimW.HITproducer: "combineHitsCryoW" + ## Definitions for shower finding (both single and by cryostat) icarus_stage1_producers.SBNShowerGausCryoW.PFParticleLabel: "pandoraGausCryoW" icarus_stage1_producers.SBNShowerGausCryoW.UseAllParticles: true From 9d3245c8038ae63c5da7fd3f0c254b10172af04b Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 30 Sep 2025 15:34:03 -0500 Subject: [PATCH 073/101] Set correct CRTSimChannel override for refactored detsim. --- fcl/caf/cafmaker_defs.fcl | 1 + 1 file changed, 1 insertion(+) diff --git a/fcl/caf/cafmaker_defs.fcl b/fcl/caf/cafmaker_defs.fcl index 284075be3..1779def80 100644 --- a/fcl/caf/cafmaker_defs.fcl +++ b/fcl/caf/cafmaker_defs.fcl @@ -313,6 +313,7 @@ cafmaker.OpFlashLabel: "opflash" # cafmaker.TriggerLabel: "daqTrigger" # see also https://github.com/SBNSoftware/icaruscode/issues/556 cafmaker.TriggerLabel: "emuTrigger" cafmaker.UnshiftedTriggerLabel: "emuTriggerUnshifted" +cafmaker.CRTSimChanLabel: "shifted" cafmaker.FlashTrigLabel: "" # unavailable cafmaker.SimChannelLabel: "largeant" cafmaker.SystWeightLabels: ["genieweight", "fluxweight"] From 4b1e4c9c3a47d2e9702d4ff93c961ecb9c68cf61 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 30 Sep 2025 15:36:08 -0500 Subject: [PATCH 074/101] Update standard overlay+data reco fcl files to 2D SP. --- fcl/standard/data/standard_data_stage0_icarus.fcl | 2 +- fcl/standard/data/standard_data_stage1_icarus.fcl | 2 +- fcl/standard/data/standard_data_stage1larcv_icarus.fcl | 2 +- fcl/standard/overlay/standard_overlay_stage0_icarus.fcl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fcl/standard/data/standard_data_stage0_icarus.fcl b/fcl/standard/data/standard_data_stage0_icarus.fcl index 655847775..34926a6ea 100644 --- a/fcl/standard/data/standard_data_stage0_icarus.fcl +++ b/fcl/standard/data/standard_data_stage0_icarus.fcl @@ -1 +1 @@ -#include "stage0_run2_icarus.fcl" +#include "stage0_run2_wcdnn_icarus.fcl" diff --git a/fcl/standard/data/standard_data_stage1_icarus.fcl b/fcl/standard/data/standard_data_stage1_icarus.fcl index 88289d934..99c103424 100644 --- a/fcl/standard/data/standard_data_stage1_icarus.fcl +++ b/fcl/standard/data/standard_data_stage1_icarus.fcl @@ -1 +1 @@ -#include "stage1_run2_1d_icarus.fcl" +#include "stage1_run2_icarus.fcl" diff --git a/fcl/standard/data/standard_data_stage1larcv_icarus.fcl b/fcl/standard/data/standard_data_stage1larcv_icarus.fcl index be9e0d00d..074299416 100644 --- a/fcl/standard/data/standard_data_stage1larcv_icarus.fcl +++ b/fcl/standard/data/standard_data_stage1larcv_icarus.fcl @@ -1 +1 @@ -#include "stage1_run2_1d_larcv_icarus.fcl" +#include "stage1_run2_larcv_icarus.fcl" diff --git a/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl index d91fab811..58de7ed2f 100644 --- a/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl +++ b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl @@ -1 +1 @@ -#include "stage0_run2_wc_icarus_overlay.fcl" +#include "stage0_run2_wcdnn_icarus_overlay.fcl" From 09834c607b35adbd6c76f3639203a8f811a2e84e Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 1 Oct 2025 20:34:47 -0500 Subject: [PATCH 075/101] Updated CMake and product dependencies --- CMakeLists.txt | 6 +++--- ups/product_deps | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78279ed8c..0b1eeae44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -#project(icaruscode VERSION 10.06.00.04 LANGUAGES CXX) +project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p04) -project(icaruscode LANGUAGES CXX) +#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p04) +#project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 60310fa1f..1d767c040 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -253,10 +253,10 @@ product version qual flags fftw v3_3_10 - icarus_data v10_06_00 - icarus_signal_processing v10_06_00_01 - -icarusalg v10_06_00_04 - +icarusalg v10_06_00_06 - icarusutil v10_06_00_04 - libwda v2_30_0a - -sbncode v10_06_00_05 - +sbncode v10_06_00_06 - cetmodules v3_24_01 - only_for_build end_product_list #################################### From ac527c74fc1f356cbef216534c7284c73ae7f3d2 Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Thu, 2 Oct 2025 17:48:39 -0500 Subject: [PATCH 076/101] This commit re-introduces CRTData in Stage0. --- fcl/reco/Stage0/data/stage0_run2_icarus.fcl | 1 - 1 file changed, 1 deletion(-) diff --git a/fcl/reco/Stage0/data/stage0_run2_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_icarus.fcl index bf5b6dbea..31e98f9d5 100644 --- a/fcl/reco/Stage0/data/stage0_run2_icarus.fcl +++ b/fcl/reco/Stage0/data/stage0_run2_icarus.fcl @@ -27,7 +27,6 @@ outputs.rootOutput.outputCommands: [ "drop *_*_*_DAQ*", "drop *_ophituncorrected_*_*", "drop *_daqPMTonbeam_*_*", - "drop *_daqCRT_*_*", "drop *_daqTPCROI_*_*", "drop *_decon2droiEE_*_*", "drop *_decon2droiEW_*_*", From 4a4bc7323fb604fabc3b934a5e8ac13c636b4f98 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Fri, 10 Oct 2025 17:33:45 -0500 Subject: [PATCH 077/101] Updated CMake tag --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b1eeae44..5c18edd74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) +#project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.04-p04) -#project(icaruscode LANGUAGES CXX) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p01) +project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" From 33ee54fe23453b99fee69a3419ded6c41dff7407 Mon Sep 17 00:00:00 2001 From: Matteo Vicenzi Date: Sat, 25 Oct 2025 22:25:56 -0500 Subject: [PATCH 078/101] update pmt tags --- ...calibration_database_GlobalTags_icarus.fcl | 4 ++-- ...alibration_database_PMT_TagSets_icarus.fcl | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl index 03f5d89a5..df6401acc 100644 --- a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl +++ b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl @@ -5,8 +5,8 @@ BEGIN_PROLOG ICARUS_Calibration_GlobalTags: { - @table::TPC_CalibrationTags_Jul2025 - @table::PMT_CalibrationTags_Run3_Feb2025 + @table::TPC_CalibrationTags_Jan2025 + @table::PMT_CalibrationTags_Oct2025 @table::CRT_CalibrationTags_Oct2023 } diff --git a/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl b/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl index aaa87828a..1719359ac 100644 --- a/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl @@ -79,4 +79,26 @@ PMT_CalibrationTags_Run3_Feb2025: { # Run 3: run>=11590 } +# These are the standard tags for analyses on Run 1, Run 2, Run 3 and Run 4 data (as of Oct 2025) +# These tagged versions of the databases contain tables relevant for Run 1, Run 2, Run 3 and Run 4. +# Notes: +# - New cosmics corrections for Run 4 (run>=12837) +PMT_CalibrationTags_Oct2025: { + pmt_cables_delays_data: "v2r5" # tables for run>=0 (null) + # Run 1: run>=8046 + # Run 2: run>=9301, run>=9628, run>=9773 + # Run 3: run>=10369, run>=10441, run>=10865 + # Run 4: run>=12040, run>=12455, run>=12777 + pmt_laser_timing_data: "v2r3" # tables for run>=0 (null) + # Run 1: run>=8046 + # Run 2: run>=9301, run>=9628, run>=9773 + # Run 3: run>=10908, run>=11590 + # Run 4: run>=12058, run>=12837 + pmt_cosmics_timing_data: "v2r3" # tables for run>=0 (null) + # Run 1: run>=8046 + # Run 2: run>=9301, run>=9628, run>=9773 + # Run 3: run>=11590 + # Run 4: run>=12837 +} + END_PROLOG From c0e625d1b6a2f8047fb3059bd3e0fe39cc803f1a Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Mon, 27 Oct 2025 20:33:04 +0100 Subject: [PATCH 079/101] fix to stage1 1D deconvolution --- .../Stage1/data/stage1_run2_icarus_keepup.fcl | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl diff --git a/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl b/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl new file mode 100644 index 000000000..efa086fbc --- /dev/null +++ b/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl @@ -0,0 +1,27 @@ +#include "stage1_run2_icarus.fcl" + + +icarus_filter1D_cluster3D_fix: [ + @sequence::icarus_EastHits_TPC, + combineHitsCryoE, + @sequence::icarus_WestHits_TPC, + combineHitsCryoW, + cluster3DCryoE, + cluster3DCryoW, + TPCHitFilterCryoE, + TPCHitFilterCryoW + ] + +physics.reco: [ @sequence::icarus_filter1D_cluster3D_fix, + @sequence::icarus_pandora_Gauss, + @sequence::icarus_reco_fm, + @sequence::icarus_tpcpmtbarycentermatch, + @sequence::icarus_crttrack, + @sequence::icarus_crtt0tagging, + caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] + +physics.producers.combineHitsCryoE.HitProducerLabelVec: [ "gaushit1dTPCEW", "gaushit1dTPCEE" ] +physics.producers.combineHitsCryoW.HitProducerLabelVec: [ "gaushit1dTPCWW", "gaushit1dTPCWE" ] + +physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] +physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] \ No newline at end of file From e3aded19212fd5fbad51c40ef6f33f01f431b27c Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 20:54:48 +0100 Subject: [PATCH 080/101] removal of keepup fcl, changed icarus_filter1D_cluster3D to original. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 2 -- .../Stage1/data/stage1_run2_icarus_keepup.fcl | 27 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index 9dfe86a1b..b2b97896a 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -212,8 +212,6 @@ icarus_WestHits2d_TPC: [ gaushit2dTPCWW, # Set up filtering of cluster3D hits by cryostat # Changed slightly to faciliate larcv processing icarus_filter1D_cluster3D: [ - @sequence::icarus_EastHits_TPC, - @sequence::icarus_WestHits_TPC, cluster3DCryoE, cluster3DCryoW, TPCHitFilterCryoE, diff --git a/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl b/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl deleted file mode 100644 index efa086fbc..000000000 --- a/fcl/reco/Stage1/data/stage1_run2_icarus_keepup.fcl +++ /dev/null @@ -1,27 +0,0 @@ -#include "stage1_run2_icarus.fcl" - - -icarus_filter1D_cluster3D_fix: [ - @sequence::icarus_EastHits_TPC, - combineHitsCryoE, - @sequence::icarus_WestHits_TPC, - combineHitsCryoW, - cluster3DCryoE, - cluster3DCryoW, - TPCHitFilterCryoE, - TPCHitFilterCryoW - ] - -physics.reco: [ @sequence::icarus_filter1D_cluster3D_fix, - @sequence::icarus_pandora_Gauss, - @sequence::icarus_reco_fm, - @sequence::icarus_tpcpmtbarycentermatch, - @sequence::icarus_crttrack, - @sequence::icarus_crtt0tagging, - caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] - -physics.producers.combineHitsCryoE.HitProducerLabelVec: [ "gaushit1dTPCEW", "gaushit1dTPCEE" ] -physics.producers.combineHitsCryoW.HitProducerLabelVec: [ "gaushit1dTPCWW", "gaushit1dTPCWE" ] - -physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] -physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] \ No newline at end of file From 1b2c8bc1bce3959bb94bf9866f06dbf9ca298670 Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 21:10:10 +0100 Subject: [PATCH 081/101] stage1_run2_1d_icarus updated to work with Cluster3D --- fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl index 4a6e28986..f4172ced2 100644 --- a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl +++ b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl @@ -11,3 +11,6 @@ physics.reco: [ @sequence::icarus_filter1D_cluster3D, physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] + +physics.producers.caloskimE.HITproducer: "cluster3DCryoE" +physics.producers.caloskimW.HITproducer: "cluster3DCryoW" From 049a1f5ec986ee3cd7ac739266dc3c9141761b8c Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 21:14:13 +0100 Subject: [PATCH 082/101] stage1_run2_1d_icarus, fix typo --- fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl index f4172ced2..782f12692 100644 --- a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl +++ b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl @@ -12,5 +12,5 @@ physics.reco: [ @sequence::icarus_filter1D_cluster3D, physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] -physics.producers.caloskimE.HITproducer: "cluster3DCryoE" -physics.producers.caloskimW.HITproducer: "cluster3DCryoW" +physics.producers.caloskimCalorimetryCryoE.HITproducer: "cluster3DCryoE" +physics.producers.caloskimCalorimetryCryoW.HITproducer: "cluster3DCryoW" From aa0fbf1332e2d4859f5ae5cc525947aa164620ca Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 15:24:36 -0500 Subject: [PATCH 083/101] tested and works. caloskimE/W are analyzers, not producers. --- fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl index 782f12692..ff1864803 100644 --- a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl +++ b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl @@ -12,5 +12,5 @@ physics.reco: [ @sequence::icarus_filter1D_cluster3D, physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] -physics.producers.caloskimCalorimetryCryoE.HITproducer: "cluster3DCryoE" -physics.producers.caloskimCalorimetryCryoW.HITproducer: "cluster3DCryoW" +physics.analyzers.caloskimE.HITproducer: "cluster3DCryoE" +physics.analyzers.caloskimW.HITproducer: "cluster3DCryoW" From d8bb948f3c78f3fd9baab1869763fdbe643627ec Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 22:58:49 +0100 Subject: [PATCH 084/101] BugFix: If CRTData are not present, hitTreeun number and subRun number were left uninitialized. --- icaruscode/CRT/CRTDataAnalysis_module.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/icaruscode/CRT/CRTDataAnalysis_module.cc b/icaruscode/CRT/CRTDataAnalysis_module.cc index 2a639fb96..f448c2a1d 100644 --- a/icaruscode/CRT/CRTDataAnalysis_module.cc +++ b/icaruscode/CRT/CRTDataAnalysis_module.cc @@ -209,6 +209,8 @@ namespace crt { vector> fDetPDG; /// signal inducing particle(s)' PDG code //CRT hit product vars + int fHitRun; + int fHitSubRun; int fHitEvent; float fXHit; ///< reconstructed X position of CRT hit (cm) float fYHit; ///< reconstructed Y position of CRT hit (cm) @@ -373,8 +375,8 @@ namespace crt { fDAQNtuple->Branch("gate_start_timestamp", &m_gate_start_timestamp, "gate_start_timestamp/l"); // Define the branches of our SimHit n-tuple - fHitNtuple->Branch("run", &fDetRun, "run/I"); - fHitNtuple->Branch("subrun", &fDetSubRun, "subrun/I"); + fHitNtuple->Branch("run", &fHitRun, "run/I"); + fHitNtuple->Branch("subrun", &fHitSubRun, "subrun/I"); fHitNtuple->Branch("event", &fHitEvent, "event/I"); fHitNtuple->Branch("nHit", &fNHit, "nHit/I"); fHitNtuple->Branch("x", &fXHit, "x/F"); @@ -578,6 +580,8 @@ namespace crt { for ( auto const& hit : *crtHitHandle ) { fNHit++; + fHitRun = fRun; + fHitSubRun = fSubRun; fHitEvent = fEvent; fXHit = hit.x_pos; fYHit = hit.y_pos; From b211c762243982236ccbec5974206828706232dc Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 28 Oct 2025 23:15:29 +0100 Subject: [PATCH 085/101] The code was fairly unreadable. Added indentention for readibility and added TriggerTimestamp variable to DAQTree. --- icaruscode/CRT/CRTDataAnalysis_module.cc | 379 +++++++++++------------ 1 file changed, 177 insertions(+), 202 deletions(-) diff --git a/icaruscode/CRT/CRTDataAnalysis_module.cc b/icaruscode/CRT/CRTDataAnalysis_module.cc index f448c2a1d..b8144f6ba 100644 --- a/icaruscode/CRT/CRTDataAnalysis_module.cc +++ b/icaruscode/CRT/CRTDataAnalysis_module.cc @@ -82,48 +82,41 @@ namespace crt { public: struct Config { - // Save some typing: using Name = fhicl::Name; using Comment = fhicl::Comment; - - fhicl::Atom CRTHitLabel { Name("CRTHitLabel"), Comment("tag of the input data product with reconstructed CRT hits") }; - fhicl::Atom CRTDAQLabel { Name("CRTDAQLabel"), Comment("tag of the input data product with calibrated CRT data") }; - fhicl::Atom TriggerLabel { Name("TriggerLabel"), - Comment("Label for the Trigger fragment label") - }; + Comment("Label for the Trigger fragment label") + }; fhicl::Atom CRTPMTLabel { - Name("CRTPMTLabel"), - Comment("Label for the CRTPMT Matched variables from the crtpmt data product") - }; + Name("CRTPMTLabel"), + Comment("Label for the CRTPMT Matched variables from the crtpmt data product") + }; fhicl::Atom QPed { - Name("QPed"), - Comment("Pedestal offset [ADC]") - }; + Name("QPed"), + Comment("Pedestal offset [ADC]") + }; fhicl::Atom QSlope { - Name("QSlope"), - Comment("Pedestal slope [ADC/photon]") - }; - + Name("QSlope"), + Comment("Pedestal slope [ADC/photon]") + }; fhicl::Atom PEThresh { - Name("PEThresh"), - Comment("threshold in photoelectrons above which charge amplitudes used in hit reco") - }; - + Name("PEThresh"), + Comment("threshold in photoelectrons above which charge amplitudes used in hit reco") + }; fhicl::Atom CrtWindow { - Name("CrtWindow"), - Comment("window for looking data [ns]") - }; + Name("CrtWindow"), + Comment("window for looking data [ns]") + }; }; // Config using Parameters = art::EDAnalyzer::Table; @@ -356,7 +349,7 @@ namespace crt { fHitNtuple = tfs->make("HitTree", "MyCRTHit"); fCRTPMTNtuple = tfs->make("CRTPMTTree", "MyCRTPMTMatch"); - // Define the branches of our DetSim n-tuple + // Define the branches of our CRTData (DAQTree) ntuples fDAQNtuple->Branch("event", &fDetEvent, "event/I"); fDAQNtuple->Branch("run", &fDetRun, "run/I"); fDAQNtuple->Branch("subrun", &fDetSubRun, "subrun/I"); @@ -373,8 +366,10 @@ namespace crt { fDAQNtuple->Branch("subSys", &fDetSubSys, "subSys/I"); fDAQNtuple->Branch("gate_type", &m_gate_type, "gate_type/b"); fDAQNtuple->Branch("gate_start_timestamp", &m_gate_start_timestamp, "gate_start_timestamp/l"); + fDAQNtuple->Branch("trigger_timestamp", &m_trigger_timestamp, "trigger_timestamp/l"); + - // Define the branches of our SimHit n-tuple + // Define the branches of our CRTHits (HitTree) ntuples fHitNtuple->Branch("run", &fHitRun, "run/I"); fHitNtuple->Branch("subrun", &fHitSubRun, "subrun/I"); fHitNtuple->Branch("event", &fHitEvent, "event/I"); @@ -461,7 +456,7 @@ namespace crt { art::Handle trigger_handle; event.getByLabel( fTriggerLabel, trigger_handle ); if( trigger_handle.isValid() ) { - sbn::triggerSource bit = trigger_handle->sourceType; + sbn::triggerSource bit = trigger_handle->sourceType; m_gate_type = value(bit); m_gate_name = bitName(bit); m_trigger_timestamp = trigger_handle->triggerTimestamp; @@ -470,7 +465,7 @@ namespace crt { } else{ - mf::LogError("CRTDataAnalysis") << "No raw::Trigger associated to label: " << fTriggerLabel.label() << "\n" ; + mf::LogError("CRTDataAnalysis") << "No raw::Trigger associated to label: " << fTriggerLabel.label() << "\n" ; } } else { @@ -500,39 +495,33 @@ namespace crt { /// Here t0 - trigger time -ve, only adding 1s makes the value +ve or -ve // if (std::fabs(int64_t(crtList[febdat_i]->fTs0 - m_trigger_timestamp) + 1e9) > fCrtWindow) continue; if ( type == 'm'){ - for(int chan=0; chan<32; chan++) { - std::pair const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)crtList[febdat_i]->fMac5,chan); - float pe = (crtList[febdat_i]->fAdc[chan]-chg_cal.second)/chg_cal.first; - // In order to have Reset TS1 hits in CRTData from Side CRT, we have to explicitly include them - // The current threshold cut (6.5 PE) was applied to filter out noise, but this also filters out - // Reset events which are random trigger around the pedestal. These Reset hits are removed in - // CRT Hit reconstruction. Top CRT has in internal triggering logic and threshold that screens - // from the noise (hence presel = true for all the hits). - // Please revise this in the future if also T0 Reset hits need to be kept in CRTData. - // To do so, include !0crtList[febdat_i]->IsReference_TS0() - if(pe<=fPEThresh && !crtList[febdat_i]->IsReference_TS1()) continue; - presel = true; - } - }else if ( type == 'c' ) { - - presel = true; - - }else if ( type == 'd'){ - for(int chan=0; chan<64; chan++) { - float pe = (crtList[febdat_i]->fAdc[chan]-fQPed)/fQSlope; - if(pe<=fPEThresh) continue; - presel = true; - } - } - if (presel) crtData.push_back(crtList[febdat_i]); + for(int chan=0; chan<32; chan++) { + std::pair const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)crtList[febdat_i]->fMac5,chan); + float pe = (crtList[febdat_i]->fAdc[chan]-chg_cal.second)/chg_cal.first; + // In order to have Reset TS1 hits in CRTData from Side CRT, we have to explicitly include them + // The current threshold cut (6.5 PE) was applied to filter out noise, but this also filters out + // Reset events which are random trigger around the pedestal. These Reset hits are removed in + // CRT Hit reconstruction. Top CRT has in internal triggering logic and threshold that screens + // from the noise (hence presel = true for all the hits). + // Please revise this in the future if also T0 Reset hits need to be kept in CRTData. + // To do so, include !0crtList[febdat_i]->IsReference_TS0() + if(pe<=fPEThresh && !crtList[febdat_i]->IsReference_TS1()) continue; + presel = true; + } + } else if ( type == 'c' ) { + presel = true; + } else if ( type == 'd'){ + for(int chan=0; chan<64; chan++) { + float pe = (crtList[febdat_i]->fAdc[chan]-fQPed)/fQSlope; + if(pe<=fPEThresh) continue; + presel = true; + } + } + if (presel) crtData.push_back(crtList[febdat_i]); presel = false; } // end of crtList - - mf::LogError("CRTDataAnalysis") << "about to loop over " << crtData.size() <<" crtData entries \n"; for (size_t febdat_i=0; febdat_ifAdc[ch]; - std::pair const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)fMac5,ch); - if (fDetSubSys == 0 || fDetSubSys == 1){ - float pe = (fADC[ch]-chg_cal.second)/chg_cal.first; - if (pe < 0) continue; - fPE[ch] = pe; - }else{ - float pe = (fADC[ch]-fQPed)/fQSlope; - if (pe < 0) continue; + for (int ch=0; chfAdc[ch]; + std::pair const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)fMac5,ch); + if (fDetSubSys == 0 || fDetSubSys == 1){ + float pe = (fADC[ch]-chg_cal.second)/chg_cal.first; + if (pe < 0) continue; + fPE[ch] = pe; + } else { + float pe = (fADC[ch]-fQPed)/fQSlope; + if (pe < 0) continue; fPE[ch] = pe; - } - - } - + } + } fDAQNtuple->Fill(); - } //for CRT FEB events - - // Fill CRT Hit Tree art::Handle> crtHitHandle; @@ -575,145 +559,136 @@ namespace crt { std::vector ids; fNHit = 0; if (isCRTHit) { - - mf::LogError("CRTDataAnalysis") << "looping over reco hits..." << std::endl; - for ( auto const& hit : *crtHitHandle ) - { - fNHit++; - fHitRun = fRun; - fHitSubRun = fSubRun; - fHitEvent = fEvent; - fXHit = hit.x_pos; - fYHit = hit.y_pos; - fZHit = hit.z_pos; - fXErrHit = hit.x_err; - fYErrHit = hit.y_err; - fZErrHit = hit.z_err; - fT0Hit = hit.ts0_ns; - fT1Hit = hit.ts1_ns; - - fNHitFeb = hit.feb_id.size(); - fHitTotPe = hit.peshit; - int mactmp = hit.feb_id[0]; - fHitReg = fCrtutils->AuxDetRegionNameToNum(fCrtutils->MacToRegion(mactmp)); - fHitSubSys = fCrtutils->MacToTypeCode(mactmp); - std::fill( std::begin( fHitPE ), std::end( fHitPE ), -1 ); - std::fill( std::begin( fHitMac ), std::end( fHitMac ), -1 ); - std::fill( std::begin( fHitMac ), std::end( fHitChan ), -1 ); - m_gate_crt_diff = m_gate_start_timestamp - hit.ts0_ns; - m_crt_global_trigger = hit.ts0_ns - hit.ts1_ns; - m_crtGT_trig_diff = m_crt_global_trigger - (m_trigger_timestamp%1'000'000'000);//''' - auto ittmp = hit.pesmap.find(mactmp); - if (ittmp==hit.pesmap.end()) { - mf::LogError("CRTDataAnalysis") << "hitreg: " << fHitReg << std::endl; - mf::LogError("CRTDataAnalysis") << "fHitSubSys: "<< fHitSubSys << std::endl; - mf::LogError("CRTDataAnalysis") << "mactmp = " << mactmp << std::endl; - mf::LogError("CRTDataAnalysis") << "could not find mac in pesmap!" << std::endl; - continue; - } - fHitNChan=0; - if(fHitSubSys==0){ - std::map>>::const_iterator it; - for (it = hit.pesmap.begin(); it!=hit.pesmap.end();it++){ - std::vector> thisHit = it->second; - int hitsize = (int) thisHit.size(); - for(int k=0; k< hitsize; k++){ - fHitPE[thisHit[k].first]=thisHit[k].second; - fHitChan[thisHit[k].first]=thisHit[k].first; - fHitMac[thisHit[k].first]=(int)it->first; - if(thisHit[k].second>1) fHitNChan++; - } - } - } else if (fHitSubSys==1) { - int arrpos=-1; - std::map>>::const_iterator it; - for (it = hit.pesmap.begin(); it!=hit.pesmap.end();it++){ - std::vector> thisHit = it->second; - int hitsize = (int) thisHit.size(); - fHitNChan+=hitsize; - for(int k=0; k< hitsize; k++){ - arrpos++; - if(arrpos>=32) continue; - fHitPE[arrpos]=thisHit[k].second; - fHitMac[arrpos]=(int)it->first; - fHitChan[arrpos]=thisHit[k].first; - } - } - } - int chantmp = (*ittmp).second[0].first; - - fHitMod = fCrtutils->MacToAuxDetID(mactmp, chantmp); - fHitStrip = fCrtutils->ChannelToAuxDetSensitiveID(mactmp, chantmp); - - fHitNtuple->Fill(); - }//for CRT Hits + mf::LogError("CRTDataAnalysis") << "looping over reco hits..." << std::endl; + for ( auto const& hit : *crtHitHandle ){ + fNHit++; + fHitRun = fRun; + fHitSubRun = fSubRun; + fHitEvent = fEvent; + fXHit = hit.x_pos; + fYHit = hit.y_pos; + fZHit = hit.z_pos; + fXErrHit = hit.x_err; + fYErrHit = hit.y_err; + fZErrHit = hit.z_err; + fT0Hit = hit.ts0_ns; + fT1Hit = hit.ts1_ns; + + fNHitFeb = hit.feb_id.size(); + fHitTotPe = hit.peshit; + int mactmp = hit.feb_id[0]; + fHitReg = fCrtutils->AuxDetRegionNameToNum(fCrtutils->MacToRegion(mactmp)); + fHitSubSys = fCrtutils->MacToTypeCode(mactmp); + std::fill( std::begin( fHitPE ), std::end( fHitPE ), -1 ); + std::fill( std::begin( fHitMac ), std::end( fHitMac ), -1 ); + std::fill( std::begin( fHitMac ), std::end( fHitChan ), -1 ); + m_gate_crt_diff = m_gate_start_timestamp - hit.ts0_ns; + m_crt_global_trigger = hit.ts0_ns - hit.ts1_ns; + m_crtGT_trig_diff = m_crt_global_trigger - (m_trigger_timestamp%1'000'000'000);//''' + auto ittmp = hit.pesmap.find(mactmp); + if (ittmp==hit.pesmap.end()) { + mf::LogError("CRTDataAnalysis") << "hitreg: " << fHitReg << std::endl; + mf::LogError("CRTDataAnalysis") << "fHitSubSys: "<< fHitSubSys << std::endl; + mf::LogError("CRTDataAnalysis") << "mactmp = " << mactmp << std::endl; + mf::LogError("CRTDataAnalysis") << "could not find mac in pesmap!" << std::endl; + continue; + } + fHitNChan=0; + if(fHitSubSys==0){ + std::map>>::const_iterator it; + for (it = hit.pesmap.begin(); it!=hit.pesmap.end();it++){ + std::vector> thisHit = it->second; + int hitsize = (int) thisHit.size(); + for(int k=0; k< hitsize; k++){ + fHitPE[thisHit[k].first]=thisHit[k].second; + fHitChan[thisHit[k].first]=thisHit[k].first; + fHitMac[thisHit[k].first]=(int)it->first; + if(thisHit[k].second>1) fHitNChan++; + } + } + } else if (fHitSubSys==1) { + int arrpos=-1; + std::map>>::const_iterator it; + for (it = hit.pesmap.begin(); it!=hit.pesmap.end();it++){ + std::vector> thisHit = it->second; + int hitsize = (int) thisHit.size(); + fHitNChan+=hitsize; + for(int k=0; k< hitsize; k++){ + arrpos++; + if(arrpos>=32) continue; + fHitPE[arrpos]=thisHit[k].second; + fHitMac[arrpos]=(int)it->first; + fHitChan[arrpos]=thisHit[k].first; + } + } + } + int chantmp = (*ittmp).second[0].first; + fHitMod = fCrtutils->MacToAuxDetID(mactmp, chantmp); + fHitStrip = fCrtutils->ChannelToAuxDetSensitiveID(mactmp, chantmp); + fHitNtuple->Fill(); + }//for CRT Hits }//if CRT Hits - - else mf::LogError("CRTDataAnalysis") << "CRTHit products not found! (expected if decoder step)" << std::endl; - + else mf::LogError("CRTDataAnalysis") << "CRTHit products not found! (expected if decoder step)" << std::endl; //Fill CRTPMT Match TTree art::Handle> CRTPMTMatchingHandle; if ( event.getByLabel(fCRTPMTProducerLabel, CRTPMTMatchingHandle)){ - for (auto const& match: *CRTPMTMatchingHandle){ - int TopEn = 0, TopEx = 0, SideEn = 0, SideEx = 0; - fMatchEvent = fEvent; - fMatchRun = fRun; - fGateType = m_gate_type; - fFlashID = match.flashID; - fFlashTime_us = match.flashTime; - fFlashGateTime_ns = match.flashGateTime; - fFirstOpHitPeakTime = match.firstOpHitPeakTime; - fFirstOpHitStartTime = match.firstOpHitStartTime; - fFlashInGate = match.flashInGate; - fFlashInBeam = match.flashInBeam; - fFlashPE = match.flashPE; - fFlashPos_x = match.flashPosition.X(); - fFlashPos_y = match.flashPosition.Y(); - fFlashPos_z = match.flashPosition.Z(); - fFlashYWidth = match.flashYWidth; - fFlashZWidth = match.flashZWidth; - fFlashClassification = match.flashClassification; - nMatchedCRTHits = match.matchedCRTHits.size(); - for(auto const& crthit: match.matchedCRTHits){ - CRTHitPos_x.push_back(crthit.position.X()); - CRTHitPos_y.push_back(crthit.position.Y()); - CRTHitPos_z.push_back(crthit.position.Z()); - fCRTPMTTimeDiff_ns.push_back(1e3*crthit.PMTTimeDiff); - fCRTTime_us.push_back(crthit.time); - fCRTSys.push_back(crthit.sys); - fCRTRegion.push_back(crthit.region); - int fMatchType = static_cast(fFlashClassification); - if(fMatchType == 1 || fMatchType == 3 || fMatchType == 6 || fMatchType == 7 || fMatchType == 11) TopEn++; - if(fMatchType == 4 || fMatchType == 13) TopEx++; - if(fMatchType == 2 || fMatchType == 12) SideEn++; - if(fMatchType == 3 || fMatchType == 5 || fMatchType == 7 || fMatchType == 14) SideEx++; - } - fNtopCRTBefore = TopEn; - fNtopCRTAfter = TopEx; - fNsideCRTBefore = SideEn; - fNsideCRTAfter = SideEx; - fCRTPMTNtuple->Fill(); - ClearVecs(); + int TopEn = 0, TopEx = 0, SideEn = 0, SideEx = 0; + fMatchEvent = fEvent; + fMatchRun = fRun; + fGateType = m_gate_type; + fFlashID = match.flashID; + fFlashTime_us = match.flashTime; + fFlashGateTime_ns = match.flashGateTime; + fFirstOpHitPeakTime = match.firstOpHitPeakTime; + fFirstOpHitStartTime = match.firstOpHitStartTime; + fFlashInGate = match.flashInGate; + fFlashInBeam = match.flashInBeam; + fFlashPE = match.flashPE; + fFlashPos_x = match.flashPosition.X(); + fFlashPos_y = match.flashPosition.Y(); + fFlashPos_z = match.flashPosition.Z(); + fFlashYWidth = match.flashYWidth; + fFlashZWidth = match.flashZWidth; + fFlashClassification = match.flashClassification; + nMatchedCRTHits = match.matchedCRTHits.size(); + for(auto const& crthit: match.matchedCRTHits){ + CRTHitPos_x.push_back(crthit.position.X()); + CRTHitPos_y.push_back(crthit.position.Y()); + CRTHitPos_z.push_back(crthit.position.Z()); + fCRTPMTTimeDiff_ns.push_back(1e3*crthit.PMTTimeDiff); + fCRTTime_us.push_back(crthit.time); + fCRTSys.push_back(crthit.sys); + fCRTRegion.push_back(crthit.region); + int fMatchType = static_cast(fFlashClassification); + if(fMatchType == 1 || fMatchType == 3 || fMatchType == 6 || fMatchType == 7 || fMatchType == 11) TopEn++; + if(fMatchType == 4 || fMatchType == 13) TopEx++; + if(fMatchType == 2 || fMatchType == 12) SideEn++; + if(fMatchType == 3 || fMatchType == 5 || fMatchType == 7 || fMatchType == 14) SideEx++; + } + fNtopCRTBefore = TopEn; + fNtopCRTAfter = TopEx; + fNsideCRTBefore = SideEn; + fNsideCRTAfter = SideEx; + fCRTPMTNtuple->Fill(); + ClearVecs(); } // for match in handle } // if valid label else{ mf::LogError("CRTDataAnalysis") << "not Valid CRTPMTProducer label!\n"; } - - - } // CRTDataAnalysis::analyze() - - void CRTDataAnalysis::ClearVecs(){ - CRTHitPos_x.clear(); - CRTHitPos_y.clear(); - CRTHitPos_z.clear(); - fCRTPMTTimeDiff_ns.clear(); - fCRTTime_us.clear(); - fCRTSys.clear(); - fCRTRegion.clear(); - } + } // CRTDataAnalysis::analyze() + + void CRTDataAnalysis::ClearVecs(){ + CRTHitPos_x.clear(); + CRTHitPos_y.clear(); + CRTHitPos_z.clear(); + fCRTPMTTimeDiff_ns.clear(); + fCRTTime_us.clear(); + fCRTSys.clear(); + fCRTRegion.clear(); + } DEFINE_ART_MODULE(CRTDataAnalysis) From f1def6d85df0659fdb3cf3e1d3db5a3a662efcda Mon Sep 17 00:00:00 2001 From: Matteo Vicenzi Date: Wed, 29 Oct 2025 11:28:18 -0400 Subject: [PATCH 086/101] Update icarus_data dependency. As part of the migration from release/SBN2025A to develop, I (Jacob Smith, smithja) noticed that this commit has a higher version number for icarus_data than develop. This commit (originally authored by Matteo Vicenzi) is being prioritized. --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 1d767c040..7517ae1c2 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v10_06_00 - +icarus_data v10_06_01 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_06 - icarusutil v10_06_00_04 - From e48daf9e9f663df64d91a0a1c70d3c171b246012 Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Fri, 31 Oct 2025 13:51:20 -0500 Subject: [PATCH 087/101] This commit does the following things: a) it fixes an issue/typo where CRTT0Tagging for 2D was using Cluster3D instead of combineCluster3D. This was due to a typo HitLabel vs HitLabels. b) Now for 1d also the pandora hit producers are based on Cluster3D. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 2 +- fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index b2b97896a..117092e82 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -382,7 +382,7 @@ icarus_stage1_producers.caloskimCalorimetryCryoW.TrackModuleLabel: #icarus_stage1_producers.pandoraGausCryoE.ConfigFile: "PandoraSettings_Master_ICARUS_RawICARUS.xml" # Also fix hit label for CRT-(pandora) TPC tagging -icarus_stage1_producers.CRTT0Tagging.HitLabels: ["combineHitsCryoE", "combineHitsCryoW"] +icarus_stage1_producers.CRTT0Tagging.HitLabel: ["combineHitsCryoE", "combineHitsCryoW"] # Override labels for ntupler icarus_stage1_analyzers.caloskimE.HITproducer: "combineHitsCryoE" diff --git a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl index ff1864803..1ce43a36c 100644 --- a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl +++ b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl @@ -12,5 +12,10 @@ physics.reco: [ @sequence::icarus_filter1D_cluster3D, physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] +physics.producers.pandoraGausCryoE.HitFinderModuleLabel: "cluster3DCryoE" +physics.producers.pandoraGausCryoW.HitFinderModuleLabel: "cluster3DCryoW" + +physics.producers.CRTT0Tagging.HitLabel: ["cluster3DCryoE", "cluster3DCryoW"] + physics.analyzers.caloskimE.HITproducer: "cluster3DCryoE" physics.analyzers.caloskimW.HITproducer: "cluster3DCryoW" From 638b105cd317f6bf65dbeca0fc2b7badde8f75a2 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 5 Nov 2025 17:33:28 -0600 Subject: [PATCH 088/101] Add in option to control YZMap+Electron lifetime DB from fcl. Add in configuration for Run4 detsim. --- fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl | 3 +++ .../detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl | 3 +++ .../TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl | 6 ++++++ icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet | 4 ++-- ...s-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl create mode 100644 fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl new file mode 100644 index 000000000..7930f8922 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored_yzsim.fcl" + +physics.producers.daq.wcls_main.params.YZMapJson: "yzmap_gain_icarus_v4_run4.json" diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl new file mode 100644 index 000000000..bb6b826b3 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored_yzsim_overlay.fcl" + +physics.producers.daq.wcls_main.params.YZMapJson: "yzmap_gain_icarus_v4_run4.json" diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index f01f766cc..e6ed53d84 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -2,6 +2,8 @@ #include "services_basic_icarus.fcl" // We need this for diffusion #include "simulationservices_icarus.fcl" +// lookup calibration tags +#include "calibration_database_GlobalTags_icarus.fcl" BEGIN_PROLOG @@ -35,6 +37,10 @@ icarus_simwire_wirecell: file_rcresp: "icarus_fnal_rc_tail.json" # use the RCResponse by default cathode_input_format: "array" # scalar (flat) or array (bent) SimEnergyDepositLabel: "ionization" + # yz map config -- default to Run 2 + YZMapJson: "yzmap_icarus_v3_run2.json" + DBFileName: "tpc_elifetime_data" + DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_elifetime_data } structs: { # load values from simulationservices_icarus.fcl diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet index e11d5c8d5..bd64391bf 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet @@ -111,8 +111,8 @@ function(params, tools) { ar39activity: 0, // no simulated activity // DB config - DBFileName: "tpc_elifetime_data", - DBTag: "v2r1", + DBFileName: std.extVar("DBFileName"), + DBTag: std.extVar("DBTag"), ELifetimeCorrection: true, Verbose: false, TPC: 0, diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet index 42b0e9eba..f92466ae9 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet @@ -416,7 +416,7 @@ local deposetfilteryz = [ g.pnode({ type: 'DepoSetFilterYZ', name: 'deposetfilteryz_resp%d-'%std.mod(r,15)+'plane%d-'%std.mod(std.floor(r/15),3)+tools.anodes[std.floor(r/45)].name, data: { - yzmap_filename: 'yzmap_icarus_v3_run2.json', + yzmap_filename: std.extVar('YZMapJson'), bin_width: 10*wc.cm, tpc_width: 1500*wc.mm, bin_height: 10*wc.cm, From 97458ead027aa146f69d07005889b44c7696d616 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 5 Nov 2025 17:34:20 -0600 Subject: [PATCH 089/101] Update TPC calibration to tag including 2D-based Run2+4 calibrations. --- .../calibration_database_GlobalTags_icarus.fcl | 4 ++-- .../calibration_database_TPC_TagSets_icarus.fcl | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl index df6401acc..c6eda5dd3 100644 --- a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl +++ b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl @@ -5,8 +5,8 @@ BEGIN_PROLOG ICARUS_Calibration_GlobalTags: { - @table::TPC_CalibrationTags_Jan2025 - @table::PMT_CalibrationTags_Oct2025 + @table::TPC_CalibrationTags_Oct2025 + @table::PMT_CalibrationTags_Run3_Feb2025 @table::CRT_CalibrationTags_Oct2023 } diff --git a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl index 99d15c020..627be3bc7 100644 --- a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl @@ -37,7 +37,7 @@ TPC_CalibrationTags_Jan2025: { } -## TPC_CalibrationTags_Jul2024 +## TPC_CalibrationTags_Jul2025 # Update to 2D deconv tags. Change TPC equalization to be per-plane TPC_CalibrationTags_Jul2025: { @@ -48,4 +48,15 @@ TPC_CalibrationTags_Jul2025: { } +## TPC_CalibrationTags_Oct2025 +# Include Run 4 in calibrations +TPC_CalibrationTags_Oct2025: { + + tpc_channelstatus_data: "v3r4" + tpc_elifetime_data: "v3r1" + tpc_dqdxcalibration_allplanes_data: "v1r1" + tpc_yz_correction_allplanes_data: "v2r1" + +} + END_PROLOG From 3451b8509eb6961dba8522edd27f2af3b6b79308 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 7 Nov 2025 14:46:18 -0600 Subject: [PATCH 090/101] Add in option to override scaler json file. Correct which json file is overriden for Run 4. --- fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl | 2 +- fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl | 2 +- icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl | 1 + .../wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl index 7930f8922..f2a5339a3 100644 --- a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl @@ -1,3 +1,3 @@ #include "detsim_2d_icarus_refactored_yzsim.fcl" -physics.producers.daq.wcls_main.params.YZMapJson: "yzmap_gain_icarus_v4_run4.json" +physics.producers.daq.wcls_main.params.YZScaleMapJson: "yzmap_gain_icarus_v4_run4.json" diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl index bb6b826b3..92158743e 100644 --- a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl @@ -1,3 +1,3 @@ #include "detsim_2d_icarus_refactored_yzsim_overlay.fcl" -physics.producers.daq.wcls_main.params.YZMapJson: "yzmap_gain_icarus_v4_run4.json" +physics.producers.daq.wcls_main.params.YZScaleMapJson: "yzmap_gain_icarus_v4_run4.json" diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index e6ed53d84..8868eb3e1 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -38,6 +38,7 @@ icarus_simwire_wirecell: cathode_input_format: "array" # scalar (flat) or array (bent) SimEnergyDepositLabel: "ionization" # yz map config -- default to Run 2 + YZScaleMapJson: "yzmap_gain_icarus_v4_run2.json" YZMapJson: "yzmap_icarus_v3_run2.json" DBFileName: "tpc_elifetime_data" DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_elifetime_data diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet index f92466ae9..f2ed2310e 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet @@ -221,7 +221,7 @@ local scalers = [{ type: "Scaler", name: "scaler%d" %n, //%std.floor(n/45), data: params.lar { - yzmap_scale_filename: 'yzmap_gain_icarus_v4_run2.json', + yzmap_scale_filename: std.extVar('YZScaleMapJson'), bin_width: 10*wc.cm, tpc_width: 1500*wc.mm, bin_height: 10*wc.cm, From d805bd0863b535468bd9dd6b81ab466915da2fa5 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Tue, 11 Nov 2025 15:44:02 -0600 Subject: [PATCH 091/101] Bump TPC channel status DB version --- fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl index 627be3bc7..544c8216c 100644 --- a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl @@ -52,7 +52,7 @@ TPC_CalibrationTags_Jul2025: { # Include Run 4 in calibrations TPC_CalibrationTags_Oct2025: { - tpc_channelstatus_data: "v3r4" + tpc_channelstatus_data: "v4r0" tpc_elifetime_data: "v3r1" tpc_dqdxcalibration_allplanes_data: "v1r1" tpc_yz_correction_allplanes_data: "v2r1" From 65e92c3c22011832c652a4e05d3fd0a14b3021bd Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 12 Nov 2025 02:02:09 -0600 Subject: [PATCH 092/101] Updating version and dependencies for release --- CMakeLists.txt | 6 +++--- ups/product_deps | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c18edd74..0b03af7a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -#project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) +project(icaruscode VERSION 10.06.00.07 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p01) -project(icaruscode LANGUAGES CXX) +#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p01) +#project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" diff --git a/ups/product_deps b/ups/product_deps index 7517ae1c2..7f422377b 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v10_06_01 - +icarus_data v10_06_02 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_06 - icarusutil v10_06_00_04 - From b4f84f2ed1dc1e1a19c298eb62eb93839c06b732 Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 24 Nov 2025 10:37:10 -0600 Subject: [PATCH 093/101] Update SPINE to use 10 hits per pulse train. --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index 117092e82..4251791ce 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -324,13 +324,13 @@ icarus_stage1_producers.gaushit2dTPCWW.HitFilterAlg.MinPulseHeight: # Setup version of hit finder's with Pulse Trains ("PT"s) enabled icarus_stage1_producers.gaushitPT2dTPCEE: @local::icarus_stage1_producers.gaushit2dTPCEE -icarus_stage1_producers.gaushitPT2dTPCEE.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCEE.LongMaxHits: [10, 10, 10] icarus_stage1_producers.gaushitPT2dTPCEW: @local::icarus_stage1_producers.gaushit2dTPCEW -icarus_stage1_producers.gaushitPT2dTPCEW.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCEW.LongMaxHits: [10, 10, 10] icarus_stage1_producers.gaushitPT2dTPCWE: @local::icarus_stage1_producers.gaushit2dTPCWE -icarus_stage1_producers.gaushitPT2dTPCWE.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCWE.LongMaxHits: [10, 10, 10] icarus_stage1_producers.gaushitPT2dTPCWW: @local::icarus_stage1_producers.gaushit2dTPCWW -icarus_stage1_producers.gaushitPT2dTPCWW.LongMaxHits: [25, 25, 25] +icarus_stage1_producers.gaushitPT2dTPCWW.LongMaxHits: [10, 10, 10] ## Overrides for filtering of cluster3D hits icarus_stage1_filters.TPCHitFilterCryoW.HitDataLabelVec: ["cluster3DCryoW"] From 03c1cfd3ee5043c1bb628720db81633e0c513802 Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 25 Nov 2025 13:55:38 +0100 Subject: [PATCH 094/101] addressed requests from reviewers. sequences: icarus_East/WestHits_TPC re-included --- fcl/reco/Definitions/stage1_icarus_defs.fcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index 4251791ce..ffea118ee 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -212,6 +212,8 @@ icarus_WestHits2d_TPC: [ gaushit2dTPCWW, # Set up filtering of cluster3D hits by cryostat # Changed slightly to faciliate larcv processing icarus_filter1D_cluster3D: [ + @sequence::icarus_EastHits_TPC, + @sequence::icarus_WestHits_TPC, cluster3DCryoE, cluster3DCryoW, TPCHitFilterCryoE, From ad7c2562c5a95e9adab193e1ea826ac19bc5c4dd Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Tue, 2 Dec 2025 00:32:31 -0600 Subject: [PATCH 095/101] Updating icarus_data version --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 7f422377b..e030a7273 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v10_06_02 - +icarus_data v10_06_03 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_06 - icarusutil v10_06_00_04 - From aa88e11442e3e07f886d30e713db44de77927ded Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Wed, 3 Dec 2025 08:43:33 -0600 Subject: [PATCH 096/101] Updating CMake for new production release --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b03af7a5..629dd5c49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,10 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.19) find_package(cetmodules 3.24.01 REQUIRED) -project(icaruscode VERSION 10.06.00.07 LANGUAGES CXX) +#project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -#set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p01) -#project(icaruscode LANGUAGES CXX) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p03) +project(icaruscode LANGUAGES CXX) message(STATUS "\n-- =============================================================================" From 194e2b7d75f7f6cf8ad3088e462859f82bd8e2bd Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 14 Apr 2026 14:44:56 -0500 Subject: [PATCH 097/101] Update PMT GlobalTags to Oct2025, which is the latest tag used by SBN2025A. --- fcl/configurations/calibration_database_GlobalTags_icarus.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl index c6eda5dd3..e09eec522 100644 --- a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl +++ b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl @@ -6,7 +6,7 @@ BEGIN_PROLOG ICARUS_Calibration_GlobalTags: { @table::TPC_CalibrationTags_Oct2025 - @table::PMT_CalibrationTags_Run3_Feb2025 + @table::PMT_CalibrationTags_Oct2025 @table::CRT_CalibrationTags_Oct2023 } From 347df44e26a2dbe38da18b359fa22d3cde32860e Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Mon, 13 Apr 2026 14:45:52 -0500 Subject: [PATCH 098/101] New fcl configurations and modules to enable Dirt Overlay configuration for ICARUS Runs 2+4 MC. --- .../larg4_icarus_cosmics_sce_filterdirt.fcl | 11 ++ ...ie_icarus_bnb_volDetEnclosure_fiducial.fcl | 3 + ...carus_bnb_volWorld_DetEnclosurerockbox.fcl | 21 +++ ...tion_genie_icarus_bnb_volWorld_rockbox.fcl | 6 + .../dirt_gen_overlay_siminfomixer.fcl | 111 ++++++++++++++ .../Filters/FilterMCTruthVolume_module.cc | 145 ++++++++++++++++++ ...EnergyDepFakeTriggerFilterICARUS_module.cc | 58 +++++++ icaruscode/Filters/filterMCTruthVolume.fcl | 11 ++ .../simenergydep_faketrigger_icarus.fcl | 15 ++ .../Overlays/SubRunPOTInEvent_module.cc | 90 +++++++++++ 10 files changed, 471 insertions(+) create mode 100644 fcl/g4/larg4_icarus_cosmics_sce_filterdirt.fcl create mode 100644 fcl/gen/genie/simulation_genie_icarus_bnb_volDetEnclosure_fiducial.fcl create mode 100644 fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_DetEnclosurerockbox.fcl create mode 100644 fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_rockbox.fcl create mode 100644 fcl/overlays/dirt_gen_overlay_siminfomixer.fcl create mode 100644 icaruscode/Filters/FilterMCTruthVolume_module.cc create mode 100644 icaruscode/Filters/SimEnergyDepFakeTriggerFilterICARUS_module.cc create mode 100644 icaruscode/Filters/filterMCTruthVolume.fcl create mode 100644 icaruscode/Filters/simenergydep_faketrigger_icarus.fcl create mode 100644 icaruscode/Overlays/SubRunPOTInEvent_module.cc diff --git a/fcl/g4/larg4_icarus_cosmics_sce_filterdirt.fcl b/fcl/g4/larg4_icarus_cosmics_sce_filterdirt.fcl new file mode 100644 index 000000000..f4c0d3a52 --- /dev/null +++ b/fcl/g4/larg4_icarus_cosmics_sce_filterdirt.fcl @@ -0,0 +1,11 @@ +#include "simenergydep_faketrigger_icarus.fcl" +#include "icarus_siminfomixer.fcl" +#include "larg4_icarus_cosmics.fcl" + +physics.filters.dirtfilter: @local::icarus_simenergydepfaketriggerfilter +physics.producers.potinevent: @local::icarus_subrunpotinevent # so the sim info mixer can grab it + +outputs.rootoutput.SelectEvents: [simulate] +physics.simulate: [@sequence::physics.simulate, potinevent, dirtfilter] + +#include "enable_spacecharge_icarus.fcl" diff --git a/fcl/gen/genie/simulation_genie_icarus_bnb_volDetEnclosure_fiducial.fcl b/fcl/gen/genie/simulation_genie_icarus_bnb_volDetEnclosure_fiducial.fcl new file mode 100644 index 000000000..09612bf48 --- /dev/null +++ b/fcl/gen/genie/simulation_genie_icarus_bnb_volDetEnclosure_fiducial.fcl @@ -0,0 +1,3 @@ +#include "simulation_genie_icarus_bnb_volDetEnclosure.fcl" + +physics.producers.generator.FiducialCut: "mbox: -378.49,-191.86,-904.950652270838,378.49,144.96,904.950652270838" diff --git a/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_DetEnclosurerockbox.fcl b/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_DetEnclosurerockbox.fcl new file mode 100644 index 000000000..aa800408b --- /dev/null +++ b/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_DetEnclosurerockbox.fcl @@ -0,0 +1,21 @@ +#include "filterMCTruthVolume.fcl" +#include "simulation_genie_icarus_bnb_volDetEnclosure.fcl" + +# change "generator" to "mcgen"-- we'll have a filter module to replicate generator +physics.producers.mcgen: @local::physics.producers.generator +physics.producers.mcgen.TopVolume: "volWorld" +physics.producers.mcgen.FiducialCut: "rockbox:(-378.49,-191.86,-904.950652270838)(+378.49,+144.96,+904.950652270838),1,800,0.00425,1.3,1" +physics.producers.mcgen.FluxFiles: ["gsimple_bnb_neutrino_icarus_dirt_*.root"] +physics.producers.mcgen.FluxSearchPaths: "/cvmfs/sbn.osgstorage.org/pnfs/fnal.gov/usr/sbn/persistent/stash/physics-gputnam/icarus-bnb-dirt/" +physics.producers.generator: @erase + +# Reject neutrino interactions inside volDetEnclosure +physics.filters.generator: @local::filtermctruthvolume + +physics.simulate: [rns, mcgen, generator, beamgate] + +outputs.rootoutput.outputCommands: [ + "keep *_*_*_*", + "drop *_mcgen_*_*" +] +outputs.rootoutput.SelectEvents: ["simulate"] diff --git a/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_rockbox.fcl b/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_rockbox.fcl new file mode 100644 index 000000000..f8a411f55 --- /dev/null +++ b/fcl/gen/genie/simulation_genie_icarus_bnb_volWorld_rockbox.fcl @@ -0,0 +1,6 @@ +#include "simulation_genie_icarus_bnb_volDetEnclosure.fcl" + +physics.producers.generator.TopVolume: "volWorld" +physics.producers.generator.FiducialCut: "rockbox:(-378.49,-191.86,-904.950652270838)(+378.49,+144.96,+904.950652270838),1,800,0.00425,1.3,1" +physics.producers.generator.FluxFiles: ["gsimple_bnb_neutrino_icarus_dirt_*.root"] +physics.producers.generator.FluxSearchPaths: "/cvmfs/sbn.osgstorage.org/pnfs/fnal.gov/usr/sbn/persistent/stash/physics-gputnam/icarus-bnb-dirt/" diff --git a/fcl/overlays/dirt_gen_overlay_siminfomixer.fcl b/fcl/overlays/dirt_gen_overlay_siminfomixer.fcl new file mode 100644 index 000000000..ebb55b3dd --- /dev/null +++ b/fcl/overlays/dirt_gen_overlay_siminfomixer.fcl @@ -0,0 +1,111 @@ +#include "services_common_icarus.fcl" +#include "icarus_siminfomixer.fcl" + +services: +{ + @table::icarus_common_services + + scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + # Load the service that manages root files for histograms. + TFileService: { fileName: "siminfomixer.root" } + + RandomNumberGenerator: {} #ART native random number generator +} + +process_name : SimInfoMixer #The process name must NOT contain any underscores + +source: +{ + module_type: RootInput + saveMemoryObjectThreshold: 0 + maxEvents: -1 +} + +outputs: { + out: { module_type: RootOutput + fileName: "%ifb_%tc_mixed.root" + compressionLevel: 1 + dataTier: "generated" + SelectEvents: ["mixer_path"] + } +} + +physics: { + + producers : { + } + + analyzers: { + } + + filters : { + generator: @local::icarus_siminfomixer + beamgate: @local::icarus_siminfomixer + largeant: @local::icarus_siminfomixer + ionization: @local::icarus_siminfomixer + simplemerge: @local::icarus_siminfomixer + genericcrt: @local::icarus_siminfomixer + sedlite: @local::icarus_siminfomixer + simdrift: @local::icarus_siminfomixer + pdfastsim: @local::icarus_siminfomixer + } + + mixer_path : [ generator, beamgate, largeant, ionization, simplemerge, genericcrt, sedlite, simdrift, pdfastsim] + trigger_paths : [ mixer_path ] + + output : [ out ] + end_paths: [ output ] + +} + +physics.filters.generator.MCTruthInputModuleLabels: ["generator::GenGenie"] +physics.filters.generator.GTruthInputModuleLabels: ["generator::GenGenie"] +physics.filters.generator.MCTruthGTruthAssnsInputModuleLabels: ["generator::GenGenie"] +physics.filters.generator.MCFluxInputModuleLabels: ["generator::GenGenie"] +physics.filters.generator.MCTruthMCFluxAssnsInputModuleLabels: ["generator::GenGenie"] +physics.filters.generator.FillPOTInfo: true +physics.filters.generator.POTSummaryTag: "potinevent:SubRunPOT:G4" + +physics.filters.beamgate.BeamGateInputModuleLabels: ["beamgate::GenGenie"] + +physics.filters.largeant.SimEnergyDepositInputModuleLabels: [ + "largeant:LArG4DetectorServicevolTPCPlaneV:G4", + "largeant:LArG4DetectorServicevolTPC0:G4", + "largeant:LArG4DetectorServicevolTPCPlaneU:G4", + "largeant:LArG4DetectorServicevolTPCPlaneY:G4", + "largeant:LArG4DetectorServicevolTPCActive:G4" +] +physics.filters.largeant.AuxDetHitInputModuleLabels: [ + "largeant:LArG4DetectorServicevolAuxDetSensitiveCERNbot:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut309:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOS:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut256:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveDC:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut508:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut497:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut325:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut485:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveCERNtop:G4", + "largeant:LArG4DetectorServicevolAuxDetSensitiveMINOScut400:G4" +] +physics.filters.largeant.MCParticleInputModuleLabels: [ + "largeant::G4", + "largeant:droppedMCParticles:G4" +] +physics.filters.largeant.MCTruthInputModuleLabels: ["generator::GenGenie"] +physics.filters.largeant.MCTruthMCParticleAssnsInputModuleLabels: ["largeant::G4"] + +physics.filters.ionization.SimEnergyDepositInputModuleLabels: [ + "ionization::G4", + "ionization:priorSCE:G4" +] + +physics.filters.simplemerge.MCParticleInputModuleLabels: ["simplemerge::G4"] + +physics.filters.genericcrt.AuxDetSimChannelInputModuleLabels: ["genericcrt::G4"] + +physics.filters.sedlite.SimEnergyDepositLiteInputModuleLabels: ["sedlite::G4"] + +physics.filters.simdrift.SimChannelInputModuleLabels: ["simdrift::G4"] + +physics.filters.pdfastsim.SimPhotonsInputModuleLabels: ["pdfastsim::G4"] diff --git a/icaruscode/Filters/FilterMCTruthVolume_module.cc b/icaruscode/Filters/FilterMCTruthVolume_module.cc new file mode 100644 index 000000000..8aac0b1fa --- /dev/null +++ b/icaruscode/Filters/FilterMCTruthVolume_module.cc @@ -0,0 +1,145 @@ +//////////////////////////////////////////////////////////////////////// +// FilterMCTruthVolume_module.cc +// +// art::EDFilter that selects events containing at least one MCTruth +// neutrino interaction with a vertex __outside__ a user-specified box. +// Produces filtered MCTruth, GTruth, and MCFlux collections with +// their associations. Passes through POT summary at the SubRun level. +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Persistency/Common/PtrMaker.h" +#include "canvas/Persistency/Common/Assns.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "larcoreobj/SummaryData/POTSummary.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "nusimdata/SimulationBase/MCFlux.h" + +#include +#include +#include + +class FilterMCTruthVolume : public art::EDFilter { +public: + explicit FilterMCTruthVolume(fhicl::ParameterSet const& pset); + + bool filter(art::Event& evt) override; + bool endSubRun(art::SubRun& sr) override; + +private: + art::InputTag fMCTruthLabel; + art::InputTag fPOTLabel; + std::array fVolumeLow; + std::array fVolumeHigh; + + bool inVolume(double x, double y, double z) const; +}; + +// --------------------------------------------------------------------------- +FilterMCTruthVolume::FilterMCTruthVolume(fhicl::ParameterSet const& pset) + : EDFilter{pset} + , fMCTruthLabel{pset.get("MCTruthLabel", "generator")} + , fPOTLabel{pset.get("POTLabel", "generator")} +{ + auto lo = pset.get>("VolumeLow"); + auto hi = pset.get>("VolumeHigh"); + if (lo.size() != 3 || hi.size() != 3) + throw art::Exception(art::errors::Configuration) + << "VolumeLow and VolumeHigh must each have exactly 3 elements (x, y, z)."; + std::copy(lo.begin(), lo.end(), fVolumeLow.begin()); + std::copy(hi.begin(), hi.end(), fVolumeHigh.begin()); + + produces>(); + produces>(); + produces>(); + produces>(); + produces>(); + produces(); +} + +// --------------------------------------------------------------------------- +bool FilterMCTruthVolume::inVolume(double x, double y, double z) const +{ + return x >= fVolumeLow[0] && x <= fVolumeHigh[0] && + y >= fVolumeLow[1] && y <= fVolumeHigh[1] && + z >= fVolumeLow[2] && z <= fVolumeHigh[2]; +} + +// --------------------------------------------------------------------------- +bool FilterMCTruthVolume::filter(art::Event& evt) +{ + auto outMCTruth = std::make_unique>(); + auto outGTruth = std::make_unique>(); + auto outMCFlux = std::make_unique>(); + auto assnsTG = std::make_unique>(); + auto assnsTF = std::make_unique>(); + + auto const& mctruthHandle = evt.getValidHandle>(fMCTruthLabel); + + art::FindOneP findGTruth(mctruthHandle, evt, fMCTruthLabel); + art::FindOneP findMCFlux(mctruthHandle, evt, fMCTruthLabel); + + art::PtrMaker makeTruthPtr(evt); + art::PtrMaker makeGTruthPtr(evt); + art::PtrMaker makeMCFluxPtr(evt); + + for (size_t i = 0; i < mctruthHandle->size(); ++i) { + auto const& mct = mctruthHandle->at(i); + + if (!mct.NeutrinoSet()) continue; + + double vx = mct.GetNeutrino().Nu().Vx(); + double vy = mct.GetNeutrino().Nu().Vy(); + double vz = mct.GetNeutrino().Nu().Vz(); + + if (inVolume(vx, vy, vz)) continue; + + outMCTruth->push_back(mct); + size_t idx = outMCTruth->size() - 1; + + if (findGTruth.isValid()) { + auto const& gtp = findGTruth.at(i); + if (gtp.isNonnull()) { + outGTruth->push_back(*gtp); + assnsTG->addSingle(makeTruthPtr(idx), makeGTruthPtr(outGTruth->size() - 1)); + } + } + + if (findMCFlux.isValid()) { + auto const& mfp = findMCFlux.at(i); + if (mfp.isNonnull()) { + outMCFlux->push_back(*mfp); + assnsTF->addSingle(makeTruthPtr(idx), makeMCFluxPtr(outMCFlux->size() - 1)); + } + } + } + + bool pass = !outMCTruth->empty(); + + evt.put(std::move(outMCTruth)); + evt.put(std::move(outGTruth)); + evt.put(std::move(outMCFlux)); + evt.put(std::move(assnsTG)); + evt.put(std::move(assnsTF)); + + return pass; +} + +// --------------------------------------------------------------------------- +bool FilterMCTruthVolume::endSubRun(art::SubRun& sr) +{ + auto const& potHandle = sr.getValidHandle(fPOTLabel); + sr.put(std::make_unique(*potHandle), art::subRunFragment()); + return true; +} + +DEFINE_ART_MODULE(FilterMCTruthVolume) diff --git a/icaruscode/Filters/SimEnergyDepFakeTriggerFilterICARUS_module.cc b/icaruscode/Filters/SimEnergyDepFakeTriggerFilterICARUS_module.cc new file mode 100644 index 000000000..b986d7a40 --- /dev/null +++ b/icaruscode/Filters/SimEnergyDepFakeTriggerFilterICARUS_module.cc @@ -0,0 +1,58 @@ +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" + +#include "lardataobj/Simulation/SimEnergyDeposit.h" + +namespace filt { + +class SimEnergyDepFakeTriggerFilterICARUS : public art::EDFilter { + public: + explicit SimEnergyDepFakeTriggerFilterICARUS(fhicl::ParameterSet const& pset); + virtual bool filter(art::Event& e) override; + + private: + const double fBeamTimeMin; // Minimum time of beam window [us] + const double fBeamTimeMax; // Maximum time of beam window [us] + const double fEnergyDeposit; // Minimum energy deposit in TPC for trigger [MeV] + const double fMaxEnergyDeposit; // Maximum energy deposit in TPC for trigger [MeV] + + const std::string fSimEnergyDepModuleName; +}; + +SimEnergyDepFakeTriggerFilterICARUS::SimEnergyDepFakeTriggerFilterICARUS(fhicl::ParameterSet const& pset) + : EDFilter(pset) + , fBeamTimeMin(pset.get("BeamTimeMin")) + , fBeamTimeMax(pset.get("BeamTimeMax")) + , fEnergyDeposit(pset.get("EnergyDeposit")) + , fMaxEnergyDeposit(pset.get("MaxEnergyDeposit", std::numeric_limits::max())) + , fSimEnergyDepModuleName(pset.get("SimEnergyDepModuleName")) +{ +} + +bool SimEnergyDepFakeTriggerFilterICARUS::filter(art::Event& e) +{ + const art::ValidHandle>& + energyDeps(e.getValidHandle>(fSimEnergyDepModuleName)); + + double energy(0); + + for (const sim::SimEnergyDeposit& energyDep : *energyDeps) { + // Check particle time is within the beam time + const double time(energyDep.Time() * 1e-3); // [ns] -> [us] + if (time < fBeamTimeMin || time > fBeamTimeMax) + continue; + + // Add up the energy deposit inside the TPC + energy += energyDep.Energy(); // [MeV] + } + + std::cout << "SAW E= " << energy << " inside window. Threshold is: " << fEnergyDeposit << std::endl; + // If the energy deposit within the beam time is greater than some limit then trigger the event + return (energy > fEnergyDeposit) & (energy < fMaxEnergyDeposit); +} + +DEFINE_ART_MODULE(SimEnergyDepFakeTriggerFilterICARUS) + +} + diff --git a/icaruscode/Filters/filterMCTruthVolume.fcl b/icaruscode/Filters/filterMCTruthVolume.fcl new file mode 100644 index 000000000..32978a7cd --- /dev/null +++ b/icaruscode/Filters/filterMCTruthVolume.fcl @@ -0,0 +1,11 @@ +BEGIN_PROLOG + +filtermctruthvolume: { + module_type: FilterMCTruthVolume + MCTruthLabel: "mcgen" + POTLabel: "mcgen" + VolumeLow: [-571.55, -352.067, -1187.04] + VolumeHigh: [+571.55, +619.033, +1566.2] +} + +END_PROLOG diff --git a/icaruscode/Filters/simenergydep_faketrigger_icarus.fcl b/icaruscode/Filters/simenergydep_faketrigger_icarus.fcl new file mode 100644 index 000000000..535c5ba2f --- /dev/null +++ b/icaruscode/Filters/simenergydep_faketrigger_icarus.fcl @@ -0,0 +1,15 @@ +BEGIN_PROLOG + +icarus_simenergydepfaketriggerfilter: +{ + module_type: "SimEnergyDepFakeTriggerFilterICARUS" + + BeamTimeMin: -0.2 # Minimum time of beam window [us] + BeamTimeMax: 1.9 # Maximum time of beam window [us] + EnergyDeposit: 5 # Minimum energy deposit in TPC for trigger [MeV] + + # By default, take only the energy deposits within the TPC active volume + SimEnergyDepModuleName: "largeant:LArG4DetectorServicevolTPCActive" # Name of SimEnergyDeposit producer module +} + +END_PROLOG diff --git a/icaruscode/Overlays/SubRunPOTInEvent_module.cc b/icaruscode/Overlays/SubRunPOTInEvent_module.cc new file mode 100644 index 000000000..60a97a2db --- /dev/null +++ b/icaruscode/Overlays/SubRunPOTInEvent_module.cc @@ -0,0 +1,90 @@ +//////////////////////////////////////////////////////////////////////// +// Class: SubRunPOTInEvent +// Plugin Type: producer (art v3_00_00) +// File: SubRunPOTInEvent_module.cc +// +// Generated at Mon Jan 21 09:09:38 2019 by Wesley Ketchum using cetskelgen +// from cetlib version v3_04_00. +// +// This module directly copies the subrun POT info into every event. +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// **IT IS NOT A POT PER EVENT IT IS NOT A POT PER EVENT** +// +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include + +#include "larcoreobj/SummaryData/POTSummary.h" + +namespace mix { + class SubRunPOTInEvent; +} + + +class mix::SubRunPOTInEvent : public art::EDProducer { +public: + explicit SubRunPOTInEvent(fhicl::ParameterSet const& p); + // The compiler-generated destructor is fine for non-base + // classes without bare pointers or other resource use. + + // Plugins should not be copied or assigned. + SubRunPOTInEvent(SubRunPOTInEvent const&) = delete; + SubRunPOTInEvent(SubRunPOTInEvent&&) = delete; + SubRunPOTInEvent& operator=(SubRunPOTInEvent const&) = delete; + SubRunPOTInEvent& operator=(SubRunPOTInEvent&&) = delete; + + // Required functions. + void produce(art::Event& e) override; + + // Selected optional functions. + void beginSubRun(art::SubRun& sr) override; + +private: + + art::InputTag fInputTag; + sumdata::POTSummary fSubRunPOT; + +}; + + +mix::SubRunPOTInEvent::SubRunPOTInEvent(fhicl::ParameterSet const& p) + : EDProducer{p} // , + // More initializers here. +{ + fInputTag = p.get("InputTag"); + + produces("SubRunPOT"); +} + +void mix::SubRunPOTInEvent::produce(art::Event& e) +{ + std::unique_ptr srpot_ptr(new sumdata::POTSummary(fSubRunPOT)); + e.put(std::move(srpot_ptr),"SubRunPOT"); +} + +void mix::SubRunPOTInEvent::beginSubRun(art::SubRun& sr) +{ + art::Handle srpot_handle; + sr.getByLabel(fInputTag,srpot_handle); + if(srpot_handle.isValid()) fSubRunPOT = *srpot_handle; + else std::cout << "BAD SUBRUNPOT\n"; + + std::cout << "GOT POT: " << fSubRunPOT.totgoodpot << std::endl; +} + +DEFINE_ART_MODULE(mix::SubRunPOTInEvent) + From 1590c96dd7dad631fb492c6ce84b5613029ac242 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 15 Apr 2026 13:49:30 -0500 Subject: [PATCH 099/101] Update version number for new production release. --- CMakeLists.txt | 2 +- ups/product_deps | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 629dd5c49..63030168e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p03) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p02) project(icaruscode LANGUAGES CXX) message(STATUS diff --git a/ups/product_deps b/ups/product_deps index e030a7273..7f422377b 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v10_06_03 - +icarus_data v10_06_02 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_06 - icarusutil v10_06_00_04 - From 9a79653c7c2c74785b1049440630c93e6afb59f8 Mon Sep 17 00:00:00 2001 From: Francesco Poppi Date: Tue, 25 Nov 2025 13:55:38 +0100 Subject: [PATCH 100/101] addressed requests from reviewers. sequences: icarus_East/WestHits_TPC re-included --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63030168e..629dd5c49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p02) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p03) project(icaruscode LANGUAGES CXX) message(STATUS From 8d5ed098b69161f35d853d66badb36109c9b2010 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 15 Apr 2026 13:49:30 -0500 Subject: [PATCH 101/101] Update version number for new production release. Include up-to-date icarus_data version. --- CMakeLists.txt | 2 +- ups/product_deps | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 629dd5c49..31d03339f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.24.01 REQUIRED) #project(icaruscode VERSION 10.06.00.06 LANGUAGES CXX) -set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p03) +set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.06.00.06-p04) project(icaruscode LANGUAGES CXX) message(STATUS diff --git a/ups/product_deps b/ups/product_deps index 7f422377b..e030a7273 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ wpdir product_dir wire-cell-cfg #################################### product version qual flags fftw v3_3_10 - -icarus_data v10_06_02 - +icarus_data v10_06_03 - icarus_signal_processing v10_06_00_01 - icarusalg v10_06_00_06 - icarusutil v10_06_00_04 -