From 27ccc6842f4f42c24b3fb3f060de53428e0bf81b Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Wed, 5 Nov 2025 17:33:28 -0600 Subject: [PATCH 1/2] 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 11f18d1ee1a265082caff9cae176e8e363d2ab2e Mon Sep 17 00:00:00 2001 From: Gray Putnam Date: Fri, 7 Nov 2025 14:46:18 -0600 Subject: [PATCH 2/2] 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,