diff --git a/fcl/CMakeLists.txt b/fcl/CMakeLists.txt index d54c89701..ff0090ba8 100644 --- a/fcl/CMakeLists.txt +++ b/fcl/CMakeLists.txt @@ -9,8 +9,9 @@ add_subdirectory(caf) add_subdirectory(services) add_subdirectory(utilities) add_subdirectory(compatibility) -add_subdirectory(numi-anaA) -add_subdirectory(syst_variations) add_subdirectory(decoder) +add_subdirectory(supera) add_subdirectory(overlays) +add_subdirectory(standard) + install_fhicl() diff --git a/fcl/SkipTesting.txt b/fcl/SkipTesting.txt index ab365ff85..d3206290e 100644 --- a/fcl/SkipTesting.txt +++ b/fcl/SkipTesting.txt @@ -81,3 +81,17 @@ job/var_50pe_5hits_1us_040ns.fcl 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 +# GRAY PUTNAM 5/8/25: "Enabler" fcl files that should not be dump'd on their own +job/enable_overlay_sp.fcl diff --git a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl index 47e5fd3ed..005c164a6 100644 --- a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl +++ b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl @@ -1,14 +1,14 @@ # over-write labels to use Wire-Cell SimChannels -physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC" # 2D drift +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: "daq:simpleSC" +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: "daq:simpleSC" +physics.producers.mcreco.SimChannelLabel: "merge" # Mini production, pre signal shape tuning # this_cal_constants: [1.343e-2, 1.338e-2, 0.01227] diff --git a/fcl/caf/cafmaker_defs.fcl b/fcl/caf/cafmaker_defs.fcl index 6c676dc26..ad8a5d17c 100644 --- a/fcl/caf/cafmaker_defs.fcl +++ b/fcl/caf/cafmaker_defs.fcl @@ -17,14 +17,12 @@ #include "mcreco.fcl" #include "mcsproducer.fcl" #include "rangeproducer.fcl" -#include "crthitconverter_producer.fcl" #include "flashmatch_simple_icarus.fcl" #include "scecorrections.fcl" #include "trackfindermodules_icarus.fcl" #include "showerfindermodules_icarus.fcl" #include "sbn_stub.fcl" #include "transfer_flashmatch_producer.fcl" -#include "crtt0producer_icarus.fcl" #include "showercosmicdistanceproducer.fcl" @@ -87,14 +85,6 @@ recoana_datacalo_producers.vertexChargeCryoW.NormTools: @local::icarus_calonormt recoana_datacalo_producers.vertexStubCryoE.NormTools: @local::icarus_calonormtools recoana_datacalo_producers.vertexStubCryoW.NormTools: @local::icarus_calonormtools -# CRT Hit to TPC Track matching in E/W -standard_crtt0producer_cryoE: @local::standard_crtt0producer -standard_crtt0producer_cryoE.TpcTrackModuleLabel: ["pandoraTrackGausCryoE"] -standard_crtt0producer_cryoE.PFParticleLabel: ["pandoraGausCryoE"] -standard_crtt0producer_cryoW: @local::standard_crtt0producer -standard_crtt0producer_cryoW.TpcTrackModuleLabel: ["pandoraTrackGausCryoW"] -standard_crtt0producer_cryoW.PFParticleLabel: ["pandoraGausCryoW"] - # Producers for making analysis level products recoana_caf_preprocess_producers: { mcreco: @local::standard_mcreco @@ -108,13 +98,9 @@ recoana_caf_preprocess_producers: { pandoraPidGausCryoE: @local::icarus_chi2pid pandoraPidGausCryoW: @local::icarus_chi2pid - pandoraCRTMatchCryoE: @local::standard_crtt0producer_cryoE - pandoraCRTMatchCryoW: @local::standard_crtt0producer_cryoW - ShowerCosmicDistCryoE: @local::showerCosmicDist_sbn ShowerCosmicDistCryoW: @local::showerCosmicDist_sbn - # crtconvhit: @local::crthitconverter_icarus rns: { module_type: "RandomNumberSaver" } genieweight: @local::sbn_eventweight_genie systtools: @local::sbn_systtools @@ -251,7 +237,6 @@ caf_preprocess_sequence: [ mcreco, # Track Momentum Estimation pandoraTrackMCSCryoE, pandoraTrackMCSCryoW, pandoraTrackRangeCryoE, pandoraTrackRangeCryoW, - pandoraCRTMatchCryoE, pandoraCRTMatchCryoW, # TODO: rns?? # Shower ShowerCosmicDistCryoE, ShowerCosmicDistCryoW @@ -266,7 +251,6 @@ caf_preprocess_data_sequence: [ # Track Momentum Estimation pandoraTrackMCSCryoE, pandoraTrackMCSCryoW, pandoraTrackRangeCryoE, pandoraTrackRangeCryoW, - pandoraCRTMatchCryoE, pandoraCRTMatchCryoW, # TODO: rns?? # Shower ShowerCosmicDistCryoE, ShowerCosmicDistCryoW @@ -318,7 +302,7 @@ cafmaker.TrackChi2PidLabel: "pandoraPidGaus" cafmaker.TrackScatterClosestApproachLabel: "" # unavailable cafmaker.TrackStoppingChi2FitLabel: "" # unavailable cafmaker.TrackDazzleLabel: "" # unavailable -cafmaker.CRTHitMatchLabel: "pandoraCRTMatch" +cafmaker.CRTHitMatchLabel: "" cafmaker.CRTTrackMatchLabel: "" # unavailable cafmaker.TrackMCSLabel: "pandoraTrackMCS" cafmaker.TrackRangeLabel: "pandoraTrackRange" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl new file mode 100644 index 000000000..ded9909e6 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl @@ -0,0 +1,5 @@ +#include "cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt.fcl" + +services.BackTrackerService.BackTracker.OverrideRealData: true +services.ParticleInventoryService.ParticleInventory.OverrideRealData: true +physics.producers.cafmaker.OverrideRealData: true diff --git a/fcl/configurations/calibration_database_GlobalTags_icarus.fcl b/fcl/configurations/calibration_database_GlobalTags_icarus.fcl index 84def123b..5d080878d 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_Feb2024 - @table::PMT_CalibrationTags_Run3_Dec2023 + @table::TPC_CalibrationTags_Jan2025 + @table::PMT_CalibrationTags_Run3_Feb2025 @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 65deb72ff..aaa87828a 100644 --- a/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_PMT_TagSets_icarus.fcl @@ -1,6 +1,6 @@ # File: calibration_database_PMT_TagSets_icarus.fcl # Author: M. Vicenzi (mvicenzi@bnl.gov), J. Kim (jae.sung.kim.3426@gmail.com) -# Date: August 21, 2023 +# Date: February 20, 2025 # Purpose: Tags definitions for the PMT timing calibration databases BEGIN_PROLOG @@ -45,8 +45,8 @@ PMT_CalibrationTags_Run2_Dec2023: { pmt_cosmics_timing_data: "v2r1" # tables for run>=0 (null), run>=8046, run>=9301, run>=9628 and run>=9773 } -# These are the standard tags for analyses on Run 1, Run 2 and future Run 3 data (as of December 2023) -# These tagged versions of the databases contain tables relevant for Run 1, Run 2 and Run 3. +# These are the standard tags for analyses on Run 1, Run 2 and pre-Run 3 data (as of December 2023) +# These tagged versions of the databases contain tables relevant for Run 1, Run 2 and pre-Run 3. # Notes: # - New cable delays (mapping changes, upgrades to laser distribution) # - New laser table for the beginning of Run 3 (new signal cables) @@ -56,4 +56,27 @@ PMT_CalibrationTags_Run3_Dec2023: { pmt_cosmics_timing_data: "v2r1" # tables for run>=0 (null), run>=8046, run>=9301, run>=9628 and run>=9773 } +# These are the standard tags for analyses on Run 1, Run 2, Run 3 and pre-Run 4 data (as of Feb 2025) +# These tagged versions of the databases contain tables relevant for Run 1, Run 2, Run 3 and pre-Run 4. +# Notes: +# - New cable delays for Run 4 (after summer 2024 laser and PPS changes) +# - New laser tables up to final Run 4 gain equalization +# - New cosmics corrections for Run 3, updates to Run 1,2 tables (more statistics) +PMT_CalibrationTags_Run3_Feb2025: { + 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: "v2r2" # tables for run>=0 (null) + # Run 1: run>=8046 + # Run 2: run>=9301, run>=9628, run>=9773 + # Run 3: run>=11590 +} + END_PROLOG diff --git a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl index 88e665461..bbc6c92c6 100644 --- a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl @@ -19,11 +19,21 @@ TPC_CalibrationTags_Oct2023: { ## - Files decoded with release >=v09_66_02 should use v3r2 TPC_CalibrationTags_Feb2024: { - tpc_channelstatus_data: "v3r2" + tpc_channelstatus_data: "v3r4" tpc_elifetime_data: "v2r1" tpc_dqdxcalibration_data: "v2r1" tpc_yz_correction_data: "v2r1" } +## TPC_CalibrationTags_Feb2024 but updating tpc_yz_correction_data to tpc_yz_correction_allplanes_data +TPC_CalibrationTags_Jan2025: { + + tpc_channelstatus_data: "v3r2" + tpc_elifetime_data: "v2r1" + tpc_dqdxcalibration_data: "v2r1" + tpc_yz_correction_allplanes_data: "v1r0" + +} + END_PROLOG diff --git a/fcl/detsim/detsim_1d_icarus_lite.fcl b/fcl/detsim/detsim_1d_icarus_lite.fcl deleted file mode 100644 index 45259aea0..000000000 --- a/fcl/detsim/detsim_1d_icarus_lite.fcl +++ /dev/null @@ -1,19 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_detsim_icarus_lite.fcl -# -# Purpose: Lite version of standard_detsim_icarus.fcl -# -# Created: 31-Mar-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "detsim_drops.fcl" -#include "detsim_1d_icarus.fcl" - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::detsim_drops ] diff --git a/fcl/detsim/detsim_2d_icarus.fcl b/fcl/detsim/detsim_2d_icarus.fcl index c2e4de8e9..e4394bd1d 100644 --- a/fcl/detsim/detsim_2d_icarus.fcl +++ b/fcl/detsim/detsim_2d_icarus.fcl @@ -19,7 +19,7 @@ physics: { crtdaq: @local::icarus_crtsim opdaq: @local::icarus_simpmt - daq: @local::icarus_simwire_wirecell + daq: @local::icarus_simwire_wirecell_shifted rns: { module_type: "RandomNumberSaver" } } # producers @@ -35,12 +35,18 @@ outputs: { rootoutput: { @table::icarus_rootoutput outputCommands: [ - "keep *", - "drop *_ionization_*_*", - "drop *_pmtlvdsgatesinit_*_*", - "drop *_pmtfixedthrinit_*_*", - "drop *_pmttriggerwindowsinit_*_*", - "drop *_triggersimgatesinit_*_*" + "keep *" + , "drop *_ionization_*_*" + , "drop *_simdrift_*_*" + , "drop *_pdfastsim_*_*" + , "drop raw::OpDetWaveform*_opdaq_*_*" + , "drop sim::SimEnergyDeposits_largeant_*_*" + , "drop sim::SimEnergyDepositLites_sedlite_*_*" + , "drop sim::SimEnergyDeposits_shifted_*_*" + , "drop *_pmtlvdsgatesinit_*_*" + , "drop *_pmtfixedthrinit_*_*" + , "drop *_pmttriggerwindowsinit_*_*" + , "drop *_triggersimgatesinit_*_*" ] } } @@ -48,5 +54,4 @@ outputs: { #legacy G4 configs services.Geometry.GDML: "icarus_complete_20220518_overburden.gdml" services.Geometry.ROOT: "icarus_complete_20220518_overburden.gdml" -physics.producers.daq.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-shifted.jsonnet"] -physics.producers.crtdaq.G4ModuleLabel: "shifted" \ No newline at end of file +physics.producers.crtdaq.G4ModuleLabel: "shifted" diff --git a/fcl/detsim/detsim_2d_icarus_SConly.fcl b/fcl/detsim/detsim_2d_icarus_SConly.fcl new file mode 100644 index 000000000..83af1ead0 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_SConly.fcl @@ -0,0 +1,9 @@ +#include "detsim_2d_icarus.fcl" + +physics.producers.tpcsim: @local::icarus_simwire_wirecell_SConly + +physics.simulate: ["rns", "tpcsim"] +physics.stream: [] +outputs: {} + +process_name: TPCSim diff --git a/fcl/detsim/detsim_2d_icarus_diff-10.fcl b/fcl/detsim/detsim_2d_icarus_diff-10.fcl deleted file mode 100644 index 1861b3d52..000000000 --- a/fcl/detsim/detsim_2d_icarus_diff-10.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -# Field Responce input customisation -# physics.producers.daq.wcls_main.params.files_fields: "icarus_testFR_1.json.bz2" - -# -# customisation -# - -# we are suppressing channels with no signal in the TPC -# physics.producers.daq.SuppressNoSignal: true -physics.producers.daq.wcls_main.structs.DL: 3.6e-9 diff --git a/fcl/detsim/detsim_2d_icarus_diff10.fcl b/fcl/detsim/detsim_2d_icarus_diff10.fcl deleted file mode 100644 index 847c42ac2..000000000 --- a/fcl/detsim/detsim_2d_icarus_diff10.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -# Field Responce input customisation -# physics.producers.daq.wcls_main.params.files_fields: "icarus_testFR_1.json.bz2" - -# -# customisation -# - -# we are suppressing channels with no signal in the TPC -# physics.producers.daq.SuppressNoSignal: true -physics.producers.daq.wcls_main.structs.DL: 4.4e-9 diff --git a/fcl/detsim/detsim_2d_icarus_fitFR.fcl b/fcl/detsim/detsim_2d_icarus_fitFR.fcl deleted file mode 100644 index 9f69921f2..000000000 --- a/fcl/detsim/detsim_2d_icarus_fitFR.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR -physics.producers.daq.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel.jsonnet"] diff --git a/fcl/detsim/detsim_2d_icarus_fitFR_nonoise.fcl b/fcl/detsim/detsim_2d_icarus_fitFR_nonoise.fcl deleted file mode 100644 index efc73667f..000000000 --- a/fcl/detsim/detsim_2d_icarus_fitFR_nonoise.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - - -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.0 -physics.producers.daq.wcls_main.structs.int_noise_scale: 0.0 diff --git a/fcl/detsim/detsim_2d_icarus_fitFR_overlay.fcl b/fcl/detsim/detsim_2d_icarus_fitFR_overlay.fcl deleted file mode 100644 index b66d01caa..000000000 --- a/fcl/detsim/detsim_2d_icarus_fitFR_overlay.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - - -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.0 -physics.producers.daq.wcls_main.structs.int_noise_scale: 0.0 -physics.producers.daq.wcls_main.structs.include_noise: false -physics.producers.daq.wcls_main.structs.overlay_drifter: true -physics.producers.daq.wcls_main.plugins: [@sequence::physics.producers.daq.wcls_main.plugins, "WireCellICARUSDrifter", "WireCellHio"] -physics.producers.daq.wcls_main.inputers: ["wclsICARUSDrifter", "wclsSimDepoSetSource:electron"] diff --git a/fcl/detsim/detsim_2d_icarus_fitFR_refactored.fcl b/fcl/detsim/detsim_2d_icarus_fitFR_refactored.fcl deleted file mode 100644 index 0e3df99c9..000000000 --- a/fcl/detsim/detsim_2d_icarus_fitFR_refactored.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "detsim_2d_icarus_refactored.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR diff --git a/fcl/detsim/detsim_2d_icarus_lite.fcl b/fcl/detsim/detsim_2d_icarus_lite.fcl deleted file mode 100644 index c9c7f8772..000000000 --- a/fcl/detsim/detsim_2d_icarus_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: wirecell_multitpc_detsim_icarus_lite.fcl -# -# Purpose: Lite version of wirecell_multitpc_detsim_icarus.fcl -# -# Created: 31-Mar-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "detsim_drops.fcl" -#include "detsim_2d_icarus.fcl" - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::detsim_drops ] - -# Field Responce input customisation -# physics.producers.daq.wcls_main.params.files_fields: "icarus_testFR_1.json.bz2" - diff --git a/fcl/detsim/detsim_2d_icarus_refactored.fcl b/fcl/detsim/detsim_2d_icarus_refactored.fcl index b20c412a4..993ce8586 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 + daq: @local::icarus_simwire_wirecell_filtersed rns: { module_type: "RandomNumberSaver" } } # producers @@ -35,18 +35,23 @@ outputs: { rootoutput: { @table::icarus_rootoutput outputCommands: [ - "keep *", - "drop *_ionization_*_*", - "drop *_pmtlvdsgatesinit_*_*", - "drop *_pmtfixedthrinit_*_*", - "drop *_pmttriggerwindowsinit_*_*", - "drop *_triggersimgatesinit_*_*" + "keep *" + , "drop *_ionization_*_*" + , "drop *_simdrift_*_*" + , "drop *_pdfastsim_*_*" + , "drop raw::OpDetWaveform*_opdaq_*_*" + , "drop sim::SimEnergyDeposits_largeant_*_*" + , "drop sim::SimEnergyDepositLites_sedlite_*_*" + , "drop sim::SimEnergyDeposits_shifted_*_*" + , "drop *_pmtlvdsgatesinit_*_*" + , "drop *_pmtfixedthrinit_*_*" + , "drop *_pmttriggerwindowsinit_*_*" + , "drop *_triggersimgatesinit_*_*" ] } } -physics.producers.daq.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-shifted-refactored.jsonnet"] physics.producers.crtdaq.G4ModuleLabel: "shifted" physics.producers.opdaq.InputModule: "pdfastsim" physics.producers.shifted.InitAuxDetSimChannelLabel: "genericcrt" -physics.producers.shifted.InitSimPhotonsLabel: "pdfastsim" \ No newline at end of file +physics.producers.shifted.InitSimPhotonsLabel: "pdfastsim" diff --git a/fcl/detsim/detsim_2d_icarus_refactored_nonoise.fcl b/fcl/detsim/detsim_2d_icarus_refactored_nonoise.fcl deleted file mode 100644 index 2fd210c22..000000000 --- a/fcl/detsim/detsim_2d_icarus_refactored_nonoise.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "detsim_2d_icarus_refactored.fcl" - -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.0 -physics.producers.daq.wcls_main.structs.int_noise_scale: 0.0 diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim.fcl new file mode 100644 index 000000000..d1f908bfc --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim.fcl @@ -0,0 +1,69 @@ +#include "services_icarus_simulation.fcl" +#include "larg4_services_icarus.fcl" +#include "detsimmodules_wirecell_ICARUS.fcl" +#include "opdetsim_pmt_icarus.fcl" +#include "crtsimmodules_icarus.fcl" +#include "trigger_emulation_icarus.fcl" +#include "rootoutput_icarus.fcl" +#include "mergesimsources_icarus.fcl" +#include "icarus_simedepfilter.fcl" + +process_name: DetSim + +services: { + @table::icarus_detsim_services + @table::icarus_g4_services + @table::icarus_larg4_services + #FileCatalogMetadata: @local::art_file_catalog_mc +} # services + +physics: { + + producers: { + @table::icarus_shifting_triggersim.producers + + crtdaq: @local::icarus_crtsim + opdaq: @local::icarus_simpmt + filtersed: @local::simedepfilter_ind1gap + daq: @local::icarus_simwire_wirecell_yz + merge: @local::icarus_merge_yz_wirecell_simchans + + rns: { module_type: "RandomNumberSaver" } + } # producers + + simulate: [ rns, opdaq, @sequence::icarus_shifting_triggersim.path, filtersed, daq, merge, crtdaq ] + + # define the output stream, there could be more than one if using filters + stream: [ rootoutput ] + +} # physics + +outputs: { + rootoutput: { + @table::icarus_rootoutput + outputCommands: [ + "keep *" + , "drop *_ionization_*_*" + , "drop *_simdrift_*_*" + , "drop *_pdfastsim_*_*" + , "drop raw::OpDetWaveform*_opdaq_*_*" + , "drop sim::SimEnergyDeposits_largeant_*_*" + , "drop sim::SimEnergyDepositLites_sedlite_*_*" + , "drop sim::SimEnergyDeposits_shifted_*_*" + , "drop sim::SimEnergyDepositLites_shifted_*_*" + , "drop sim::SimChannels_daq_*_*" +# , "drop *_pmtlvdsgatesinit_*_*" +# , "drop *_pmtfixedthrinit_*_*" +# , "drop *_pmttriggerwindowsinit_*_*" +# , "drop *_triggersimgatesinit_*_*" + ] + } +} + +physics.producers.crtdaq.G4ModuleLabel: "shifted" +physics.producers.opdaq.InputModule: "pdfastsim" +physics.producers.shifted.InitAuxDetSimChannelLabel: "genericcrt" +physics.producers.shifted.InitSimPhotonsLabel: "pdfastsim" +physics.producers.filtersed.InitSimEnergyDepositLabel: "shifted" +physics.producers.filtersed.InitSimEnergyDepositLiteLabel: "shifted" + diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger.fcl new file mode 100644 index 000000000..0c53caa7f --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger.fcl @@ -0,0 +1,59 @@ +#include "services_icarus_simulation.fcl" +#include "larg4_services_icarus.fcl" +#include "detsimmodules_wirecell_ICARUS.fcl" +#include "opdetsim_pmt_icarus.fcl" +#include "crtsimmodules_icarus.fcl" +#include "trigger_emulation_icarus.fcl" +#include "rootoutput_icarus.fcl" +#include "mergesimsources_icarus.fcl" +#include "icarus_simedepfilter.fcl" + +process_name: DetSim + +services: { + @table::icarus_detsim_services + @table::icarus_g4_services + @table::icarus_larg4_services + #FileCatalogMetadata: @local::art_file_catalog_mc +} # services + +physics: { + + producers: { + crtdaq: @local::icarus_crtsim + opdaq: @local::icarus_simpmt + filtersed: @local::simedepfilter_ind1gap + daq: @local::icarus_simwire_wirecell_yz + merge: @local::icarus_merge_yz_wirecell_simchans + + rns: { module_type: "RandomNumberSaver" } + } # producers + + simulate: [ rns, opdaq, filtersed, daq, merge, crtdaq ] + + # define the output stream, there could be more than one if using filters + stream: [ rootoutput ] + +} # physics + +outputs: { + rootoutput: { + @table::icarus_rootoutput + outputCommands: [ + "keep *" + , "drop *_ionization_*_*" + , "drop *_simdrift_*_*" + , "drop sim::SimEnergyDeposit*_largeant_*_*" + , "drop sim::SimEnergyDepositLite*_sedlite_*_*" + , "drop sim::SimEnergyDeposit*_shifted_*_*" + , "drop sim::SimEnergyDepositLite*_shifted_*_*" + , "drop sim::SimChannels_daq_*_*" +# , "drop *_pmtlvdsgatesinit_*_*" +# , "drop *_pmtfixedthrinit_*_*" +# , "drop *_pmttriggerwindowsinit_*_*" +# , "drop *_triggersimgatesinit_*_*" + ] + } +} + +physics.producers.opdaq.InputModule: "pdfastsim" diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger_overlay.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger_overlay.fcl new file mode 100644 index 000000000..74147585c --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger_overlay.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored_yzsim_notrigger.fcl" + +physics.producers.daq: @local::icarus_simwire_wirecell_yz_overlay diff --git a/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay.fcl b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay.fcl new file mode 100644 index 000000000..ed2f25196 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored_yzsim.fcl" + +physics.producers.daq: @local::icarus_simwire_wirecell_yz_overlay diff --git a/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift.fcl b/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift.fcl deleted file mode 100644 index d6fa3b1fb..000000000 --- a/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "cosmics_g4_icarus.fcl" - -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - diff --git a/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift_lite.fcl b/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift_lite.fcl deleted file mode 100644 index 699a2aee0..000000000 --- a/fcl/g4/2d_drift_sim/cosmics_g4_icarus_sce_2d_drift_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: cosmics_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of cosmics_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "cosmics_g4_icarus_sce_2d_drift.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/2d_drift_sim/dirts_bnb_g4_sce_2d_drift_on.fcl b/fcl/g4/2d_drift_sim/dirts_bnb_g4_sce_2d_drift_on.fcl deleted file mode 100644 index 2e350e5cc..000000000 --- a/fcl/g4/2d_drift_sim/dirts_bnb_g4_sce_2d_drift_on.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "intime_g4_icarus_sce_2d_drift.fcl" - -physics.producers.larg4outtime.InputLabels: [ "generator2" ] - diff --git a/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift.fcl b/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift.fcl deleted file mode 100644 index 5cf717796..000000000 --- a/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "intime_g4_icarus.fcl" - -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - diff --git a/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift_lite.fcl b/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift_lite.fcl deleted file mode 100644 index dc84fe586..000000000 --- a/fcl/g4/2d_drift_sim/intime_g4_icarus_sce_2d_drift_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: intime_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of intime_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "intime_g4_icarus_sce_2d_drift.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.out1.outputCommands: [ @sequence::outputs.out1.outputCommands, - @sequence::g4_drops ] diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift.fcl deleted file mode 100644 index 80a4dcd5d..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "standard_g4_icarus.fcl" - -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization.fcl deleted file mode 100644 index 92d814111..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-1-1.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-1-1.fcl deleted file mode 100644 index ff2e74b27..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-1-1.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.21 diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-10.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-10.fcl deleted file mode 100644 index ce1e6f3fe..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-10.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.212 - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-11.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-11.fcl deleted file mode 100644 index 41d81abc5..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-11.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.214 - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-3-3.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-3-3.fcl deleted file mode 100644 index 262a0e9fc..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-3-3.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.87 -services.LArG4Parameters.ModBoxB: 0.206 - - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-33.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-33.fcl deleted file mode 100644 index 8c6f35d8e..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb-33.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.87 -services.LArG4Parameters.ModBoxB: 0.218 diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb0-1.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb0-1.fcl deleted file mode 100644 index a91346c10..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb0-1.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.93 -services.LArG4Parameters.ModBoxB: 0.21 - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb01.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb01.fcl deleted file mode 100644 index 1b833accd..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb01.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.93 -services.LArG4Parameters.ModBoxB: 0.214 - - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb1-1.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb1-1.fcl deleted file mode 100644 index 3e8103d72..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb1-1.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.21 - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb10.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb10.fcl deleted file mode 100644 index d0544ba29..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb10.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.212 - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb11.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb11.fcl deleted file mode 100644 index 1cf683e88..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb11.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.214 diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb3-3.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb3-3.fcl deleted file mode 100644 index 8f1a5d260..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb3-3.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.999 -services.LArG4Parameters.ModBoxB: 0.206 - - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb33.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb33.fcl deleted file mode 100644 index e4bba4e40..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_ionization_recomb33.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.999 -services.LArG4Parameters.ModBoxB: 0.218 - - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_largeant.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_largeant.fcl deleted file mode 100644 index 6fb491fbd..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_largeant.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_services_icarus_2D_DriftSimOnly.fcl" - -physics.simulate: [ rns, largeant ] - diff --git a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_lite.fcl b/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_lite.fcl deleted file mode 100644 index 558c67976..000000000 --- a/fcl/g4/2d_drift_sim/standard_g4_icarus_sce_2d_drift_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of standard_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "standard_g4_icarus_sce_2d_drift.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/CMakeLists.txt b/fcl/g4/CMakeLists.txt index bca162a0f..f54f7aa05 100644 --- a/fcl/g4/CMakeLists.txt +++ b/fcl/g4/CMakeLists.txt @@ -9,8 +9,6 @@ install_source( EXTRAS ${fcl_files} ) # Add the underlying folders -add_subdirectory(Purity) -add_subdirectory(Lifetime) add_subdirectory(modifiers) add_subdirectory(2d_drift_sim) diff --git a/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime.fcl b/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime.fcl deleted file mode 100644 index af1afba81..000000000 --- a/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - - -services.DetectorPropertiesService.Electronlifetime: 15000 # introducing a new value for the purity study diff --git a/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime_lite.fcl b/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime_lite.fcl deleted file mode 100644 index 1818f418c..000000000 --- a/fcl/g4/Lifetime/g4_icarus_change_elect_lifetime_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_icarus_change_elect_lifetime_lite.fcl -# -# Purpose: Lite version of g4_icarus_change_elect_lifetime.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_icarus_change_elect_lifetime.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_15ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_15ms.fcl deleted file mode 100644 index 1cf02157d..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_15ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 15000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_15ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_15ms_lite.fcl deleted file mode 100644 index 7d239dbcc..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_15ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_15ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_15ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_15ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_1ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_1ms.fcl deleted file mode 100644 index c1ee99857..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_1ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 1000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_1ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_1ms_lite.fcl deleted file mode 100644 index cb74b012c..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_1ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_1ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_1ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_1ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_2ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_2ms.fcl deleted file mode 100644 index 86242ceee..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_2ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 2000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_2ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_2ms_lite.fcl deleted file mode 100644 index 9ef3c5cc2..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_2ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_2ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_2ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_2ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_4ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_4ms.fcl deleted file mode 100644 index a24c40e35..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_4ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 4000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_4ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_4ms_lite.fcl deleted file mode 100644 index a0c5fcea7..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_4ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_4ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_4ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_4ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_6ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_6ms.fcl deleted file mode 100644 index 256656431..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_6ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 6000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_6ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_6ms_lite.fcl deleted file mode 100644 index 6391ad56e..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_6ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_6ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_6ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_6ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_cosmics_purity_8ms.fcl b/fcl/g4/Purity/g4_cosmics_purity_8ms.fcl deleted file mode 100644 index e5502971a..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_8ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 8000 # introducing a new value for the purity study -services.LArG4Parameters.EnabledPhysics: [ - "Em", - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping" - ] -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_cosmics_purity_8ms_lite.fcl b/fcl/g4/Purity/g4_cosmics_purity_8ms_lite.fcl deleted file mode 100644 index 7d2c116ea..000000000 --- a/fcl/g4/Purity/g4_cosmics_purity_8ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_cosmics_purity_8ms_lite.fcl -# -# Purpose: Lite version of g4_cosmics_purity_8ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_cosmics_purity_8ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/Purity/g4_enable_spacecharge_1ms.fcl b/fcl/g4/Purity/g4_enable_spacecharge_1ms.fcl deleted file mode 100644 index ac94e4d4b..000000000 --- a/fcl/g4/Purity/g4_enable_spacecharge_1ms.fcl +++ /dev/null @@ -1,17 +0,0 @@ -#include "standard_g4_icarus_sce.fcl" - -process_name: G4 - -services.DetectorPropertiesService.Electronlifetime: 1000 # introducing a new value for the purity study -#services.LArG4Parameters.EnabledPhysics: [ -# "Em", -# "SynchrotronAndGN", -# "Ion", -# "Hadron", -# "Decay", -# "HadronElastic", -# "Stopping" -# ] -#services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -#physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] - diff --git a/fcl/g4/Purity/g4_enable_spacecharge_1ms_lite.fcl b/fcl/g4/Purity/g4_enable_spacecharge_1ms_lite.fcl deleted file mode 100644 index 00ede24e4..000000000 --- a/fcl/g4/Purity/g4_enable_spacecharge_1ms_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: g4_enable_spacecharge_1ms_lite.fcl -# -# Purpose: Lite version of g4_enable_spacecharge_1ms.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "g4_enable_spacecharge_1ms.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/cosmics_g4_icarus.fcl b/fcl/g4/cosmics_g4_icarus.fcl deleted file mode 100644 index cc1ddf2cb..000000000 --- a/fcl/g4/cosmics_g4_icarus.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "standard_g4_icarus.fcl" - -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.largeant.KeepParticlesInVolumes: [ "volCryostat" ] diff --git a/fcl/g4/cosmics_g4_icarus_lite.fcl b/fcl/g4/cosmics_g4_icarus_lite.fcl deleted file mode 100644 index 7bb42a973..000000000 --- a/fcl/g4/cosmics_g4_icarus_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: cosmics_g4_icarus_lite.fcl -# -# Purpose: Lite version of cosmics_g4_icarus.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "cosmics_g4_icarus.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/cosmics_g4_icarus_sce.fcl b/fcl/g4/cosmics_g4_icarus_sce.fcl deleted file mode 100644 index d8ad69f8a..000000000 --- a/fcl/g4/cosmics_g4_icarus_sce.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "cosmics_g4_icarus.fcl" - -#include "enable_spacecharge_icarus.fcl" - diff --git a/fcl/g4/cosmics_g4_icarus_sce_lite.fcl b/fcl/g4/cosmics_g4_icarus_sce_lite.fcl deleted file mode 100644 index f200b5a16..000000000 --- a/fcl/g4/cosmics_g4_icarus_sce_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: cosmics_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of cosmics_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "cosmics_g4_icarus_sce.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/cosmics_g4_icarus_volCryostat.fcl b/fcl/g4/cosmics_g4_icarus_volCryostat.fcl deleted file mode 100644 index 475d4c184..000000000 --- a/fcl/g4/cosmics_g4_icarus_volCryostat.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "cosmics_g4_icarus.fcl" - -physics.producers.largeant.KeepParticlesInVolumes: [ "volCryostat" ] - diff --git a/fcl/g4/cosmics_g4_icarus_volCryostat_lite.fcl b/fcl/g4/cosmics_g4_icarus_volCryostat_lite.fcl deleted file mode 100644 index 84cfe7782..000000000 --- a/fcl/g4/cosmics_g4_icarus_volCryostat_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: cosmics_g4_icarus_volCryostat_lite.fcl -# -# Purpose: Lite version of cosmics_g4_icarus_volCryostat.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "cosmics_g4_icarus_volCryostat.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/cosmics_g4_icarus_volDetEnc.fcl b/fcl/g4/cosmics_g4_icarus_volDetEnc.fcl deleted file mode 100644 index b486d4c1c..000000000 --- a/fcl/g4/cosmics_g4_icarus_volDetEnc.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "cosmics_g4_icarus.fcl" - -physics.producers.largeant.KeepParticlesInVolumes: [ "volDetEnclosure" ] diff --git a/fcl/g4/cosmics_g4_icarus_volDetEnc_lite.fcl b/fcl/g4/cosmics_g4_icarus_volDetEnc_lite.fcl deleted file mode 100644 index 7053c927d..000000000 --- a/fcl/g4/cosmics_g4_icarus_volDetEnc_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: cosmics_g4_icarus_volDetEnc_lite.fcl -# -# Purpose: Lite version of cosmics_g4_icarus_volDetEnc.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "cosmics_g4_icarus_volDetEnc.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/dirts_bnb_g4_sce_on.fcl b/fcl/g4/dirts_bnb_g4_sce_on.fcl deleted file mode 100644 index 574e72a74..000000000 --- a/fcl/g4/dirts_bnb_g4_sce_on.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "intime_g4_icarus_sce.fcl" - -physics.producers.larg4outtime.InputLabels: [ "generator2" ] - diff --git a/fcl/g4/intime_g4_icarus.fcl b/fcl/g4/intime_g4_icarus.fcl deleted file mode 100644 index 6476d7ac7..000000000 --- a/fcl/g4/intime_g4_icarus.fcl +++ /dev/null @@ -1,149 +0,0 @@ -# -# Purpose: Processes generated Monte Carlo events through GEANT4 detector simulation -# Specifically, handles both "intime" and "out of time" inputs -# -# -# Input -# ------ -# -# * all `simb::MCTruth` collection data products are used as input -# -# -# Output -# ------- -# -# * `largeant` ("legacy" `LArG4` module): -# * `simb::MCParticle` collection: all initial, intermediate and final -# particles propagated through the detector (exceptions apply) -# * `sim::SimEnergyDeposit` collections: `TPCActive` and `Others` -# * `sim::SimChannel` collection: ionisation drifted to TPC channels -# * `sim::SimPhoton` collection: scintillation photons converting into PMT -# * `sim::AuxDetSimChannel` collection: hits from auxiliary detectors (CRT) -# * `ionization` (`sim::SimEnergyDeposit` collection) -# - - -# ------------------------------------------------------------------------------ -#include "services_icarus_simulation.fcl" -#include "largeantmodules_icarus.fcl" -#include "photpropservices_icarus.fcl" -#include "g4inforeducer.fcl" -#include "mcreco.fcl" - -process_name: G4 - -services: -{ - @table::icarus_g4_services - scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. -} -services.Geometry.GDML: "icarus_complete_20220518_overburden.gdml" -services.Geometry.ROOT: "icarus_complete_20220518_overburden.gdml" - -#source is now a root file -source: -{ - module_type: RootInput - maxEvents: 10 # Number of events to create - saveMemoryObjectThreshold: 0 -} - -# 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: - { - larg4outtime: @local::icarus_largeant - largeant: { - module_type: "MergeSimSourcesSBN" - InputSourcesLabels: [ "larg4intime","larg4outtime"] - TrackIDOffsets: [ 10000000,20000000 ] - } - ionization: { - module_type: "larsim/ElectronDrift/ShiftEdepSCE" - EDepTag: "largeant:TPCActive" - MakeAnaTree: false - } - sedlite: @local::sbn_largeant_info_reducer # needs to run right after largeant - - # Saving MC information needed for the ML effort - mcreco: @local::standard_mcreco - - 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 - merge: [rns, larg4outtime, largeant, ionization, sedlite, mcreco] - - #define the output stream, there could be more than one if using filters - stream1: [ out1 ] -} - -#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: "%ifb_%tc_g4.root" - dataTier: "g4" - compressionLevel: 1 - outputCommands: [ "keep *_*_*_*", - "drop *_larg4intime_*_*", - "drop *_larg4outtime_*_*"] - dropMetaDataForDroppedData: true - saveMemoryObjectThreshold: 0 - } -} - -services.LArG4Parameters.ParticleKineticEnergyCut: 0.0005 -physics.producers.larg4outtime.KeepParticlesInVolumes: [ "volDetEnclosure" ] -physics.producers.larg4outtime.InputLabels: [ "GenInTimeSorter:outtime" ] - -# Store MCParticleLite in G4 to store dropped particles from KeepEMShowerDaughters: false -physics.producers.larg4outtime.StoreDroppedMCParticles: true - -# ------------------------------------------------------------------------------ - -# Configure mcreco to read SEDLite instead of SED and MCParticleLite in addition to MCParticle -physics.producers.mcreco.SimChannelLabel: "sedlite" -physics.producers.mcreco.MCParticleLabel: "largeant" -physics.producers.mcreco.MCParticleLiteLabel: "largeant" -physics.producers.mcreco.UseSimEnergyDeposit: false -physics.producers.mcreco.MCRecoPart.SavePathPDGList: [13,-13,211,-211,111,311,310,130,321,-321,2212,2112,2224,2214,2114,1114,3122,1000010020,1000010030,1000020030,1000020040] -physics.producers.mcreco.UseSimEnergyDepositLite: true -physics.producers.mcreco.IncludeDroppedParticles: false - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - ## Turning off the spewing of warnings coming from these two modules - SimDriftElectrons: - { - limit: 0 - reportEvery: 0 - } - McReco: - { - limit: 0 - reportEvery: 0 - } - default: - { - limit: 5 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 1 - } - } - } -} diff --git a/fcl/g4/intime_g4_icarus_lite.fcl b/fcl/g4/intime_g4_icarus_lite.fcl deleted file mode 100644 index 404863637..000000000 --- a/fcl/g4/intime_g4_icarus_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: intime_g4_icarus_lite.fcl -# -# Purpose: Lite version of intime_g4_icarus.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "intime_g4_icarus.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.out1.outputCommands: [ @sequence::outputs.out1.outputCommands, - @sequence::g4_drops ] diff --git a/fcl/g4/intime_g4_icarus_sce.fcl b/fcl/g4/intime_g4_icarus_sce.fcl deleted file mode 100644 index 6a1ddb71c..000000000 --- a/fcl/g4/intime_g4_icarus_sce.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "intime_g4_icarus.fcl" - -#include "enable_spacecharge_icarus.fcl" - diff --git a/fcl/g4/intime_g4_icarus_sce_lite.fcl b/fcl/g4/intime_g4_icarus_sce_lite.fcl deleted file mode 100644 index 548e6478a..000000000 --- a/fcl/g4/intime_g4_icarus_sce_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: intime_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of intime_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "intime_g4_icarus_sce.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.out1.outputCommands: [ @sequence::outputs.out1.outputCommands, - @sequence::g4_drops ] diff --git a/fcl/g4/larg4_icarus.fcl b/fcl/g4/larg4_icarus.fcl index 494aa52d7..00d058e99 100644 --- a/fcl/g4/larg4_icarus.fcl +++ b/fcl/g4/larg4_icarus.fcl @@ -7,7 +7,6 @@ #include "simdrift_icarus.fcl" #include "PDFastSim_icarus.fcl" #include "icarus_genericCRT.fcl" -#include "mcreco.fcl" #include "g4inforeducer.fcl" #include "simplemerge_icarus.fcl" @@ -46,9 +45,6 @@ physics: # Electron propogation simdrift: @local::icarus_simdrift - # Truth-level reconstruction - mcreco: @local::standard_mcreco - # needs to run right after largeant sedlite: @local::sbn_largeant_info_reducer @@ -69,7 +65,6 @@ physics: , pdfastsim , simdrift , sedlite - , mcreco , genericcrt , simplemerge ] @@ -89,19 +84,15 @@ physics.producers.largeant.StoreDroppedMCParticles: false #services.ParticleListAction.KeepDroppedParticlesInVolumes: ["volDetEnclosure"] # ------------------------------------------------------------------------------ -# Configure mcreco to read SEDLite instead of SED and MCParticleLite in addition to MCParticle -physics.producers.mcreco.G4ModName: "simdrift" -physics.producers.mcreco.SimChannelLabel: "sedlite" -physics.producers.mcreco.MCParticleLabel: "largeant" -physics.producers.mcreco.UseSimEnergyDepositLite: true -physics.producers.mcreco.UseSimEnergyDeposit: false -physics.producers.mcreco.IncludeDroppedParticles: true #this is now true with larsoft v09_89 and newer -physics.producers.mcreco.MCParticleDroppedLabel: "largeant:droppedMCParticles" -physics.producers.mcreco.MCRecoPart.SavePathPDGList: [13,-13,211,-211,111,311,310,130,321,-321,2212,2112,2224,2214,2114,1114,3122,1000010020,1000010030,1000020030,1000020040] -physics.producers.mcreco.MCRecoPart.TrackIDOffsets: [0,10000000,20000000] #Account for track ID offsets in labeling primaries +# Setup hack for 2D +services.SpaceChargeService.is2DdriftSimHack: true #info reducer physics.producers.sedlite.SimEnergyDepositLabel: "largeant:LArG4DetectorServicevolTPCActive" physics.producers.sedlite.useOrigTrackID: true #needed since origTrackID not filled for sedlite in SBND +# avoid huge log files +services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } +services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } + outputs.rootoutput: @local::icarus_rootoutput diff --git a/fcl/g4/larg4_icarus_intime.fcl b/fcl/g4/larg4_icarus_intime.fcl index cf2f9f5f6..51b01edcb 100644 --- a/fcl/g4/larg4_icarus_intime.fcl +++ b/fcl/g4/larg4_icarus_intime.fcl @@ -73,10 +73,6 @@ physics.producers.largeantdropped.InputSourcesLabels: [ "larg4intime:droppedMCPa physics.producers.sedlite: @local::sbn_largeant_info_reducer physics.producers.sedlite.SimEnergyDepositLabel: "largeant:LArG4DetectorServicevolTPCActive" -# mcreco dropped label for intime -physics.producers.mcreco.MCParticleDroppedLabel: "largeantdropped" -physics.producers.mcreco.MCRecoPart.TrackIDOffsets: [0,10000000,20000000] #Account for track ID offsets in labeling primaries - # simplemerge for intime # simplemerge for ML physics.producers.simplemerge.InputSourcesLabels: ["largeant", "largeantdropped"] @@ -104,7 +100,6 @@ physics.simulate: [ rns , genericcrt ### Do truth-level reconstruction , sedlite - , mcreco , simplemerge ] diff --git a/fcl/g4/ldm_g4_icarus.fcl b/fcl/g4/ldm_g4_icarus.fcl deleted file mode 100644 index 5fcb2f978..000000000 --- a/fcl/g4/ldm_g4_icarus.fcl +++ /dev/null @@ -1,86 +0,0 @@ -#include "services_icarus_simulation.fcl" -#include "largeantmodules_icarus.fcl" -#include "mcreco.fcl" - -process_name: G4 - -services: -{ - @table::icarus_g4_services -} - -#source is now a root file -source: -{ - module_type: RootInput - saveMemoryObjectThreshold: 0 -} - -# 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: - { - largeant: @local::icarus_largeant - ionization: { - module_type: "larsim/ElectronDrift/ShiftEdepSCE" - EDepTag: "largeant:TPCActive" - MakeAnaTree: false - } - mcreco: @local::standard_mcreco - 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, largeant, ionization,mcreco ] - - #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: "%ifb_%tc-%p.root" - dataTier: "simulated" - saveMemoryObjectThreshold: 0 - compressionLevel: 1 - fastCloning: false - } -} - -#physics.producers.largeant.KeepParticlesInVolumes: ["volCryostat"] #only keep MCParticles that cross the cryostat - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "INFO" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - default: - { - limit: 1000 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 1 - } - } - } -} diff --git a/fcl/g4/ldm_g4_icarus_lite.fcl b/fcl/g4/ldm_g4_icarus_lite.fcl deleted file mode 100644 index fa684a639..000000000 --- a/fcl/g4/ldm_g4_icarus_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: ldm_g4_icarus_lite.fcl -# -# Purpose: Lite version of ldm_g4_icarus.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "ldm_g4_icarus.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.out1.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/mergesimsources_icarus.fcl b/fcl/g4/mergesimsources_icarus.fcl index 859073947..d61d570eb 100644 --- a/fcl/g4/mergesimsources_icarus.fcl +++ b/fcl/g4/mergesimsources_icarus.fcl @@ -5,6 +5,7 @@ icarus_merge_sim_sources : { FillMCParticles: false FillSimPhotons: false FillSimChannels: false + SkipTrackIDOffsets: false FillAuxDetSimChannels: false FillSimEnergyDeposits: false FillAuxDetHits: false @@ -57,4 +58,744 @@ icarus_merge_intime_dropped_mcparts: FillMCParticlesAssociated: false } +icarus_merge_yz_wirecell_simchans : +{ + @table::icarus_merge_sim_sources + FillSimChannels: true + SkipTrackIDOffsets: true + FillMCParticles: false + FillSimPhotons: false + FillAuxDetSimChannels: false + FillSimEnergyDeposits: false + FillAuxDetHits: false + + InputSourcesLabels: [ + "daq:simpleSC0" + ,"daq:simpleSC1" + ,"daq:simpleSC2" + ,"daq:simpleSC3" + ,"daq:simpleSC4" + ,"daq:simpleSC5" + ,"daq:simpleSC6" + ,"daq:simpleSC7" + ,"daq:simpleSC8" + ,"daq:simpleSC9" + ,"daq:simpleSC10" + ,"daq:simpleSC11" + ,"daq:simpleSC12" + ,"daq:simpleSC13" + ,"daq:simpleSC14" + ,"daq:simpleSC15" + ,"daq:simpleSC16" + ,"daq:simpleSC17" + ,"daq:simpleSC18" + ,"daq:simpleSC19" + ,"daq:simpleSC20" + ,"daq:simpleSC21" + ,"daq:simpleSC22" + ,"daq:simpleSC23" + ,"daq:simpleSC24" + ,"daq:simpleSC25" + ,"daq:simpleSC26" + ,"daq:simpleSC27" + ,"daq:simpleSC28" + ,"daq:simpleSC29" + ,"daq:simpleSC30" + ,"daq:simpleSC31" + ,"daq:simpleSC32" + ,"daq:simpleSC33" + ,"daq:simpleSC34" + ,"daq:simpleSC35" + ,"daq:simpleSC36" + ,"daq:simpleSC37" + ,"daq:simpleSC38" + ,"daq:simpleSC39" + ,"daq:simpleSC40" + ,"daq:simpleSC41" + ,"daq:simpleSC42" + ,"daq:simpleSC43" + ,"daq:simpleSC44" + ,"daq:simpleSC45" + ,"daq:simpleSC46" + ,"daq:simpleSC47" + ,"daq:simpleSC48" + ,"daq:simpleSC49" + ,"daq:simpleSC50" + ,"daq:simpleSC51" + ,"daq:simpleSC52" + ,"daq:simpleSC53" + ,"daq:simpleSC54" + ,"daq:simpleSC55" + ,"daq:simpleSC56" + ,"daq:simpleSC57" + ,"daq:simpleSC58" + ,"daq:simpleSC59" + ,"daq:simpleSC60" + ,"daq:simpleSC61" + ,"daq:simpleSC62" + ,"daq:simpleSC63" + ,"daq:simpleSC64" + ,"daq:simpleSC65" + ,"daq:simpleSC66" + ,"daq:simpleSC67" + ,"daq:simpleSC68" + ,"daq:simpleSC69" + ,"daq:simpleSC70" + ,"daq:simpleSC71" + ,"daq:simpleSC72" + ,"daq:simpleSC73" + ,"daq:simpleSC74" + ,"daq:simpleSC75" + ,"daq:simpleSC76" + ,"daq:simpleSC77" + ,"daq:simpleSC78" + ,"daq:simpleSC79" + ,"daq:simpleSC80" + ,"daq:simpleSC81" + ,"daq:simpleSC82" + ,"daq:simpleSC83" + ,"daq:simpleSC84" + ,"daq:simpleSC85" + ,"daq:simpleSC86" + ,"daq:simpleSC87" + ,"daq:simpleSC88" + ,"daq:simpleSC89" + ,"daq:simpleSC90" + ,"daq:simpleSC91" + ,"daq:simpleSC92" + ,"daq:simpleSC93" + ,"daq:simpleSC94" + ,"daq:simpleSC95" + ,"daq:simpleSC96" + ,"daq:simpleSC97" + ,"daq:simpleSC98" + ,"daq:simpleSC99" + ,"daq:simpleSC100" + ,"daq:simpleSC101" + ,"daq:simpleSC102" + ,"daq:simpleSC103" + ,"daq:simpleSC104" + ,"daq:simpleSC105" + ,"daq:simpleSC106" + ,"daq:simpleSC107" + ,"daq:simpleSC108" + ,"daq:simpleSC109" + ,"daq:simpleSC110" + ,"daq:simpleSC111" + ,"daq:simpleSC112" + ,"daq:simpleSC113" + ,"daq:simpleSC114" + ,"daq:simpleSC115" + ,"daq:simpleSC116" + ,"daq:simpleSC117" + ,"daq:simpleSC118" + ,"daq:simpleSC119" + ,"daq:simpleSC120" + ,"daq:simpleSC121" + ,"daq:simpleSC122" + ,"daq:simpleSC123" + ,"daq:simpleSC124" + ,"daq:simpleSC125" + ,"daq:simpleSC126" + ,"daq:simpleSC127" + ,"daq:simpleSC128" + ,"daq:simpleSC129" + ,"daq:simpleSC130" + ,"daq:simpleSC131" + ,"daq:simpleSC132" + ,"daq:simpleSC133" + ,"daq:simpleSC134" + ,"daq:simpleSC135" + ,"daq:simpleSC136" + ,"daq:simpleSC137" + ,"daq:simpleSC138" + ,"daq:simpleSC139" + ,"daq:simpleSC140" + ,"daq:simpleSC141" + ,"daq:simpleSC142" + ,"daq:simpleSC143" + ,"daq:simpleSC144" + ,"daq:simpleSC145" + ,"daq:simpleSC146" + ,"daq:simpleSC147" + ,"daq:simpleSC148" + ,"daq:simpleSC149" + ,"daq:simpleSC150" + ,"daq:simpleSC151" + ,"daq:simpleSC152" + ,"daq:simpleSC153" + ,"daq:simpleSC154" + ,"daq:simpleSC155" + ,"daq:simpleSC156" + ,"daq:simpleSC157" + ,"daq:simpleSC158" + ,"daq:simpleSC159" + ,"daq:simpleSC160" + ,"daq:simpleSC161" + ,"daq:simpleSC162" + ,"daq:simpleSC163" + ,"daq:simpleSC164" + ,"daq:simpleSC165" + ,"daq:simpleSC166" + ,"daq:simpleSC167" + ,"daq:simpleSC168" + ,"daq:simpleSC169" + ,"daq:simpleSC170" + ,"daq:simpleSC171" + ,"daq:simpleSC172" + ,"daq:simpleSC173" + ,"daq:simpleSC174" + ,"daq:simpleSC175" + ,"daq:simpleSC176" + ,"daq:simpleSC177" + ,"daq:simpleSC178" + ,"daq:simpleSC179" + ,"daq:simpleSC180" + ,"daq:simpleSC181" + ,"daq:simpleSC182" + ,"daq:simpleSC183" + ,"daq:simpleSC184" + ,"daq:simpleSC185" + ,"daq:simpleSC186" + ,"daq:simpleSC187" + ,"daq:simpleSC188" + ,"daq:simpleSC189" + ,"daq:simpleSC190" + ,"daq:simpleSC191" + ,"daq:simpleSC192" + ,"daq:simpleSC193" + ,"daq:simpleSC194" + ,"daq:simpleSC195" + ,"daq:simpleSC196" + ,"daq:simpleSC197" + ,"daq:simpleSC198" + ,"daq:simpleSC199" + ,"daq:simpleSC200" + ,"daq:simpleSC201" + ,"daq:simpleSC202" + ,"daq:simpleSC203" + ,"daq:simpleSC204" + ,"daq:simpleSC205" + ,"daq:simpleSC206" + ,"daq:simpleSC207" + ,"daq:simpleSC208" + ,"daq:simpleSC209" + ,"daq:simpleSC210" + ,"daq:simpleSC211" + ,"daq:simpleSC212" + ,"daq:simpleSC213" + ,"daq:simpleSC214" + ,"daq:simpleSC215" + ,"daq:simpleSC216" + ,"daq:simpleSC217" + ,"daq:simpleSC218" + ,"daq:simpleSC219" + ,"daq:simpleSC220" + ,"daq:simpleSC221" + ,"daq:simpleSC222" + ,"daq:simpleSC223" + ,"daq:simpleSC224" + ,"daq:simpleSC225" + ,"daq:simpleSC226" + ,"daq:simpleSC227" + ,"daq:simpleSC228" + ,"daq:simpleSC229" + ,"daq:simpleSC230" + ,"daq:simpleSC231" + ,"daq:simpleSC232" + ,"daq:simpleSC233" + ,"daq:simpleSC234" + ,"daq:simpleSC235" + ,"daq:simpleSC236" + ,"daq:simpleSC237" + ,"daq:simpleSC238" + ,"daq:simpleSC239" + ,"daq:simpleSC240" + ,"daq:simpleSC241" + ,"daq:simpleSC242" + ,"daq:simpleSC243" + ,"daq:simpleSC244" + ,"daq:simpleSC245" + ,"daq:simpleSC246" + ,"daq:simpleSC247" + ,"daq:simpleSC248" + ,"daq:simpleSC249" + ,"daq:simpleSC250" + ,"daq:simpleSC251" + ,"daq:simpleSC252" + ,"daq:simpleSC253" + ,"daq:simpleSC254" + ,"daq:simpleSC255" + ,"daq:simpleSC256" + ,"daq:simpleSC257" + ,"daq:simpleSC258" + ,"daq:simpleSC259" + ,"daq:simpleSC260" + ,"daq:simpleSC261" + ,"daq:simpleSC262" + ,"daq:simpleSC263" + ,"daq:simpleSC264" + ,"daq:simpleSC265" + ,"daq:simpleSC266" + ,"daq:simpleSC267" + ,"daq:simpleSC268" + ,"daq:simpleSC269" + ,"daq:simpleSC270" + ,"daq:simpleSC271" + ,"daq:simpleSC272" + ,"daq:simpleSC273" + ,"daq:simpleSC274" + ,"daq:simpleSC275" + ,"daq:simpleSC276" + ,"daq:simpleSC277" + ,"daq:simpleSC278" + ,"daq:simpleSC279" + ,"daq:simpleSC280" + ,"daq:simpleSC281" + ,"daq:simpleSC282" + ,"daq:simpleSC283" + ,"daq:simpleSC284" + ,"daq:simpleSC285" + ,"daq:simpleSC286" + ,"daq:simpleSC287" + ,"daq:simpleSC288" + ,"daq:simpleSC289" + ,"daq:simpleSC290" + ,"daq:simpleSC291" + ,"daq:simpleSC292" + ,"daq:simpleSC293" + ,"daq:simpleSC294" + ,"daq:simpleSC295" + ,"daq:simpleSC296" + ,"daq:simpleSC297" + ,"daq:simpleSC298" + ,"daq:simpleSC299" + ,"daq:simpleSC300" + ,"daq:simpleSC301" + ,"daq:simpleSC302" + ,"daq:simpleSC303" + ,"daq:simpleSC304" + ,"daq:simpleSC305" + ,"daq:simpleSC306" + ,"daq:simpleSC307" + ,"daq:simpleSC308" + ,"daq:simpleSC309" + ,"daq:simpleSC310" + ,"daq:simpleSC311" + ,"daq:simpleSC312" + ,"daq:simpleSC313" + ,"daq:simpleSC314" + ,"daq:simpleSC315" + ,"daq:simpleSC316" + ,"daq:simpleSC317" + ,"daq:simpleSC318" + ,"daq:simpleSC319" + ,"daq:simpleSC320" + ,"daq:simpleSC321" + ,"daq:simpleSC322" + ,"daq:simpleSC323" + ,"daq:simpleSC324" + ,"daq:simpleSC325" + ,"daq:simpleSC326" + ,"daq:simpleSC327" + ,"daq:simpleSC328" + ,"daq:simpleSC329" + ,"daq:simpleSC330" + ,"daq:simpleSC331" + ,"daq:simpleSC332" + ,"daq:simpleSC333" + ,"daq:simpleSC334" + ,"daq:simpleSC335" + ,"daq:simpleSC336" + ,"daq:simpleSC337" + ,"daq:simpleSC338" + ,"daq:simpleSC339" + ,"daq:simpleSC340" + ,"daq:simpleSC341" + ,"daq:simpleSC342" + ,"daq:simpleSC343" + ,"daq:simpleSC344" + ,"daq:simpleSC345" + ,"daq:simpleSC346" + ,"daq:simpleSC347" + ,"daq:simpleSC348" + ,"daq:simpleSC349" + ,"daq:simpleSC350" + ,"daq:simpleSC351" + ,"daq:simpleSC352" + ,"daq:simpleSC353" + ,"daq:simpleSC354" + ,"daq:simpleSC355" + ,"daq:simpleSC356" + ,"daq:simpleSC357" + ,"daq:simpleSC358" + ,"daq:simpleSC359" + ] + + TrackIDOffsets: [ +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 + ] + + +} + END_PROLOG diff --git a/fcl/g4/modifiers/g4_only_energydeposits.fcl b/fcl/g4/modifiers/g4_only_energydeposits.fcl deleted file mode 100644 index cadf4ae3b..000000000 --- a/fcl/g4/modifiers/g4_only_energydeposits.fcl +++ /dev/null @@ -1,84 +0,0 @@ -# -# File: g4_only_energydeposits.fcl -# Purpose: Drop in configuration to set LArG4 to simulate only energy deposits. -# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) -# Date: May 13, 2020 -# Version: 1.0 -# -# This configuration can be used as drop-in to instruct LArSoft to produce -# only energy depositions during GEANT4 runs. -# This is achieved via `LArG4Parameters` service configuration. -# -# This configuration produces particles and energy depositions as output, -# skipping the transportation of scintillation light and ionization charge to -# the readout. It is tailored around the way the `LArG4Parameters` is used in -# LArSoft module `LegacyLArG4`. -# -# The `LegacyLArG4` module simulates the energy depositions as a spin off of -# the processing of scintillation light. For that reason this configuration -# leaves the simulation of the scintillation light enabled (and the charge -# as well, since they go together), but it does not perform the transportation -# of the light to the photodetectors. -# -# Example: to run only energy depositions with a base configuration -# `cosmics_g4_icarus_volCryostat.fcl`, have a job configuration like: -# -# #include "cosmics_g4_icarus_volCryostat.fcl" -# -# #include "g4_only_energydeposits.fcl" -# -# Note that small saving can be achieved by disabling the services that are -# not needed. For example, if space charge maps are not used: -# -# services.SpaceChargeService: @erase -# -# can be added to the configuration file. -# -# -# Dependencies -# ============= -# -# This configuration does not directly depend on any specific configuration, -# but it requires the service `LArG4Parameters` to have been already -# configured. -# -# -# Settings -# ========= -# -# TPC charge and light propagation are not performed. -# The simulation of the auxiliary detectors is not disabled, including both -# energy deposition and readout. -# -# -# Input -# ====== -# -# No specific input is required. -# -# -# Output -# ======= -# -# No specific output is produced. -# -# -# Changes -# ======== -# -# 20200513 (petrillo@slac.stanford.edu) [v1.0] -# original version for `icaruscode` `v08_51_00` -# - -services.LArG4Parameters: { - @table::services.LArG4Parameters - - # "disabling wire planes" seems to affect the way GEANT4 performs the - # simulation, maybe not imposing a short stepping - # (two orders of magnitude fewer energy depositions, in count) - DisableWireplanes: false - FillSimEnergyDeposits: true - NoElectronPropagation: true - NoPhotonPropagation: true - -} # services.LArG4Parameters diff --git a/fcl/g4/standard_g4_icarus.fcl b/fcl/g4/standard_g4_icarus.fcl deleted file mode 100644 index 2ca27d312..000000000 --- a/fcl/g4/standard_g4_icarus.fcl +++ /dev/null @@ -1,118 +0,0 @@ -# -# Purpose: Processes generated Monte Carlo events through GEANT4 detector simulation -# -# -# Input -# ------ -# -# * all `simb::MCTruth` collection data products are used as input -# -# -# Output -# ------- -# -# * `largeant` ("legacy" `LArG4` module): -# * `simb::MCParticle` collection: all initial, intermediate and final -# particles propagated through the detector (exceptions apply) -# * `sim::SimEnergyDeposit` collections: `TPCActive` and `Others` -# * `sim::SimChannel` collection: ionisation drifted to TPC channels -# * `sim::SimPhoton` collection: scintillation photons converting into PMT -# * `sim::AuxDetSimChannel` collection: hits from auxiliary detectors (CRT) -# * `ionization` (`sim::SimEnergyDeposit` collection) -# - - -# ------------------------------------------------------------------------------ -#include "services_icarus_simulation.fcl" -#include "largeantmodules_icarus.fcl" -#include "rootoutput_icarus.fcl" -#include "g4inforeducer.fcl" -#include "mcreco.fcl" - - -# ------------------------------------------------------------------------------ -process_name: G4 - - -# ------------------------------------------------------------------------------ -services: @local::icarus_g4_services -services.Geometry.GDML: "icarus_complete_20220518_overburden.gdml" -services.Geometry.ROOT: "icarus_complete_20220518_overburden.gdml" - -# ------------------------------------------------------------------------------ -physics: -{ - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - producers: - { - largeant: @local::icarus_largeant - ionization: { - module_type: "larsim/ElectronDrift/ShiftEdepSCE" - EDepTag: "largeant:TPCActive" - MakeAnaTree: false - } - sedlite: @local::sbn_largeant_info_reducer # needs to run right after largeant - - # Saving MC information needed for the ML effort - mcreco: @local::standard_mcreco - - rns: { module_type: "RandomNumberSaver" } - } - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - simulate: [ rns, largeant, ionization, sedlite, mcreco ] - stream: [ rootoutput ] - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} # physics - -# Store MCParticleLite in G4 to store dropped particles from KeepEMShowerDaughters: false -physics.producers.largeant.StoreDroppedMCParticles: true - -# ------------------------------------------------------------------------------ - -# Configure mcreco to read SEDLite instead of SED and MCParticleLite in addition to MCParticle -physics.producers.mcreco.SimChannelLabel: "sedlite" -physics.producers.mcreco.MCParticleLabel: "largeant" -physics.producers.mcreco.MCParticleLiteLabel: "largeant" -physics.producers.mcreco.UseSimEnergyDeposit: false -physics.producers.mcreco.MCRecoPart.SavePathPDGList: [13,-13,211,-211,111,311,310,130,321,-321,2212,2112,2224,2214,2114,1114,3122,1000010020,1000010030,1000020030,1000020040] -physics.producers.mcreco.UseSimEnergyDepositLite: true -physics.producers.mcreco.IncludeDroppedParticles: false - -outputs.rootoutput: @local::icarus_rootoutput - - -# ------------------------------------------------------------------------------ - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - ## Turning off the spewing of warnings coming from these two modules - SimDriftElectrons: - { - limit: 0 - reportEvery: 0 - } - McReco: - { - limit: 0 - reportEvery: 0 - } - default: - { - limit: 5 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 1 - } - } - } -} diff --git a/fcl/g4/standard_g4_icarus_doublesce.fcl b/fcl/g4/standard_g4_icarus_doublesce.fcl deleted file mode 100644 index 1b90d4c32..000000000 --- a/fcl/g4/standard_g4_icarus_doublesce.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "standard_g4_icarus.fcl" - -#include "enable_spacecharge_icarus.fcl" - -services.SpaceChargeService.InputFilename: 'SCEoffsets/SCEoffsets_ICARUS_E500_DoubleCharge_voxelTH3.root' -#services.SpaceChargeService.InputFilename: 'users/rlazur/SCEoffsets/SCEoffsets_ICARUS_E500_DoubleCharge_voxelTH3.root' #if cannot find double spacecharge file in icarus_data diff --git a/fcl/g4/standard_g4_icarus_doublesce_lite.fcl b/fcl/g4/standard_g4_icarus_doublesce_lite.fcl deleted file mode 100644 index 2f5aa9fd7..000000000 --- a/fcl/g4/standard_g4_icarus_doublesce_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_g4_icarus_doublesce_lite.fcl -# -# Purpose: Lite version of standard_g4_icarus_doublesce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "standard_g4_icarus_doublesce.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/standard_g4_icarus_edep.fcl b/fcl/g4/standard_g4_icarus_edep.fcl deleted file mode 100644 index cb9d49397..000000000 --- a/fcl/g4/standard_g4_icarus_edep.fcl +++ /dev/null @@ -1,60 +0,0 @@ -# -# File: standard_g4_icarus_edep.fcl -# Purpose: Simulate energy depositions in liquid argon from generated events. -# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) -# Date: May 13, 2020 -# Version: 1.0 -# -# This configuration is equivalent to `standard_g4_icarus.fcl`, but it only -# produces particles and energy depositions as output, skipping the -# transportation of scintillation light and ionization charge to the readout. -# -# See `g4_only_energydeposits.fcl` for more details. -# -# -# Dependencies -# ============= -# -# This configuration is a minor customization of, and therefore depends on, -# `standard_g4_icarus.fcl`. -# For the configuration, the drop-in "g4_only_energydeposits.fcl" currently in -# `icaruscode` is used. -# -# -# Settings -# ========= -# -# The physics settings are not changed with respect to `standard_g4_icarus.fcl`. -# -# -# Input -# ====== -# -# The input settings are not changed with respect to `standard_g4_icarus.fcl`. -# All generated truth information (`std::vector`) is processed -# through GEANT4. -# -# -# Output -# ======= -# -# Naming follows `standard_g4_icarus.fcl` (likely: module is `largeant`). -# -# * `std::vector`: particles propagated through the detector -# * `std::vector`: energy depositions in the detector -# -# -# Changes -# ======== -# -# 20200513 (petrillo@slac.stanford.edu) [v1.0] -# original version for `icaruscode` `v08_51_00` -# - -#include "standard_g4_icarus.fcl" -#include "g4_only_energydeposits.fcl" - -# disable the service; it does not matter much since it's lazy... -services.PhotonVisibilityService: @erase - - diff --git a/fcl/g4/standard_g4_icarus_edep_lite.fcl b/fcl/g4/standard_g4_icarus_edep_lite.fcl deleted file mode 100644 index 506b26b17..000000000 --- a/fcl/g4/standard_g4_icarus_edep_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_g4_icarus_edep_lite.fcl -# -# Purpose: Lite version of standard_g4_icarus_edep.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "standard_g4_icarus_edep.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/standard_g4_icarus_lite.fcl b/fcl/g4/standard_g4_icarus_lite.fcl deleted file mode 100644 index 8630eee43..000000000 --- a/fcl/g4/standard_g4_icarus_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_g4_icarus_lite.fcl -# -# Purpose: Lite version of standard_g4_icarus.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "standard_g4_icarus.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/g4/standard_g4_icarus_sce.fcl b/fcl/g4/standard_g4_icarus_sce.fcl deleted file mode 100644 index 427d7a082..000000000 --- a/fcl/g4/standard_g4_icarus_sce.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "standard_g4_icarus.fcl" - -#include "enable_spacecharge_icarus.fcl" - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization.fcl b/fcl/g4/standard_g4_icarus_sce_ionization.fcl deleted file mode 100644 index 3a83d9d81..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-1-1.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb-1-1.fcl deleted file mode 100644 index 994399e6c..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-1-1.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.21 diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-10.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb-10.fcl deleted file mode 100644 index 8a23e1e62..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-10.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.212 - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-11.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb-11.fcl deleted file mode 100644 index fda76f1f1..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-11.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] -services.LArG4Parameters.ModBoxA: 0.91 -services.LArG4Parameters.ModBoxB: 0.214 - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-3-3.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb-3-3.fcl deleted file mode 100644 index d70234c41..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-3-3.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.87 -services.LArG4Parameters.ModBoxB: 0.206 - - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-33.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb-33.fcl deleted file mode 100644 index 1b59d1e47..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb-33.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.87 -services.LArG4Parameters.ModBoxB: 0.218 diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb0-1.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb0-1.fcl deleted file mode 100644 index 45ccb7b11..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb0-1.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.93 -services.LArG4Parameters.ModBoxB: 0.21 - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb01.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb01.fcl deleted file mode 100644 index 2d6335ec0..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb01.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.93 -services.LArG4Parameters.ModBoxB: 0.214 - - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb1-1.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb1-1.fcl deleted file mode 100644 index 21469b2fb..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb1-1.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.21 - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb10.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb10.fcl deleted file mode 100644 index 5fe8f7c26..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb10.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.212 - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb11.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb11.fcl deleted file mode 100644 index a6d7f8aab..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb11.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.95 -services.LArG4Parameters.ModBoxB: 0.214 diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb3-3.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb3-3.fcl deleted file mode 100644 index 6278cdf95..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb3-3.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.999 -services.LArG4Parameters.ModBoxB: 0.206 - - diff --git a/fcl/g4/standard_g4_icarus_sce_ionization_recomb33.fcl b/fcl/g4/standard_g4_icarus_sce_ionization_recomb33.fcl deleted file mode 100644 index e2160d3da..000000000 --- a/fcl/g4/standard_g4_icarus_sce_ionization_recomb33.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -process_name: G4ion - -physics.simulate: [ rns, ionization, sedlite, mcreco ] - -services.LArG4Parameters.ModBoxA: 0.999 -services.LArG4Parameters.ModBoxB: 0.218 - - diff --git a/fcl/g4/standard_g4_icarus_sce_largeant.fcl b/fcl/g4/standard_g4_icarus_sce_largeant.fcl deleted file mode 100644 index a9a077713..000000000 --- a/fcl/g4/standard_g4_icarus_sce_largeant.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "standard_g4_icarus.fcl" -#include "enable_spacecharge_icarus.fcl" - -physics.simulate: [ rns, largeant ] - diff --git a/fcl/g4/standard_g4_icarus_sce_lite.fcl b/fcl/g4/standard_g4_icarus_sce_lite.fcl deleted file mode 100644 index 37987c578..000000000 --- a/fcl/g4/standard_g4_icarus_sce_lite.fcl +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: standard_g4_icarus_sce_lite.fcl -# -# Purpose: Lite version of standard_g4_icarus_sce.fcl -# -# Created: 05-Apr-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "g4_drops.fcl" -#include "standard_g4_icarus_sce.fcl" - -# Use lite photons. - -services.LArG4Parameters.UseLitePhotons: true - -# Drop truth data products. - -outputs.rootoutput.outputCommands: [ "keep *_*_*_*", - @sequence::g4_drops ] diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom.fcl deleted file mode 100644 index 23bdd23e0..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR_P0nom diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom_gain0-8x.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom_gain0-8x.fcl deleted file mode 100644 index 7faaf7b48..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_P0nom_gain0-8x.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR_P0nom - -physics.producers.daq.wcls_main.structs.gain0: 13.641696 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainhi.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainhi.fcl deleted file mode 100644 index 34302c68e..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainhi.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 11.8031771 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainlo.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainlo.fcl deleted file mode 100644 index ff199a1e0..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainlo.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 8.724087455 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvhi.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvhi.fcl deleted file mode 100644 index 279636478..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvhi.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 12.316358759999998 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvlo.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvlo.fcl deleted file mode 100644 index 52d60efa2..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0gainvlo.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 8.21090584 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0var.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0var.fcl deleted file mode 100644 index 0ed634359..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind0var.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind0var.json.bz2" diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin0.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin0.fcl deleted file mode 100644 index 7bfa4bd01..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin0.fcl +++ /dev/null @@ -1,13 +0,0 @@ -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin0.json.bz2" - -# Set gains to MCNuPhase2 -physics.producers.daq.wcls_main.structs.gain0: 10.2636323 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin14.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin14.fcl deleted file mode 100644 index 192ba6ced..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_ind1bin14.fcl +++ /dev/null @@ -1,13 +0,0 @@ -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin14.json.bz2" - -# Set gains to MCNuPhase2 -physics.producers.daq.wcls_main.structs.gain0: 10.2636323 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-1x.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-1x.fcl deleted file mode 100644 index 266577e83..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-1x.fcl +++ /dev/null @@ -1,11 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 10.2636323 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 - -physics.producers.daq.wcls_main.structs.int_noise_scale: 1.10 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-2x.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-2x.fcl deleted file mode 100644 index 32e048ea7..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_noise1-2x.fcl +++ /dev/null @@ -1,11 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 10.2636323 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 - -physics.producers.daq.wcls_main.structs.int_noise_scale: 1.20 diff --git a/fcl/numi-anaA/detsim_2d_icarus_fitFR_oldgain.fcl b/fcl/numi-anaA/detsim_2d_icarus_fitFR_oldgain.fcl deleted file mode 100644 index fa40ba0db..000000000 --- a/fcl/numi-anaA/detsim_2d_icarus_fitFR_oldgain.fcl +++ /dev/null @@ -1,9 +0,0 @@ -# Fit field responses, same gains as used in the MCNuPhase2 2023A monte carlo -# -#include "detsim_2d_icarus.fcl" - - -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -physics.producers.daq.wcls_main.structs.gain0: 10.2636323 -physics.producers.daq.wcls_main.structs.gain1: 12.1420344 diff --git a/fcl/overlays/enable_overlay_gen.fcl b/fcl/overlays/enable_overlay_gen.fcl new file mode 100644 index 000000000..20535eda7 --- /dev/null +++ b/fcl/overlays/enable_overlay_gen.fcl @@ -0,0 +1,5 @@ +source: { + module_type: RootInput + maxEvents: -1 # Number of events to create + saveMemoryObjectThreshold: 0 +} # source diff --git a/fcl/overlays/overlay_waveforms.fcl b/fcl/overlays/overlay_waveforms.fcl index 52d31b94c..f3ba7a1ae 100644 --- a/fcl/overlays/overlay_waveforms.fcl +++ b/fcl/overlays/overlay_waveforms.fcl @@ -9,7 +9,7 @@ process_name: Overlay ## Add the MC module to the list of producers physics.producers: { - crthit: @local::standard_crtsimhitproducer + mccrthit: @local::standard_crtsimhitproducer overlayTPCRawEE: { module_type: "OverlayProducts" @@ -70,7 +70,7 @@ physics.producers: { PMTOverlayHits: false CRTOverlayHits: false PMTWaveDataLabel: "daqPMT" - PMTWaveSimLabel: "opdaq" + PMTWaveSimLabel: "shifted" PMTWaveBaseLabel: "pmtbaselines" } @@ -84,12 +84,12 @@ physics.producers: { PMTOverlayRaw: false PMTOverlayHits: false CRTOverlayHits: true - CRTHitInputLabels: ["crthit::decoder","crthit::Overlay"] + CRTHitInputLabels: ["crthit","mccrthit"] } } ## Use the following to run the full defined stage0 set of modules -physics.reco: [ crthit, overlayTPCRawWW, overlayTPCRawWE, overlayTPCRawEW, overlayTPCRawEE, overlayOpWaveforms, overlayCRTHit] +physics.reco: [ mccrthit, overlayTPCRawWW, overlayTPCRawWE, overlayTPCRawEW, overlayTPCRawEE, overlayOpWaveforms, overlayCRTHit] ## boiler plate... physics.outana: [ ] @@ -102,4 +102,11 @@ outputs.rootOutput.dataTier: "reconstructed" outputs.rootOutput.SelectEvents: ["reco"] # Drop the artdaq format files on output -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 +outputs.rootOutput.outputCommands: ["keep *_*_*_*", + "drop *_daqTPCROI_*_*", + "drop artdaq::Fragment*_daq_PHYSCRATEDATATPC*_*", + "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/overlays/prodcorsika_standard_overlay_icarus.fcl b/fcl/overlays/prodcorsika_standard_overlay_icarus.fcl new file mode 100644 index 000000000..11bd70237 --- /dev/null +++ b/fcl/overlays/prodcorsika_standard_overlay_icarus.fcl @@ -0,0 +1,3 @@ +#include "prodcorsika_standard_icarus.fcl" + +#include "enable_overlay_gen.fcl" diff --git a/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure.fcl b/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure.fcl index faed055cd..e10974567 100644 --- a/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure.fcl +++ b/fcl/overlays/simulation_genie_icarus_bnb_overlays_volDetEnclosure.fcl @@ -16,9 +16,4 @@ physics.producers.generator.TopVolume: "volDetEnclosure" outputs.rootoutput.fileName: "simulation_genie_icarus_bnb_volDetEnclosure_%tc-%p.root" services.TFileService.fileName: "Supplemental-simulation_genie_icarus_bnb_volDetEnclosure_%tc-%p.root" -source: { - module_type: RootInput - maxEvents: -1 # Number of events to create - saveMemoryObjectThreshold: 0 -} # source - +#include "enable_overlay_gen.fcl" diff --git a/fcl/overlays/stage0_run2_icarus_overlay.fcl b/fcl/overlays/stage0_run2_icarus_overlay.fcl deleted file mode 100644 index b9538a555..000000000 --- a/fcl/overlays/stage0_run2_icarus_overlay.fcl +++ /dev/null @@ -1,64 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_mc_defs.fcl" -#include "stage0_icarus_driver_common.fcl" - -process_name: MCstage0 - -## Add the MC module to the list of producers -physics.producers: { @table::icarus_stage0_producers - @table::icarus_stage0_mc_producers - } - -## Use the following to run the full defined stage0 set of modules -physics.path: [ @sequence::icarus_stage0_mc_PMT, - MCDecodeTPCROI, - @sequence::icarus_stage0_multiTPC, - @sequence::icarus_stage0_mc_crt - ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop data products that are no longer needed, but make sure to keep important items! -# For example, we need to drop the RawDigits from the detector simulation stage but want to keep the SimChannel info from WireCell... -#outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_daq*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder_*_*", "keep *_daq_simpleSC_*"] -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop *_daq*_*_*", - "drop *_MCDecodeTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop recob::Wire*_roifinder_*_*", - "keep *_daq_simpleSC_*", - "drop raw::RawDigits_overlayTPCRaw*_*_Overlay", - "drop sim::SimEnergyDeposits_largeant_TPCActive_G4", - "drop sim::SimEnergyDeposits_shifted_*_DetSim", - "drop raw::OpDetWaveforms_overlayOpWaveforms_*_Overlay" - ] -# Set the expected input for ophit -physics.producers.ophit.InputModule: "overlayOpWaveforms" - -# Note the default assumption is that our detector simulation input will come from the WireCell 2D drift simulation, a la 'daq' -# If we are running the 1D drift simulation we need to switch to using: -# `physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq3:PHYSCRATEDATATPCWW","daq2:PHYSCRATEDATATPCWE","daq1:PHYSCRATEDATATPCEW","daq0:PHYSCRATEDATATPCEE"]` -# - -physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["overlayTPCRawWW", "overlayTPCRawWE", "overlayTPCRawEW", "overlayTPCRawEE"] -physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] -physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.producers.roifinder.WireModuleLabelVec: ["decon1droi:PHYSCRATEDATATPCWW","decon1droi:PHYSCRATEDATATPCWE","decon1droi:PHYSCRATEDATATPCEW","decon1droi:PHYSCRATEDATATPCEE"] - -physics.producers.decon2droiEE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEE" -physics.producers.decon2droiEW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEW" -physics.producers.decon2droiWE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWE" -physics.producers.decon2droiWW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWW" - -## Need overrides for the purity monitor -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] -physics.producers.purityana0.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - diff --git a/fcl/overlays/stage0_run2_icarus_overlay_wf.fcl b/fcl/overlays/stage0_run2_icarus_overlay_wf.fcl deleted file mode 100644 index 15de362a0..000000000 --- a/fcl/overlays/stage0_run2_icarus_overlay_wf.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "stage0_run2_icarus_overlay.fcl" - -outputs.rootOutput.outputCommands: [ - "keep *_*_*_*", - "drop *_daq*_*_*", - "drop *_MCDecodeTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop recob::Wire*_roifinder_*_*", - "keep *_daq_simpleSC_*" - ] \ No newline at end of file diff --git a/fcl/overlays/stage1_run2_1d_icarus_overlay.fcl b/fcl/overlays/stage1_run2_1d_icarus_overlay.fcl deleted file mode 100644 index ae4ee90f0..000000000 --- a/fcl/overlays/stage1_run2_1d_icarus_overlay.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "stage1_run2_icarus_overlay.fcl" - -physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] -physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] \ No newline at end of file diff --git a/fcl/reco/Definitions/enable_dnn_hitthresh.fcl b/fcl/reco/Definitions/enable_dnn_hitthresh.fcl new file mode 100644 index 000000000..76580aebf --- /dev/null +++ b/fcl/reco/Definitions/enable_dnn_hitthresh.fcl @@ -0,0 +1,19 @@ +physics.producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEE.HitFilterAlg.MinPulseHeight: [2., 2., 2.] + +physics.producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCEW.HitFilterAlg.MinPulseHeight: [2., 2., 2.] + +physics.producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWE.HitFilterAlg.MinPulseHeight: [2., 2., 2.] + +physics.producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 2.5 +physics.producers.gaushit2dTPCWW.HitFilterAlg.MinPulseHeight: [2., 2., 2.] diff --git a/fcl/reco/Definitions/enable_dnn_sp.fcl b/fcl/reco/Definitions/enable_dnn_sp.fcl new file mode 100644 index 000000000..5961c8bca --- /dev/null +++ b/fcl/reco/Definitions/enable_dnn_sp.fcl @@ -0,0 +1,12 @@ +physics.producers.decon2droiEE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet"] +physics.producers.decon2droiEW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet"] +physics.producers.decon2droiWE.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet"] +physics.producers.decon2droiWW.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet"] + +physics.producers.wire2channelroi2d.WireModuleLabelVec: ["decon2droiEE:dnnsp", "decon2droiEW:dnnsp", "decon2droiWE:dnnsp", "decon2droiWW:dnnsp"] + +physics.analyzers.spanaE.HitProducers: ["gaushit2dTPCEE", "gaushit2dTPCEW"] +physics.analyzers.spanaE.WireProducers: ["decon2droiEE:dnnsp", "decon2droiEW:dnnsp"] + +physics.analyzers.spanaW.HitProducers: ["gaushit2dTPCWE", "gaushit2dTPCWW"] +physics.analyzers.spanaW.WireProducers: ["decon2droiWE:dnnsp", "decon2droiWW:dnnsp"] diff --git a/fcl/reco/Definitions/enable_overlay_sp.fcl b/fcl/reco/Definitions/enable_overlay_sp.fcl new file mode 100644 index 000000000..8275366c5 --- /dev/null +++ b/fcl/reco/Definitions/enable_overlay_sp.fcl @@ -0,0 +1,15 @@ +# Exclude crthit from path -- not needed since it's included at overlay stage +physics.path: [ @sequence::icarus_stage0_mc_PMT, + MCDecodeTPCROI, + @sequence::icarus_stage0_2d_multiTPC, + @sequence::icarus_stage0_mc_crtreco + ] + +# use overlay products +physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["overlayTPCRawWW", "overlayTPCRawWE", "overlayTPCRawEW", "overlayTPCRawEE"] +physics.producers.pmtbaselines.OpticalWaveforms: "overlayOpWaveforms" +physics.producers.pmtfixedthr.OpticalWaveforms: "overlayOpWaveforms" +physics.producers.opdetonbeam.OpticalWaveforms: "overlayOpWaveforms" +physics.producers.ophit.InputModule: "overlayOpWaveforms" +physics.producers.crttrack.DataLabelHits: "overlayCRTHit" +physics.producers.crtpmt.CrtHitModuleLabel: "overlayCRTHit" diff --git a/fcl/reco/Definitions/enable_overlay_stage1.fcl b/fcl/reco/Definitions/enable_overlay_stage1.fcl new file mode 100644 index 000000000..71707c38e --- /dev/null +++ b/fcl/reco/Definitions/enable_overlay_stage1.fcl @@ -0,0 +1,14 @@ +# Ignore isRealData for overlays +physics.producers.mcassociationsGausCryoE.OverrideRealData: true +physics.producers.mcassociationsGausCryoW.OverrideRealData: true +services.BackTrackerService.BackTracker.OverrideRealData: true +services.ParticleInventoryService.ParticleInventory.OverrideRealData: true + +# overlay CRT hits +physics.analyzers.CRTAnalysis.CrtHitModuleLabel: "overlayCRTHit" +physics.analyzers.CRTDataAnalysis.CRTHitLabel: "overlayCRTHit" +physics.producers.CRTT0Tagging.CrtHitModuleLabel: "overlayCRTHit" +physics.producers.crttrack.DataLabelHits: "overlayCRTHit" + +# overlay PMT waveforms +physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["overlayOpWaveforms"] diff --git a/fcl/reco/Definitions/sp_filter_parameters.fcl b/fcl/reco/Definitions/sp_filter_parameters.fcl new file mode 100644 index 000000000..5929eeb91 --- /dev/null +++ b/fcl/reco/Definitions/sp_filter_parameters.fcl @@ -0,0 +1,15 @@ +BEGIN_PROLOG +Wiener_tight_U_sigma: 0.065 +Wiener_tight_U_power: 4.4 +Wiener_tight_V_sigma: 0.065 +Wiener_tight_V_power: 2.6 +Wiener_tight_W_sigma: 0.07 +Wiener_tight_W_power: 3.4 + +Wire_ind_sigma: 0.4 +Wire_col_sigma: 2.2 + +Gaus_wide_sigma: 0.06 + +gain_ADC_per_e: 0.01214 # ADC / e-. For frame_scale +END_PROLOG diff --git a/fcl/reco/Definitions/stage0_icarus_defs.fcl b/fcl/reco/Definitions/stage0_icarus_defs.fcl index c22d2f9a9..1625449fb 100644 --- a/fcl/reco/Definitions/stage0_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_defs.fcl @@ -7,7 +7,7 @@ #include "decoderdefs_icarus.fcl" #include "recowire_icarus.fcl" -#include "hitfindermodules_icarus.fcl" +#include "wirechannelroiconverters_sbn.fcl" #include "timing_icarus.fcl" #include "timing_beam.fcl" #include "icarus_ophitfinder.fcl" @@ -19,12 +19,17 @@ #include "wcls-decode-to-sig-base.fcl" #include "icarus_FilterDataIntegrity.fcl" #include "icarus_FilterCRTPMTMatching.fcl" +#include "spana_icarus.fcl" +#include "sp_filter_parameters.fcl" BEGIN_PROLOG ### Analyzers employed during stage 0 processing ### icarus_stage0_analyzers: { + spanaE: @local::spana1d_east + spanaW: @local::spana1d_west + purityinfoana0: { module_type: "TPCPurityInfoAna" PurityInfoLabel: "purityana0" PrintInfo: false @@ -68,6 +73,10 @@ icarus_stage0_producers: ### calwire producers decon1droi: @local::icarus_decon1droi + ### convert wires to channel rois + wire2channelroi: @local::wiretochannelroi_sbn + wire2channelroi2d: @local::wiretochannelroi_sbn + ### wire-cell decon producers decon2droi: @local::standard_wirecell_sigproc decon2droiEE: @local::standard_wirecell_sigproc @@ -79,22 +88,6 @@ icarus_stage0_producers: roifinder1d: @local::icarus_roifinder roifinder2d: @local::icarus_roifinder - ### TPC hit-finder producers - gaushit1dTPCWW: @local::gaus_hitfinder_icarus - gaushit1dTPCWE: @local::gaus_hitfinder_icarus - gaushit1dTPCEW: @local::gaus_hitfinder_icarus - gaushit1dTPCEE: @local::gaus_hitfinder_icarus - - gaushit2dTPCWW: @local::gaus_hitfinder_icarus - gaushit2dTPCWE: @local::gaus_hitfinder_icarus - gaushit2dTPCEW: @local::gaus_hitfinder_icarus - gaushit2dTPCEE: @local::gaus_hitfinder_icarus - - gausshitTPCWW: @local::gauss_hitfinder_icarus - gausshitTPCWE: @local::gauss_hitfinder_icarus - gausshitTPCEW: @local::gauss_hitfinder_icarus - gausshitTPCEE: @local::gauss_hitfinder_icarus - ### CRT hit finder producer crthit: @local::standard_crthitproducer @@ -202,40 +195,24 @@ icarus_stage0_trigger_Unknown: [ triggerconfig, ] icarus_stage0_multiTPC_TPC: [ decon1droi, - roifinder1d - ] - -icarus_stage0_multiTPC_2d_TPC: [ decon1droi, roifinder1d, - decon2droiEE, - decon2droiEW, - decon2droiWE, - decon2droiWW, - roifinder2d - ] - -icarus_stage0_EastHits_TPC: [ gaushit1dTPCEW, - gaushit1dTPCEE + wire2channelroi ] -icarus_stage0_WestHits_TPC: [ gaushit1dTPCWW, - gaushit1dTPCWE - ] - -icarus_stage0_EastHits2d_TPC: [ gaushit2dTPCEW, - gaushit2dTPCEE - ] - -icarus_stage0_WestHits2d_TPC: [ gaushit2dTPCWW, - gaushit2dTPCWE +icarus_stage0_multiTPC_2d_TPC_E:[ + decon2droiEE, + decon2droiEW ] -icarus_stage0_EastGauss_TPC: [ gausshitTPCEW, - gausshitTPCEE +icarus_stage0_multiTPC_2d_TPC_W:[ + decon2droiWE, + decon2droiWW ] -icarus_stage0_WestGauss_TPC: [ gausshitTPCWW, - gausshitTPCWE +icarus_stage0_multiTPC_2d_TPC: [ + @sequence::icarus_stage0_multiTPC_2d_TPC_E, + @sequence::icarus_stage0_multiTPC_2d_TPC_W, + wire2channelroi2d ] icarus_purity_monitor: [ @@ -267,19 +244,13 @@ icarus_stage0_PMT_NuMI: [ @sequence::icarus_stage0_PMT, ] icarus_stage0_multiTPC: [ @sequence::icarus_stage0_multiTPC_TPC, - @sequence::icarus_stage0_EastHits_TPC, - @sequence::icarus_stage0_WestHits_TPC, @sequence::icarus_purity_monitor ] icarus_stage0_2d_multiTPC: [ @sequence::icarus_stage0_multiTPC_2d_TPC, - @sequence::icarus_stage0_EastHits_TPC, - @sequence::icarus_stage0_WestHits_TPC, - @sequence::icarus_stage0_EastHits2d_TPC, - @sequence::icarus_stage0_WestHits2d_TPC, @sequence::icarus_purity_monitor ] - + icarus_stage0_CRT: [ daqCRT, crthit, @@ -330,6 +301,12 @@ icarus_stage0_2d_data_crtpmtfilter: [ physics.producers.daqTrigger.DecoderTool.TrigConfigLabel: triggerconfig +### connect channel ROI converters to input +icarus_stage0_producers.wire2channelroi.WireModuleLabelVec: ["roifinder1d:PHYSCRATEDATATPCWW", "roifinder1d:PHYSCRATEDATATPCWE", "roifinder1d:PHYSCRATEDATATPCEW", "roifinder1d:PHYSCRATEDATATPCEE"] +icarus_stage0_producers.wire2channelroi.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] +icarus_stage0_producers.wire2channelroi2d.WireModuleLabelVec: ["decon2droiEE:gauss", "decon2droiEW:gauss", "decon2droiWE:gauss", "decon2droiWW:gauss"] +icarus_stage0_producers.wire2channelroi2d.OutInstanceLabelVec: ["PHYSCRATEDATATPCEE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCWW"] + ### Handle multiple TPC readout with single instances icarus_stage0_producers.daqTPC.FragmentsLabelVec: ["daq:PHYSCRATEDATATPCWW","daq:PHYSCRATEDATATPCWE","daq:PHYSCRATEDATATPCEW","daq:PHYSCRATEDATATPCEE"] icarus_stage0_producers.daqTPCROI.FragmentsLabelVec: ["daq:PHYSCRATEDATATPCWW","daq:PHYSCRATEDATATPCWE","daq:PHYSCRATEDATATPCEW","daq:PHYSCRATEDATATPCEE"] @@ -346,30 +323,128 @@ icarus_stage0_producers.decon2droi.wcls_main.outputers: icarus_stage0_producers.decon2droi.wcls_main.params.raw_input_label: "daqTPC" icarus_stage0_producers.decon2droi.wcls_main.params.tpc_volume_label: 0 icarus_stage0_producers.decon2droi.wcls_main.params.signal_output_form: "dense" +icarus_stage0_producers.decon2droi.wcls_main.logsinks: ["stdout"] +icarus_stage0_producers.decon2droi.wcls_main.loglevels: ["debug", "pgraph:info"] +icarus_stage0_producers.decon2droi.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc0"] icarus_stage0_producers.decon2droiEE.wcls_main.outputers: ["wclsFrameSaver:spsaver0"] icarus_stage0_producers.decon2droiEE.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCEE" icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: 0 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.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] icarus_stage0_producers.decon2droiEW.wcls_main.outputers: ["wclsFrameSaver:spsaver1"] icarus_stage0_producers.decon2droiEW.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCEW" icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: 1 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.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] icarus_stage0_producers.decon2droiWE.wcls_main.outputers: ["wclsFrameSaver:spsaver2"] icarus_stage0_producers.decon2droiWE.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCWE" icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: 2 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.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] icarus_stage0_producers.decon2droiWW.wcls_main.outputers: ["wclsFrameSaver:spsaver3"] icarus_stage0_producers.decon2droiWW.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCWW" icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: 3 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.configs: ["pgrapher/experiment/icarus/wcls-decode-to-sig-twofaced.jsonnet"] + +# Signal processing values +icarus_stage0_producers.decon2droiEE.wcls_main.structs.gain0: 17.05212 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.gain0: 17.05212 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.gain0: 17.05212 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.gain0: 17.05212 + +icarus_stage0_producers.decon2droiEE.wcls_main.structs.gain1: 12.1420344 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.gain1: 12.1420344 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.gain1: 12.1420344 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.gain1: 12.1420344 + +icarus_stage0_producers.decon2droiEE.wcls_main.structs.gain2: 13.0261362 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.gain2: 13.0261362 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.gain2: 13.0261362 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.gain2: 13.0261362 + + +icarus_stage0_producers.decon2droiEE.wcls_main.structs.shaping0: 1.3 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.shaping0: 1.3 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.shaping0: 1.3 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.shaping0: 1.3 + +icarus_stage0_producers.decon2droiEE.wcls_main.structs.shaping1: 1.45 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.shaping1: 1.45 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.shaping1: 1.45 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.shaping1: 1.45 + +icarus_stage0_producers.decon2droiEE.wcls_main.structs.shaping2: 1.3 +icarus_stage0_producers.decon2droiEW.wcls_main.structs.shaping2: 1.3 +icarus_stage0_producers.decon2droiWE.wcls_main.structs.shaping2: 1.3 +icarus_stage0_producers.decon2droiWW.wcls_main.structs.shaping2: 1.3 + +# Defines final gain, in ADC/e- +icarus_stage0_producers.decon2droiEE.wcls_main.structs.gain_ADC_per_e: @local::gain_ADC_per_e +icarus_stage0_producers.decon2droiEW.wcls_main.structs.gain_ADC_per_e: @local::gain_ADC_per_e +icarus_stage0_producers.decon2droiWE.wcls_main.structs.gain_ADC_per_e: @local::gain_ADC_per_e +icarus_stage0_producers.decon2droiWW.wcls_main.structs.gain_ADC_per_e: @local::gain_ADC_per_e + +# Filter parameters +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Gaus_wide_sigma: @local::Gaus_wide_sigma +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_U_sigma: @local::Wiener_tight_U_sigma +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_U_power: @local::Wiener_tight_U_power +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_V_sigma: @local::Wiener_tight_V_sigma +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_V_power: @local::Wiener_tight_V_power +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_W_sigma: @local::Wiener_tight_W_sigma +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wiener_tight_W_power: @local::Wiener_tight_W_power +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wire_ind_sigma: @local::Wire_ind_sigma +icarus_stage0_producers.decon2droiEE.wcls_main.structs.Wire_col_sigma: @local::Wire_col_sigma + +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Gaus_wide_sigma: @local::Gaus_wide_sigma +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_U_sigma: @local::Wiener_tight_U_sigma +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_U_power: @local::Wiener_tight_U_power +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_V_sigma: @local::Wiener_tight_V_sigma +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_V_power: @local::Wiener_tight_V_power +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_W_sigma: @local::Wiener_tight_W_sigma +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wiener_tight_W_power: @local::Wiener_tight_W_power +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wire_ind_sigma: @local::Wire_ind_sigma +icarus_stage0_producers.decon2droiEW.wcls_main.structs.Wire_col_sigma: @local::Wire_col_sigma + +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Gaus_wide_sigma: @local::Gaus_wide_sigma +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_U_sigma: @local::Wiener_tight_U_sigma +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_U_power: @local::Wiener_tight_U_power +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_V_sigma: @local::Wiener_tight_V_sigma +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_V_power: @local::Wiener_tight_V_power +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_W_sigma: @local::Wiener_tight_W_sigma +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wiener_tight_W_power: @local::Wiener_tight_W_power +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wire_ind_sigma: @local::Wire_ind_sigma +icarus_stage0_producers.decon2droiWE.wcls_main.structs.Wire_col_sigma: @local::Wire_col_sigma + +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Gaus_wide_sigma: @local::Gaus_wide_sigma +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_U_sigma: @local::Wiener_tight_U_sigma +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_U_power: @local::Wiener_tight_U_power +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_V_sigma: @local::Wiener_tight_V_sigma +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_V_power: @local::Wiener_tight_V_power +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_W_sigma: @local::Wiener_tight_W_sigma +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wiener_tight_W_power: @local::Wiener_tight_W_power +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wire_ind_sigma: @local::Wire_ind_sigma +icarus_stage0_producers.decon2droiWW.wcls_main.structs.Wire_col_sigma: @local::Wire_col_sigma ### Set up to output ROIs from full waveforms icarus_stage0_producers.roifinder1d.WireModuleLabelVec: ["decon1droi:PHYSCRATEDATATPCWW","decon1droi:PHYSCRATEDATATPCWE","decon1droi:PHYSCRATEDATATPCEW","decon1droi:PHYSCRATEDATATPCEE"] @@ -387,22 +462,6 @@ icarus_stage0_producers.roifinder2d.WireModuleLabelVec: icarus_stage0_producers.roifinder2d.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] icarus_stage0_producers.roifinder2d.OutputMorphed: false -### Set up hit finding for multiple TPC readout -icarus_stage0_producers.gaushit1dTPCWW.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCWW" -icarus_stage0_producers.gaushit1dTPCWE.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCWE" -icarus_stage0_producers.gaushit1dTPCEW.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCEW" -icarus_stage0_producers.gaushit1dTPCEE.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCEE" - -icarus_stage0_producers.gaushit2dTPCWW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWW" -icarus_stage0_producers.gaushit2dTPCWE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWE" -icarus_stage0_producers.gaushit2dTPCEW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEW" -icarus_stage0_producers.gaushit2dTPCEE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEE" - -icarus_stage0_producers.gausshitTPCWW.CalDataModuleLabel: "roifinder:PHYSCRATEDATATPCWW" -icarus_stage0_producers.gausshitTPCWE.CalDataModuleLabel: "roifinder:PHYSCRATEDATATPCWE" -icarus_stage0_producers.gausshitTPCEW.CalDataModuleLabel: "roifinder:PHYSCRATEDATATPCEW" -icarus_stage0_producers.gausshitTPCEE.CalDataModuleLabel: "roifinder:PHYSCRATEDATATPCEE" - ### ### Optical detector ### diff --git a/fcl/reco/Definitions/stage0_icarus_defs_run1.fcl b/fcl/reco/Definitions/stage0_icarus_defs_run1.fcl deleted file mode 100644 index 9b9a21f20..000000000 --- a/fcl/reco/Definitions/stage0_icarus_defs_run1.fcl +++ /dev/null @@ -1,419 +0,0 @@ -## -## ICARUS definitions for the first stage of data processing -## modeled on standard version -## - -#include "services_common_icarus.fcl" - -#include "decoderdefs_icarus.fcl" -#include "recowire_icarus.fcl" -#include "hitfindermodules_icarus.fcl" -#include "timing_icarus.fcl" -#include "icarus_ophitfinder.fcl" -#include "icarus_flashfinder.fcl" -#include "trigger_emulation_icarus.fcl" -#include "crt_decoderdefs_icarus.fcl" -#include "crthitproducer.fcl" -#include "crtpmtmatchingproducer.fcl" -#include "wcls-decode-to-sig-base.fcl" -#include "icarus_FilterDataIntegrity.fcl" -#include "icarus_FilterCRTPMTMatching.fcl" - -BEGIN_PROLOG - -### Analyzers employed during stage 0 processing ### -icarus_stage0_analyzers: -{ - purityinfoana0: { module_type: "TPCPurityInfoAna" - PurityInfoLabel: "purityana0" - PrintInfo: false - SelectEvents: [ reco ] - } - purityinfoana1: { module_type: "TPCPurityInfoAna" - PurityInfoLabel: "purityana1" - PrintInfo: false - SelectEvents: [ reco ] - } - CRTPMTMatching: { module_type: "CRTPMTMatchingAna" - OpHitModuleLabel: "ophit" - OpFlashModuleLabel0: "opflashCryoE" - OpFlashModuleLabel1: "opflashCryoW" - CrtHitModuleLabel: "crthit" - TriggerLabel: "daqTrigger" - FlashPeThresh: 2000.0 - HitPeThresh: 100.0 - CoincidenceWindow: 80.0 - OpDelay: 43.0 - HitVelocityMax: 15.0 - HitVelocityMin: 2.0 - } -} - -# set the name of our `extractPMTconfig` and `extractTriggerConfig` for our decoders -decodeTriggerV2.DecoderTool.TrigConfigLabel: triggerconfig -decodeTriggerV3.DecoderTool.TrigConfigLabel: triggerconfig -decodeTriggerAutodetect.DecoderTool.Decoders[0].ToolConfig.TrigConfigLabel: triggerconfig -decodeTriggerAutodetect.DecoderTool.Decoders[1].ToolConfig.TrigConfigLabel: triggerconfig -decodeTriggerAutodetect.DecoderTool.Decoders[2].ToolConfig.TrigConfigLabel: triggerconfig -decodePMT.PMTconfigTag: pmtconfig -decodePMT.TriggerTag: daqTrigger - -### This is the complete list of all producers! ### -icarus_stage0_producers: -{ - - ### configuration extraction - triggerconfig: @local::extractTriggerConfig - pmtconfig: @local::extractPMTconfig - - ### Decoder definitions - daqTPC: @local::decodeTPC - - daqTPCROI: @local::decodeTPCROI - - daqPMT: @local::decodePMT - - daqCRT: @local::crtdaq_icarus - - daqTrigger: @local::decodeTriggerAutodetect - - ### calwire producers - decon1droi: @local::icarus_decon1droi - - ### wire-cell decon producers - decon2droi: @local::standard_wirecell_sigproc - decon2droiEE: @local::standard_wirecell_sigproc - decon2droiEW: @local::standard_wirecell_sigproc - decon2droiWE: @local::standard_wirecell_sigproc - decon2droiWW: @local::standard_wirecell_sigproc - - ### ROI finding on complete deconvolved waveforms - roifinder1d: @local::icarus_roifinder - roifinder2d: @local::icarus_roifinder - - ### TPC hit-finder producers - gaushit1dTPCWW: @local::gaus_hitfinder_icarus - gaushit1dTPCWE: @local::gaus_hitfinder_icarus - gaushit1dTPCEW: @local::gaus_hitfinder_icarus - gaushit1dTPCEE: @local::gaus_hitfinder_icarus - - gaushit2dTPCWW: @local::gaus_hitfinder_icarus - gaushit2dTPCWE: @local::gaus_hitfinder_icarus - gaushit2dTPCEW: @local::gaus_hitfinder_icarus - gaushit2dTPCEE: @local::gaus_hitfinder_icarus - - ### CRT hit finder producer - crthit: @local::standard_crthitproducer - - ### CRTPMTMatching producer - crtpmt: @local::standard_crtpmtmatchingproducer - - ### trigger emulation foundation - pmtconfigbaselines: @local::icarus_pmtconfigbaselines - pmtthr: @local::icarus_pmtdiscriminatethr - - ### Optical hit finder - pmtbaselines: @local::icarus_opreco_pedestal_fromchannel_data # from icarus_ophitfinder.fcl - ophituncorrected: @local::icarus_ophit_data - ophit: @local::icarus_ophit_timing_correction - ophitfulluncorrected: @local::icarus_ophitdebugger_data - ophitfull: @local::icarus_ophit_timing_correction - opflashCryoE: @local::ICARUSSimpleFlashDataCryoE - opflashCryoW: @local::ICARUSSimpleFlashDataCryoW - - daqPMTonbeam: @local::copyPMTonBeam - - ### Purity monitoring - purityana0: { module_type: "ICARUSPurityDQM" } - purityana1: { module_type: "ICARUSPurityDQM" } -} - -icarus_stage0_filters: -{ - # - # Note that these filters are holdovers from early "Run 0" and "Run 1" data taking and are - # generally no longer used. We are maintaining here now just in case but assume they will be - # deprecated in the future. - # - flashfilterBNB: { module_type: "FilterOpFlash" - OpFlashProducerList: ["opflashCryoE","opflashCryoW"] - WindowStartTime: -0.2 # 0.2us safe margin - WindowEndTime: 1.8 - } - flashfilterNuMI: { module_type: "FilterOpFlash" - OpFlashProducerList: ["opflashCryoE","opflashCryoW"] - WindowStartTime: -0.2 - WindowEndTime: 9.8 - } - - triggerfilterBNB: { module_type: "TriggerTypeFilter" - TriggerDataLabel: "daqTrigger" - TriggerType: "BNB" - } - - triggerfilterNuMI: { module_type: "TriggerTypeFilter" - TriggerDataLabel: "daqTrigger" - TriggerType: "NuMI" - } - - triggerfilterOffbeamBNB: { module_type: "TriggerTypeFilter" - TriggerDataLabel: "daqTrigger" - TriggerType: "OffbeamBNB" - } - - triggerfilterOffbeamNuMI: { module_type: "TriggerTypeFilter" - TriggerDataLabel: "daqTrigger" - TriggerType: "OffbeamNuMI" - } - - - triggerfilterUnknown: { module_type: "TriggerTypeFilter" - TriggerDataLabel: "daqTrigger" - TriggerType: "Unknown" - } - - filterdataintegrity: @local::icarus_FilterDataIntegrity - - crtpmtmatchingfilter: @local::icarus_FilterCRTPMTMatching -} - - -### Below are a list of convenient sequences that can be used for production/typical users. ### - -icarus_stage0_trigger_BNB: [ triggerconfig, - daqTrigger, - triggerfilterBNB - ] - -icarus_stage0_trigger_NuMI: [ triggerconfig, - daqTrigger, - triggerfilterNuMI - ] - -icarus_stage0_trigger_OffbeamBNB: [ triggerconfig, - daqTrigger, - triggerfilterOffbeamBNB - ] - -icarus_stage0_trigger_OffbeamNuMI: [ triggerconfig, - daqTrigger, - triggerfilterOffbeamNuMI - ] - -icarus_stage0_trigger_Unknown: [ triggerconfig, - daqTrigger, - triggerfilterUnknown - ] - -icarus_stage0_multiTPC_TPC: [ decon1droi, - roifinder1d - ] - -icarus_stage0_multiTPC_2d_TPC: [ decon1droi, - roifinder1d, - decon2droiEE, - decon2droiEW, - decon2droiWE, - decon2droiWW, - roifinder2d - ] - -icarus_stage0_EastHits_TPC: [ gaushit1dTPCEW, - gaushit1dTPCEE - ] - -icarus_stage0_WestHits_TPC: [ gaushit1dTPCWW, - gaushit1dTPCWE - ] - -icarus_stage0_EastHits2d_TPC: [ gaushit2dTPCEW, - gaushit2dTPCEE - ] - -icarus_stage0_WestHits2d_TPC: [ gaushit2dTPCWW, - gaushit2dTPCWE - ] - -icarus_purity_monitor: [ - purityana0, - purityana1 - ] - -icarus_stage0_PMT: [ triggerconfig, - daqTrigger, - pmtconfig, - daqPMT, - pmtconfigbaselines, - pmtthr, - pmtbaselines, - ophituncorrected, - ophit, - opflashCryoE, - opflashCryoW, - daqPMTonbeam - ] - -icarus_stage0_PMT_BNB: [ @sequence::icarus_stage0_PMT, - flashfilterBNB - ] - -icarus_stage0_PMT_NuMI: [ @sequence::icarus_stage0_PMT, - flashfilterNuMI - ] - -icarus_stage0_multiTPC: [ @sequence::icarus_stage0_multiTPC_TPC, - @sequence::icarus_stage0_EastHits_TPC, - @sequence::icarus_stage0_WestHits_TPC, - @sequence::icarus_purity_monitor - ] - -icarus_stage0_2d_multiTPC: [ @sequence::icarus_stage0_multiTPC_2d_TPC, - @sequence::icarus_stage0_EastHits_TPC, - @sequence::icarus_stage0_WestHits_TPC, - @sequence::icarus_stage0_EastHits2d_TPC, - @sequence::icarus_stage0_WestHits2d_TPC, - @sequence::icarus_purity_monitor - ] - -icarus_stage0_CRT: [ - daqCRT, - crthit, - crtpmt - ] - -icarus_stage0_data: [ - filterdataintegrity, - @sequence::icarus_stage0_PMT, - @sequence::icarus_stage0_CRT, - daqTPCROI, - @sequence::icarus_stage0_multiTPC - ] - -icarus_stage0_data_crtpmtfilter: [ - filterdataintegrity, - @sequence::icarus_stage0_PMT, - @sequence::icarus_stage0_CRT, - crtpmtmatchingfilter, - daqTPCROI, - @sequence::icarus_stage0_multiTPC - ] - -icarus_stage0_2d_data: [ - filterdataintegrity, - @sequence::icarus_stage0_PMT, - @sequence::icarus_stage0_CRT, - daqTPCROI, - @sequence::icarus_stage0_2d_multiTPC - ] - -icarus_stage0_2d_data_crtpmtfilter: [ - filterdataintegrity, - @sequence::icarus_stage0_PMT, - @sequence::icarus_stage0_CRT, - crtpmtmatchingfilter, - daqTPCROI, - @sequence::icarus_stage0_2d_multiTPC - ] - -### Below we include overrides for the modules above - -physics.producers.daqTrigger.DecoderTool.TrigConfigLabel: triggerconfig - -### Handle multiple TPC readout with single instances -icarus_stage0_producers.daqTPC.FragmentsLabelVec: ["daq:PHYSCRATEDATATPCWW","daq:PHYSCRATEDATATPCWE","daq:PHYSCRATEDATATPCEW","daq:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.daqTPCROI.FragmentsLabelVec: ["daq:PHYSCRATEDATATPCWW","daq:PHYSCRATEDATATPCWE","daq:PHYSCRATEDATATPCEW","daq:PHYSCRATEDATATPCEE"] - -### Set up for the 1D deconvolution - turn OFF ROI finding -icarus_stage0_producers.decon1droi.RawDigitLabelVec: ["daqTPCROI:PHYSCRATEDATATPCWW","daqTPCROI:PHYSCRATEDATATPCWE","daqTPCROI:PHYSCRATEDATATPCEW","daqTPCROI:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.decon1droi.roifinderToolVec.roifinderToolPlane0: @local::icarus_noproifinder_0 -icarus_stage0_producers.decon1droi.roifinderToolVec.roifinderToolPlane1: @local::icarus_noproifinder_1 -icarus_stage0_producers.decon1droi.roifinderToolVec.roifinderToolPlane2: @local::icarus_noproifinder_2 - -### Set up for the 2D deconvolution -icarus_stage0_producers.decon2droi.wcls_main.inputers: ["wclsRawFrameSource:rfsrc0"] -icarus_stage0_producers.decon2droi.wcls_main.outputers: ["wclsFrameSaver:spsaver0"] -icarus_stage0_producers.decon2droi.wcls_main.params.raw_input_label: "daqTPC" -icarus_stage0_producers.decon2droi.wcls_main.params.tpc_volume_label: 0 -icarus_stage0_producers.decon2droi.wcls_main.params.signal_output_form: "dense" - -icarus_stage0_producers.decon2droiEE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc0"] -icarus_stage0_producers.decon2droiEE.wcls_main.outputers: ["wclsFrameSaver:spsaver0"] -icarus_stage0_producers.decon2droiEE.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCEE" -icarus_stage0_producers.decon2droiEE.wcls_main.params.tpc_volume_label: 0 -icarus_stage0_producers.decon2droiEE.wcls_main.params.signal_output_form: "dense" - -icarus_stage0_producers.decon2droiEW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc1"] -icarus_stage0_producers.decon2droiEW.wcls_main.outputers: ["wclsFrameSaver:spsaver1"] -icarus_stage0_producers.decon2droiEW.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCEW" -icarus_stage0_producers.decon2droiEW.wcls_main.params.tpc_volume_label: 1 -icarus_stage0_producers.decon2droiEW.wcls_main.params.signal_output_form: "dense" - -icarus_stage0_producers.decon2droiWE.wcls_main.inputers: ["wclsRawFrameSource:rfsrc2"] -icarus_stage0_producers.decon2droiWE.wcls_main.outputers: ["wclsFrameSaver:spsaver2"] -icarus_stage0_producers.decon2droiWE.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCWE" -icarus_stage0_producers.decon2droiWE.wcls_main.params.tpc_volume_label: 2 -icarus_stage0_producers.decon2droiWE.wcls_main.params.signal_output_form: "dense" - -icarus_stage0_producers.decon2droiWW.wcls_main.inputers: ["wclsRawFrameSource:rfsrc3"] -icarus_stage0_producers.decon2droiWW.wcls_main.outputers: ["wclsFrameSaver:spsaver3"] -icarus_stage0_producers.decon2droiWW.wcls_main.params.raw_input_label: "daqTPCROI:PHYSCRATEDATATPCWW" -icarus_stage0_producers.decon2droiWW.wcls_main.params.tpc_volume_label: 3 -icarus_stage0_producers.decon2droiWW.wcls_main.params.signal_output_form: "dense" - -### Set up to output ROIs from full waveforms -icarus_stage0_producers.roifinder1d.WireModuleLabelVec: ["decon1droi:PHYSCRATEDATATPCWW","decon1droi:PHYSCRATEDATATPCWE","decon1droi:PHYSCRATEDATATPCEW","decon1droi:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder1d.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder1d.OutputMorphed: false - -icarus_stage0_producers.roifinder2d.roifinderToolVec: { roifinderPlane0: @local::decoderroifinder_0 - roifinderPlane1: @local::decoderroifinder_1 - roifinderPlane2: @local::decoderroifinder_2 - } -icarus_stage0_producers.roifinder2d.roifinderToolVec.roifinderPlane0.ROILabelVec: ["roifinder1d:PHYSCRATEDATATPCWW","roifinder1d:PHYSCRATEDATATPCWE","roifinder1d:PHYSCRATEDATATPCEW","roifinder1d:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder2d.roifinderToolVec.roifinderPlane1.ROILabelVec: ["roifinder1d:PHYSCRATEDATATPCWW","roifinder1d:PHYSCRATEDATATPCWE","roifinder1d:PHYSCRATEDATATPCEW","roifinder1d:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder2d.roifinderToolVec.roifinderPlane2.ROILabelVec: ["roifinder1d:PHYSCRATEDATATPCWW","roifinder1d:PHYSCRATEDATATPCWE","roifinder1d:PHYSCRATEDATATPCEW","roifinder1d:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder2d.WireModuleLabelVec: ["decon2droiWW:looseLf","decon2droiWE:looseLf","decon2droiEW:looseLf","decon2droiEE:looseLf"] -icarus_stage0_producers.roifinder2d.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] -icarus_stage0_producers.roifinder2d.OutputMorphed: false - -### Set up hit finding for multiple TPC readout -icarus_stage0_producers.gaushit1dTPCWW.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCWW" -icarus_stage0_producers.gaushit1dTPCWE.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCWE" -icarus_stage0_producers.gaushit1dTPCEW.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCEW" -icarus_stage0_producers.gaushit1dTPCEE.CalDataModuleLabel: "roifinder1d:PHYSCRATEDATATPCEE" - -icarus_stage0_producers.gaushit2dTPCWW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWW" -icarus_stage0_producers.gaushit2dTPCWE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWE" -icarus_stage0_producers.gaushit2dTPCEW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEW" -icarus_stage0_producers.gaushit2dTPCEE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEE" - -### -### Optical detector -### -icarus_stage0_producers.ophit.InputLabels: [ "ophituncorrected" ] -icarus_stage0_producers.ophitfull.InputLabels: [ "ophitfulluncorrected" ] - -### Default purity monitor settings (single TPC readout assumed) -icarus_stage0_producers.purityana0.RawModuleLabel: ["daqTPCROI:PHYSCRATEDATATPCWW","daqTPCROI:PHYSCRATEDATATPCWE","daqTPCROI:PHYSCRATEDATATPCEW","daqTPCROI:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.purityana0.ValoreTauFCL: 600000. -icarus_stage0_producers.purityana0.CryostatFCL: 0 -icarus_stage0_producers.purityana0.PlaneFCL: 2 -icarus_stage0_producers.purityana0.ThresholdFCL: 3 -icarus_stage0_producers.purityana0.PersistPurityInfo: false -icarus_stage0_producers.purityana0.FillAnaTuple: false -icarus_stage0_producers.purityana0.PersistPurityInfo: false -icarus_stage0_producers.purityana0.FillAnaTuple: false - -icarus_stage0_producers.purityana1.RawModuleLabel: ["daqTPCROI:PHYSCRATEDATATPCWW","daqTPCROI:PHYSCRATEDATATPCWE","daqTPCROI:PHYSCRATEDATATPCEW","daqTPCROI:PHYSCRATEDATATPCEE"] -icarus_stage0_producers.purityana1.ValoreTauFCL: 600000. -icarus_stage0_producers.purityana1.CryostatFCL: 1 -icarus_stage0_producers.purityana1.PlaneFCL: 2 -icarus_stage0_producers.purityana1.ThresholdFCL: 3 -icarus_stage0_producers.purityana1.PersistPurityInfo: false -icarus_stage0_producers.purityana1.FillAnaTuple: false -icarus_stage0_producers.purityana1.PersistPurityInfo: false -icarus_stage0_producers.purityana1.FillAnaTuple: false - -icarus_stage0_producers.daqPMTonbeam.Waveforms: daqPMT - -END_PROLOG diff --git a/fcl/reco/Definitions/stage0_icarus_driver_common_run1.fcl b/fcl/reco/Definitions/stage0_icarus_driver_common_run1.fcl deleted file mode 100644 index 726435996..000000000 --- a/fcl/reco/Definitions/stage0_icarus_driver_common_run1.fcl +++ /dev/null @@ -1,92 +0,0 @@ -## -## Shared art job configuartions for ICARUS reco -## -#include "stage0_icarus_defs_run1.fcl" -#include "services_common_icarus.fcl" -#include "channelmapping_icarus.fcl" - -process_name: Stage0 - -services: -{ - TFileService: { } - IICARUSChannelMap: @local::icarus_channelmappinggservice - IPMTTimingCorrectionService: @local::icarus_pmttimingservice - @table::icarus_wirecalibration_minimum_services -} - -#source is a root file -source: -{ - module_type: RootInput - maxEvents: 10 # Number of events to create - saveMemoryObjectThreshold: 0 -} - -# 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: - { - @table::icarus_stage0_producers - } - - filters: - { - @table::icarus_stage0_filters - } - - analyzers: - { - @table::icarus_stage0_analyzers - } - - #reco sequence and trigger_paths to be defined elsewhere - - streamROOT: [ rootOutput ] - end_paths: [ streamROOT ] - -} - -#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: -{ - rootOutput: - { - module_type: RootOutput - dataTier: "reconstructed" - compressionLevel: 1 - saveMemoryObjectThreshold: 0 - fileName: "%ifb_%tc-%p.root" - fileProperties: {maxInputFiles: 1} - checkFileName: false - SelectEvents: [path] - } -} - -# Include this as per directive of Kazu and Andrea (circa March 25, 2021) for introduction of the filter -#services.DetectorClocksService.InheritClockConfig: false - -### Here we try to suppress known and pointless messages -### See https://cdcvs.fnal.gov/redmine/projects/messagefacility/wiki for details -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - default: - { - limit: -1 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 1 - } - } - } -} diff --git a/fcl/reco/Definitions/stage0_icarus_mc_defs.fcl b/fcl/reco/Definitions/stage0_icarus_mc_defs.fcl index a02393d60..9052f38f3 100644 --- a/fcl/reco/Definitions/stage0_icarus_mc_defs.fcl +++ b/fcl/reco/Definitions/stage0_icarus_mc_defs.fcl @@ -61,11 +61,8 @@ icarus_stage0_mc_PMT: [ opflashCryoW ] -icarus_stage0_mc_crt: [ crthit, - #crttzero - crttrack, - crtpmt - ] +icarus_stage0_mc_crthit: [crthit] +icarus_stage0_mc_crtreco: [crttrack, crtpmt] # adapt input labels icarus_stage0_mc_producers.emuTrigger.BeamGates: shifted diff --git a/fcl/reco/Definitions/stage1_icarus_defs.fcl b/fcl/reco/Definitions/stage1_icarus_defs.fcl index dd82375cc..422058dd4 100644 --- a/fcl/reco/Definitions/stage1_icarus_defs.fcl +++ b/fcl/reco/Definitions/stage1_icarus_defs.fcl @@ -5,6 +5,7 @@ #include "services_common_icarus.fcl" +#include "hitfindermodules_icarus.fcl" #include "cluster_icarus.fcl" #include "trackfindermodules_icarus.fcl" #include "showerfindermodules_icarus.fcl" @@ -16,8 +17,11 @@ #include "flashmatch_simple_icarus.fcl" #include "crttrackproducer_icarus.fcl" #include "crtbacktracker_icarus.fcl" +### FPoppi : The following CRT matching algorithms are deprecated. #include "crtt0matchingalg_icarus.fcl" #include "crtt0producer_icarus.fcl" +### FPoppi : The following one is mantained. +#include "crtt0tagging.fcl" ## The below can be found from the softlink to Supera in sbncode #include "supera_modules.fcl" #include "crtpmtmatching_parameters.fcl" @@ -28,6 +32,17 @@ BEGIN_PROLOG ### This is the complete list of all producers! ### icarus_stage1_producers: { + ### TPC hit-finder producers + gaushit1dTPCWW: @local::gausshit_sbn + gaushit1dTPCWE: @local::gausshit_sbn + gaushit1dTPCEW: @local::gausshit_sbn + gaushit1dTPCEE: @local::gausshit_sbn + + gaushit2dTPCWW: @local::gausshit_sbn + gaushit2dTPCWE: @local::gausshit_sbn + gaushit2dTPCEW: @local::gausshit_sbn + gaushit2dTPCEE: @local::gausshit_sbn + ### Cluster3D cluster3DCryoW: @local::icarus_cluster3d cluster3DCryoE: @local::icarus_cluster3d @@ -65,9 +80,11 @@ icarus_stage1_producers: ## crt producer crttrack: @local::standard_crttrackproducer - CRTT0Matching: @local::standard_crtt0producer - CRTT0MatchingW: @local::standard_crtt0producerW - CRTT0MatchingE: @local::standard_crtt0producerE + ### FPoppi: the following are deprecated (and the one above not mantained) + ## CRTT0Matching: @local::standard_crtt0producer + ## CRTT0MatchingW: @local::standard_crtt0producerW + ## CRTT0MatchingE: @local::standard_crtt0producerE + CRTT0Tagging: @local::icarus_crtt0tagging_data tpcpmtbarycentermatchCryoE: @local::data_tpcpmtbarycentermatchproducer_east tpcpmtbarycentermatchCryoW: @local::data_tpcpmtbarycentermatchproducer_west @@ -81,8 +98,8 @@ icarus_stage1_filters: icarus_stage1_analyzers: { - caloskimE: @local::caloskim_cryoe_goldentracks - caloskimW: @local::caloskim_cryow_goldentracks + caloskimE: @local::caloskim_cryoe_crthittagged_goldentracks + caloskimW: @local::caloskim_cryow_crthittagged_goldentracks simpleLightAna: @local::ICARUSFlashAssAna supera: @local::icarus_supera_data superaMC: @local::icarus_supera_MC_PMT_CRT @@ -130,14 +147,6 @@ icarus_stage1_analyzers: } } -icarus_stage1_analyzers.caloskimE.SelectEvents: [reco] -icarus_stage1_analyzers.caloskimE.CALOproducer: caloskimCalorimetryCryoE -icarus_stage1_analyzers.caloskimE.SilenceMissingDataProducts: true - -icarus_stage1_analyzers.caloskimW.SelectEvents: [reco] -icarus_stage1_analyzers.caloskimW.CALOproducer: caloskimCalorimetryCryoW -icarus_stage1_analyzers.caloskimW.SilenceMissingDataProducts: true - icarus_stage1_analyzers.supera.unique_filename: true ### Below are a list of convenient sequences that can be used for production/typical users. ### @@ -150,6 +159,12 @@ icarus_analysis_modules: [ caloskimE ,CRTAnalysis ] +icarus_analysis_modules_nolight: [ caloskimE + ,caloskimW + ,CRTDataAnalysis + ,CRTAnalysis + ] + icarus_analysis_supera: [ supera ] @@ -167,14 +182,42 @@ icarus_analysis_larcv_modules: [ @sequence::icarus_analysis_modules ,@sequence::icarus_analysis_supera ] +icarus_EastHits_TPC: [ gaushit1dTPCEW, + gaushit1dTPCEE + ] + +icarus_WestHits_TPC: [ gaushit1dTPCWW, + gaushit1dTPCWE + ] +icarus_EastHits2d_TPC: [ gaushit2dTPCEW, + gaushit2dTPCEE + ] + +icarus_WestHits2d_TPC: [ gaushit2dTPCWW, + gaushit2dTPCWE + ] + # Set up filtering of cluster3D hits by cryostat # Changed slightly to faciliate larcv processing -icarus_filter_cluster3D: [ cluster3DCryoE, +icarus_filter1D_cluster3D: [ + @sequence::icarus_EastHits_TPC, + @sequence::icarus_WestHits_TPC, + cluster3DCryoE, cluster3DCryoW, TPCHitFilterCryoE, TPCHitFilterCryoW ] +icarus_filter2D_cluster3D: [ + @sequence::icarus_EastHits2d_TPC, + @sequence::icarus_WestHits2d_TPC, + cluster3DCryoE, + cluster3DCryoW, + TPCHitFilterCryoE, + TPCHitFilterCryoW + ] + + icarus_reco_cluster3DCryoW: [ cluster3DCryoW ] icarus_reco_cluster3DCryoE: [ cluster3DCryoE ] @@ -191,12 +234,26 @@ icarus_reco_pandoraGausCryoE: [ pandoraGausCryoE, SBNShowerGausCryoE ] -icarus_reco_Gauss_CryoW: [ +icarus_reco_Gauss1D_CryoW: [ + @sequence::icarus_WestHits_TPC, @sequence::icarus_reco_cluster3DCryoW, @sequence::icarus_reco_pandoraGausCryoW ] -icarus_reco_Gauss_CryoE: [ +icarus_reco_Gauss1D_CryoE: [ + @sequence::icarus_EastHits_TPC, + @sequence::icarus_reco_cluster3DCryoE, + @sequence::icarus_reco_pandoraGausCryoE + ] + +icarus_reco_Gauss2D_CryoW: [ + @sequence::icarus_WestHits2d_TPC, + @sequence::icarus_reco_cluster3DCryoW, + @sequence::icarus_reco_pandoraGausCryoW + ] + +icarus_reco_Gauss2D_CryoE: [ + @sequence::icarus_EastHits2d_TPC, @sequence::icarus_reco_cluster3DCryoE, @sequence::icarus_reco_pandoraGausCryoE ] @@ -219,11 +276,41 @@ icarus_tpcpmtbarycentermatch: [ icarus_crttrack: [crttrack] -icarus_crtt0match: [CRTT0Matching] - -icarus_crtt0match_eff: [CRTT0MatchingE, CRTT0MatchingW] +icarus_crtt0tagging: [CRTT0Tagging] ### Below we include overrides for the modules above +# +### Set up hit finding for multiple TPC readout +icarus_stage1_producers.gaushit1dTPCWW.CalDataModuleLabel: "wire2channelroi:PHYSCRATEDATATPCWW" +icarus_stage1_producers.gaushit1dTPCWE.CalDataModuleLabel: "wire2channelroi:PHYSCRATEDATATPCWE" +icarus_stage1_producers.gaushit1dTPCEW.CalDataModuleLabel: "wire2channelroi:PHYSCRATEDATATPCEW" +icarus_stage1_producers.gaushit1dTPCEE.CalDataModuleLabel: "wire2channelroi:PHYSCRATEDATATPCEE" + +icarus_stage1_producers.gaushit2dTPCWW.CalDataModuleLabel: "wire2channelroi2d:PHYSCRATEDATATPCWW" +icarus_stage1_producers.gaushit2dTPCWE.CalDataModuleLabel: "wire2channelroi2d:PHYSCRATEDATATPCWE" +icarus_stage1_producers.gaushit2dTPCEW.CalDataModuleLabel: "wire2channelroi2d:PHYSCRATEDATATPCEW" +icarus_stage1_producers.gaushit2dTPCEE.CalDataModuleLabel: "wire2channelroi2d:PHYSCRATEDATATPCEE" + +# Lower thresholds for tighter filter width +icarus_stage1_producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEE.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEE.HitFilterAlg.MinPulseHeight: [3., 3., 3.] + +icarus_stage1_producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEW.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCEW.HitFilterAlg.MinPulseHeight: [3., 3., 3.] + +icarus_stage1_producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWE.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWE.HitFilterAlg.MinPulseHeight: [3., 3., 3.] + +icarus_stage1_producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 5. +icarus_stage1_producers.gaushit2dTPCWW.HitFilterAlg.MinPulseHeight: [3., 3., 3.] ## Overrides for filtering of cluster3D hits icarus_stage1_filters.TPCHitFilterCryoW.HitDataLabelVec: ["cluster3DCryoW"] diff --git a/fcl/reco/Definitions/stage1_icarus_driver_common.fcl b/fcl/reco/Definitions/stage1_icarus_driver_common.fcl index 66671049f..754ed0442 100644 --- a/fcl/reco/Definitions/stage1_icarus_driver_common.fcl +++ b/fcl/reco/Definitions/stage1_icarus_driver_common.fcl @@ -86,3 +86,6 @@ services.message.destinations : } } } + +# set hit thresholds at DNN levels +#include "enable_dnn_hitthresh.fcl" diff --git a/fcl/reco/Stage0/CMakeLists.txt b/fcl/reco/Stage0/CMakeLists.txt index c3b75f69f..178294463 100644 --- a/fcl/reco/Stage0/CMakeLists.txt +++ b/fcl/reco/Stage0/CMakeLists.txt @@ -1,5 +1,5 @@ cet_enable_asserts() -add_subdirectory(Run1) -add_subdirectory(Run2) -add_subdirectory(RunA) +add_subdirectory(mc) +add_subdirectory(data) +add_subdirectory(overlay) diff --git a/fcl/reco/Stage0/Run1/stage0_run1_icarus.fcl b/fcl/reco/Stage0/Run1/stage0_run1_icarus.fcl deleted file mode 100644 index c8de2bda4..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_icarus.fcl +++ /dev/null @@ -1,33 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_driver_common_run1.fcl" - -process_name: stage0 - -## Define the path we'll execute -physics.path: [ @sequence::icarus_stage0_data_crtpmtfilter ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop the artdaq format files on output -outputs.rootOutput.outputCommands: [ - "keep *_*_*_*", - "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", - "drop *_*_*_DAQ*", - "drop *_ophituncorrected_*_*", - "drop raw::OpDetWaveforms_daqPMT__*", - "drop *_daqTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon1DroiTPC*_*_*", - "keep *_daq_ICARUSTrigger*_*" - ] -outputs.rootOutput.SelectEvents: [path] - -## Modify the event selection for the purity analyzers -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_icarus_lite.fcl b/fcl/reco/Stage0/Run1/stage0_run1_icarus_lite.fcl deleted file mode 100644 index 989573630..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_icarus_lite.fcl +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: stage0_multiTPC_splitstream_nofilter_icarus_lite.fcl -# -# Purpose: Lite version of stage0_multiTPC_splitstream_nofilter_icarus.fcl -# -# Created: 31-Mar-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "reco_drops.fcl" -#include "stage0_run1_icarus.fcl" - -# Drop truth data products. -outputs.rootOutput.outputCommands: [ @sequence::outputs.rootOutput.outputCommands, - @sequence::reco_drops ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc.fcl b/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc.fcl deleted file mode 100644 index 18081dea6..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc.fcl +++ /dev/null @@ -1,53 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_mc_defs.fcl" -#include "stage0_icarus_driver_common.fcl" - -process_name: MCstage0 - -## Revert the geometry for now -services.Geometry: @local::icarus_legacy_base_geometry -services.WireReadout: @local::icarus_legacy_base_wire_readout - -## Add the MC module to the list of producers -physics.producers: { @table::icarus_stage0_producers - @table::icarus_stage0_mc_producers - } - -## Use the following to run the full defined stage0 set of modules -physics.path: [ @sequence::icarus_stage0_mc_PMT, - MCDecodeTPCROI, - @sequence::icarus_stage0_multiTPC, - @sequence::icarus_stage0_mc_crt - ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop the artdaq format files on output -#outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*","drop raw::RawDigits_*_*_*" ] -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_decon1droi_*_*" ] - -# Set the expected input for ophit -physics.producers.ophit: @local::icarus_ophit_MC -physics.producers.ophitfull: @local::icarus_ophitdebugger_MC - -# Set up for the single module mutliple TPC mode... -physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq3:PHYSCRATEDATATPCWW","daq2:PHYSCRATEDATATPCWE","daq1:PHYSCRATEDATATPCEW","daq0:PHYSCRATEDATATPCEE"] -physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] -physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - -physics.producers.roifinder.WireModuleLabelVec: ["decon1droi:PHYSCRATEDATATPCWW","decon1droi:PHYSCRATEDATATPCWE","decon1droi:PHYSCRATEDATATPCEW","decon1droi:PHYSCRATEDATATPCEE"] - -## Need overrides for the purity monitor -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] -physics.producers.purityana0.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - -# restore legacy G4 labels -physics.producers.mcophit.SimPhotonsProducer: "largeant" diff --git a/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc_refactored.fcl b/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc_refactored.fcl deleted file mode 100644 index 34fea020d..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_icarus_mc_refactored.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage0_run1_icarus_mc.fcl" - -physics.producers.mcophit.SimPhotonsProducer: "pdfastsim" diff --git a/fcl/reco/Stage0/Run1/stage0_run1_nocrtpmtfilter_icarus.fcl b/fcl/reco/Stage0/Run1/stage0_run1_nocrtpmtfilter_icarus.fcl deleted file mode 100644 index 82132ae9c..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_nocrtpmtfilter_icarus.fcl +++ /dev/null @@ -1,8 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_run1_icarus.fcl" - -## use a sequence without the CRT/PMT matching filter -physics.path: [ @sequence::icarus_stage0_data ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus.fcl b/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus.fcl deleted file mode 100644 index 5de3a2223..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus.fcl +++ /dev/null @@ -1,8 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_run1_icarus.fcl" - -# Drop the artdaq format files on output -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop *_decon1droi_*_*", "drop *_decon1DroiTPC*_*_*" ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus_lite.fcl b/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus_lite.fcl deleted file mode 100644 index 07814c4ec..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_raw_icarus_lite.fcl +++ /dev/null @@ -1,19 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: stage0_run1_raw_icarus_lite.fcl -# -# Purpose: Lite version of stage0_run1_raw_icarus.fcl -# -# Created: 31-Mar-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "reco_drops.fcl" -#include "stage0_run1_raw_icarus.fcl" - -# Drop truth data products. - -outputs.rootOutput.outputCommands: [ @sequence::outputs.rootOutput.outputCommands, - @sequence::reco_drops ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_rawpmt_icarus.fcl b/fcl/reco/Stage0/Run1/stage0_run1_rawpmt_icarus.fcl deleted file mode 100644 index 4fc8ca582..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_rawpmt_icarus.fcl +++ /dev/null @@ -1,25 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -## It drops TPC raw digits but not the PMT ones. -## -#include "stage0_icarus_driver_common_run1.fcl" - -process_name: stage0 - -## Define the paths we'll execute depending on data -#physics.pathOptical: [ @sequence::icarus_stage0_pmt ] -physics.path: [ @sequence::icarus_stage0_data ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop the artdaq format files on output -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop *_daqTPCROI_*_*", "drop *_decon1droi_*_*", "drop *_decon1DroiTPC*_*_*" ] - -## Modify the event selection for the purity analyzers -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus.fcl b/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus.fcl deleted file mode 100644 index 564ad1db6..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus.fcl +++ /dev/null @@ -1,29 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_driver_common_run1.fcl" - -process_name: stage0 - -## Define the paths we'll execute depending on data -#physics.pathOptical: [ @sequence::icarus_stage0_pmt ] -physics.path: [ @sequence::icarus_stage0_2d_data ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamCommon ] - -# Drop the artdaq format files on output -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop *_daqTPCROI_*_*", "drop *_decon1droi_*_*", "drop *_decon1DroiTPC*_*_*", "drop *_decon2Droi*_*_*", "drop *_roifindr_*_*" ] - -# Override the hit finder input -physics.producers.gaushitTPCWW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWW" -physics.producers.gaushitTPCWE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCWE" -physics.producers.gaushitTPCEW.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEW" -physics.producers.gaushitTPCEE.CalDataModuleLabel: "roifinder2d:PHYSCRATEDATATPCEE" - -## Modify the event selection for the purity analyzers -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] diff --git a/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus_lite.fcl b/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus_lite.fcl deleted file mode 100644 index 53e2e639b..000000000 --- a/fcl/reco/Stage0/Run1/stage0_run1_wc_icarus_lite.fcl +++ /dev/null @@ -1,19 +0,0 @@ -#------------------------------------------------------------------- -# -# Name: stage0_run1_wc_icarus_lite.fcl -# -# Purpose: Lite version of stage0_run1_wc_icarus.fcl -# -# Created: 31-Mar-2022 H. Greenlee -# -# Automatically generated. -# -#------------------------------------------------------------------- - -#include "reco_drops.fcl" -#include "stage0_run1_wc_icarus.fcl" - -# Drop truth data products. - -outputs.rootOutput.outputCommands: [ @sequence::outputs.rootOutput.outputCommands, - @sequence::reco_drops ] diff --git a/fcl/reco/Stage0/Run2/partial/decodePMT_icarus.fcl b/fcl/reco/Stage0/Run2/partial/decodePMT_icarus.fcl deleted file mode 100644 index d22be3e79..000000000 --- a/fcl/reco/Stage0/Run2/partial/decodePMT_icarus.fcl +++ /dev/null @@ -1,145 +0,0 @@ -# -# 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/Run2/partial/decodePMT_icarus_incomplete.fcl b/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_incomplete.fcl deleted file mode 100644 index 038a09480..000000000 --- a/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_incomplete.fcl +++ /dev/null @@ -1,15 +0,0 @@ -# -# 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/Run2/partial/decodePMT_icarus_standalone.fcl b/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_standalone.fcl deleted file mode 100644 index fa70378a8..000000000 --- a/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_standalone.fcl +++ /dev/null @@ -1,69 +0,0 @@ -# -# 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/Run2/partial/decodePMT_icarus_treeonly.fcl b/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_treeonly.fcl deleted file mode 100644 index 5e34eefad..000000000 --- a/fcl/reco/Stage0/Run2/partial/decodePMT_icarus_treeonly.fcl +++ /dev/null @@ -1,68 +0,0 @@ -# -# 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/Run2/partial/decodeTrigger_icarus.fcl b/fcl/reco/Stage0/Run2/partial/decodeTrigger_icarus.fcl deleted file mode 100644 index d041c0023..000000000 --- a/fcl/reco/Stage0/Run2/partial/decodeTrigger_icarus.fcl +++ /dev/null @@ -1,56 +0,0 @@ -#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/Run2/partial/stage0_run2_icarus_opdetonly.fcl b/fcl/reco/Stage0/Run2/partial/stage0_run2_icarus_opdetonly.fcl deleted file mode 100644 index a7abf2d87..000000000 --- a/fcl/reco/Stage0/Run2/partial/stage0_run2_icarus_opdetonly.fcl +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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 diff --git a/fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtfilter.fcl b/fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtfilter.fcl deleted file mode 100644 index fccadae4d..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtfilter.fcl +++ /dev/null @@ -1,34 +0,0 @@ -### -## This fhicl file is used to filter events that do not pass the "medium" level -## of the CRT-PMT filter. Events passing are saved in the same RAW format as before. -## For events that fail, the TPC information is dropped while the CRT-PMT information -## is saved for all events, to allow studies on the filter performance. -## - -#include "stage0_icarus_driver_common.fcl" - -process_name: CrtPmtFilter - -daq: { - FragmentsLabelVec: [ "daq:PHYSCRATEDATATPCEE:DAQEVB09", "daq:PHYSCRATEDATATPCEW:DAQEVB09", "daq:PHYSCRATEDATATPCWE:DAQEVB09", "daq:PHYSCRATEDATATPCWW:DAQEVB09"] - module_type: "CopyDaqICARUSTPC" -} - -physics.producers.daq: @local::daq - -## Define the path we'll execute -physics.path: [ @sequence::icarus_stage0_data_crtpmtfilter_noTPC, daq ] - -physics.filters.crtpmtmatchingfilter.FilterLevel: "medium" - -outputs.rootOutput.dataTier: "raw" -outputs.rootOutput.SelectEvents: [] -outputs.rootOutput.outputCommands: [ - "keep *_*_*_*", - "drop *_daq_PHYSCRATEDATATPC*_*", - "drop *_*_*_CrtPmtFilter", - "keep *_daq_*_CrtPmtFilter" - ] - -physics.trigger_paths: [ path ] -physics.end_paths: [ streamROOT ] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_icarus_mc_refactored.fcl b/fcl/reco/Stage0/Run2/stage0_run2_icarus_mc_refactored.fcl deleted file mode 100644 index d8c84521b..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_icarus_mc_refactored.fcl +++ /dev/null @@ -1,56 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_mc_defs.fcl" -#include "stage0_icarus_driver_common.fcl" - -process_name: MCstage0 - -## Add the MC module to the list of producers -physics.producers: { @table::icarus_stage0_producers - @table::icarus_stage0_mc_producers - } - -## Use the following to run the full defined stage0 set of modules -physics.path: [ @sequence::icarus_stage0_mc_PMT, - MCDecodeTPCROI, - @sequence::icarus_stage0_multiTPC, - simChannelROI, - @sequence::icarus_stage0_mc_crt - ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop data products that are no longer needed, but make sure to keep important items! -# For example, we need to drop the RawDigits from the detector simulation stage but want to keep the SimChannel info from WireCell... -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_daq*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder_*_*", "keep *_daq_simpleSC_*"] - -# Set the expected input for ophit -physics.producers.ophit.InputModule: "opdaq" - -# Note the default assumption is that our detector simulation input will come from the WireCell 2D drift simulation, a la 'daq' -# If we are running the 1D drift simulation we need to switch to using: -# `physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq3:PHYSCRATEDATATPCWW","daq2:PHYSCRATEDATATPCWE","daq1:PHYSCRATEDATATPCEW","daq0:PHYSCRATEDATATPCEE"]` -# -physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq:TPCWW","daq:TPCWE","daq:TPCEW","daq:TPCEE"] -physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] -physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - -physics.producers.simChannelROI.SimChannelLabelVec: ["daq:simpleSC"] -physics.producers.simChannelROI.OutInstanceLabelVec: ["All"] - -physics.producers.decon2droiEE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEE" -physics.producers.decon2droiEW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEW" -physics.producers.decon2droiWE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWE" -physics.producers.decon2droiWW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWW" - -## Need overrides for the purity monitor -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] -physics.producers.purityana0.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - diff --git a/fcl/reco/Stage0/Run2/stage0_run2_nocrtpmtfilter_icarus.fcl b/fcl/reco/Stage0/Run2/stage0_run2_nocrtpmtfilter_icarus.fcl deleted file mode 100644 index ba6c586fb..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_nocrtpmtfilter_icarus.fcl +++ /dev/null @@ -1,8 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_run2_icarus.fcl" - -## use a sequence without the CRT/PMT matching filter -physics.path: [ @sequence::icarus_stage0_data ] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus.fcl b/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus.fcl deleted file mode 100644 index 0a81e4c75..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus.fcl +++ /dev/null @@ -1,11 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_run2_icarus.fcl" - -# Drop the artdaq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop the recob::Wire output from the roifinder (but keep the ChannelROIs) -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop recob::Wire*_daqTPCROI_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder*_*_*" ] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus_mc.fcl b/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus_mc.fcl deleted file mode 100644 index 7d19355a1..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_raw_icarus_mc.fcl +++ /dev/null @@ -1,8 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_run2_icarus_mc.fcl" - -# Modify the drop so that we keep RawDigits from the MCDecoder stage -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_daq*_*_*", "drop recob::Wire*_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder*_*_*", "keep *_daq_simpleSC_*"] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_savewires_icarus_mc.fcl b/fcl/reco/Stage0/Run2/stage0_run2_savewires_icarus_mc.fcl deleted file mode 100644 index 933949cbd..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_savewires_icarus_mc.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage0_run2_icarus_mc.fcl" -outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_daq*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", "keep *_daq_simpleSC_*"] - diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_crtpmtfilter_icarus.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_crtpmtfilter_icarus.fcl deleted file mode 100644 index 689b576eb..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_crtpmtfilter_icarus.fcl +++ /dev/null @@ -1,64 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_driver_common.fcl" - -process_name: stage0 - -## Define the paths we'll execute depending on data -physics.path: [ @sequence::icarus_stage0_2d_data_crtpmtfilter ] - -## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# We only keep events that pass the crt/pmt filter -outputs.out1.SelectEvents: [ reco ] - -# Drop the artdaq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop all ouptut for the first running of the ROI finder (on the 1D decon) -# Drop all output from the 2D deconvolution stage -# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", - "drop *_*_*_DAQ*", - "drop *_daqTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon2droi*_*_*", - "drop recob::Wire*_roifinder*_*_*" - ] - -## Modify the event selection for the purity analyzers -physics.analyzers.purityinfoana0.SelectEvents: [ path ] -physics.analyzers.purityinfoana1.SelectEvents: [ path ] - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "INFO" #tells the message service that this destination applies to INFO and higher level messages - categories: - { - CRTSimHitProducer: - { - limit: 5 - reportEvery: 1 - } - FilterCRTPMTMatching: - { - limit: 50 - reportEvery: 1 - } - default: - { - limit: 0 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 0 - } - } - } -} diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus.fcl deleted file mode 100644 index 50fc99937..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus.fcl +++ /dev/null @@ -1,88 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_driver_common.fcl" - -process_name: stage0 - -## Define the paths we'll execute depending on data -#physics.pathOptical: [ @sequence::icarus_stage0_pmt ] -physics.path: [ @sequence::icarus_stage0_2d_data ] - -## boiler plate... -physics.outana: [ ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop the artdaq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop all ouptut for the first running of the ROI finder (on the 1D decon) -# Drop all output from the 2D deconvolution stage -# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) -# Keep the Trigger fragment -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", - "drop *_*_*_DAQ*", - "drop *_daqTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon2droi*_*_*", - "drop recob::Wire*_roifinder*_*_*", - "keep *_daq_ICARUSTriggerV*_*" - ] - -# Add below as per Gray Putnam (should we move to jsonnet files?) -physics.producers.decon2droiEE.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiEW.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiWE.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiWW.wcls_main.structs.gain0: 17.05212 - - -physics.producers.decon2droiEE.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiEW.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiWE.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiWW.wcls_main.structs.gain1: 12.1420344 - -physics.producers.decon2droiEE.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiEW.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiWE.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiWW.wcls_main.structs.gain2: 13.0261362 - - -physics.producers.decon2droiEE.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiEW.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiWE.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiWW.wcls_main.structs.shaping0: 1.3 - -physics.producers.decon2droiEE.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiEW.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiWE.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiWW.wcls_main.structs.shaping1: 1.45 - -physics.producers.decon2droiEE.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiEW.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiWE.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiWW.wcls_main.structs.shaping2: 1.3 - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - CRTSimHitProducer: - { - limit: 5 - reportEvery: 1 - } - default: - { - limit: 5 #don't print anything at the infomsg level except the explicitly named categories - reportEvery: 1 - } - } - } -} diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc.fcl deleted file mode 100644 index 71f48966e..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc.fcl +++ /dev/null @@ -1,84 +0,0 @@ -### -## This fhicl file is used to run "stage0" processing specifically for the case where all -## TPC data is included in an artdaq data product from a single instance -## -#include "stage0_icarus_mc_defs.fcl" -#include "stage0_icarus_driver_common.fcl" - -process_name: MCstage0 - -## Add the MC module to the list of producers -physics.producers: { @table::icarus_stage0_producers - @table::icarus_stage0_mc_producers - } - -## Use the following to run the full defined stage0 set of modules -physics.path: [ @sequence::icarus_stage0_mc_PMT, - MCDecodeTPCROI, - @sequence::icarus_stage0_2d_multiTPC, - @sequence::icarus_stage0_mc_crt - ] - -## boiler plate... -physics.outana: [ ] -physics.trigger_paths: [ path ] -physics.end_paths: [ outana, streamROOT ] - -# Drop the artdaq format files on output -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop *_daq*_*_*", - "drop *_MCDecodeTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon2droi*_*_*", - "drop recob::Wire*_roifinder*_*_*", - "keep *_daq_simpleSC*_*"] - -# Set the expected input for ophit -physics.producers.ophit.InputModule: "opdaq" - -# Set up for the single module mutliple TPC mode... -physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq:TPCWW","daq:TPCWE","daq:TPCEW","daq:TPCEE"] -physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] - -physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - -physics.producers.decon2droiEE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEE" -physics.producers.decon2droiEW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEW" -physics.producers.decon2droiWE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWE" -physics.producers.decon2droiWW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWW" - -# As per Gray Putname... -physics.producers.decon2droiEE.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiEW.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiWE.wcls_main.structs.gain0: 17.05212 -physics.producers.decon2droiWW.wcls_main.structs.gain0: 17.05212 - - -physics.producers.decon2droiEE.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiEW.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiWE.wcls_main.structs.gain1: 12.1420344 -physics.producers.decon2droiWW.wcls_main.structs.gain1: 12.1420344 - -physics.producers.decon2droiEE.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiEW.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiWE.wcls_main.structs.gain2: 13.0261362 -physics.producers.decon2droiWW.wcls_main.structs.gain2: 13.0261362 - - -physics.producers.decon2droiEE.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiEW.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiWE.wcls_main.structs.shaping0: 1.3 -physics.producers.decon2droiWW.wcls_main.structs.shaping0: 1.3 - -physics.producers.decon2droiEE.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiEW.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiWE.wcls_main.structs.shaping1: 1.45 -physics.producers.decon2droiWW.wcls_main.structs.shaping1: 1.45 - -physics.producers.decon2droiEE.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiEW.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiWE.wcls_main.structs.shaping2: 1.3 -physics.producers.decon2droiWW.wcls_main.structs.shaping2: 1.3 - -# restore legacy G4 labels -physics.producers.mcophit.SimPhotonsProducer: "largeant" diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc_refactored.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc_refactored.fcl deleted file mode 100644 index 902065250..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_mc_refactored.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage0_run2_wc_icarus_mc.fcl" - -physics.producers.mcophit.SimPhotonsProducer: "pdfastsim" diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_raw_icarus.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_raw_icarus.fcl deleted file mode 100644 index 25b9d4c83..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_raw_icarus.fcl +++ /dev/null @@ -1,19 +0,0 @@ -### -## This fhicl file modifies the WC stage 0 processing file to keep RawDigits -## -#include "stage0_run2_wc_icarus.fcl" - -# Drop the artdaq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop all ouptut for the first running of the ROI finder (on the 1D decon) -# Drop all output from the 2D deconvolution stage -# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", - "drop *_*_*_DAQ*", - "drop recob::Wire*_daqTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon2droi*_*_*", - "drop recob::Wire*_roifinder*_*_*" - ] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_raw_icarus_mc.fcl b/fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_raw_icarus_mc.fcl deleted file mode 100644 index c0f2afda6..000000000 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_raw_icarus_mc.fcl +++ /dev/null @@ -1,21 +0,0 @@ -### -## This fhicl file takes the standard stage 0 wc mc file and keeps the raw digits -## -#include "stage0_run2_wc_testgauss_icarus_mc.fcl" - -# Drop the daq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop all ouptut for the first running of the ROI finder (on the 1D decon) -# Drop all output from the 2D deconvolution stage -# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) -outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop *_daq_*_*", - "drop *_MCDecodeTPCROI_*_*", - "drop *_decon1droi_*_*", - "drop *_decon2droi*_*_*", - "drop recob::Wire*_roifinder*_*_*", - "keep raw::RawDigit*_MCDecodeTPCROI_*_*", - "keep *_daq_simpleSC*_*" - ] - diff --git a/fcl/reco/Stage0/RunA/CMakeLists.txt b/fcl/reco/Stage0/RunA/CMakeLists.txt deleted file mode 100644 index 13355789a..000000000 --- a/fcl/reco/Stage0/RunA/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -install_fhicl() diff --git a/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV1.fcl b/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV1.fcl deleted file mode 100644 index 8d1bf769c..000000000 --- a/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV1.fcl +++ /dev/null @@ -1,45 +0,0 @@ -# -# File: stage0_runA_icarus_triggerV1.fcl -# Purpose: Runs Stage0 for runs 7932 and earlier. -# -# Runs older than circa 7932, before March 2022, were taken with physics -# triggers. Compared to Run1: -# * PMT readout: -# - uses 6+9 us buffers (not 3+7). -# - artificial trigger primitives are sent at beam gate opening -# time (not 4 us before -- the "veto" was not introduced -# either) and 6 us after the beam gate, covering -6/+15 us -# from the beam gate (more if a NuMI trigger happens late). -# - on the 16th channel of the first readout board the trigger -# primitive signals are sent, not the global trigger one. -# These signals appear like three peaks (the two artificial -# primitives plus the one at global trigger time) and they are -# not suitable for the trigger timing correction developed for -# Run2, which assumes a single sharp signal at global trigger -# time. These signals are not very reliable either: one board -# does not see them, another sees them seriously distorted, -# and sometimes other boards see them distorted too. -# For this reason, this configuration disables the correction. -# - it is assumed that the counter reset signal (PPS) is sent to -# all the readout boards at the same time and therefore the -# trigger primitive propagation delay is automatically -# accounted for by the counter values. -# * trigger: -# - trigger information is in the unversioned format -# (postumous v1). -# - no trigger configuration information is saved in FHiCL. -# -# As usual, Stage0 runs the full optical simulation chain. -# - -#include "stage0_run2_icarus.fcl" - -# trigger configuration is not saved in DAQ FHiCL, hence it's not available: -physics.producers.triggerconfig.module_type: DummyProducer -physics.filters.crtpmtmatchingfilter.module_type: DummyFilter - -# trigger is version 1 (and autodetection does not work for the reason above) -physics.producers.daqTrigger: @local::decodeTrigger - -# no global trigger waveform available for correction: omit it -physics.producers.daqPMT.CorrectionInstance: @erase diff --git a/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV2.fcl b/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV2.fcl deleted file mode 100644 index 287a937fc..000000000 --- a/fcl/reco/Stage0/RunA/stage0_runA_icarus_triggerV2.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#include "stage0_run2_icarus.fcl" - - -# trigger configuration is not saved in DAQ FHiCL, hence it's not available: -# physics.producers.triggerconfig.module_type: DummyProducer - -# trigger is version 2 (and autodetection does not work for the reason above) -physics.producers.daqTrigger: @local::decodeTriggerV2 -physics.producers.daqTrigger.FragmentsLabel: "daq:ICARUSTriggerUDP" # but it's called UDP diff --git a/fcl/reco/Stage0/Run1/CMakeLists.txt b/fcl/reco/Stage0/data/CMakeLists.txt similarity index 100% rename from fcl/reco/Stage0/Run1/CMakeLists.txt rename to fcl/reco/Stage0/data/CMakeLists.txt diff --git a/fcl/reco/Stage0/Run2/stage0_run2_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_icarus.fcl similarity index 86% rename from fcl/reco/Stage0/Run2/stage0_run2_icarus.fcl rename to fcl/reco/Stage0/data/stage0_run2_icarus.fcl index 459f943a1..310989d10 100644 --- a/fcl/reco/Stage0/Run2/stage0_run2_icarus.fcl +++ b/fcl/reco/Stage0/data/stage0_run2_icarus.fcl @@ -26,8 +26,14 @@ outputs.rootOutput.outputCommands: [ "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop *_ophituncorrected_*_*", - "drop raw::OpDetWaveforms_daqPMT__*", + "drop *_daqPMT_*_*", + "drop *_daqPMTonbeam_*_*", + "drop *_daqCRT_*_*", "drop *_daqTPCROI_*_*", + "drop *_decon2droiEE_*_*", + "drop *_decon2droiEW_*_*", + "drop *_decon2droiWE_*_*", + "drop *_decon2droiWW_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder_*_*", "keep *_daq_ICARUSTriggerV*_*"] diff --git a/fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtonly.fcl b/fcl/reco/Stage0/data/stage0_run2_raw_icarus.fcl similarity index 54% rename from fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtonly.fcl rename to fcl/reco/Stage0/data/stage0_run2_raw_icarus.fcl index 1336b0dd2..f1c4925bc 100644 --- a/fcl/reco/Stage0/Run2/stage0_run2_icarus_crtpmtonly.fcl +++ b/fcl/reco/Stage0/data/stage0_run2_raw_icarus.fcl @@ -2,33 +2,26 @@ ## This fhicl file is used to run "stage0" processing specifically for the case where all ## TPC data is included in an artdaq data product from a single instance ## -#include "stage0_icarus_driver_common.fcl" - -process_name: stage0 - -## Define the path we'll execute -physics.path: [ @sequence::icarus_stage0_data_crtpmtfilter_noTPC ] - -## boiler plate... -physics.trigger_paths: [ path ] -physics.end_paths: [ streamROOT ] +#include "stage0_run2_icarus.fcl" # Drop the artdaq format files on output, # Drop all output from the TPC decoder stage # Drop all output from the 1D deconvolution stage # Drop the recob::Wire output from the roifinder (but keep the ChannelROIs) -# Drop the reconstructed optical hits before the timing correction -# Drop the PMT waveforms (will keep the ones from daqPMTonbeam) -# Keep the Trigger fragment outputs.rootOutput.outputCommands: [ "keep *_*_*_*", "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", "drop *_*_*_DAQ*", "drop *_ophituncorrected_*_*", - "drop raw::OpDetWaveforms_daqPMT__*", - "drop *_daqTPCROI_*_*", + "drop *_daqPMT_*_*", + "drop *_daqPMTonbeam_*_*", + "drop *_daqCRT_*_*", + "drop recob::Wire*_daqTPCROI_*_*", + "drop *_decon2droiEE_*_*", + "drop *_decon2droiEW_*_*", + "drop *_decon2droiWE_*_*", + "drop *_decon2droiWW_*_*", "drop *_decon1droi_*_*", "drop recob::Wire*_roifinder_*_*", "keep *_daq_ICARUSTriggerV*_*"] -## Modify the event selection for the purity analyzers diff --git a/fcl/reco/Stage0/Run2/stage0_run2_rawpmt_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_rawpmt_icarus.fcl similarity index 100% rename from fcl/reco/Stage0/Run2/stage0_run2_rawpmt_icarus.fcl rename to fcl/reco/Stage0/data/stage0_run2_rawpmt_icarus.fcl diff --git a/fcl/reco/Stage0/data/stage0_run2_wc_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_wc_icarus.fcl new file mode 100644 index 000000000..b71ca6afb --- /dev/null +++ b/fcl/reco/Stage0/data/stage0_run2_wc_icarus.fcl @@ -0,0 +1,62 @@ +### +## This fhicl file is used to run "stage0" processing specifically for the case where all +## TPC data is included in an artdaq data product from a single instance +## +#include "stage0_icarus_driver_common.fcl" + +process_name: stage0 + +## Define the paths we'll execute depending on data +#physics.pathOptical: [ @sequence::icarus_stage0_pmt ] +physics.path: [ @sequence::icarus_stage0_2d_data ] + +## boiler plate... +physics.outana: [ ] +physics.trigger_paths: [ path ] +physics.end_paths: [ outana, streamROOT ] + +# Drop the artdaq format files on output, +# Drop all output from the TPC decoder stage +# Drop all output from the 1D deconvolution stage +# Drop all ouptut for the first running of the ROI finder (on the 1D decon) +# Drop all output from the 2D deconvolution stage +# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) +# Keep the Trigger fragment +outputs.rootOutput.outputCommands: [ + "keep *_*_*_*", + "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", + "drop *_*_*_DAQ*", + "drop *_ophituncorrected_*_*", + "drop *_daqPMT_*_*", + "drop *_daqPMTonbeam_*_*", + "drop *_daqCRT_*_*", + "drop *_daqTPCROI_*_*", + "drop *_decon2droiEE_*_*", + "drop *_decon2droiEW_*_*", + "drop *_decon2droiWE_*_*", + "drop *_decon2droiWW_*_*", + "drop *_decon1droi_*_*", + "drop recob::Wire*_roifinder_*_*", + "keep *_daq_ICARUSTriggerV*_*"] + +services.message.destinations : +{ + STDCOUT: + { + type: "cout" #tells the message service to output this destination to cout + threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages + categories: + { + CRTSimHitProducer: + { + limit: 5 + reportEvery: 1 + } + default: + { + limit: 5 #don't print anything at the infomsg level except the explicitly named categories + reportEvery: 1 + } + } + } +} diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_keepup.fcl b/fcl/reco/Stage0/data/stage0_run2_wc_icarus_keepup.fcl similarity index 100% rename from fcl/reco/Stage0/Run2/stage0_run2_wc_icarus_keepup.fcl rename to fcl/reco/Stage0/data/stage0_run2_wc_icarus_keepup.fcl diff --git a/fcl/reco/Stage0/data/stage0_run2_wc_raw_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_wc_raw_icarus.fcl new file mode 100644 index 000000000..646ec0792 --- /dev/null +++ b/fcl/reco/Stage0/data/stage0_run2_wc_raw_icarus.fcl @@ -0,0 +1,27 @@ +### +## This fhicl file modifies the WC stage 0 processing file to keep RawDigits +## +#include "stage0_run2_wc_icarus.fcl" + +# Drop the artdaq format files on output, +# Drop all output from the TPC decoder stage +# Drop all output from the 1D deconvolution stage +# Drop all ouptut for the first running of the ROI finder (on the 1D decon) +# Drop all output from the 2D deconvolution stage +# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) +outputs.rootOutput.outputCommands: [ + "keep *_*_*_*", + "drop artdaq::Fragments_*_*_ICARUSReprocessRaw", + "drop *_*_*_DAQ*", + "drop *_ophituncorrected_*_*", + "drop *_daqPMT_*_*", + "drop *_daqPMTonbeam_*_*", + "drop *_daqCRT_*_*", + "drop recob::Wire*_daqTPCROI_*_*", + "drop *_decon2droiEE_*_*", + "drop *_decon2droiEW_*_*", + "drop *_decon2droiWE_*_*", + "drop *_decon2droiWW_*_*", + "drop *_decon1droi_*_*", + "drop recob::Wire*_roifinder_*_*", + "keep *_daq_ICARUSTriggerV*_*"] diff --git a/fcl/reco/Stage0/data/stage0_run2_wcdnn_icarus.fcl b/fcl/reco/Stage0/data/stage0_run2_wcdnn_icarus.fcl new file mode 100644 index 000000000..051147b76 --- /dev/null +++ b/fcl/reco/Stage0/data/stage0_run2_wcdnn_icarus.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wc_icarus.fcl" + +#include "enable_dnn_sp.fcl" diff --git a/fcl/numi-anaA/CMakeLists.txt b/fcl/reco/Stage0/mc/CMakeLists.txt similarity index 100% rename from fcl/numi-anaA/CMakeLists.txt rename to fcl/reco/Stage0/mc/CMakeLists.txt diff --git a/fcl/reco/Stage0/Run2/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl similarity index 88% rename from fcl/reco/Stage0/Run2/stage0_run2_icarus_mc.fcl rename to fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index 4de87f414..8e8085d25 100644 --- a/fcl/reco/Stage0/Run2/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -17,7 +17,8 @@ physics.path: [ @sequence::icarus_stage0_mc_PMT, MCDecodeTPCROI, @sequence::icarus_stage0_multiTPC, simChannelROI, - @sequence::icarus_stage0_mc_crt + @sequence::icarus_stage0_mc_crthit, + @sequence::icarus_stage0_mc_crtreco ] ## boiler plate... @@ -29,10 +30,12 @@ physics.end_paths: [ outana, streamROOT ] # For example, we need to drop the RawDigits from the detector simulation stage but want to keep the SimChannel info from WireCell... outputs.rootOutput.outputCommands: ["keep *_*_*_*", "drop *_daq*_*_*", + "drop raw::RawDigit*_*_*_*", + "drop raw::OpDetWaveform*_opdaq_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", - "drop recob::Wire*_roifinder_*_*", - "keep *_daq_simpleSC_*"] + "drop recob::Wire*_roifinder*_*_*", + "keep *_daq_simpleSC*_*"] # Set the expected input for ophit physics.producers.ophit.InputModule: "opdaq" @@ -45,7 +48,7 @@ physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq:TPCWW","daq:TPCWE"," physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.producers.simChannelROI.SimChannelLabelVec: ["daq:simpleSC"] +physics.producers.simChannelROI.SimChannelLabelVec: ["merge"] physics.producers.simChannelROI.OutInstanceLabelVec: ["All"] physics.producers.decon2droiEE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEE" @@ -60,4 +63,4 @@ physics.producers.purityana0.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] # restore legacy G4 labels -physics.producers.mcophit.SimPhotonsProducer: "largeant" +physics.producers.mcophit.SimPhotonsProducer: "shifted" diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc_notriggersim.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc_notriggersim.fcl new file mode 100644 index 000000000..15f5126f0 --- /dev/null +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc_notriggersim.fcl @@ -0,0 +1,8 @@ +#include "stage0_run2_icarus_mc.fcl" + +# restore non-shifted labels +physics.producers.emuTrigger.BeamGates: "beamgate" +physics.producers.mcophit.SimPhotonsProducer: "pdfastsim" +physics.producers.opdetonbeam.Waveforms: "opdaq" +physics.producers.pmtbaselines.OpticalWaveforms: "opdaq" +physics.producers.pmtfixedthr.OpticalWaveforms: "opdaq" diff --git a/fcl/reco/Stage0/mc/stage0_run2_raw_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_raw_icarus_mc.fcl new file mode 100644 index 000000000..6b032c887 --- /dev/null +++ b/fcl/reco/Stage0/mc/stage0_run2_raw_icarus_mc.fcl @@ -0,0 +1,13 @@ +### +## This fhicl file is used to run "stage0" processing specifically for the case where all +## TPC data is included in an artdaq data product from a single instance +## +#include "stage0_run2_icarus_mc.fcl" + +# Modify the drop so that we keep RawDigits from the MCDecoder stage +outputs.rootOutput.outputCommands: ["keep *_*_*_*", + "drop *_daq*_*_*", + "drop recob::Wire*_MCDecodeTPCROI_*_*", + "drop recob::Wire*_roifinder_*_*", + "keep *_daq_simpleSC_*"] + diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl similarity index 68% rename from fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_icarus_mc.fcl rename to fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl index 4a39ad7ae..c10e139a1 100644 --- a/fcl/reco/Stage0/Run2/stage0_run2_wc_testgauss_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl @@ -16,30 +16,24 @@ physics.producers: { @table::icarus_stage0_producers physics.path: [ @sequence::icarus_stage0_mc_PMT, MCDecodeTPCROI, @sequence::icarus_stage0_2d_multiTPC, - @sequence::icarus_stage0_EastGauss_TPC, - @sequence::icarus_stage0_WestGauss_TPC, - @sequence::icarus_stage0_mc_crt + @sequence::icarus_stage0_mc_crthit, + @sequence::icarus_stage0_mc_crtreco ] ## boiler plate... -physics.outana: [ purityinfoana0, purityinfoana1 ] +physics.outana: [ ] physics.trigger_paths: [ path ] physics.end_paths: [ outana, streamROOT ] -# Drop the daq format files on output, -# Drop all output from the TPC decoder stage -# Drop all output from the 1D deconvolution stage -# Drop all ouptut for the first running of the ROI finder (on the 1Dsingularity shell --nv -B /cvmfs,/media/usher/analysis/LArSoft/ICARUS slf7-essentials_latest.sif decon) -# Drop all output from the 2D deconvolution stage -# Drop the recob::Wire output from the roifinder2d (but keep the ChannelROIs) +# Drop the artdaq format files on output outputs.rootOutput.outputCommands: ["keep *_*_*_*", - "drop *_daq_*_*", + "drop *_daq*_*_*", + "drop raw::RawDigit*_*_*_*", "drop *_MCDecodeTPCROI_*_*", "drop *_decon1droi_*_*", - "drop *_decon2Droi*_*_*", + "drop *_decon2droi*_*_*", "drop recob::Wire*_roifinder*_*_*", - "keep *_daq_simpleSC*_*" ] - + "keep *_daq_simpleSC*_*"] # Set the expected input for ophit physics.producers.ophit.InputModule: "opdaq" @@ -48,8 +42,6 @@ physics.producers.ophit.InputModule: "opdaq" physics.producers.MCDecodeTPCROI.FragmentsLabelVec: ["daq:TPCWW","daq:TPCWE","daq:TPCEW","daq:TPCEE"] physics.producers.MCDecodeTPCROI.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW", "PHYSCRATEDATATPCWE", "PHYSCRATEDATATPCEW", "PHYSCRATEDATATPCEE"] -physics.producers.decon1droi.RawDigitLabelVec: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] - physics.producers.decon2droiEE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEE" physics.producers.decon2droiEW.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCEW" physics.producers.decon2droiWE.wcls_main.params.raw_input_label: "MCDecodeTPCROI:PHYSCRATEDATATPCWE" @@ -62,4 +54,4 @@ physics.producers.purityana0.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW","MCDecodeTPCROI:PHYSCRATEDATATPCWE","MCDecodeTPCROI:PHYSCRATEDATATPCEW","MCDecodeTPCROI:PHYSCRATEDATATPCEE"] # restore legacy G4 labels -physics.producers.mcophit.SimPhotonsProducer: "largeant" +physics.producers.mcophit.SimPhotonsProducer: "shifted" 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 new file mode 100644 index 000000000..9d738f348 --- /dev/null +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc_notriggersim.fcl @@ -0,0 +1,8 @@ +#include "stage0_run2_wc_icarus_mc.fcl" + +# restore non-shifted labels +physics.producers.emuTrigger.BeamGates: "beamgate" +physics.producers.mcophit.SimPhotonsProducer: "pdfastsim" +physics.producers.opdetonbeam.Waveforms: "opdaq" +physics.producers.pmtbaselines.OpticalWaveforms: "opdaq" +physics.producers.pmtfixedthr.OpticalWaveforms: "opdaq" diff --git a/fcl/reco/Stage0/Run2/stage0_run2_wc_raw_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_raw_icarus_mc.fcl similarity index 100% rename from fcl/reco/Stage0/Run2/stage0_run2_wc_raw_icarus_mc.fcl rename to fcl/reco/Stage0/mc/stage0_run2_wc_raw_icarus_mc.fcl diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl new file mode 100644 index 000000000..8e3c557f9 --- /dev/null +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wc_icarus_mc.fcl" + +#include "enable_dnn_sp.fcl" diff --git a/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc_notriggersim.fcl b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc_notriggersim.fcl new file mode 100644 index 000000000..c6b844173 --- /dev/null +++ b/fcl/reco/Stage0/mc/stage0_run2_wcdnn_icarus_mc_notriggersim.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wc_icarus_mc_notriggersim.fcl" + +#include "enable_dnn_sp.fcl" diff --git a/fcl/reco/Stage0/Run2/partial/CMakeLists.txt b/fcl/reco/Stage0/overlay/CMakeLists.txt similarity index 100% rename from fcl/reco/Stage0/Run2/partial/CMakeLists.txt rename to fcl/reco/Stage0/overlay/CMakeLists.txt diff --git a/fcl/reco/Stage0/overlay/stage0_run2_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_icarus_overlay.fcl new file mode 100644 index 000000000..294536148 --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_icarus_mc.fcl" +# +#include "enable_overlay_sp.fcl" diff --git a/fcl/reco/Stage0/overlay/stage0_run2_raw_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_raw_icarus_overlay.fcl new file mode 100644 index 000000000..c7035ca90 --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_raw_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_raw_icarus_mc.fcl" +# +#include "enable_overlay_sp.fcl" diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wc_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wc_icarus_overlay.fcl new file mode 100644 index 000000000..0b610a35e --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_wc_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wc_icarus_mc.fcl" +# +#include "enable_overlay_sp.fcl" diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wc_raw_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wc_raw_icarus_overlay.fcl new file mode 100644 index 000000000..430387116 --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_wc_raw_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wc_raw_icarus_mc.fcl" +# +#include "enable_overlay_sp.fcl" diff --git a/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl new file mode 100644 index 000000000..53af7c45a --- /dev/null +++ b/fcl/reco/Stage0/overlay/stage0_run2_wcdnn_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage0_run2_wcdnn_icarus_mc.fcl" +# +#include "enable_overlay_sp.fcl" diff --git a/fcl/reco/Stage1/CMakeLists.txt b/fcl/reco/Stage1/CMakeLists.txt index c3b75f69f..d8c3883a9 100644 --- a/fcl/reco/Stage1/CMakeLists.txt +++ b/fcl/reco/Stage1/CMakeLists.txt @@ -1,5 +1,5 @@ cet_enable_asserts() -add_subdirectory(Run1) -add_subdirectory(Run2) -add_subdirectory(RunA) +add_subdirectory(overlay) +add_subdirectory(mc) +add_subdirectory(data) diff --git a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss.fcl b/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss.fcl deleted file mode 100644 index d9ad45958..000000000 --- a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss.fcl +++ /dev/null @@ -1,52 +0,0 @@ -#include "stage1_icarus_driver_common.fcl" - -process_name: stage1 - -physics.reco: [ @sequence::icarus_filter_cluster3D, - @sequence::icarus_pandora_Gauss, - @sequence::icarus_reco_fm, - @sequence::icarus_crttrack, - @sequence::icarus_crtt0match, - caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] - -physics.outana: [ caloskimE, caloskimW, simpleLightAna, CRTDataAnalysis] -physics.trigger_paths: [ reco ] -physics.end_paths: [ outana, stream1 ] -outputs.out1.fileName: "%ifb_%tc-%p.root" -outputs.out1.dataTier: "reconstructed" -outputs.out1.SelectEvents: [ reco ] -outputs.out1.outputCommands: [ - "keep *_*_*_*", - "drop *_caloskimCalorimetryCryoE_*_*", - "drop *_caloskimCalorimetryCryoW_*_*" -] - -# Disabled Space-Charge service for calorimetry -services.SpaceChargeService: { - EnableCalEfieldSCE: false - EnableCalSpatialSCE: false - EnableCorrSCE: false - EnableSimEfieldSCE: false - EnableSimSpatialSCE: false - InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" - RepresentationType: "Voxelized_TH3" - service_provider: "SpaceChargeServiceICARUS" -} - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - Cluster3D: - { - limit: -1 - reportEvery: 1 - } - } - } -} - diff --git a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_MC.fcl b/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_MC.fcl deleted file mode 100644 index 3725a6037..000000000 --- a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_MC.fcl +++ /dev/null @@ -1,96 +0,0 @@ - -#include "mchitmodules.fcl" -#include "mcreco.fcl" -#include "mctrutht0matching.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "stage1_icarus_driver_common.fcl" - -process_name: MCstage1 - -## Add the MC module to the list of producers -physics.producers: { - @table::icarus_stage1_producers - - #mcophit: @local::ICARUSMCOpHit - mcopflashTPC0: @local::ICARUSMCOpFlashTPC0 - mcopflashTPC1: @local::ICARUSMCOpFlashTPC1 - mcopflashTPC2: @local::ICARUSMCOpFlashTPC2 - mcopflashTPC3: @local::ICARUSMCOpFlashTPC3 - - cheatopflashTPC0: @local::ICARUSCheatOpFlashTPC0 - cheatopflashTPC1: @local::ICARUSCheatOpFlashTPC1 - cheatopflashTPC2: @local::ICARUSCheatOpFlashTPC2 - cheatopflashTPC3: @local::ICARUSCheatOpFlashTPC3 - - ### mc producers - mchitfinder: @local::standard_mchitfinder - mcassociationsGausCryoE: @local::standard_mcparticlehitmatching - mcassociationsGausCryoW: @local::standard_mcparticlehitmatching -} - -physics.reco: [ - @sequence::icarus_reco_Gauss_CryoE , - @sequence::icarus_reco_Gauss_CryoW , - @sequence::icarus_reco_fm, - caloskimCalorimetryCryoE, caloskimCalorimetryCryoW, - mcassociationsGausCryoE, mcassociationsGausCryoW - ] - -# Turn on truth-info for track skimmer -physics.analyzers.caloskimE.G4producer: "largeant" -physics.analyzers.caloskimE.SimChannelproducer: "largeant" -physics.analyzers.caloskimW.G4producer: "largeant" -physics.analyzers.caloskimW.SimChannelproducer: "largeant" - -physics.outana: [ caloskimE, caloskimW, simpleLightAna, CRTDataAnalysis] -physics.trigger_paths: [ reco ] -physics.end_paths: [ outana, stream1 ] -outputs.out1.fileName: "%ifb_%tc-%p.root" -outputs.out1.dataTier: "reconstructed" -outputs.out1.SelectEvents: [ reco ] -outputs.out1.outputCommands: [ - "keep *_*_*_*", - "drop *_caloskimCalorimetryCryoE_*_*", - "drop *_caloskimCalorimetryCryoW_*_*" -] - -# Disabled Space-Charge service for calorimetry -services.SpaceChargeService: { - EnableCalEfieldSCE: false - EnableCalSpatialSCE: false - EnableCorrSCE: false - EnableSimEfieldSCE: false - EnableSimSpatialSCE: false - InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" - RepresentationType: "Voxelized_TH3" - service_provider: "SpaceChargeServiceICARUS" -} - -services.BackTrackerService: @local::standard_backtrackerservice -services.ParticleInventoryService: @local::standard_particleinventoryservice - -# Use this to take out the interplane offsets that are put in during the G4 stage -physics.producers.cluster3DCryoE.Hit3DBuilderAlg.UseT0Offsets: true -physics.producers.cluster3DCryoW.Hit3DBuilderAlg.UseT0Offsets: true - -physics.producers.mcassociationsGausCryoE.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoE"] -physics.producers.mcassociationsGausCryoW.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoW"] - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - Cluster3DICARUS: - { - limit: -1 - reportEvery: 1 - } - } - } -} - diff --git a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_alltracks_ntuple.fcl b/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_alltracks_ntuple.fcl deleted file mode 100644 index f979a164f..000000000 --- a/fcl/reco/Stage1/Run1/stage1_multiTPC_icarus_gauss_alltracks_ntuple.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "stage1_multiTPC_icarus_gauss.fcl" - -physics.analyzers.caloskimE.SelectionTools: [ ] -physics.analyzers.caloskimW.SelectionTools: [ ] - -physics.analyzers.caloskimE: @local::caloskim_cryoe_goldentracks_not0 -physics.analyzers.caloskimW: @local::caloskim_cryow_goldentracks_not0 -physics.analyzers.caloskimE.HitRawDigitsTickCollectWidth: 0 -physics.analyzers.caloskimW.HitRawDigitsTickCollectWidth: 0 - diff --git a/fcl/reco/Stage1/Run1/stage1_multiTPC_nofilter_icarus_gauss_crtpmt.fcl b/fcl/reco/Stage1/Run1/stage1_multiTPC_nofilter_icarus_gauss_crtpmt.fcl deleted file mode 100644 index 39d2a83e2..000000000 --- a/fcl/reco/Stage1/Run1/stage1_multiTPC_nofilter_icarus_gauss_crtpmt.fcl +++ /dev/null @@ -1,53 +0,0 @@ -#include "stage1_icarus_driver_common.fcl" - -process_name: stage1 - -physics.reco: [ @sequence::icarus_filter_cluster3D, - @sequence::icarus_pandora_Gauss, - @sequence::icarus_reco_fm, - @sequence::icarus_crttrack, - @sequence::icarus_crtt0match, - caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] - -physics.outana: [ caloskimE, caloskimW, simpleLightAna, CRTDataAnalysis, CRTAnalysis] -physics.trigger_paths: [ reco ] -physics.end_paths: [ outana, stream1 ] -outputs.out1.fileName: "%ifb_%tc-%p.root" -outputs.out1.dataTier: "reconstructed" -outputs.out1.SelectEvents: [ reco ] -outputs.out1.outputCommands: [ - "keep *_*_*_*", - "drop *_caloskimCalorimetryCryoE_*_*", - "drop *_caloskimCalorimetryCryoW_*_*" -] - -# Disabled Space-Charge service for calorimetry -services.SpaceChargeService: { - EnableCalEfieldSCE: false - EnableCalSpatialSCE: false - EnableCorrSCE: false - EnableSimEfieldSCE: false - EnableSimSpatialSCE: false - InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" - RepresentationType: "Voxelized_TH3" - service_provider: "SpaceChargeServiceICARUS" -} - -services.DetectorPropertiesService.IncludeInterPlanePitchInXTickOffsets: false - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - Cluster3DICARUS: - { - limit: -1 - reportEvery: 1 - } - } - } -} diff --git a/fcl/reco/Stage1/Run1/stage1_singleTPC_icarus_gauss.fcl b/fcl/reco/Stage1/Run1/stage1_singleTPC_icarus_gauss.fcl deleted file mode 100644 index 715477e9b..000000000 --- a/fcl/reco/Stage1/Run1/stage1_singleTPC_icarus_gauss.fcl +++ /dev/null @@ -1,86 +0,0 @@ -#include "stage1_icarus_driver_common.fcl" - -process_name: stage1 - -physics.producers.cluster3d: @local::icarus_cluster3d -physics.producers.pandoraGaus: @local::icarus_pandora -physics.producers.pandoraTrackGaus: @local::icarus_pandoraTrackCreation -physics.producers.pandoraKalmanTrackGaus: @local::icarus_pandora_kalmantrack -physics.producers.caloskimCalorimetry: @local::caloskim_calorimetry - -physics.analyzers.caloskim: { - module_type: TrackCaloSkimmer - CALOproducer: "caloskimCalorimetry" - TRKproducer: "pandoraTrackGaus" - T0producer: "pandoraGaus" - PFPproducer: "pandoraGaus" - G4producer: "" - SimChannelproducer: "" - HITproducer: "cluster3d" - RawDigitproducers: [ ] - RequireT0: true - HitRawDigitsTickCollectWidth: 50 - DoTailFit: false - SilenceMissingDataProducts: true - SelectionTools: [@local::stopping_selection, @local::a2c_selection, @local::throughgoing_selection] - SelectEvents: [reco] -} - -physics.reco: [ TPCHitFilter, cluster3d, pandoraGaus, pandoraTrackGaus, pandoraKalmanTrackGaus, caloskimCalorimetry ] - -physics.outana: [ caloskim ] -physics.trigger_paths: [ reco ] -physics.end_paths: [ outana, stream1 ] -outputs.out1.fileName: "%ifb_%tc-%p.root" -outputs.out1.dataTier: "reconstructed" -outputs.out1.SelectEvents: [ reco ] -outputs.out1.outputCommands: [ - "keep *_*_*_*", - "drop *_caloskimCalorimetry_*_*" -] - -# Disabled Space-Charge service for calorimetry -services.SpaceChargeService: { - EnableCalEfieldSCE: false - EnableCalSpatialSCE: false - EnableCorrSCE: false - EnableSimEfieldSCE: false - EnableSimSpatialSCE: false - InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" - RepresentationType: "Voxelized_TH3" - service_provider: "SpaceChargeServiceICARUS" -} - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - Cluster3D: - { - limit: -1 - reportEvery: 1 - } - } - } -} - -physics.filters.TPCHitFilter.HitDataLabelVec: ["gaushit"] -physics.filters.TPCHitFilter.MaximumHits: 500000 - -physics.producers.cluster3d.Hit3DBuilderAlg: @local::standard_snippethit3dbuilder -physics.producers.cluster3d.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit"] -physics.producers.cluster3d.Hit3DBuilderAlg.PulseHeightFraction: 0. #0.75 #0.25 -physics.producers.cluster3d.Hit3DBuilderAlg.PHLowSelection: 0. #4.0 # 20. -physics.producers.cluster3d.Hit3DBuilderAlg.MaxHitChiSquare: 1000000. -physics.producers.cluster3d.Hit3DBuilderAlg.OutputHistograms: false - -physics.producers.pandoraGaus.HitFinderModuleLabel: "cluster3d" -physics.producers.pandoraTrackGaus.PFParticleLabel: "pandoraGaus" -physics.producers.pandoraKalmanTrackGaus.inputCollection: "pandoraGaus" -physics.producers.pandoraKalmanTrackGaus.trackInputTag: "pandoraTrackGaus" - -physics.producers.caloskimCalorimetry.TrackModuleLabel: "pandoraTrackGaus" diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus.fcl deleted file mode 100644 index b20d3bb0d..000000000 --- a/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus.fcl +++ /dev/null @@ -1,5 +0,0 @@ -# -#include "stage1_run2_icarus.fcl" - -physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] -physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus_MC.fcl b/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus_MC.fcl deleted file mode 100644 index fd6fceb83..000000000 --- a/fcl/reco/Stage1/Run2/stage1_run2_1d_icarus_MC.fcl +++ /dev/null @@ -1,5 +0,0 @@ - -#include "stage1_run2_icarus_MC.fcl" - -physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] -physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] diff --git a/fcl/reco/Stage1/Run2/stage1_run2_icarus_MC.fcl b/fcl/reco/Stage1/Run2/stage1_run2_icarus_MC.fcl deleted file mode 100644 index 8401564f1..000000000 --- a/fcl/reco/Stage1/Run2/stage1_run2_icarus_MC.fcl +++ /dev/null @@ -1,106 +0,0 @@ - -#include "mchitmodules.fcl" -#include "mctrutht0matching.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "stage1_icarus_driver_common.fcl" - -process_name: MCstage1 - -# Disabled Space-Charge service for calorimetry -services.SpaceChargeService: { - EnableCalEfieldSCE: false - EnableCalSpatialSCE: false - EnableCorrSCE: false - EnableSimEfieldSCE: false - EnableSimSpatialSCE: false - InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" - RepresentationType: "Voxelized_TH3" - service_provider: "SpaceChargeServiceICARUS" -} - -services.BackTrackerService: @local::standard_backtrackerservice -# In the 2D-detsim, SimChannel objects are made by the WireCell -# drift simulation (daq), not LArG4 (largeant). Thus, we need -# to overwrite the truth matching labels in the calibration ntuple maker -services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" -services.ParticleInventoryService: @local::standard_particleinventoryservice - -## Add the MC module to the list of producers -physics.producers: { - @table::icarus_stage1_producers - - #mcophit: @local::ICARUSMCOpHit - mcopflashTPC0: @local::ICARUSMCOpFlashTPC0 - mcopflashTPC1: @local::ICARUSMCOpFlashTPC1 - mcopflashTPC2: @local::ICARUSMCOpFlashTPC2 - mcopflashTPC3: @local::ICARUSMCOpFlashTPC3 - - cheatopflashTPC0: @local::ICARUSCheatOpFlashTPC0 - cheatopflashTPC1: @local::ICARUSCheatOpFlashTPC1 - cheatopflashTPC2: @local::ICARUSCheatOpFlashTPC2 - cheatopflashTPC3: @local::ICARUSCheatOpFlashTPC3 - - ### mc producers - mchitfinder: @local::standard_mchitfinder - mcassociationsGausCryoE: @local::standard_mcparticlehitmatching - mcassociationsGausCryoW: @local::standard_mcparticlehitmatching -} - -physics.reco: [ - @sequence::icarus_reco_Gauss_CryoE , - @sequence::icarus_reco_Gauss_CryoW , - @sequence::icarus_reco_fm, - @sequence::icarus_tpcpmtbarycentermatch, - caloskimCalorimetryCryoE, caloskimCalorimetryCryoW, - mcassociationsGausCryoE, mcassociationsGausCryoW - ] - -physics.outana: [ @sequence::icarus_analysis_modules ] -physics.trigger_paths: [ reco ] -physics.end_paths: [ outana, stream1 ] -outputs.out1.fileName: "%ifb_%tc-%p.root" -outputs.out1.dataTier: "reconstructed" -outputs.out1.outputCommands: [ - "keep *_*_*_*", - "drop *_caloskimCalorimetryCryoE_*_*", - "drop *_caloskimCalorimetryCryoW_*_*" -] - -#Redefine TPCPMTBarycenterMatch producers with MC parameters -physics.producers.tpcpmtbarycentermatchCryoE: @local::mc_tpcpmtbarycentermatchproducer_east -physics.producers.tpcpmtbarycentermatchCryoW: @local::mc_tpcpmtbarycentermatchproducer_west - -# Turn on truth-info for track skimmer -physics.analyzers.caloskimE.G4producer: "largeant" -physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" -physics.analyzers.caloskimE.RawDigitproducers: ["MCDecodeTPCROI:PHYSCRATEDATATPCEW", "MCDecodeTPCROI:PHYSCRATEDATATPCEE"] -physics.analyzers.caloskimW.G4producer: "largeant" -physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" -physics.analyzers.caloskimW.RawDigitproducers: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW", "MCDecodeTPCROI:PHYSCRATEDATATPCWE"] - -physics.producers.mcassociationsGausCryoE.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoE"] -physics.producers.mcassociationsGausCryoW.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoW"] - -# Remove missing products in MC -physics.analyzers.simpleLightAna.TriggerLabel: "" -physics.analyzers.simpleLightAna.RWMLabel: "" -physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["opdaq"] - -services.message.destinations : -{ - STDCOUT: - { - type: "cout" #tells the message service to output this destination to cout - threshold: "WARNING" #tells the message service that this destination applies to WARNING and higher level messages - categories: - { - Cluster3DICARUS: - { - limit: -1 - reportEvery: 1 - } - } - } -} - diff --git a/fcl/reco/Stage1/RunA/CMakeLists.txt b/fcl/reco/Stage1/RunA/CMakeLists.txt deleted file mode 100644 index 13355789a..000000000 --- a/fcl/reco/Stage1/RunA/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -install_fhicl() diff --git a/fcl/reco/Stage1/RunA/stage1_runA_icarus_nosupera.fcl b/fcl/reco/Stage1/RunA/stage1_runA_icarus_nosupera.fcl deleted file mode 100644 index b6778b06c..000000000 --- a/fcl/reco/Stage1/RunA/stage1_runA_icarus_nosupera.fcl +++ /dev/null @@ -1,8 +0,0 @@ -#include "stage1_run2_icarus.fcl" - -# don't run supera -- crashes on old files -physics.outana: [ - caloskimE - ,caloskimW - ,simpleLightAna -] diff --git a/fcl/reco/Stage1/Run1/CMakeLists.txt b/fcl/reco/Stage1/data/CMakeLists.txt similarity index 100% rename from fcl/reco/Stage1/Run1/CMakeLists.txt rename to fcl/reco/Stage1/data/CMakeLists.txt diff --git a/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl new file mode 100644 index 000000000..4a6e28986 --- /dev/null +++ b/fcl/reco/Stage1/data/stage1_run2_1d_icarus.fcl @@ -0,0 +1,13 @@ +# +#include "stage1_run2_icarus.fcl" + +physics.reco: [ @sequence::icarus_filter1D_cluster3D, + @sequence::icarus_pandora_Gauss, + @sequence::icarus_reco_fm, + @sequence::icarus_tpcpmtbarycentermatch, + @sequence::icarus_crttrack, + @sequence::icarus_crtt0tagging, + caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] + +physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] +physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus.fcl rename to fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_Cosmic.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_Cosmic.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_Cosmic.fcl rename to fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_Cosmic.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_MPVMPR.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_MPVMPR.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_MPVMPR.fcl rename to fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_MPVMPR.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_Nu.fcl b/fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_Nu.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_Nu.fcl rename to fcl/reco/Stage1/data/stage1_run2_1d_larcv_icarus_Nu.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_icarus.fcl similarity index 88% rename from fcl/reco/Stage1/Run2/stage1_run2_icarus.fcl rename to fcl/reco/Stage1/data/stage1_run2_icarus.fcl index 40ea40c2a..53f70ccbd 100644 --- a/fcl/reco/Stage1/Run2/stage1_run2_icarus.fcl +++ b/fcl/reco/Stage1/data/stage1_run2_icarus.fcl @@ -2,12 +2,12 @@ process_name: stage1 -physics.reco: [ @sequence::icarus_filter_cluster3D, +physics.reco: [ @sequence::icarus_filter2D_cluster3D, @sequence::icarus_pandora_Gauss, @sequence::icarus_reco_fm, @sequence::icarus_tpcpmtbarycentermatch, @sequence::icarus_crttrack, - @sequence::icarus_crtt0match, + @sequence::icarus_crtt0tagging, caloskimCalorimetryCryoE, caloskimCalorimetryCryoW] physics.outana: [ @sequence::icarus_analysis_modules ] @@ -22,6 +22,9 @@ outputs.out1.outputCommands: [ "drop *_caloskimCalorimetryCryoW_*_*" ] +physics.analyzers.caloskimE.SelectEvents: [reco] +physics.analyzers.caloskimW.SelectEvents: [reco] + # Disabled Space-Charge service for calorimetry services.SpaceChargeService: { EnableCalEfieldSCE: false diff --git a/fcl/reco/Stage1/Run2/stage1_run2_icarus_alltracks_ntuple.fcl b/fcl/reco/Stage1/data/stage1_run2_icarus_alltracks_ntuple.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_icarus_alltracks_ntuple.fcl rename to fcl/reco/Stage1/data/stage1_run2_icarus_alltracks_ntuple.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus.fcl b/fcl/reco/Stage1/data/stage1_run2_larcv_icarus.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus.fcl rename to fcl/reco/Stage1/data/stage1_run2_larcv_icarus.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_Cosmic.fcl b/fcl/reco/Stage1/data/stage1_run2_larcv_icarus_Cosmic.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_Cosmic.fcl rename to fcl/reco/Stage1/data/stage1_run2_larcv_icarus_Cosmic.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_MPVMPR.fcl b/fcl/reco/Stage1/data/stage1_run2_larcv_icarus_MPVMPR.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_MPVMPR.fcl rename to fcl/reco/Stage1/data/stage1_run2_larcv_icarus_MPVMPR.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_Nu.fcl b/fcl/reco/Stage1/data/stage1_run2_larcv_icarus_Nu.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_Nu.fcl rename to fcl/reco/Stage1/data/stage1_run2_larcv_icarus_Nu.fcl diff --git a/fcl/reco/Stage1/Run2/trigger_eff_stage1_icarus.fcl b/fcl/reco/Stage1/data/trigger_eff_stage1_icarus.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/trigger_eff_stage1_icarus.fcl rename to fcl/reco/Stage1/data/trigger_eff_stage1_icarus.fcl diff --git a/fcl/reco/Stage1/Run2/CMakeLists.txt b/fcl/reco/Stage1/mc/CMakeLists.txt similarity index 100% rename from fcl/reco/Stage1/Run2/CMakeLists.txt rename to fcl/reco/Stage1/mc/CMakeLists.txt diff --git a/fcl/reco/Stage1/mc/stage1_run2_1d_icarus_MC.fcl b/fcl/reco/Stage1/mc/stage1_run2_1d_icarus_MC.fcl new file mode 100644 index 000000000..85b155397 --- /dev/null +++ b/fcl/reco/Stage1/mc/stage1_run2_1d_icarus_MC.fcl @@ -0,0 +1,17 @@ + +#include "stage1_run2_icarus_MC.fcl" + +physics.reco: [ + @sequence::icarus_reco_Gauss1D_CryoE , + @sequence::icarus_reco_Gauss1D_CryoW , + @sequence::icarus_reco_fm, + @sequence::icarus_tpcpmtbarycentermatch, + @sequence::icarus_crttrack, + @sequence::icarus_crtt0tagging, + caloskimCalorimetryCryoE, caloskimCalorimetryCryoW, + mcassociationsGausCryoE, mcassociationsGausCryoW, + mcreco + ] + +physics.producers.cluster3DCryoW.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCWW", "gaushit1dTPCWE"] +physics.producers.cluster3DCryoE.Hit3DBuilderAlg.HitFinderTagVec: ["gaushit1dTPCEW", "gaushit1dTPCEE"] diff --git a/fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_MC.fcl b/fcl/reco/Stage1/mc/stage1_run2_1d_larcv_icarus_MC.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_1d_larcv_icarus_MC.fcl rename to fcl/reco/Stage1/mc/stage1_run2_1d_larcv_icarus_MC.fcl diff --git a/fcl/overlays/stage1_run2_icarus_overlay.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl similarity index 75% rename from fcl/overlays/stage1_run2_icarus_overlay.fcl rename to fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl index 0634feb7a..0009c0806 100644 --- a/fcl/overlays/stage1_run2_icarus_overlay.fcl +++ b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC.fcl @@ -1,6 +1,6 @@ - #include "mchitmodules.fcl" #include "mctrutht0matching.fcl" +#include "mcreco.fcl" #include "backtrackerservice.fcl" #include "particleinventoryservice.fcl" #include "stage1_icarus_driver_common.fcl" @@ -23,11 +23,9 @@ services.BackTrackerService: @local::standard_backtrackerservice # In the 2D-detsim, SimChannel objects are made by the WireCell # drift simulation (daq), not LArG4 (largeant). Thus, we need # to overwrite the truth matching labels in the calibration ntuple maker -services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "merge" services.ParticleInventoryService: @local::standard_particleinventoryservice -#For Overlays -services.BackTrackerService.BackTracker.OverrideRealData: true -services.ParticleInventoryService.ParticleInventory.OverrideRealData: true + ## Add the MC module to the list of producers physics.producers: { @table::icarus_stage1_producers @@ -44,18 +42,22 @@ physics.producers: { cheatopflashTPC3: @local::ICARUSCheatOpFlashTPC3 ### mc producers + mcreco: @local::standard_mcreco mchitfinder: @local::standard_mchitfinder mcassociationsGausCryoE: @local::standard_mcparticlehitmatching mcassociationsGausCryoW: @local::standard_mcparticlehitmatching } physics.reco: [ - @sequence::icarus_reco_Gauss_CryoE , - @sequence::icarus_reco_Gauss_CryoW , + @sequence::icarus_reco_Gauss2D_CryoE , + @sequence::icarus_reco_Gauss2D_CryoW , @sequence::icarus_reco_fm, @sequence::icarus_tpcpmtbarycentermatch, + @sequence::icarus_crttrack, + @sequence::icarus_crtt0tagging, caloskimCalorimetryCryoE, caloskimCalorimetryCryoW, - mcassociationsGausCryoE, mcassociationsGausCryoW + mcassociationsGausCryoE, mcassociationsGausCryoW, + mcreco ] physics.outana: [ @sequence::icarus_analysis_modules ] @@ -73,17 +75,16 @@ outputs.out1.outputCommands: [ physics.producers.tpcpmtbarycentermatchCryoE: @local::mc_tpcpmtbarycentermatchproducer_east physics.producers.tpcpmtbarycentermatchCryoW: @local::mc_tpcpmtbarycentermatchproducer_west -#For Overlays -physics.producers.mcassociationsGausCryoE.OverrideRealData: true -physics.producers.mcassociationsGausCryoW.OverrideRealData: true - # Turn on truth-info for track skimmer physics.analyzers.caloskimE.G4producer: "largeant" -physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimE.SimChannelproducer: "merge" physics.analyzers.caloskimE.RawDigitproducers: ["MCDecodeTPCROI:PHYSCRATEDATATPCEW", "MCDecodeTPCROI:PHYSCRATEDATATPCEE"] +physics.analyzers.caloskimE.SelectEvents: [reco] + physics.analyzers.caloskimW.G4producer: "largeant" -physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimW.SimChannelproducer: "merge" physics.analyzers.caloskimW.RawDigitproducers: ["MCDecodeTPCROI:PHYSCRATEDATATPCWW", "MCDecodeTPCROI:PHYSCRATEDATATPCWE"] +physics.analyzers.caloskimW.SelectEvents: [reco] physics.producers.mcassociationsGausCryoE.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoE"] physics.producers.mcassociationsGausCryoW.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoW"] @@ -93,6 +94,17 @@ physics.analyzers.simpleLightAna.TriggerLabel: "" physics.analyzers.simpleLightAna.RWMLabel: "" physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["opdaq"] +# Configure mcreco to read SEDLite instead of SED and MCParticleLite in addition to MCParticle +physics.producers.mcreco.G4ModName: @erase +physics.producers.mcreco.SimChannelLabel: "filtersed" +physics.producers.mcreco.MCParticleLabel: "largeant" +physics.producers.mcreco.UseSimEnergyDepositLite: true +physics.producers.mcreco.UseSimEnergyDeposit: false +physics.producers.mcreco.IncludeDroppedParticles: true #this is now true with larsoft v09_89 and newer +physics.producers.mcreco.MCParticleDroppedLabel: "largeant:droppedMCParticles" +physics.producers.mcreco.MCRecoPart.SavePathPDGList: [13,-13,211,-211,111,311,310,130,321,-321,2212,2112,2224,2214,2114,1114,3122,1000010020,1000010030,1000020030,1000020040] +physics.producers.mcreco.MCRecoPart.TrackIDOffsets: [0,10000000,20000000] #Account for track ID offsets in labeling primaries + services.message.destinations : { STDCOUT: diff --git a/fcl/reco/Stage1/Run2/stage1_run2_icarus_MC_slimout.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_slimout.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_icarus_MC_slimout.fcl rename to fcl/reco/Stage1/mc/stage1_run2_icarus_MC_slimout.fcl diff --git a/fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_MC.fcl b/fcl/reco/Stage1/mc/stage1_run2_larcv_icarus_MC.fcl similarity index 100% rename from fcl/reco/Stage1/Run2/stage1_run2_larcv_icarus_MC.fcl rename to fcl/reco/Stage1/mc/stage1_run2_larcv_icarus_MC.fcl diff --git a/fcl/reco/Stage0/Run2/CMakeLists.txt b/fcl/reco/Stage1/overlay/CMakeLists.txt similarity index 58% rename from fcl/reco/Stage0/Run2/CMakeLists.txt rename to fcl/reco/Stage1/overlay/CMakeLists.txt index ee9b6cab4..2bda0f610 100644 --- a/fcl/reco/Stage0/Run2/CMakeLists.txt +++ b/fcl/reco/Stage1/overlay/CMakeLists.txt @@ -1,5 +1,3 @@ cet_enable_asserts() -add_subdirectory(partial) - install_fhicl() diff --git a/fcl/reco/Stage1/overlay/stage1_run2_1d_icarus_overlay.fcl b/fcl/reco/Stage1/overlay/stage1_run2_1d_icarus_overlay.fcl new file mode 100644 index 000000000..b67be7b90 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_1d_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage1_run2_1d_icarus_MC.fcl" + +#include "enable_overlay_stage1.fcl" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_1d_larcv_icarus_overlay.fcl b/fcl/reco/Stage1/overlay/stage1_run2_1d_larcv_icarus_overlay.fcl new file mode 100644 index 000000000..93799a763 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_1d_larcv_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage1_run2_1d_larcv_icarus_MC.fcl" + +#include "enable_overlay_stage1.fcl" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay.fcl b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay.fcl new file mode 100644 index 000000000..8fb460ed0 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage1_run2_icarus_MC.fcl" + +#include "enable_overlay_stage1.fcl" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_slimout.fcl b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_slimout.fcl new file mode 100644 index 000000000..8a49f47aa --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_slimout.fcl @@ -0,0 +1,3 @@ +#include "stage1_run2_icarus_MC_slimout.fcl" + +#include "enable_overlay_stage1.fcl" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_larcv_icarus_overlay.fcl b/fcl/reco/Stage1/overlay/stage1_run2_larcv_icarus_overlay.fcl new file mode 100644 index 000000000..70070331a --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_larcv_icarus_overlay.fcl @@ -0,0 +1,3 @@ +#include "stage1_run2_larcv_icarus_MC.fcl" + +#include "enable_overlay_stage1.fcl" diff --git a/fcl/services/simulationservices_icarus.fcl b/fcl/services/simulationservices_icarus.fcl index 4e855daf3..b5e4d9718 100644 --- a/fcl/services/simulationservices_icarus.fcl +++ b/fcl/services/simulationservices_icarus.fcl @@ -27,6 +27,8 @@ icarus_largeantparameters.EnabledPhysics: [ "Em", "SynchrotronAndGN", "Io icarus_largeantparameters.FillSimEnergyDeposits: true icarus_largeantparameters.UseModLarqlRecomb: true # use LArQL recombination corrections (dependence on EF) icarus_largeantparameters.IonAndScintCalculator: "Correlated" # adopt the "correlated" model for ionization and scintillation (SBN DocDB 17964) +icarus_largeantparameters.UseModBoxRecomb: false +icarus_largeantparameters.UseEllipsModBoxRecomb: true # # ICARUS LArVoxelCalculator service configuration. diff --git a/fcl/g4/Purity/CMakeLists.txt b/fcl/standard/CMakeLists.txt similarity index 74% rename from fcl/g4/Purity/CMakeLists.txt rename to fcl/standard/CMakeLists.txt index 520ed808b..9714229ee 100644 --- a/fcl/g4/Purity/CMakeLists.txt +++ b/fcl/standard/CMakeLists.txt @@ -1,4 +1,4 @@ -# Install fcl files in /job subdirectory. +# Install fcl files install_fhicl() diff --git a/fcl/standard/standard_data_caf_icarus.fcl b/fcl/standard/standard_data_caf_icarus.fcl new file mode 100644 index 000000000..34ac0e6be --- /dev/null +++ b/fcl/standard/standard_data_caf_icarus.fcl @@ -0,0 +1 @@ +#include "cafmakerjob_icarus_data.fcl" diff --git a/fcl/standard/standard_data_larcv_icarus.fcl b/fcl/standard/standard_data_larcv_icarus.fcl new file mode 100644 index 000000000..1e63b1063 --- /dev/null +++ b/fcl/standard/standard_data_larcv_icarus.fcl @@ -0,0 +1 @@ +#include "icarus_supera_data.fcl" diff --git a/fcl/reco/Stage0/RunA/stage0_runA_icarus.fcl b/fcl/standard/standard_data_stage0_icarus.fcl similarity index 100% rename from fcl/reco/Stage0/RunA/stage0_runA_icarus.fcl rename to fcl/standard/standard_data_stage0_icarus.fcl diff --git a/fcl/standard/standard_data_stage1_icarus.fcl b/fcl/standard/standard_data_stage1_icarus.fcl new file mode 100644 index 000000000..88289d934 --- /dev/null +++ b/fcl/standard/standard_data_stage1_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_1d_icarus.fcl" diff --git a/fcl/standard/standard_data_stage1larcv_icarus.fcl b/fcl/standard/standard_data_stage1larcv_icarus.fcl new file mode 100644 index 000000000..be9e0d00d --- /dev/null +++ b/fcl/standard/standard_data_stage1larcv_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_1d_larcv_icarus.fcl" diff --git a/fcl/standard/standard_mc_all_detsim_icarus.fcl b/fcl/standard/standard_mc_all_detsim_icarus.fcl new file mode 100644 index 000000000..13685eafc --- /dev/null +++ b/fcl/standard/standard_mc_all_detsim_icarus.fcl @@ -0,0 +1 @@ +#include "detsim_2d_icarus_refactored.fcl" diff --git a/fcl/standard/standard_mc_all_larcv_icarus.fcl b/fcl/standard/standard_mc_all_larcv_icarus.fcl new file mode 100644 index 000000000..db4adfe1a --- /dev/null +++ b/fcl/standard/standard_mc_all_larcv_icarus.fcl @@ -0,0 +1 @@ +#include "run_MPVMPR_supera_yz.fcl" diff --git a/fcl/syst_variations/legacy/stage0_variation_icarus.fcl b/fcl/standard/standard_mc_all_stage0_icarus.fcl similarity index 58% rename from fcl/syst_variations/legacy/stage0_variation_icarus.fcl rename to fcl/standard/standard_mc_all_stage0_icarus.fcl index e712ba93f..feb8aca63 100644 --- a/fcl/syst_variations/legacy/stage0_variation_icarus.fcl +++ b/fcl/standard/standard_mc_all_stage0_icarus.fcl @@ -1,3 +1 @@ #include "stage0_run2_icarus_mc.fcl" - -process_name: MCstage0Var \ No newline at end of file diff --git a/fcl/syst_variations/stage1_variation_icarus.fcl b/fcl/standard/standard_mc_all_stage1_icarus.fcl similarity index 60% rename from fcl/syst_variations/stage1_variation_icarus.fcl rename to fcl/standard/standard_mc_all_stage1_icarus.fcl index c0b2e8504..86d4b0eba 100644 --- a/fcl/syst_variations/stage1_variation_icarus.fcl +++ b/fcl/standard/standard_mc_all_stage1_icarus.fcl @@ -1,3 +1 @@ #include "stage1_run2_1d_icarus_MC.fcl" - -process_name: MCstage1Var \ No newline at end of file diff --git a/fcl/syst_variations/stage1_variation_icarus_larcv.fcl b/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl similarity index 63% rename from fcl/syst_variations/stage1_variation_icarus_larcv.fcl rename to fcl/standard/standard_mc_all_stage1larcv_icarus.fcl index d7a4f793f..caf161ca4 100644 --- a/fcl/syst_variations/stage1_variation_icarus_larcv.fcl +++ b/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl @@ -1,3 +1 @@ #include "stage1_run2_1d_larcv_icarus_MC.fcl" - -process_name: MCstage1Var \ No newline at end of file diff --git a/fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl b/fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl new file mode 100644 index 000000000..b04ef5909 --- /dev/null +++ b/fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl @@ -0,0 +1 @@ +#include "cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt.fcl" diff --git a/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl b/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl new file mode 100644 index 000000000..687f1fe35 --- /dev/null +++ b/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_cosmics_sce_2d_drift.fcl" diff --git a/fcl/standard/standard_mc_intime_caf_icarus.fcl b/fcl/standard/standard_mc_intime_caf_icarus.fcl new file mode 100644 index 000000000..a56c6617a --- /dev/null +++ b/fcl/standard/standard_mc_intime_caf_icarus.fcl @@ -0,0 +1 @@ +#include "cafmakerjob_icarus_cosmic_detsim2d.fcl" diff --git a/fcl/standard/standard_mc_intime_g4_icarus.fcl b/fcl/standard/standard_mc_intime_g4_icarus.fcl new file mode 100644 index 000000000..05c30a5c9 --- /dev/null +++ b/fcl/standard/standard_mc_intime_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_intime_sce_2d_drift.fcl" diff --git a/fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl b/fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl new file mode 100644 index 000000000..41a4445a8 --- /dev/null +++ b/fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl @@ -0,0 +1,2 @@ +#include "stage1_run2_1d_larcv_icarus_MPVMPR.fcl" + diff --git a/fcl/g4/Lifetime/CMakeLists.txt b/fcl/supera/CMakeLists.txt similarity index 100% rename from fcl/g4/Lifetime/CMakeLists.txt rename to fcl/supera/CMakeLists.txt diff --git a/fcl/supera/run_MPVMPR_supera_yz.fcl b/fcl/supera/run_MPVMPR_supera_yz.fcl new file mode 100644 index 000000000..3c5d340af --- /dev/null +++ b/fcl/supera/run_MPVMPR_supera_yz.fcl @@ -0,0 +1,3 @@ +#include "run_MPVMPR_supera.fcl" + +physics.analyzers.supera.supera_params: "supera_icarus_MC_MPVMPR_cryoE_PMT_CRT_yz.fcl" diff --git a/fcl/supera/supera_icarus_MC_MPVMPR_cryoE_PMT_CRT_yz.fcl b/fcl/supera/supera_icarus_MC_MPVMPR_cryoE_PMT_CRT_yz.fcl new file mode 100644 index 000000000..edabce783 --- /dev/null +++ b/fcl/supera/supera_icarus_MC_MPVMPR_cryoE_PMT_CRT_yz.fcl @@ -0,0 +1,178 @@ +ProcessDriver: { + + Verbosity: 2 + EnableFilter: true + RandomAccess: false + ProcessType: ["SuperaMCTruth","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePoint","Tensor3DFromCluster3D","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3D","SuperaOptical","SuperaCRT"] + ProcessName: ["MultiPartVrtx","SuperaBBoxInteraction","SuperaMCParticleCluster","SuperaSimEnergyDeposit","SuperaSpacePointCryoE","Tensor3DFromCluster3D","ThresholdTensor3D","CombineTensor3D","ParticleCorrector","EmptyTensorFilter","RescaleChargeTensor3DCryoE","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"] + OpFlashOutputs: ["cryoE"] + } + + 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" + } + + ThresholdTensor3D: { # fill with ghost value (5) + TargetProducer: "reco_cryoE" + OutputProducer: "pcluster_semantics_ghost" + PaintValue: 5 + } + + CombineTensor3D: { + Tensor3DProducers: ["pcluster_semantics_ghost","pcluster_semantics"] + OutputProducer: "pcluster_semantics_ghost" + PoolType: 0 + } + + SuperaMCParticleCluster: { + OutputLabel: "pcluster" + LArMCParticleProducer: "simplemerge" #"largeant" + 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: true + Verbosity: 2 + Meta3DFromCluster3D: "pcluster" + #LArSimChProducer: "largeant" + LArSimChProducer: "merge" + LArSpacePointProducers: ["cluster3DCryoE"] + TwofoldMatching: true + UseTruePosition: true + HitThresholdNe: 100 + HitWindowTicks: 15 #5 + HitPeakFinding: false + PostAveraging: true + PostAveragingThreshold_cm: 0.425 + DumpToCSV: false + #DumpToCSV: true + RecoChargeRange: [-1000,50000] + VoxelDistanceThreshold: 3. + UseOrigTrackID: true + } + } + + MultiPartVrtx: { + Verbosity: 2 + #LArMCTruthProducer: "generator" + MCTruthProducers: ["generator","rain","rain2"] + OutParticleLabel: "mpv" + Origin: 0 + } + + SuperaBBoxInteraction: { + Verbosity: 2 + LArMCTruthProducer: "generator" + #LArSimEnergyDepositProducer: "largeant TPCActive" + LArSimEnergyDepositLiteProducer: "filtersed" + UseSEDLite: true #false + Origin: 0 + Cluster3DLabels: ["mcst","pcluster","sed","masked_true2reco"] + Tensor3DLabels: ["reco_cryoE","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 + #BBoxBottom: [-413.04,-182.01,-895.101] + 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 #false + 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] + } + + } +} + diff --git a/fcl/syst_variations/CMakeLists.txt b/fcl/syst_variations/CMakeLists.txt deleted file mode 100644 index 2e575e69a..000000000 --- a/fcl/syst_variations/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_subdirectory(legacy) - -install_fhicl() diff --git a/fcl/syst_variations/caf_variations_saveAR_icarus.fcl b/fcl/syst_variations/caf_variations_saveAR_icarus.fcl deleted file mode 100644 index 0ccea6db9..000000000 --- a/fcl/syst_variations/caf_variations_saveAR_icarus.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "cafmakerjob_icarus_detsim2d.fcl" - -physics.stream1: [ outpid ] diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm1_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm1_icarus.fcl deleted file mode 100644 index 49ced76b0..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCCohNoiseVarm1 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.9565 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm2_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm2_icarus.fcl deleted file mode 100644 index 4c60e26ee..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohm2_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCCohNoiseVarm2 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.913 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp1_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp1_icarus.fcl deleted file mode 100644 index fd9b1ceeb..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCCohNoiseVarp1 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 1.0435 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp2_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp2_icarus.fcl deleted file mode 100644 index 45f47de9e..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_cohp2_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCCohNoiseVarp2 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 1.0870 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intm1_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intm1_icarus.fcl deleted file mode 100644 index 3792d67df..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intm1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCIntNoiseVarm1 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the intrinsic noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.int_noise_scale: 0.9624 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise0p9_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise0p9_icarus.fcl deleted file mode 100644 index c34b05dae..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise0p9_icarus.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCIntNoiseVar - -#10 percent decrease in intrinsic noise, similar to NuMI analysis variation - -physics.producers.daq.wcls_main.structs.int_noise_scale: 0.9 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise1p1_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise1p1_icarus.fcl deleted file mode 100644 index f228fa49b..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intnoise1p1_icarus.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCIntNoiseVar - -#10 percent increase in intrinsic noise, similar to NuMI analysis variation - -physics.producers.daq.wcls_main.structs.int_noise_scale: 1.10 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intp1_icarus.fcl b/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intp1_icarus.fcl deleted file mode 100644 index 3f3a2a8e3..000000000 --- a/fcl/syst_variations/detsim_2d_TPCnoise_refactored_variation_intp1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -process_name: TPCIntNoiseVarp1 - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the intrinsic noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.int_noise_scale: 1.0376 \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_light_variations.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_light_variations.fcl deleted file mode 100644 index a0530a378..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_light_variations.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "detsim_2d_icarus_fitFR_refactored.fcl" - -physics.producers.opdaq.QE: 0.04 - -process_name: DetSimLightVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_untuned_variations.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_untuned_variations.fcl deleted file mode 100644 index 8711d2a60..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_untuned_variations.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR_refactored.fcl" - -physics.producers.daq.wcls_main.params.file_rcresp: "" -physics.producers.daq.wcls_main.params.files_fields: "garfield-icarus-fnal-rev2.json.bz2" - -process_name: UntunedSigShapeFRVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainhi.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainhi.fcl deleted file mode 100644 index 622208bd9..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainhi.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#originally developed by G. Putnam, adapt once that PR is in place -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -# variation increase gain by 15% -physics.producers.daq.wcls_main.structs.gain0: 13.79065 - -process_name: DetSimInd0GainHi \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainlow.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainlow.fcl deleted file mode 100644 index 2ac267431..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind0gainlow.fcl +++ /dev/null @@ -1,9 +0,0 @@ -#originally developed by G. Putnam -# Fit field responses -# -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -# variation decrease gain factor on induction 1 plane by 15% -physics.producers.daq.wcls_main.structs.gain0: 10.1930 - -process_name: DetSimInd0GainLow \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_opaque.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_opaque.fcl deleted file mode 100644 index d3bca6580..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_opaque.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#originally developed by G. Putnam, adapt once that PR is in place -# Fit field responses, turned up noise on each plane -# - -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin0.json.bz2" - -process_name: DetSimInd1OpaqueVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_transparent.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_transparent.fcl deleted file mode 100644 index 54b3b623c..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_ind1_transparent.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#originally developed by G. Putnam and adapt when that PR is merged -# Fit field responses, turned up noise on each plane -# - -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin14.json.bz2" - -process_name:Ind1TranspVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimehi.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimehi.fcl deleted file mode 100644 index 4073fb1c2..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimehi.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -#Highest value of e- lifetime across both TPCs in Run 2 (9.2 ms in West cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 9200 -physics.producers.daq.wcls_main.structs.lifetime: 9200 - -process_name: ELRun2MaxVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimelow.fcl b/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimelow.fcl deleted file mode 100644 index 1f8ad02f6..000000000 --- a/fcl/syst_variations/detsim_2d_icarus_refactored_variation_run2lifetimelow.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_variation_fitFR_refactored_icarus.fcl" - -#Lowest value of e- lifetime across both TPCs in Run 2 (3.8 ms in East cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 3800 -physics.producers.daq.wcls_main.structs.lifetime: 3800 - -process_name: ELRun2MinVar \ No newline at end of file diff --git a/fcl/syst_variations/detsim_2d_variation_fitFR_refactored_icarus.fcl b/fcl/syst_variations/detsim_2d_variation_fitFR_refactored_icarus.fcl deleted file mode 100644 index 2d24564ce..000000000 --- a/fcl/syst_variations/detsim_2d_variation_fitFR_refactored_icarus.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "detsim_2d_icarus_fitFR_refactored.fcl" - -process_name: DetSimVar \ No newline at end of file diff --git a/fcl/syst_variations/g4_icarus_qe_variations.fcl b/fcl/syst_variations/g4_icarus_qe_variations.fcl deleted file mode 100644 index 7516f035e..000000000 --- a/fcl/syst_variations/g4_icarus_qe_variations.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "refactored_g4_icarus_step2_variations.fcl" - -process_name: G4FullQEVar - -services.LArPropertiesService.ScintPreScale: 4.0e-2 -physics.producers.opdaq.QE: 4.0 \ No newline at end of file diff --git a/fcl/syst_variations/g4_icarus_step2_refactored_recombmodel_variations.fcl b/fcl/syst_variations/g4_icarus_step2_refactored_recombmodel_variations.fcl deleted file mode 100644 index 48f76809e..000000000 --- a/fcl/syst_variations/g4_icarus_step2_refactored_recombmodel_variations.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "refactored_g4_icarus_step2.fcl" - -services.LArG4Parameters.UseModBoxRecomb: false -services.LArG4Parameters.UseEllipsModBoxRecomb: true - -process_name: RecombVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/CMakeLists.txt b/fcl/syst_variations/legacy/CMakeLists.txt deleted file mode 100644 index 13355789a..000000000 --- a/fcl/syst_variations/legacy/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -install_fhicl() diff --git a/fcl/syst_variations/legacy/cosmics_g4_icarus_2xsce.fcl b/fcl/syst_variations/legacy/cosmics_g4_icarus_2xsce.fcl deleted file mode 100644 index d5e9a4eaf..000000000 --- a/fcl/syst_variations/legacy/cosmics_g4_icarus_2xsce.fcl +++ /dev/null @@ -1,5 +0,0 @@ -#include "standard_g4_icarus_step2.fcl" - -services.SpaceChargeService.InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_DoubleCharge_voxelTH3.root" - -process_name: G4step2SCEVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm1_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm1_icarus.fcl deleted file mode 100644 index 394307cd8..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: TPCCohNoiseVar - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.9565 \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm2_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm2_icarus.fcl deleted file mode 100644 index d0bf1c9bc..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohm2_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: TPCCohNoiseVar - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 0.913 \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp1_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp1_icarus.fcl deleted file mode 100644 index 60bdad508..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: TPCCohNoiseVar - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 1.0435 \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp2_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp2_icarus.fcl deleted file mode 100644 index 0de3f86ab..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_cohp2_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: TPCCohNoiseVar - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the coherent noise in the TPC (subject to change, this is a test case) -physics.producers.daq.wcls_main.structs.coh_noise_scale: 1.0870 \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_intp1_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_intp1_icarus.fcl deleted file mode 100644 index cb324e52c..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_TPCnoise_variation_intp1_icarus.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: TPCIntNoiseVar - -#Noise adjustment from preliminary study by J. Mueller looking at the range over a set of events the uncertainty on the intrinsic noise in the TPC (subject to change, this is a test case) -icarus_simwire_wirecell_fitSR.wcls_main.structs.int_noise_scale: 1.0376 \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainhi.fcl b/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainhi.fcl deleted file mode 100644 index 4d553f577..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainhi.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#originally developed by G. Putnam, adapt once that PR is in place -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation increase gain by 15% -physics.producers.daq.wcls_main.structs.gain0: 13.79065 - -process_name: DetSimInd0GainHi \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainlow.fcl b/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainlow.fcl deleted file mode 100644 index ebdfa2b5f..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind0gainlow.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#originally developed by G. Putnam, adapt once that PR is in place -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation decrease gain factor on induction 1 plane by 15% -physics.producers.daq.wcls_main.structs.gain0: 10.1930 - -process_name: DetSimInd0GainLow \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_opaque.fcl b/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_opaque.fcl deleted file mode 100644 index c1203fac2..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_opaque.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#originally developed by G. Putnam, adapt once that PR is in place -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin0.json.bz2" - -process_name: DetSimInd1OpaqueVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_transparent.fcl b/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_transparent.fcl deleted file mode 100644 index bfb163269..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_icarus_fitFR_variation_ind1_transparent.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#originally developed by G. Putnam and adapt when that PR is merged -# Fit field responses, turned up noise on each plane -# -#include "detsim_2d_icarus.fcl" - -# Add in the tuned field responses -physics.producers.daq: @local::icarus_simwire_wirecell_fitSR - -# variation on ind 0 -physics.producers.daq.wcls_main.params.files_fields: "icarus_fnal_fit_ks_ind1bin14.json.bz2" - -process_name:Ind1TranspVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_icarus_untuned_variations.fcl b/fcl/syst_variations/legacy/detsim_2d_icarus_untuned_variations.fcl deleted file mode 100644 index e9cf4b71f..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_icarus_untuned_variations.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "detsim_2d_icarus.fcl" - -process_name: UntunedSigShapeFRVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_2d_variation_icarus.fcl b/fcl/syst_variations/legacy/detsim_2d_variation_icarus.fcl deleted file mode 100644 index de6577fd1..000000000 --- a/fcl/syst_variations/legacy/detsim_2d_variation_icarus.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -process_name: DetSimVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimehigh_variations.fcl b/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimehigh_variations.fcl deleted file mode 100644 index 492568fcd..000000000 --- a/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimehigh_variations.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -#Lowest value of e- lifetime across both TPCs in Run 1 (4.8 ms in West cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 4800 -icarus_simwire_wirecell_fitSR.wcls_main.structs.lifetime: 4800 - -process_name: ELRun1MaxVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimelow_variations.fcl b/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimelow_variations.fcl deleted file mode 100644 index 4cc49e306..000000000 --- a/fcl/syst_variations/legacy/detsim_icarus_Run1_lifetimelow_variations.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -#Lowest value of e- lifetime across both TPCs in Run 1 (2.8 ms in West cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 2800 -icarus_simwire_wirecell_fitSR.wcls_main.structs.lifetime: 2800 - -process_name: ELRun1MinVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimehigh_variations.fcl b/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimehigh_variations.fcl deleted file mode 100644 index 89fb3295b..000000000 --- a/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimehigh_variations.fcl +++ /dev/null @@ -1,8 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -#Highest value of e- lifetime across both TPCs in Run 2 (9.2 ms in West cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 9200 -icarus_simwire_wirecell_fitSR.wcls_main.structs.lifetime: 9200 - - -process_name: ELRun2MaxVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimelow_variations.fcl b/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimelow_variations.fcl deleted file mode 100644 index 40d2114ff..000000000 --- a/fcl/syst_variations/legacy/detsim_icarus_Run2_lifetimelow_variations.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "detsim_2d_icarus_fitFR.fcl" - -#Lowest value of e- lifetime across both TPCs in Run 2 (3.8 ms in East cryostat) - Values provided by C. Farnese -services.DetectorPropertiesService.Electronlifetime: 3800 -icarus_simwire_wirecell_fitSR.wcls_main.structs.lifetime: 3800 - -process_name: ELRun2MinVar \ No newline at end of file diff --git a/fcl/syst_variations/legacy/g4_icarus_recombmodel_variations.fcl b/fcl/syst_variations/legacy/g4_icarus_recombmodel_variations.fcl deleted file mode 100644 index 763451045..000000000 --- a/fcl/syst_variations/legacy/g4_icarus_recombmodel_variations.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "standard_g4_icarus.fcl" - -services.LArG4Parameters.UseModBoxRecomb: false -services.LArG4Parameters.UseEllipsModBoxRecomb: true \ No newline at end of file diff --git a/fcl/syst_variations/legacy/g4_icarus_step2_recombmodel_variations.fcl b/fcl/syst_variations/legacy/g4_icarus_step2_recombmodel_variations.fcl deleted file mode 100644 index 64e9c9d1f..000000000 --- a/fcl/syst_variations/legacy/g4_icarus_step2_recombmodel_variations.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "standard_g4_icarus_step2_variations.fcl" - -services.LArG4Parameters.UseModBoxRecomb: false -services.LArG4Parameters.UseEllipsModBoxRecomb: true \ No newline at end of file diff --git a/fcl/syst_variations/legacy/standard_g4_icarus_step1.fcl b/fcl/syst_variations/legacy/standard_g4_icarus_step1.fcl deleted file mode 100644 index 47e076d27..000000000 --- a/fcl/syst_variations/legacy/standard_g4_icarus_step1.fcl +++ /dev/null @@ -1,27 +0,0 @@ -# -# Purpose: Processes generated Monte Carlo events through GEANT4 detector simulation -# -# -# Input -# ------ -# -# * all `simb::MCTruth` collection data products are used as input -# -# -# Output -# ------- -# -# * `largeant` ("legacy" `LArG4` module): -# * `simb::MCParticle` collection: all initial, intermediate and final -# particles propagated through the detector (exceptions apply) -# * `sim::SimEnergyDeposit` collections: `TPCActive` and `Others` -# * `sim::SimChannel` collection: ionisation drifted to TPC channels -# * `sim::SimPhoton` collection: scintillation photons converting into PMT -# * `sim::AuxDetSimChannel` collection: hits from auxiliary detectors (CRT) -# - -#include "standard_g4_icarus_sce.fcl" - -process_name: G4step1 - -physics.simulate: [rns, largeant ] diff --git a/fcl/syst_variations/legacy/standard_g4_icarus_step2.fcl b/fcl/syst_variations/legacy/standard_g4_icarus_step2.fcl deleted file mode 100644 index 9f6441b8f..000000000 --- a/fcl/syst_variations/legacy/standard_g4_icarus_step2.fcl +++ /dev/null @@ -1,21 +0,0 @@ -# -# Purpose: Processes G4 detector simulated events through the charge and light transportation processes -# -# -# Input -# ------ -# -# * all `largeant` data products are used as input -# -# -# Output -# ------- -# -# * `ionization` (`sim::SimEnergyDeposit` collection) -# - -#include "standard_g4_icarus_sce.fcl" - -process_name: G4step2 - -physics.simulate: [ rns, ionization, sedlite, mcreco ] diff --git a/fcl/syst_variations/legacy/standard_g4_icarus_step2_variations.fcl b/fcl/syst_variations/legacy/standard_g4_icarus_step2_variations.fcl deleted file mode 100644 index 6cdc4bb89..000000000 --- a/fcl/syst_variations/legacy/standard_g4_icarus_step2_variations.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "standard_g4_icarus_step2.fcl" - -process_name: G4step2Var diff --git a/fcl/syst_variations/nuonly_sample_gen.fcl b/fcl/syst_variations/nuonly_sample_gen.fcl deleted file mode 100644 index d507433a9..000000000 --- a/fcl/syst_variations/nuonly_sample_gen.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "prodcorsika_genie_standard_icarus.fcl" - -physics.simulate: [ rns, generator, beamgate ] \ No newline at end of file diff --git a/fcl/syst_variations/refactored_g4_icarus_step1.fcl b/fcl/syst_variations/refactored_g4_icarus_step1.fcl deleted file mode 100644 index c5ad5f245..000000000 --- a/fcl/syst_variations/refactored_g4_icarus_step1.fcl +++ /dev/null @@ -1,8 +0,0 @@ -#include "larg4_icarus_cosmics_sce_2d_drift.fcl" - -physics.simulate: [ rns - , loader - , largeant - ] - -process_name: G4Step1 \ No newline at end of file diff --git a/fcl/syst_variations/refactored_g4_icarus_step2.fcl b/fcl/syst_variations/refactored_g4_icarus_step2.fcl deleted file mode 100644 index 132caea4b..000000000 --- a/fcl/syst_variations/refactored_g4_icarus_step2.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "larg4_icarus_cosmics_sce_2d_drift.fcl" - -physics.simulate: [ rns - , ionization - , pdfastsim - , simdrift - , sedlite - , mcreco - , genericcrt - , simplemerge - ] - -process_name: G4Step2 \ No newline at end of file diff --git a/fcl/syst_variations/refactored_g4_icarus_step2_variations.fcl b/fcl/syst_variations/refactored_g4_icarus_step2_variations.fcl deleted file mode 100644 index f16b9de67..000000000 --- a/fcl/syst_variations/refactored_g4_icarus_step2_variations.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "larg4_icarus_cosmics_sce_2d_drift.fcl" - -physics.simulate: [ rns - , ionization - , pdfastsim - , simdrift - , sedlite - , mcreco - , genericcrt - , simplemerge - ] - -process_name: G4Step2Var \ No newline at end of file diff --git a/fcl/syst_variations/run_icarusMC_supera.fcl b/fcl/syst_variations/run_icarusMC_supera.fcl deleted file mode 100644 index 9751d2271..000000000 --- a/fcl/syst_variations/run_icarusMC_supera.fcl +++ /dev/null @@ -1,36 +0,0 @@ -#include "services_common_icarus.fcl" -#include "channelmapping_icarus.fcl" - -process_name: Supera - -services: -{ - RandomNumberGenerator: {} - NuRandomService: @local::random_NuRandomService - IICARUSChannelMap: @local::icarus_channelmappinggservice - @table::icarus_wirecalibration_services -} - -source: -{ - module_type: RootInput -} - -physics: -{ - analyzers: - { - supera: - { - module_type: "LArSoftSuperaDriver" - supera_params: "supera_icarus_MC_all_cryo_PMT_CRT.fcl" - out_filename: "larcv.root" - unique_filename: true - stream: "mc" - Verbosity: 2 - StrictDataLoading: false - } - } - analyze: [supera] - end_paths: [analyze] -} \ No newline at end of file diff --git a/fcl/syst_variations/scrub_stage1_qechange_variations_icarus.fcl b/fcl/syst_variations/scrub_stage1_qechange_variations_icarus.fcl deleted file mode 100644 index 8b38e2a17..000000000 --- a/fcl/syst_variations/scrub_stage1_qechange_variations_icarus.fcl +++ /dev/null @@ -1,38 +0,0 @@ -# This fcl purely removes products made in the post-G4step1 processes. -# This allows for keeping the identical simulated event on the file and running -# a variation of the downstream detector simulation / reconstruction. -# -# Author Jacob Zettlemoyer (jzettle@fnal.gov), originally implemented by H. Lay for SBND - -#include "rootoutput_icarus.fcl" - -process_name: Scrub - -source: -{ - module_type: RootInput - inputCommands: [ "keep *_*_*_*", - "drop *_*_*_G4step1", - "drop *_*_*_G4step2", - "drop *_*_*_DetSim", - "drop *_*_*_MCstage0", - "drop *_*_*_MCstage1" ] -} - -outputs: -{ - out1: - { - compressionLevel: 1 - dataTier: "simulated" - fileName: "Scrubbed_%tc.root" - module_type: "RootOutput" - saveMemoryObjectThreshold: 0 - } -} - -physics: -{ - stream1: [ out1 ] - end_paths: [ stream1 ] -} \ No newline at end of file diff --git a/fcl/syst_variations/scrub_stage1_variations_icarus.fcl b/fcl/syst_variations/scrub_stage1_variations_icarus.fcl deleted file mode 100644 index 49cd7127e..000000000 --- a/fcl/syst_variations/scrub_stage1_variations_icarus.fcl +++ /dev/null @@ -1,37 +0,0 @@ -# This fcl purely removes products made in the post-G4step1 processes. -# This allows for keeping the identical simulated event on the file and running -# a variation of the downstream detector simulation / reconstruction. -# -# Author Jacob Zettlemoyer (jzettle@fnal.gov), originally implemented by H. Lay for SBND - -#include "rootoutput_icarus.fcl" - -process_name: Scrub - -source: -{ - module_type: RootInput - inputCommands: [ "keep *_*_*_*", - "drop *_*_*_G4step2", - "drop *_*_*_DetSim", - "drop *_*_*_MCstage0", - "drop *_*_*_MCstage1" ] -} - -outputs: -{ - out1: - { - compressionLevel: 1 - dataTier: "simulated" - fileName: "Scrubbed_%tc.root" - module_type: "RootOutput" - saveMemoryObjectThreshold: 0 - } -} - -physics: -{ - stream1: [ out1 ] - end_paths: [ stream1 ] -} \ No newline at end of file diff --git a/fcl/syst_variations/stage0_variation_icarus_refactored.fcl b/fcl/syst_variations/stage0_variation_icarus_refactored.fcl deleted file mode 100644 index a17d21381..000000000 --- a/fcl/syst_variations/stage0_variation_icarus_refactored.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage0_run2_icarus_mc_refactored.fcl" - -process_name: MCStage0Var \ No newline at end of file diff --git a/fcl/syst_variations/stage0_variation_icarus_savewires.fcl b/fcl/syst_variations/stage0_variation_icarus_savewires.fcl deleted file mode 100644 index 7c6a131e7..000000000 --- a/fcl/syst_variations/stage0_variation_icarus_savewires.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage0_variation_icarus_refactored.fcl" - -outputs.rootOutput.outputCommands: ["keep *_*_*_*"] \ No newline at end of file diff --git a/fcl/syst_variations/stage1_variation_icarus_nuonly.fcl b/fcl/syst_variations/stage1_variation_icarus_nuonly.fcl deleted file mode 100644 index a30fa41a1..000000000 --- a/fcl/syst_variations/stage1_variation_icarus_nuonly.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "stage1_run2_1d_larcv_icarus_Nu.fcl" - -process_name: MCstage1Var \ No newline at end of file diff --git a/fcl/syst_variations/stage1_variation_icarus_saveallcalibtracks.fcl b/fcl/syst_variations/stage1_variation_icarus_saveallcalibtracks.fcl deleted file mode 100644 index e2d99ff0a..000000000 --- a/fcl/syst_variations/stage1_variation_icarus_saveallcalibtracks.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "stage1_run2_1d_icarus_MC.fcl" - -process_name: MCstage1Var - -icarus_stage1_analyzers.caloskimE: @local::caloskim_cryoe_nodigits_goldentracks_not0 -icarus_stage1_analyzers.caloskimW: @local::caloskim_cryow_nodigits_goldentracks_not0 \ No newline at end of file diff --git a/icaruscode/CRT/CMakeLists.txt b/icaruscode/CRT/CMakeLists.txt index 08cd40883..f3bb9c332 100644 --- a/icaruscode/CRT/CMakeLists.txt +++ b/icaruscode/CRT/CMakeLists.txt @@ -1,6 +1,25 @@ add_subdirectory(CRTUtils) add_subdirectory(CRTDecoder) +add_subdirectory(CRTLegacyCode) +art_make_library( + LIBRARY_NAME + icaruscode_CRTMatchingUtils + SOURCE + CRTUtils/CRTMatchingUtils.cxx + LIBRARIES + fhiclcpp::fhiclcpp + canvas::canvas + lardataobj::RecoBase + lardata::Utilities + lardata::ArtDataHelper + larcorealg::Geometry + lardataalg::DetectorInfo + sbnobj::Common_CRT + cetlib::cetlib + messagefacility::MF_MessageLogger + ROOT::Matrix + ) cet_build_plugin(CRTDetSim art::module LIBRARIES @@ -55,22 +74,6 @@ cet_build_plugin( CRTTrueHitProducer art::module cetlib::cetlib ) -cet_build_plugin(CRTTzeroProducer art::module - LIBRARIES - larcorealg::Geometry - sbnobj::ICARUS_CRT - sbnobj::Common_CRT - art_root_io::TFileService_service - lardataalg::DetectorInfo - nurandom::RandomUtils_NuRandomService_service - art::Framework_Services_Registry - art::Framework_Services_Optional_RandomNumberGenerator_service - messagefacility::MF_MessageLogger - messagefacility::headers - CLHEP::CLHEP - lardata::Utilities - ) - cet_build_plugin(CRTTrackProducer art::module LIBRARIES larcorealg::Geometry @@ -296,75 +299,6 @@ cet_build_plugin( PhotBackground art::module ROOT::Tree ) -cet_build_plugin(CRTT0Matching art::module - LIBRARIES - sbnobj::Common_CRT - icaruscode_CRTUtils - larcore::Geometry_Geometry_service - larsim::Simulation lardataobj::Simulation - larsim::MCCheater_BackTrackerService_service - larsim::MCCheater_ParticleInventoryService_service - lardata::Utilities - larevt::Filters - lardataobj::RawData - lardataobj::RecoBase - lardataobj::AnalysisBase - lardata::RecoObjects - larpandora::LArPandoraInterface - larcorealg::Geometry - nusimdata::SimulationBase - art::Framework_Core - art::Framework_Principal - art::Framework_Services_Registry - art_root_io::tfile_support - art_root_io::TFileService_service - art::Persistency_Common canvas::canvas - art::Persistency_Provenance - art::Utilities - messagefacility::MF_MessageLogger - ROOT::Core - ROOT::Geom - ROOT::XMLIO - ROOT::Gdml - ROOT::Tree - ROOT::Spectrum - ROOT::RooFit - ROOT::RooFitCore -) - - -cet_build_plugin(CRTT0MatchingAna art::module - LIBRARIES - sbnobj::ICARUS_CRT - sbnobj::Common_CRT - icaruscode_CRTUtils - larcorealg::Geometry - larcore::Geometry_Geometry_service - larsim::Simulation lardataobj::Simulation - larsim::MCCheater_BackTrackerService_service - larsim::MCCheater_ParticleInventoryService_service - lardata::Utilities - larevt::Filters - lardataobj::RawData - lardataobj::RecoBase - lardataobj::AnalysisBase - lardata::RecoObjects - larpandora::LArPandoraInterface - larcorealg::Geometry - nusimdata::SimulationBase - art::Persistency_Common canvas::canvas - art::Persistency_Provenance - art::Utilities - ROOT::Core - ROOT::Tree - ROOT::Geom - ROOT::XMLIO - ROOT::Gdml - ROOT::Spectrum - ROOT::RooFit - ROOT::RooFitCore -) - cet_build_plugin(CRTTPCMatchingAna art::module LIBRARIES sbnobj::ICARUS_CRT @@ -426,6 +360,27 @@ simple_plugin(CRTTPCTruthEff module ) +cet_build_plugin(CRTT0Tagging art::module + LIBRARIES + icaruscode::IcarusObj + icaruscode_CRTMatchingUtils + icaruscode_CRTUtils + sbnobj::Common_CRT + larcorealg::Geometry + lardataalg::DetectorInfo + larcore::Geometry_Geometry_service + larsim::Simulation lardataobj::Simulation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + lardata::headers + lardataobj::RecoBase + lardataobj::AnalysisBase + nusimdata::SimulationBase + art_root_io::TFileService_service + art_root_io::tfile_support + ROOT::Tree +) + install_headers() install_fhicl() diff --git a/icaruscode/CRT/CRTLegacyCode/CMakeLists.txt b/icaruscode/CRT/CRTLegacyCode/CMakeLists.txt new file mode 100644 index 000000000..26bceb946 --- /dev/null +++ b/icaruscode/CRT/CRTLegacyCode/CMakeLists.txt @@ -0,0 +1,89 @@ +cet_build_plugin(CRTTzeroProducer art::module + LIBRARIES + larcorealg::Geometry + sbnobj::ICARUS_CRT + sbnobj::Common_CRT + art_root_io::TFileService_service + lardataalg::DetectorInfo + nurandom::RandomUtils_NuRandomService_service + art::Framework_Services_Registry + art::Framework_Services_Optional_RandomNumberGenerator_service + messagefacility::MF_MessageLogger + messagefacility::headers + CLHEP::CLHEP + lardata::Utilities + ) + +cet_build_plugin(CRTT0Matching art::module + LIBRARIES + sbnobj::Common_CRT + icaruscode_CRTUtils + larcore::Geometry_Geometry_service + larsim::Simulation lardataobj::Simulation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + lardata::Utilities + larevt::Filters + lardataobj::RawData + lardataobj::RecoBase + lardataobj::AnalysisBase + lardata::RecoObjects + larpandora::LArPandoraInterface + larcorealg::Geometry + nusimdata::SimulationBase + art::Framework_Core + art::Framework_Principal + art::Framework_Services_Registry + art_root_io::tfile_support + art_root_io::TFileService_service + art::Persistency_Common canvas::canvas + art::Persistency_Provenance + art::Utilities + messagefacility::MF_MessageLogger + ROOT::Core + ROOT::Geom + ROOT::XMLIO + ROOT::Gdml + ROOT::Tree + ROOT::Spectrum + ROOT::RooFit + ROOT::RooFitCore +) + + +cet_build_plugin(CRTT0MatchingAna art::module + LIBRARIES + sbnobj::ICARUS_CRT + sbnobj::Common_CRT + icaruscode_CRTUtils + larcorealg::Geometry + larcore::Geometry_Geometry_service + larsim::Simulation lardataobj::Simulation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + lardata::Utilities + larevt::Filters + lardataobj::RawData + lardataobj::RecoBase + lardataobj::AnalysisBase + lardata::RecoObjects + larpandora::LArPandoraInterface + larcorealg::Geometry + nusimdata::SimulationBase + art::Persistency_Common canvas::canvas + art::Persistency_Provenance + art::Utilities + ROOT::Core + ROOT::Tree + ROOT::Geom + ROOT::XMLIO + ROOT::Gdml + ROOT::Spectrum + ROOT::RooFit + ROOT::RooFitCore +) + + +install_headers() +install_fhicl() +install_source() diff --git a/icaruscode/CRT/CRTT0MatchingAna_module.cc b/icaruscode/CRT/CRTLegacyCode/CRTT0MatchingAna_module.cc similarity index 100% rename from icaruscode/CRT/CRTT0MatchingAna_module.cc rename to icaruscode/CRT/CRTLegacyCode/CRTT0MatchingAna_module.cc diff --git a/icaruscode/CRT/CRTT0Matching_module.cc b/icaruscode/CRT/CRTLegacyCode/CRTT0Matching_module.cc similarity index 100% rename from icaruscode/CRT/CRTT0Matching_module.cc rename to icaruscode/CRT/CRTLegacyCode/CRTT0Matching_module.cc diff --git a/icaruscode/CRT/CRTTzeroProducer_module.cc b/icaruscode/CRT/CRTLegacyCode/CRTTzeroProducer_module.cc similarity index 100% rename from icaruscode/CRT/CRTTzeroProducer_module.cc rename to icaruscode/CRT/CRTLegacyCode/CRTTzeroProducer_module.cc diff --git a/icaruscode/CRT/crtt0matching_icarus.fcl b/icaruscode/CRT/CRTLegacyCode/crtt0matching_icarus.fcl similarity index 100% rename from icaruscode/CRT/crtt0matching_icarus.fcl rename to icaruscode/CRT/CRTLegacyCode/crtt0matching_icarus.fcl diff --git a/icaruscode/CRT/crtt0matchingana_icarus.fcl b/icaruscode/CRT/CRTLegacyCode/crtt0matchingana_icarus.fcl similarity index 100% rename from icaruscode/CRT/crtt0matchingana_icarus.fcl rename to icaruscode/CRT/CRTLegacyCode/crtt0matchingana_icarus.fcl diff --git a/icaruscode/CRT/crtt0producer_icarus.fcl b/icaruscode/CRT/CRTLegacyCode/crtt0producer_icarus.fcl similarity index 100% rename from icaruscode/CRT/crtt0producer_icarus.fcl rename to icaruscode/CRT/CRTLegacyCode/crtt0producer_icarus.fcl diff --git a/icaruscode/CRT/crttzeroproducer_icarus.fcl b/icaruscode/CRT/CRTLegacyCode/crttzeroproducer_icarus.fcl similarity index 100% rename from icaruscode/CRT/crttzeroproducer_icarus.fcl rename to icaruscode/CRT/CRTLegacyCode/crttzeroproducer_icarus.fcl diff --git a/icaruscode/CRT/CRTT0Tagging_module.cc b/icaruscode/CRT/CRTT0Tagging_module.cc new file mode 100644 index 000000000..785be76e1 --- /dev/null +++ b/icaruscode/CRT/CRTT0Tagging_module.cc @@ -0,0 +1,588 @@ +/** + * @file icaruscode/CRT/CRTT0Tagging_module.cc + * @author Francesco Poppi (poppi@bo.infn.it) + * @date October 2024 + */ + +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "icaruscode/CRT/CRTUtils/CRTMatchingUtils.h" +#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh" +#include "sbnobj/Common/CRT/CRTHitT0TaggingTruthInfo.hh" +#include "icaruscode/CRT/CRTUtils/RecoUtils.h" +#include "icaruscode/CRT/CRTUtils/CRTCommonUtils.h" +// Framework includes +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Run.h" +#include "canvas/Utilities/Exception.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "canvas/Persistency/Common/PtrVector.h" +#include "art/Persistency/Common/PtrMaker.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindOne.h" +#include "art_root_io/TFileService.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include +#include +#include +#include +#include // std::abs(), std::hypot() +// LArSoft +#include "larcorealg/Geometry/GeometryCore.h" +#include "larcorealg/CoreUtils/zip.h" +#include "lardataobj/AnalysisBase/T0.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom() +#include "larcore/Geometry/Geometry.h" +#include "larcore/Geometry/WireReadout.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "larsim/MCCheater/BackTrackerService.h" +#include "larsim/MCCheater/ParticleInventoryService.h" +// ROOT +#include "TTree.h" + +namespace icarus::crt { + +class CRTT0Tagging; + +} // namespace icarus::crt + +using namespace icarus::crt; + +class icarus::crt::CRTT0Tagging : public art::EDProducer { +public: + + using CRTHit = sbn::crt::CRTHit; + //using CRTPMTMatching = sbn::crt::CRTPMTMatching; + + explicit CRTT0Tagging(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. + CRTT0Tagging(CRTT0Tagging const&) = delete; + CRTT0Tagging(CRTT0Tagging&&) = delete; + CRTT0Tagging& operator=(CRTT0Tagging const&) = delete; + CRTT0Tagging& operator=(CRTT0Tagging&&) = delete; + + // Required functions. + bool hasModID(std::uint32_t modID, sbn::crt::CRTHit const& crthit); + //void beginRun(art::Run& r) override; + void beginJob() override; + void produce(art::Event& e) override; + +private: + + // Declare member data here. + + // MC Truth + art::InputTag fSimulationProducerLabel; + art::InputTag fAuxDetSimProducerLabel; + //art::InputTag fCRTSimHitProducerLabel; + //art::InputTag fCRTTrueHitProducerLabel; + //art::InputTag fCRTDetSimProducerLabel; + //art::InputTag fCRTSimTrackProducerLabel; + art::InputTag fSimChannelProducerLabel; + + art::InputTag fCrtHitModuleLabel; + + std::vector fTPCTrackLabel; ///< labels for source of tracks + std::vector fPFParticleLabel; ///< labels for source of PFParticle + std::vector fHitLabel; ///< labels for source of hits + std::vector fTRKHMLabel; ///< labels for hit metadata + + art::ServiceHandle tfs; + + CRTCommonUtils fCrtUtils; + CRTMatchingAlg fMatchingAlg; + geo::GeometryCore const* fGeometryService; ///< pointer to Geometry provider + + + double fMinimalTrackLength; + int fMinimumGoodHits; + double fMaximalCRTDistance; + double fGoodCandidateDistance; + double fMaximumDeltaT; + bool fData; + bool fSkipTruth; + + icarus::crt::dataTools::TopCRTCentersMap fTopCRTCenterMap; + icarus::crt::dataTools::TopCRTTransformations fTopCRTTransformations; + + TTree* fTree; + int fEvent; ///< number of the event being processed + int fRun; ///< number of the run being processed + int fSubRun; ///< number of the sub-run being processed + int fCrtRegion; + int fCrtSys; + int fCryo; + double fTrackLength; + double fFirstEigenValue; + double fSecondEigenValue; + double fThirdEigenValue; + double fTrackCrtDistance; + double fTrackCrtDeltaX; + double fTrackCrtDeltaY; + double fTrackCrtDeltaZ; + double fCrtX; + double fCrtY; + double fCrtZ; + double fCrossPointX; + double fCrossPointY; + double fCrossPointZ; + bool fTrueMatch; + +}; + +icarus::crt::CRTT0Tagging::CRTT0Tagging(fhicl::ParameterSet const& p) + : EDProducer{p}, + fSimulationProducerLabel(p.get("SimulationLabel","largeant")), + fAuxDetSimProducerLabel(p.get("AuxDetSimProducerLabel","genericcrt")), + fSimChannelProducerLabel(p.get("SimChannelProducer", {"daq:simpleSC"})), + fCrtHitModuleLabel(p.get("CrtHitModuleLabel", "crthit")), + fTPCTrackLabel(p.get< std::vector >("TPCTrackLabel", {""})), + fPFParticleLabel(p.get< std::vector >("PFParticleLabel", {""})), + fHitLabel(p.get< std::vector >("HitLabel", {""})), + fTRKHMLabel(p.get< std::vector > ("TRKHMLabel", {""})), + fMatchingAlg(p.get ("MatchingAlg")), + fGeometryService(lar::providerFrom()), + fMinimalTrackLength(p.get("MinimalTrackLength", 40.0)), + fMinimumGoodHits(p.get("MinimumGoodHits", 5)), + fMaximalCRTDistance(p.get("MaximalCRTDistance", 300.)), + fGoodCandidateDistance(p.get("GoodCandidateDistance", 100.)), + fMaximumDeltaT(p.get("MaximumDeltaT", 10000.)), + fData(p.get("isData", true)), + fSkipTruth(p.get("skipTruth", false)) +{ + + produces< std::vector >(); + produces< art::Assns >(); + produces< art::Assns >(); + produces< std::vector >(); + produces< art::Assns >(); + produces< art::Assns >(); + produces< art::Assns >(); + produces< std::vector >(); + produces< art::Assns >(); + + if (fTPCTrackLabel.size() != fPFParticleLabel.size()) { + throw art::Exception{ art::errors::Configuration } + << fTPCTrackLabel.size() << " TPC track data products configured (`TPCTrackLabel`), should have been " + << fPFParticleLabel.size(); + } + if (fHitLabel.size() != fPFParticleLabel.size()) { + throw art::Exception{ art::errors::Configuration } + << fHitLabel.size() << " TPC hit data products configured (`HitLabel`), should have been " + << fPFParticleLabel.size(); + } + + if (fTRKHMLabel.size() > fPFParticleLabel.size()) { + throw art::Exception{ art::errors::Configuration } + << fTRKHMLabel.size() << " track-hit metadata data products configured (`TRKHMproducer`), should have been " + << fPFParticleLabel.size(); + } + fTRKHMLabel.resize(fPFParticleLabel.size()); // extend with empty labels + // replace empty defaults with the actual input tag value, assumed the same as tracks + for (std::size_t i = 0; i < fTRKHMLabel.size(); ++i) + if (fTRKHMLabel[i].empty()) fTRKHMLabel[i] = fTPCTrackLabel[i]; + +} + +bool icarus::crt::CRTT0Tagging::hasModID(std::uint32_t modID, sbn::crt::CRTHit const& crthit){ + for(auto const& mactopes: crthit.pesmap){ + for(auto const& chanpe: mactopes.second){ + int thisModID=(int)fCrtUtils.MacToAuxDetID(mactopes.first, chanpe.first); + if(thisModID==(int)modID) return true; + } + } + return false; +} + +//void icarus::crt::CRTT0Tagging::beginRun(art::Run& r) +void icarus::crt::CRTT0Tagging::beginJob() +{ + fTopCRTCenterMap=icarus::crt::dataTools::LoadTopCRTCenters(); + fTopCRTTransformations=icarus::crt::dataTools::LoadTopCRTTransformations(); + + fTree = tfs->make("matchTree","CRTHit - TPC track matching analysis"); + + fTree->Branch("Event", &fEvent, "Event/I"); + fTree->Branch("SubRun", &fSubRun, "SubRun/I"); + fTree->Branch("Run", &fRun, "Run/I"); + fTree->Branch("Cryo", &fCryo, "Cryo/I"); + fTree->Branch("CrtSys", &fCrtSys, "CrtSys/I"); + fTree->Branch("CrtRegion", &fCrtRegion, "CrtRegion/I"); + fTree->Branch("TrackLength", &fTrackLength ); + fTree->Branch("FirstEigenValue", &fFirstEigenValue ); + fTree->Branch("SecondEigenValue", &fSecondEigenValue ); + fTree->Branch("ThirdEigenValue", &fThirdEigenValue ); + fTree->Branch("TrackCrtDistance", &fTrackCrtDistance ); + fTree->Branch("TrackCrtDeltaX", &fTrackCrtDeltaX ); + fTree->Branch("TrackCrtDeltaY", &fTrackCrtDeltaY ); + fTree->Branch("TrackCrtDeltaZ", &fTrackCrtDeltaZ ); + fTree->Branch("CrtX", &fCrtX ); + fTree->Branch("CrtY", &fCrtY ); + fTree->Branch("CrtZ", &fCrtZ ); + fTree->Branch("CrossPointX", &fCrossPointX ); + fTree->Branch("CrossPointY", &fCrossPointY ); + fTree->Branch("CrossPointZ", &fCrossPointZ ); + fTree->Branch("TrueMatch", &fTrueMatch ); +} + +void icarus::crt::CRTT0Tagging::produce(art::Event& e) +{ + auto const clockData = art::ServiceHandle()->DataFor(e); + auto const detProp = art::ServiceHandle()->DataFor(e, clockData); + const geo::WireReadoutGeom *wireReadout = &art::ServiceHandle()->Get(); + + mf::LogDebug("CRTT0Tagging: ") << "beginning production" << '\n'; + + auto t0col = std::make_unique< std::vector > (); + auto trackAssn = std::make_unique< art::Assns >(); + auto t0CrtHitAssn = std::make_unique< art::Assns >(); + auto matchInfoCol = std::make_unique< std::vector >(); + auto matchInfoTruthCol = std::make_unique< std::vector >(); + + auto pfpAssn = std::make_unique< art::Assns >(); + auto trackMatchInfoAssn = std::make_unique< art::Assns >(); + auto pfpMatchInfoAssn = std::make_unique< art::Assns >(); + + auto truthAssn = std::make_unique< art::Assns >(); + + art::PtrMaker makeT0ptr{ e }; // create art pointers to the new T0 + art::PtrMaker makeMatchInfoPtr{ e }; // create art pointers to the CRTHitT0TaggingInfo + art::PtrMaker makeMatchTruthInfoPtr{ e }; // create art pointers to the CRTHitT0TaggingTruthInfo + + std::map< int, const simb::MCParticle*> particleMap; + std::map,std::vector> crtParticleMap; + std::map isNuMap; + std::vector> simchannels; + + // CRTHits + std::vector> CRTHitList; + art::ValidHandle> crthits = e.getValidHandle>(fCrtHitModuleLabel); + art::fill_ptr_vector(CRTHitList, crthits); + + // If it is not data is MC. + // Retrieving MC truth information. + // Three maps (particleMap, crtParticleMap and isNuMap) are filled. + // -> particleMap maps truth level informations for all the MC particles. The key is the Geant4 TrackID + // -> crtParticleMap maps the CRTHits at truth level. The key is a pair of reconstructed CRT Hit module and time. + // The object of the map is a vector of Geant4 Track IDs of the particles that generated that hit. + // -> isNuMap maps the reconstructed tracks. The key is the Track ID and the object is a boolean True/False if + // the Track was a neutrino related interaction or not. + if(!fData){ + if(fSkipTruth){ + mf::LogInfo("CRTT0Tagging") <<"This is MC, but MC truth is not considered!"; + } else{ + mf::LogInfo("CRTT0Tagging") <<"This is MC, MC truth is considered!"; + } + } + if(!fData && !fSkipTruth){ + art::ServiceHandle partInventory; + + art::Handle< std::vector> simChannelHandle; + if (!e.getByLabel(fSimChannelProducerLabel, simChannelHandle)){ + throw cet::exception("CRTT0Tagging") + << " No sim::SimChannel objects in this event - " + << " Line " << __LINE__ << " in file " << __FILE__ << std::endl; + } + art::fill_ptr_vector(simchannels, simChannelHandle); + + // Define "handle" to Generator level MCTruth objects + art::Handle< vector> genHandle; + // Define a "handle" to point to a vector of MCParticle objects. + art::Handle< vector > particleHandle; + + if (!e.getByLabel("generator", genHandle)) { + std::cout << "could not get handle to gen objects!!!" << std::endl; + } + + if (!e.getByLabel(fSimulationProducerLabel, particleHandle)) { + // If we have no MCParticles at all in an event, but we are requiring + // to have MC truth information, throw exception. + throw cet::exception("CRTT0Tagging") + << " No simb::MCParticle objects in this event - " + << " Line " << __LINE__ << " in file " << __FILE__ << std::endl; + } + + // Handle to AuxDetSimChannel (CRT module) objects generated by LArG4 + art::Handle > auxDetSimChannelHandle; + if (!e.getByLabel(fAuxDetSimProducerLabel, auxDetSimChannelHandle)) { + throw cet::exception("CRTT0Tagging") + << " No sim::AuxDetSimChannel objects in this event - " + << " Line " << __LINE__ << " in file " << __FILE__ << std::endl; + } + //if((*genHandle).size()>1) + // throw cet::exception("CRTT0Tagging") << "gen stage MCParticle vector has more than 1 entry!" << '\n'; + for ( auto const& particle : (*particleHandle) ){ + // Add the address of the MCParticle to the map, with the + // track ID as the key. + particleMap[particle.TrackId()] = &particle; + art::Ptr mcTruth=partInventory->ParticleToMCTruth_P(&particle); + + bool isNu=false; + + if (mcTruth->Origin() == simb::kBeamNeutrino) isNu=true; + + isNuMap[particle.TrackId()] = isNu; + + for ( auto const& channel : (*auxDetSimChannelHandle) ){ + auto const& auxDetIDEs = channel.AuxDetIDEs(); + for ( auto const& ide : auxDetIDEs ){ + if ( ide.trackID != particle.TrackId() ) continue; + if ( ide.energyDeposited * 1.0e6 < 50 ) continue; // skip energy deposits of less then 50 keV + size_t adid = channel.AuxDetID(); + uint32_t region=fCrtUtils.AuxDetRegionNameToNum(fCrtUtils.GetAuxDetRegion(adid)); + uint32_t modID=channel.AuxDetID(); + float aveT = (ide.entryT + ide.exitT) / 2.0; + for(auto const& crthit : CRTHitList){ + if(crthit->plane!=(int)region) continue; + if(abs(aveT-crthit->ts1_ns)>200) continue; + bool modFound=hasModID(modID, *crthit); + if(!modFound)continue; + std::pair thisMatch = std::make_pair((int)crthit->feb_id[0],crthit->ts1_ns); + crtParticleMap[thisMatch].push_back(particle.TrackId()); + } // CRT Hits loop + } // Energy deposits loop + } // CRT sim channels loop + } // MC particles loop + } // End MC Only + for(const auto& [ PFPLabel, TPCTrackLabel, HitLabel, TRKHMLabel ]: util::zip(fPFParticleLabel, fTPCTrackLabel, fHitLabel, fTRKHMLabel)){ + std::vector> PFParticleList; + art::ValidHandle> pfparticles = e.getValidHandle>(PFPLabel); + art::fill_ptr_vector(PFParticleList, pfparticles); + + // Pandora MetaData + art::FindOne fmt0pandora(pfparticles, e, PFPLabel); + art::FindOne PFPMetaDataAssoc(pfparticles, e, PFPLabel); + + // Tracks + art::ValidHandle> tracks = e.getValidHandle>(TPCTrackLabel); + + // Track - associated data + art::FindManyP fmTracks(PFParticleList, e, TPCTrackLabel); + + // Collect all hits + art::ValidHandle> allhit_handle = e.getValidHandle>(HitLabel); + std::vector> allHits; + art::fill_ptr_vector(allHits, allhit_handle); + + std::map>> id_to_ide_map; + std::map>> id_to_truehit_map; + if(!simchannels.empty() && !fData){ + art::ServiceHandle btServ; + // ID (TrackID) refers to the reconstructed TrackID, it is not the Geant4 ID. + id_to_ide_map = RecoUtils::PrepSimChannels(simchannels, *wireReadout); + id_to_truehit_map = RecoUtils::buildTrackIDtoHitsMap(allHits, clockData, *btServ.get()); + } + // Start looping on the particles + for (art::Ptr const& p_pfp: PFParticleList) { + const std::vector> thisTrack = fmTracks.at(p_pfp.key()); + if (thisTrack.size() != 1) continue; + art::Ptr trkPtr = thisTrack.at(0); + const recob::Track &track = *trkPtr; + if(track.Length() fmtrkHits(tracks, e, thm_label); + std::vector> emptyHitVector; + const std::vector> &trkHits = fmtrkHits.isValid() ? fmtrkHits.at(trkPtr.key()) : emptyHitVector; + std::vector emptyTHMVector; + const std::vector &trkHitMetas = fmtrkHits.isValid() ? fmtrkHits.data(trkPtr.key()) : emptyTHMVector; + int trueTrackId=-9; + if(!fData) trueTrackId= abs(RecoUtils::TrueParticleIDFromTotalRecoHits(clockData, trkHits, false)); + // T0 + double t0 = std::numeric_limits::signaling_NaN(); + if( auto const& t0ref = fmt0pandora.at(p_pfp.key())) t0 = t0ref.ref().Time(); + + int goodHits=0; + int countE=0, countW=0; + + // These counters are used to determine if track is CC-E, EE, EW, CC-W, WE, WW + // depending on the track type, the Top CRT uses the appropriate position corrections + std::vector ht; + std::vector positionVector; + for(auto const& [trkHit, trkHitMeta]: util::zip(trkHits, trkHitMetas)){ + bool badhit = (trkHitMeta->Index() == std::numeric_limits::max()) || + (!track.HasValidPoint(trkHitMeta->Index())); + if(badhit) continue; + geo::Point_t loc = track.LocationAtPoint(trkHitMeta->Index()); + positionVector.push_back(loc); + ht.push_back(trkHit->PeakTime()); + goodHits++; + if(trkHit->WireID().TPC==0 || trkHit->WireID().TPC==1) countE++; + else countW++; + } + if(goodHitsWireID().Cryostat; + if(countW!=0 && countE!=0 && cryo==0) trackType=0; //CCEast + else if(countW!=0 && countE==0 && cryo==0) trackType=2; //East-West + else if(countW==0 && countE!=0 && cryo==0) trackType=1; //East-East + else if(countW!=0 && countE!=0 && cryo==1) trackType=3; //CCWest + else if(countW!=0 && countE==0 && cryo==1) trackType=5; //West-West + else if(countW==0 && countE!=0 && cryo==1) trackType=4; //West-East + icarus::crt::dataTools::TopCRTCorrectionMap TopCRTCorrection; + if(trackType==0) TopCRTCorrection=fTopCRTTransformations.EastCC; + else if(trackType==1) TopCRTCorrection=fTopCRTTransformations.EE; + else if(trackType==2) TopCRTCorrection=fTopCRTTransformations.EW; + else if(trackType==3) TopCRTCorrection=fTopCRTTransformations.WestCC; + else if(trackType==4) TopCRTCorrection=fTopCRTTransformations.WE; + else if(trackType==5) TopCRTCorrection=fTopCRTTransformations.WW; + + std::vector crtCands; + for(art::Ptr const& p_crthit: CRTHitList){ + const CRTHit &crtHit = *p_crthit; + double crtTime=crtHit.ts1_ns/1e3; + // If the Track has a Pandora T0, this is also used to look for compatible CRT Hits + if(!isnan(t0)){ + if(fabs(t0-crtHit.ts1_ns)>fMaximumDeltaT) continue; + } + icarus::crt::DriftedTrack thisDriftedTrack = fMatchingAlg.DriftTrack(trkHits, trkHitMetas, fGeometryService, wireReadout, detProp, clockData, crtTime, track, 0); + if(thisDriftedTrack.outbound>0) continue; + icarus::crt::PCAResults driftedPCAResults=fMatchingAlg.PCAfit(thisDriftedTrack.sp); + icarus::crt::TranslationVector translVector = {driftedPCAResults.eigenVector1, driftedPCAResults.mean}; + int crtSys=fCrtUtils.MacToTypeCode(crtHit.feb_id[0]); + if(crtSys==2) continue; // lets discard Bottom CRT Hits for the moment + + geo::Point_t delta = {std::numeric_limits::signaling_NaN(), std::numeric_limits::signaling_NaN(), std::numeric_limits::signaling_NaN()}; + + double crtDistance=std::numeric_limits::signaling_NaN(); + + icarus::crt::CRTPlane thisCRTPlane = fMatchingAlg.DeterminePlane(crtHit); + icarus::crt::CrossingPoint crossPoint = fMatchingAlg.DetermineProjection(translVector, thisCRTPlane); + + geo::Point_t CRTHitCoordinate = {crtHit.x_pos, crtHit.y_pos, crtHit.z_pos}; + + if(fData && fTopCRTTransformations.imported){ // Realignment only applies to Data, not MC + if(crtSys==0){ + CRTHitCoordinate = icarus::crt::dataTools::ApplyTransformation(crtHit, TopCRTCorrection, fTopCRTCenterMap); + } + } + delta=CRTHitCoordinate-crossPoint; + crtDistance=std::hypot(delta.X(), delta.Y(), delta.Z()); + if(crtDistance>fMaximalCRTDistance) continue; + icarus::crt::CandCRT thisCrtCand={crtHit,p_crthit, thisCRTPlane.first, crtDistance, delta, crossPoint}; + crtCands.push_back(thisCrtCand); + } // End of CRT Hit loop + if(crtCands.empty()) { + mf::LogDebug("CRTT0Tagging:")<<"No Good CRT match candidates for this track"; + continue; + } + auto minElementIt = std::min_element(crtCands.begin(), crtCands.end(), [](const icarus::crt::CandCRT& a, const icarus::crt::CandCRT& b) { + return a.distance < b.distance; + }); + icarus::crt::CandCRT& bestCrtCand=*minElementIt; + if(bestCrtCand.distance<=fGoodCandidateDistance){ + int matchedSys=fCrtUtils.MacToTypeCode(bestCrtCand.CRThit.feb_id[0]); + if(matchedSys==2) continue; // lets discard Bottom CRT Hits for the moment + bool truthFound=false; + bool trueMatch=false; + bool truthIsNu=false; + int trueG4TrackId=std::numeric_limits::lowest(); + int truePdg=std::numeric_limits::lowest(); + + if(!fData && !fSkipTruth){ + std::vector crtTracks, crtPdgs; + std::pair thisMatch=std::make_pair((int)bestCrtCand.CRThit.feb_id[0], bestCrtCand.CRThit.ts1_ns); + auto const itMatch = crtParticleMap.find(thisMatch); + if(itMatch != crtParticleMap.end()){ + for(int trackID: itMatch->second){ + crtTracks.push_back(trackID); + crtPdgs.push_back(particleMap.at(trackID)->PdgCode()); + } + } + for(int trackID: crtTracks){ + if(trackID == trueTrackId){ + trueMatch=true; + break; + } + } + trueG4TrackId=abs(RecoUtils::TrueParticleIDFromTotalRecoHits(clockData, trkHits, false)); + if(trueG4TrackId==0){ + trueG4TrackId=std::numeric_limits::lowest(); + } else { + truthFound=true; + truthIsNu=isNuMap.at(trueG4TrackId); + truePdg=particleMap.at(trueG4TrackId)->PdgCode(); + } + } + icarus::crt::DriftedTrack thisMatchedDriftedTrack = fMatchingAlg.DriftTrack(trkHits, trkHitMetas, fGeometryService, wireReadout, detProp, clockData, bestCrtCand.CRThit.ts1_ns/1e3, track, 0); + icarus::crt::PCAResults driftedMatchedPCAResults=fMatchingAlg.PCAfit(thisMatchedDriftedTrack.sp); + fEvent=e.event(); + fRun=e.run(); + fCrtRegion=bestCrtCand.CRThit.plane; + fCrtSys=matchedSys; + fCryo=cryo; + fTrackLength=track.Length(); + fFirstEigenValue=driftedMatchedPCAResults.eigenValue1; + fSecondEigenValue=driftedMatchedPCAResults.eigenValue2; + fThirdEigenValue=driftedMatchedPCAResults.eigenValue3; + fTrackCrtDistance=bestCrtCand.distance; + fTrackCrtDeltaX=bestCrtCand.delta.X(); + fTrackCrtDeltaY=bestCrtCand.delta.Y(); + fTrackCrtDeltaZ=bestCrtCand.delta.Z(); + fCrtX=bestCrtCand.CRThit.x_pos; + fCrtY=bestCrtCand.CRThit.y_pos; + fCrtZ=bestCrtCand.CRThit.z_pos; + fCrossPointX=bestCrtCand.crossPoint.X(); + fCrossPointY=bestCrtCand.crossPoint.Y(); + fCrossPointZ=bestCrtCand.crossPoint.Z(); + fTrueMatch=trueMatch; + fTree->Fill(); + + sbn::crt::CRTTaggingTrackFit trackFit = sbn::crt::CRTTaggingTrackFit::pca; + sbn::crt::CRTTaggingMethod matchMethod = sbn::crt::CRTTaggingMethod::crtHits; + + mf::LogInfo("CRTT0Tagging") + <<"Matched CRT time = "<push_back(anab::T0(bestCrtCand.CRThit.ts1_ns, track.ID(), matchedSys, bestCrtCand.CRThit.plane,bestCrtCand.distance)); + art::Ptr const newT0ptr = makeT0ptr(t0col->size()-1); // index of the last T0 + trackAssn->addSingle(trkPtr, newT0ptr); + t0CrtHitAssn->addSingle(bestCrtCand.ptrCRThit, newT0ptr); + pfpAssn->addSingle(p_pfp, newT0ptr); + + sbn::crt::CRTHitT0TaggingInfo matchInfo {bestCrtCand.distance, matchedSys, bestCrtCand.CRThit.plane, bestCrtCand.CRThit.ts1_ns, bestCrtCand.delta.X(), bestCrtCand.delta.Y(), bestCrtCand.delta.Z(), bestCrtCand.crossPoint.X(), bestCrtCand.crossPoint.Y(), bestCrtCand.crossPoint.Z(), bestCrtCand.plane, driftedMatchedPCAResults.eigenVector1, trackFit, matchMethod}; + matchInfoCol->push_back(matchInfo); + + art::Ptr const newMatchInfoPtr = makeMatchInfoPtr(matchInfoCol->size()-1); // index of the last CRTHitT0TaggingInfo + trackMatchInfoAssn->addSingle(trkPtr, newMatchInfoPtr); + pfpMatchInfoAssn->addSingle(p_pfp, newMatchInfoPtr); + + if(!fData && !fSkipTruth){ + sbn::crt::CRTHitT0TaggingTruthInfo truthInfo {truthFound, trueMatch, trueG4TrackId, truePdg, truthIsNu}; + matchInfoTruthCol->push_back(truthInfo); + art::Ptr const newMatchTruthInfoPtr = makeMatchTruthInfoPtr(matchInfoTruthCol->size()-1); // index of the last CRTHitT0TaggingTruthInfo + truthAssn->addSingle(newMatchInfoPtr, newMatchTruthInfoPtr); + } + + } + } // End of Track Loop + } // End of Cryo Loop + e.put(std::move(t0col)); + e.put(std::move(trackAssn)); + e.put(std::move(t0CrtHitAssn)); + e.put(std::move(matchInfoCol)); + e.put(std::move(pfpAssn)); + e.put(std::move(trackMatchInfoAssn)); + e.put(std::move(pfpMatchInfoAssn)); + e.put(std::move(matchInfoTruthCol)); + e.put(std::move(truthAssn)); +} + +DEFINE_ART_MODULE(CRTT0Tagging) diff --git a/icaruscode/CRT/CRTUtils/CRTMatchingUtils.cxx b/icaruscode/CRT/CRTUtils/CRTMatchingUtils.cxx new file mode 100644 index 000000000..e82541436 --- /dev/null +++ b/icaruscode/CRT/CRTUtils/CRTMatchingUtils.cxx @@ -0,0 +1,206 @@ +/** + * @file icaruscode/CRT/CRTUtils/CRTMatchingUtils.cxx + * @author Francesco Poppi (poppi@bo.infn.it) + * @date January 2025 + */ + +#include "icaruscode/CRT/CRTUtils/CRTMatchingUtils.h" + +#include +#include +#include +#include +#include +#include +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "TMatrixD.h" +#include "TMatrixDSym.h" +#include "TMatrixDEigen.h" +#include "TMatrixDSymEigen.h" +#include "larcore/Geometry/WireReadout.h" +#include "larcore/Geometry/Geometry.h" +#include "larcore/CoreUtils/ServiceUtil.h" +namespace icarus::crt{ + + CRTMatchingAlg::CRTMatchingAlg(const fhicl::ParameterSet& pset) + { + this->reconfigure(pset); + return; + } + + CRTMatchingAlg::CRTMatchingAlg() = default; + + void CRTMatchingAlg::reconfigure(const fhicl::ParameterSet& pset) + { + fAllowedOffsetCM = pset.get("AllowedOffsetCM", 1.57); + return; + } + + PCAResults CRTMatchingAlg::PCAfit (std::vector const& sp) + { + int min=0; + int max=sp.size(); + int size=max-min; + double xavg=0, yavg=0, zavg=0; + for(int k=min; k sp, std::vector hw) + { + double average_x_charge=0, average_y_charge=0, average_z_charge=0, total_charge=0; + bool isGood; + for (unsigned i = 0; i < sp.size(); i++) { + if(isnan(sp[i].Z())) continue; + + if(sp[i].Z()>-1000 && sp[i].Z()<1000){ + average_z_charge+=sp[i].Z()*hw[i]; + average_y_charge+=sp[i].Y()*hw[i]; + average_x_charge+=sp[i].X()*hw[i]; + total_charge+=hw[i]; + } + } + average_z_charge=average_z_charge/total_charge; + average_y_charge=average_y_charge/total_charge; + average_x_charge=average_x_charge/total_charge; + if(total_charge==0) isGood=false; + else isGood=true; + TrackBarycenter ThisTrackBary = {average_x_charge, average_y_charge, average_z_charge, isGood}; + return ThisTrackBary; + } + + DriftedTrack CRTMatchingAlg::DriftTrack(const std::vector>& trkHits, const std::vector& trkHitMetas, const geo::GeometryCore *GeometryService, const geo::WireReadoutGeom *wireReadout, detinfo::DetectorPropertiesData const& detProp, detinfo::DetectorClocksData const& detClock, double time, const recob::Track& tpcTrack, int maxOutBoundPoints) const + { + int outBound=0; + std::vector recI; + std::vector driftedPositionVector; + for(size_t i=0; iIndex() == std::numeric_limits::max()) || + (!tpcTrack.HasValidPoint(trkHitMetas[i]->Index())); + if(badhit) continue; + geo::Point_t loc = tpcTrack.LocationAtPoint(trkHitMetas[i]->Index()); + const geo::TPCGeo& tpcGeo = GeometryService->TPC(trkHits[i]->WireID()); + const geo::PlaneGeo& planeGeo = wireReadout->Plane(trkHits[i]->WireID().planeID()); + double vDrift=detProp.DriftVelocity(); + + // recoX: distance of the hit charge from the plane + // * `trkHits[i]->PeakTime()-fTickAtAnode`: TPC ticks from the trigger to when charge gets to plane + // * `time`: t0 [CRT or Flash] (with respect to trigger) in TPC ticks + // * difference is how many ticks passed from the track to when charge gets to plane: drift ticks + double recoX=(trkHits[i]->PeakTime()-detClock.Time2Tick(detClock.TriggerTime())-time/detClock.TPCClock().TickPeriod())*detClock.TPCClock().TickPeriod()*vDrift; + //double plane=tpcGeo.PlanePtr(trkHits[i]->WireID().Plane)->GetCenter().X(); + double plane=planeGeo.GetCenter().X(); + double X=plane-tpcGeo.DriftDir().X()*recoX; + double AllowedRel = 1+fAllowedOffsetCM / abs(tpcGeo.GetCathodeCenter().X()-plane); + if(!tpcGeo.ActiveBoundingBox().ContainsX((X), AllowedRel)) outBound++; + if(outBound>maxOutBoundPoints) { + return {{},{},maxOutBoundPoints+1}; + } + driftedPositionVector.push_back({X, loc.Y(), loc.Z()}); + recI.push_back(trkHits[i]->Integral()); + } + DriftedTrack thisDriftedTrack = {driftedPositionVector, recI, outBound}; + return thisDriftedTrack; + } +} \ No newline at end of file diff --git a/icaruscode/CRT/CRTUtils/CRTMatchingUtils.h b/icaruscode/CRT/CRTUtils/CRTMatchingUtils.h new file mode 100644 index 000000000..c63441413 --- /dev/null +++ b/icaruscode/CRT/CRTUtils/CRTMatchingUtils.h @@ -0,0 +1,129 @@ +#ifndef ICARUSCODE_CRT_CRTUTILS_CRTMATCHINGUTILS_H +#define ICARUSCODE_CRT_CRTUTILS_CRTMATCHINGUTILS_H + +/** + * @file icaruscode/CRT/CRTUtils/CRTMatchingUtils.h + * @author Francesco Poppi (poppi@bo.infn.it) + * @date January 2025 + */ + +#include +#include // std::pair +#include + +#include "fhiclcpp/ParameterSet.h" +#include "canvas/Persistency/Common/Ptr.h" +// LArSoft headers +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/TrackHitMeta.h" +#include "larcorealg/Geometry/GeometryCore.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "lardataalg/DetectorInfo/DetectorPropertiesData.h" +#include "lardataalg/DetectorInfo/DetectorClocksData.h" +#include "lardataalg/DetectorInfo/DetectorClocks.h" +// Data product headers +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "sbnobj/Common/Trigger/ExtraTriggerInfo.h" +#include "sbnobj/Common/CRT/CRTPMTMatching.hh" + + + +namespace icarus::crt{ + +struct TrackBarycenter +{ + double BarX; // Track Barycenter X coordinate + double BarY; // Track Barycenter Y coordinate + double BarZ; // Track Barycenter Z coordinate + bool isGood; // Track Barycenter quality +}; + +struct DriftedTrack +{ + std::vector sp; // Drifted space points + std::vector spi; // Drifted Track Hit Points integral + int outbound; // Number of hit points out of the logical volume of the TPC + //double drifted_startx; + //double drifted_endx; +}; + +struct TranslationVector{ + geo::Vector_t dir; + geo::Point_t mean; +}; + +struct PCAResults{ + geo::Vector_t eigenVector1; // First EigenVector + geo::Vector_t eigenVector2; // Second EigenVector + geo::Vector_t eigenVector3; // Third EigenVector + double eigenValue1; // First EigenValue + double eigenValue2; // Second EigenValue + double eigenValue3; // Third EigenValue + geo::Point_t mean; // Mean X,Y,Z coordinates +}; + +using CrossingPoint = geo::Point_t; + +struct CandCRT{ + sbn::crt::CRTHit CRThit; + art::Ptr ptrCRThit; + int plane; + double distance; + geo::Point_t delta; + CrossingPoint crossPoint; +}; + +/// CRTPlane corresponds to a pair of: +/// 1st CRT fixed coordinate plane (e.g. 0 is X coordinate) +/// 2nd value of the CRT fixed coordinate plane (e.g. for Top CRT Horizontal this value is ~618 cm. +using CRTPlane = std::pair; + +class CRTMatchingAlg { +public: + + explicit CRTMatchingAlg(const fhicl::ParameterSet& pset); + CRTMatchingAlg(); + + void reconfigure(const fhicl::ParameterSet& pset); + + /// This function runs the PCA analysis on the spatial coordinates vector and return the PCAResults. + static PCAResults PCAfit (std::vector const& sp); + + /// This function determines the coordinate in which the CRT module is constant. + /// 0 for fixed Y, 1 for fixed X, 2 for fixed Z, + /// e.g. in the Top CRT Horizontal Plane, the Y coordinate is fixed, in the Side CRT West Walll, the X Coordinate is fixed, ... + CRTPlane DeterminePlane(sbn::crt::CRTHit const& CRThit); + + /// This function evaluates the Track Crossing point onto the CRT plane considered. + /// dir is the track direction in the CRTWall reference system. + /// mean is the mean value of the track in the CRTWall reference system. + static CrossingPoint TranslatePointTo(geo::Vector_t dir, geo::Point_t mean, CRTPlane CRTWall); + + /// This function rotate the translation vector (direction and mean position) from the TPC reference system, to the CRTWall one. + TranslationVector RotateToLocalCRTPlane(const TranslationVector& transl, CRTPlane CRTWall); + + /// This function rotate the CrossingPoint from the CRTWall reference system, to the TPC one. + CrossingPoint RotateFromLocalCRTPlane(CrossingPoint crossPointCRT, CRTPlane CRTWall); + + /// This function returns the "correct" predicted crossing point given the cosine directors of the track fitted with PCA + /// and a CRTPlane (fixed coordinate and value of the coordinate). + CrossingPoint DetermineProjection(const TranslationVector& dir, CRTPlane CRTWall); + + /// This function evaluates the TrackBarycenter with weighted mean. posVector is a vector of track spacepoints + /// and w is the weight (e.g. one could use integral or peak amplitude or more...). + /// The entries in the i-th index of posVector and hw vectors must correspond to the same point. + TrackBarycenter GetTrackBarycenter(std::vector posVector, std::vector hw); + + /// Function which drifts the track x coordinates assuming a time (in the trigger reference system). + /// The function also returns the number of hit points which would be outside of the physical boundaries of the TPCs at the considered time. + DriftedTrack DriftTrack(const std::vector>& trkHits, const std::vector& trkHitMetas, const geo::GeometryCore *GeometryService, const geo::WireReadoutGeom *wireReadout, detinfo::DetectorPropertiesData const& detProp, detinfo::DetectorClocksData const& detClock, double time, const recob::Track& tpcTrack, int maxOutBoundPoints) const; + +private: + double fAllowedOffsetCM; +}; + +} + +#endif // CRTMATCHINGUTILS_H \ No newline at end of file diff --git a/icaruscode/CRT/CRTUtils/RecoUtils.cc b/icaruscode/CRT/CRTUtils/RecoUtils.cc index 00ca4c99e..1c6c2f1ad 100644 --- a/icaruscode/CRT/CRTUtils/RecoUtils.cc +++ b/icaruscode/CRT/CRTUtils/RecoUtils.cc @@ -1,5 +1,274 @@ +#include +#include #include "RecoUtils.h" +namespace icarus::crt::dataTools{ + +TopCRTCentersMap LoadTopCRTCenters() +{ + TopCRTCentersMap TopCRTCenters; + // The follwing numbers have been extracted from the Top CRT modules geometry. + // The numbers are respectively moduleID and X,Y,Z coordinates of the + // module center (X markes the spot in the sketch below). + // The CRT modules are perfect square with 8 bars per side. + // The fixed coordinate (e.g. Y for Top CRT Horizontal) is returned from geometry. + // The transverce coordinate is returned from the average position of P1 and P2 + // the average position of P1 and P3. + // The transformed CRT Hits are in cm. + // + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | P1 | P2 | | | | + // | | | | | | | | | + // --------------------------- X --------------------------- + // | | | | | | | | | + // | | | | P3 | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // | | | | | | | | | + // | | | | | | | | | + // | | | | | | | | | + // --------------------------------------------------------- + // + TopCRTCenters = {{108, { -460.975, 617.388,-1050.61}}, + {109, { -460.975,617.388,-866.215}}, + {110, { -460.975,617.388,-681.825}}, + {111, { -460.975,617.388,-497.435}}, + {112, { -460.975,617.388,-313.045}}, + {113, { -460.975,617.388,-128.655}}, + {114, { -460.975,617.388,55.735}}, + {115, { -460.975,617.388,240.125}}, + {116, { -460.975,617.388,424.515}}, + {117, { -460.975,617.388,608.905}}, + {118, { -460.975,617.388,793.295}}, + {119, { -460.975,617.388,977.685}}, + {120, { -460.975,617.388,1162.07}}, + {121, { -460.975,617.388,1346.46}}, + {122, { -276.585,617.388,-1050.61}}, + {123, { -276.585,617.388,-866.215}}, + {124, { -276.585,617.388,-681.825}}, + {125, { -276.585,617.388,-497.435}}, + {126, { -276.585,617.388,-313.045}}, + {127, { -276.585,617.388,-128.655}}, + {128, { -276.585,617.388, 55.735}}, + {129, { -276.585,617.388, 240.125}}, + {130, { -276.585,617.388, 424.515}}, + {131, { -276.585,617.388, 608.905}}, + {132, { -276.585,617.388, 793.295}}, + {133, { -276.585,617.388, 977.685}}, + {134, { -276.585,617.388, 1162.07}}, + {135, { -276.585,617.388, 1346.46}}, + {136, { -92.195 ,617.388,-1050.61}}, + {137, { -92.195 ,617.388,-866.215}}, + {138, { -92.195 ,617.388,-681.825}}, + {139, { -92.195 ,617.388,-497.435}}, + {140, { -92.195 ,617.388,-313.045}}, + {141, { -92.195 ,617.388,-128.655}}, + {142, { -92.195 ,617.388, 55.735}}, + {143, { -92.195 ,617.388, 240.125}}, + {144, { -92.195 ,617.388, 424.515}}, + {145, { -92.195 ,617.388, 608.905}}, + {146, { -92.195 ,617.388, 793.295}}, + {147, { -92.195 ,617.388, 977.685}}, + {148, { -92.195 ,617.388, 1162.07}}, + {149, { -92.195 ,617.388, 1346.46}}, + {150, { 92.195 , 617.388, -1050.61}}, + {151, { 92.195 , 617.388, -866.215}}, + {152, { 92.195 , 617.388, -681.825}}, + {153, { 92.195 , 617.388, -497.435}}, + {154, { 92.195 , 617.388, -313.045}}, + {155, { 92.195 , 617.388, -128.655}}, + {156, { 92.195 ,617.388, 55.735}}, + {157, { 92.195 ,617.388, 240.125}}, + {158, { 92.195 ,617.388, 424.515}}, + {159, { 92.195 ,617.388, 608.905}}, + {160, { 92.195 ,617.388, 793.295}}, + {161, { 92.195 ,617.388, 977.685}}, + {162, { 92.195 ,617.388, 1162.07}}, + {163, { 92.195 ,617.388, 1346.46}}, + {164, { 276.585,617.388, -1050.61}}, + {165, { 276.585,617.388, -866.215}}, + {166, { 276.585,617.388, -681.825}}, + {167, { 276.585,617.388, -497.435}}, + {168, { 276.585,617.388, -313.045}}, + {169, { 276.585,617.388, -128.655}}, + {170, { 276.585,617.388, 55.735}}, + {171, { 276.585,617.388, 240.125}}, + {172, { 276.585,617.388, 424.515}}, + {173, { 276.585,617.388, 608.905}}, + {174, { 276.585,617.388, 793.295}}, + {175, { 276.585,617.388, 977.685}}, + {176, { 276.585,617.388, 1162.07}}, + {177, { 276.585,617.388, 1346.46}}, + {178, { 460.975,617.388, -1050.61}}, + {179, { 460.975,617.388, -866.215}}, + {180, { 460.975,617.388, -681.825}}, + {181, { 460.975,617.388, -497.435}}, + {182, { 460.975,617.388, -313.045}}, + {183, { 460.975,617.388, -128.655}}, + {184, { 460.975,617.388, 55.735}}, + {185, { 460.975,617.388, 240.125}}, + {186, { 460.975,617.388, 424.515}}, + {187, { 460.975,617.388, 608.905}}, + {188, { 460.975,617.388, 793.295}}, + {189, { 460.975,617.388, 977.685}}, + {190, { 460.975,617.388, 1162.07}}, + {191, { 460.975,617.388, 1346.46}}, + {192, { 555.265, 496.038, -1050.61}}, + {193, { 555.265, 496.038, -866.215}}, + {194, { 555.265, 496.038, -681.825}}, + {195, { 555.265, 496.038, -497.435}}, + {196, { 555.265, 496.038, -313.045}}, + {197, { 555.265, 496.038, -128.655}}, + {198, { 555.265, 496.038, 55.735}}, + {199, { 555.265, 496.038, 240.125}}, + {200, { 555.265, 496.038, 424.515}}, + {201, { 555.265, 496.038, 608.905}}, + {202, { 555.265, 496.038, 793.295}}, + {203, { 555.265, 496.038, 977.685}}, + {204, { 555.265, 496.038, 1162.07}}, + {205, { 555.265, 496.038, 1346.46}}, + {206, { -555.265, 496.038, -1050.61}}, + {207, { -555.265, 496.038, -866.215}}, + {208, { -555.265, 496.038, -681.825}}, + {209, { -555.265, 496.038, -497.435}}, + {210, { -555.265, 496.038, -313.045}}, + {211, { -555.265, 496.038, -128.655}}, + {212, { -555.265, 496.038, 55.735}}, + {213, { -555.265, 496.038, 240.125}}, + {214, { -555.265, 496.038, 424.515}}, + {215, { -555.265, 496.038, 608.905}}, + {216, { -555.265, 496.038, 793.295}}, + {217, { -555.265, 496.038, 977.685}}, + {218, { -555.265, 496.038, 1162.07}}, + {219, { -555.265, 496.038, 1346.46}}, + {220, { -460.975, 496.038, -1143.4}}, + {221, { -276.585, 496.038, -1143.4}}, + {222, { -92.195, 496.038, -1143.4}}, + {223, { 92.195, 496.038, -1143.4}}, + {224, { 276.585, 496.038, -1143.4}}, + // This module does not exist in reality, but exists in simulation + {225, { 0, 0, 0}}, + {226, { -460.975, 525.038, 1533.608}}, + {227, { -276.585, 525.038, 1533.608}}, + {228, { -92.195, 525.038, 1533.608}}, + {229, { 92.195, 525.038, 1533.608}}, + {230, { 276.585, 525.038, 1533.608}}, + {231, { 460.975, 525.038, 1533.608}}}; + return TopCRTCenters; +} + +TransformedCRTHit AffineTransformation(double DX, double DZ,AffineTrans affine) +{ + double CRTX=affine.B1+DZ*affine.A12+DX*affine.A11; + double CRTZ=affine.B2+DZ*affine.A22+DX*affine.A21; + return std::make_pair(CRTX, CRTZ); +} + +TopCRTTransformations LoadTopCRTTransformations() +{ + std::string fullFileName; + cet::search_path searchPath("FW_SEARCH_PATH"); + bool imported = false; + searchPath.find_file("TopCrtCorrectionByTPC.txt", fullFileName); + if (!searchPath.find_file("TopCrtCorrectionByTPC.txt", fullFileName)) { + mf::LogError("CRTMatchingUtils_LoadTopCrtTransformation") + << "Top CRT Correction transformation file not found in FW_SEARCH_PATH."; + } + std::ifstream corrFile(fullFileName, std::ios::in); + std::map Type0Corr; + std::map Type1Corr; + std::map Type2Corr; + std::map Type3Corr; + std::map Type4Corr; + std::map Type5Corr; + if (!corrFile.is_open()) { + mf::LogError("CRTRecoUtils_LoadTopCRTTransformation") + << "Failed to open Top CRT Correction transformation file: " << fullFileName; + } + std::string line; + while (std::getline(corrFile, line)) { + std::istringstream iss(line); + std::vector variables; + double var; + while (iss >> var) { + variables.push_back(var); + } + int pos=0; + AffineTrans Type0 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + pos=pos+8; + AffineTrans Type1 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + pos=pos+8; + AffineTrans Type2 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + pos=pos+8; + AffineTrans Type3 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + pos=pos+8; + AffineTrans Type4 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + pos=pos+8; + AffineTrans Type5 = {variables.at(1+pos),variables.at(2+pos),variables.at(3+pos),variables.at(4+pos),variables.at(5+pos),variables.at(6+pos), variables.at(7+pos),variables.at(8+pos)}; + Type0Corr.insert({variables.at(0), Type0}); + Type1Corr.insert({variables.at(0), Type1}); + Type2Corr.insert({variables.at(0), Type2}); + Type3Corr.insert({variables.at(0), Type3}); + Type4Corr.insert({variables.at(0), Type4}); + Type5Corr.insert({variables.at(0), Type5}); + imported = true; + } + TopCRTTransformations LoadedTransformations={Type2Corr, Type1Corr, Type0Corr, Type4Corr, Type5Corr, Type3Corr, imported}; + return LoadedTransformations; +} + +geo::Point_t ApplyTransformation(const sbn::crt::CRTHit& crthit, const TopCRTCorrectionMap& TopCRTCorrections, const TopCRTCentersMap& TopCRTCenters){ + double centerDX=crthit.x_pos - TopCRTCenters.at((int)crthit.feb_id[0]).X(); + double centerDY=crthit.y_pos - TopCRTCenters.at((int)crthit.feb_id[0]).Y(); + double centerDZ=crthit.z_pos - TopCRTCenters.at((int)crthit.feb_id[0]).Z(); + AffineTrans thisAffine=TopCRTCorrections.at((int)crthit.feb_id[0]); + std::pair transCrt; + double crtX=crthit.x_pos, crtY=crthit.y_pos, crtZ=crthit.z_pos; + switch (crthit.plane){ + case 30: + transCrt=icarus::crt::dataTools::AffineTransformation(centerDX, centerDZ, thisAffine); + crtX=transCrt.first; + crtZ=transCrt.second; + break; + case 31: case 32: + transCrt=icarus::crt::dataTools::AffineTransformation(centerDY, centerDZ, thisAffine); + crtY=transCrt.first; + crtZ=transCrt.second; + break; + case 33: case 34: + transCrt=icarus::crt::dataTools::AffineTransformation(centerDX, centerDY, thisAffine); + crtX=transCrt.first; + crtY=transCrt.second; + break; + default: + throw std::logic_error("TopCRTAffineTransformationError: CRT plane/region not valid!"); + break; + } + return {crtX, crtY, crtZ}; +} + +} int RecoUtils::TrueParticleID(detinfo::DetectorClocksData const& clockData, const art::Ptr hit, bool rollup_unsaved_ids) { @@ -25,7 +294,35 @@ int RecoUtils::TrueParticleID(detinfo::DetectorClocksData const& clockData, return likely_track_id; } +std::map>> RecoUtils::PrepSimChannels(const std::vector> &simchannels, const geo::WireReadoutGeom &wireReadout) { + std::map>> ret; + for (const art::Ptr& sc : simchannels) { + // Lookup the wire of this channel + raw::ChannelID_t channel = sc->Channel(); + std::vector maybewire = wireReadout.ChannelToWire(channel); + geo::WireID thisWire; // Default constructor makes invalid wire + if (!maybewire.empty()) thisWire = maybewire[0]; + for (const auto &item : sc->TDCIDEMap()) { + for (const sim::IDE &ide: item.second) { + // indexing initializes empty vector + ret[abs(ide.trackID)].push_back({thisWire, &ide}); + } + } + } + return ret; +} + +std::map>> RecoUtils::buildTrackIDtoHitsMap(const std::vector> &allHits, + const detinfo::DetectorClocksData &clockData, const cheat::BackTrackerService &backtracker) { + std::map>> ret; + for (const art::Ptr& h: allHits) { + for (int ID: backtracker.HitToTrackIds(clockData, *h)) { + ret[abs(ID)].push_back(h); + } + } + return ret; +} int RecoUtils::TrueParticleIDFromTotalTrueEnergy(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids) { art::ServiceHandle bt_serv; @@ -55,8 +352,6 @@ int RecoUtils::TrueParticleIDFromTotalTrueEnergy(detinfo::DetectorClocksData con return objectTrack; } - - int RecoUtils::TrueParticleIDFromTotalRecoCharge(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids) { // Make a map of the tracks which are associated with this object and the charge each contributes std::map trackMap; @@ -78,8 +373,6 @@ int RecoUtils::TrueParticleIDFromTotalRecoCharge(detinfo::DetectorClocksData con return objectTrack; } - - int RecoUtils::TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const& clockData,const std::vector >& hits, bool rollup_unsaved_ids) { // Make a map of the tracks which are associated with this object and the number of hits they are the primary contributor to std::map trackMap; @@ -110,8 +403,6 @@ int RecoUtils::TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const return objectTrack; } - - bool RecoUtils::IsInsideTPC(TVector3 position, double distance_buffer){ bool inside = false; art::ServiceHandle geom; @@ -175,4 +466,4 @@ double RecoUtils::CalculateTrackLength(const art::Ptr track){ length+=(next_point-this_point).Mag(); } return length; -} +} \ No newline at end of file diff --git a/icaruscode/CRT/CRTUtils/RecoUtils.h b/icaruscode/CRT/CRTUtils/RecoUtils.h index 3f90f4d0e..ca78d80de 100644 --- a/icaruscode/CRT/CRTUtils/RecoUtils.h +++ b/icaruscode/CRT/CRTUtils/RecoUtils.h @@ -31,8 +31,9 @@ //#include "lardataobj/AnalysisBase/MVAPIDResult.h" //#include "lardataobj/AnalysisBase/ParticleID.h" #include "larsim/MCCheater/BackTrackerService.h" +#include "larcore/Geometry/WireReadout.h" #include "larcore/Geometry/Geometry.h" -namespace detinfo { class DetectorClocksData; } +#include "sbnobj/Common/CRT/CRTHit.hh" // c++ @@ -42,40 +43,93 @@ namespace detinfo { class DetectorClocksData; } // ROOT #include "TTree.h" +namespace icarus::crt::dataTools{ + +using ModuleCenter = geo::Point_t; + +struct AffineTrans +{ + double A11; + double A12; + double A21; + double A22; + double B1; + double B2; + double Accuracy; + double N; +}; + +using FebIndex_t = int; + +using TopCRTCorrectionMap = std::map; + +struct TopCRTTransformations +{ + TopCRTCorrectionMap EE; + TopCRTCorrectionMap EW; + TopCRTCorrectionMap EastCC; + TopCRTCorrectionMap WE; + TopCRTCorrectionMap WW; + TopCRTCorrectionMap WestCC; + bool imported; +}; + +using TopCRTCentersMap = std::map; + +/// The transformed CRT Hits are in cm +using TransformedCRTHit = std::pair; + +/// This function loads the Top CRT modules centers. +TopCRTCentersMap LoadTopCRTCenters(); + +/// This function performs the affine transformation of the CRT hit points. +/// The AffineTransformation requires input variables in cm. +TransformedCRTHit AffineTransformation(double DX, double DZ, AffineTrans affine); + +/// This functions loads the Affine Transformation TXT files. +TopCRTTransformations LoadTopCRTTransformations(); + +/// This function transforms a CRTHit with AffineTransformationFunctions. +geo::Point_t ApplyTransformation(const sbn::crt::CRTHit& crthit, const TopCRTCorrectionMap& TopCRTCorrections, const TopCRTCentersMap& TopCRTCenters); + +} namespace RecoUtils{ - // Returns the geant4 ID which contributes the most to a single reco hit. - // The matching method looks for true particle which deposits the most true energy in the reco hit. - // If rollup_unsaved_ids is set to true, any unsaved daughter than - // contributed energy to the hit has its energy included in its closest ancestor that was saved. +// Returns the geant4 ID which contributes the most to a single reco hit. +// The matching method looks for true particle which deposits the most true energy in the reco hit. +// If rollup_unsaved_ids is set to true, any unsaved daughter than +// contributed energy to the hit has its energy included in its closest ancestor that was saved. - int TrueParticleID(detinfo::DetectorClocksData const& clockData, const art::Ptr hit, bool rollup_unsaved_ids=1); +int TrueParticleID(detinfo::DetectorClocksData const& clockData, const art::Ptr hit, bool rollup_unsaved_ids=1); - // Returns the geant4 ID which contributes the most to the vector of hits. - // The matching method looks for which true particle deposits the most true energy in the reco hits +// Returns the geant4 ID which contributes the most to the vector of hits. +// The matching method looks for which true particle deposits the most true energy in the reco hits - int TrueParticleIDFromTotalTrueEnergy(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); +int TrueParticleIDFromTotalTrueEnergy(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); - // Returns the geant4 ID which contributes the most to the vector of hits. - // The matching method looks for which true particle contributes the most reconstructed charge to the hit selection - // (the reco charge of each hit is correlated with each maximally contributing true particle and summed) +// Returns the geant4 ID which contributes the most to the vector of hits. +// The matching method looks for which true particle contributes the most reconstructed charge to the hit selection +// (the reco charge of each hit is correlated with each maximally contributing true particle and summed) - int TrueParticleIDFromTotalRecoCharge(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); +int TrueParticleIDFromTotalRecoCharge(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); - // Returns the geant4 ID which contributes the most to the vector of hits. - // The matching method looks for which true particle maximally contributes to the most reco hits +// Returns the geant4 ID which contributes the most to the vector of hits. +// The matching method looks for which true particle maximally contributes to the most reco hits - int TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); +int TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const& clockData, const std::vector >& hits, bool rollup_unsaved_ids=1); - // Checks if a position is within any of the TPCs in the geometry (user can define some distance buffer from the TPC walls) +// Checks if a position is within any of the TPCs in the geometry (user can define some distance buffer from the TPC walls) - bool IsInsideTPC(TVector3 position, double distance_buffer); +bool IsInsideTPC(TVector3 position, double distance_buffer); - // Calculates the total length of a recob::track by summing up the distances between adjacent traj. points +// Calculates the total length of a recob::track by summing up the distances between adjacent traj. points - double CalculateTrackLength(const art::Ptr track); +double CalculateTrackLength(const art::Ptr track); +std::map>> PrepSimChannels(const std::vector> &simchannels, const geo::WireReadoutGeom &wireReadout); + +std::map>> buildTrackIDtoHitsMap(const std::vector> &allHits, const detinfo::DetectorClocksData &clockData, const cheat::BackTrackerService &backtracker); } -#endif +#endif \ No newline at end of file diff --git a/icaruscode/CRT/CRTUtils/crtmatchingalg_icarus.fcl b/icaruscode/CRT/CRTUtils/crtmatchingalg_icarus.fcl new file mode 100644 index 000000000..94e207321 --- /dev/null +++ b/icaruscode/CRT/CRTUtils/crtmatchingalg_icarus.fcl @@ -0,0 +1,33 @@ +BEGIN_PROLOG + +icarus_crtmatchingalg: +{ + AllowedOffsetCM: 1.57 # When trying to determine if a track and a time are compatible, you reconstructruct the track at that time + # you then check if the reconstructed track is out of the boundaries of the cathode and of the anode, + # this variable gives you the maximum excess of the track wrt cathode or anode to consider the track/time pair. + # Since we are allowing for MaximumDeltaT of 10 us (see above), this corresponds to a maximum excess + # of 10 us * 0.157 cm/us = 1.57 cm. + # As this is phrased, one could think of this as the two variables are related, that is not necessarily + # the case, but is still a good guess. +} + + +icarus_crtt0tagging_base: +{ + module_type: "icaruscode/CRT/CRTT0Tagging" + CrtHitModuleLabel: "crthit" + TPCTrackLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # Track producer module label + TRKHMLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # TrackHit Metadata producer module label + PFParticleLabel: ["pandoraGausCryoE", "pandoraGausCryoW"] # PFParticle producer module label + HitLabel: ["cluster3DCryoE" , "cluster3DCryoW"] + MatchingAlg: @local::icarus_crtmatchingalg + MinimalTrackLength: 40. # Minimal TrackLength to match with a CRT + MinimumGoodHits: 5 # Minimum number of good hits to perform the fit + MaximalCRTDistance: 300. # Maximal distance between CRT Hit Candidate and Track Projection + GoodCandidateDistance: 100. # 96 cm maximizes EfficiencyXPurity (both > 92%) + MaximumDeltaT: 10000. # Maximal Time difference between a T0 tagged track and CRT Hit time for the combination to be considered acceptable. [ns] + +} + + +END_PROLOG diff --git a/icaruscode/CRT/crtt0tagging.fcl b/icaruscode/CRT/crtt0tagging.fcl new file mode 100644 index 000000000..c3dfd551a --- /dev/null +++ b/icaruscode/CRT/crtt0tagging.fcl @@ -0,0 +1,38 @@ +#include "crtmatchingalg_icarus.fcl" + +BEGIN_PROLOG + +icarus_crtt0tagging_data: +{ + @table::icarus_crtt0tagging_base + isData: true # Data + skipTruth: false # skipTruth + + module_type: "CRTT0Tagging" + CrtHitModuleLabel: "crthit" + TPCTrackLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # Track producer module label + PFParticleLabel: ["pandoraGausCryoE", "pandoraGausCryoW"] # PFParticle producer module label + TRKHMLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # TrackHit Metadata producer module label + HitLabel: ["cluster3DCryoE" , "cluster3DCryoW"] + MatchingAlg: @local::icarus_crtmatchingalg +} + +icarus_crtt0taggingmc: +{ + @table::icarus_crtt0tagging_base + isData: false # MC + skipTruth: false # skipTruth + + module_type: "CRTT0Tagging" + CrtHitModuleLabel: "crthit" + TPCTrackLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # Track producer module label + PFParticleLabel: ["pandoraGausCryoE", "pandoraGausCryoW"] # PFParticle producer module label + TRKHMLabel: ["pandoraTrackGausCryoE", "pandoraTrackGausCryoW"] # TrackHit Metadata producer module label + HitLabel: ["cluster3DCryoE" , "cluster3DCryoW"] + MatchingAlg: @local::icarus_crtmatchingalg + SimulationLabel: "largeant" + AuxDetSimProducerLabel: "genericcrt" + SimChannelProducer: "daq:simpleSC" +} + +END_PROLOG diff --git a/icaruscode/CRT/crtt0tagging_icarus.fcl b/icaruscode/CRT/crtt0tagging_icarus.fcl new file mode 100644 index 000000000..8b5399698 --- /dev/null +++ b/icaruscode/CRT/crtt0tagging_icarus.fcl @@ -0,0 +1,28 @@ +#include "services_common_icarus.fcl" +#include "crtt0tagging.fcl" +#include "rootoutput_icarus.fcl" + +process_name: CRTT0Tagging + +services: +{ + message: @local::icarus_message_services_prod_debug + @table::icarus_common_services + TFileService: { fileName: "crtt0tagging_hist.root" } +} # services + +outputs.out1: @local::icarus_rootoutput + +# The 'physics' section defines and configures some modules to do work on each event. +physics: +{ + producers: + { + CRTT0Tagging: @local::icarus_crtt0tagging_data + } + + # Schedule job step(s) for execution by defining the analysis module for this job. + reco: [ CRTT0Tagging ] + + stream1: [ out1 ] +} diff --git a/icaruscode/CRT/crtt0taggingmc_icarus.fcl b/icaruscode/CRT/crtt0taggingmc_icarus.fcl new file mode 100644 index 000000000..19954ecbc --- /dev/null +++ b/icaruscode/CRT/crtt0taggingmc_icarus.fcl @@ -0,0 +1,36 @@ +#include "services_common_icarus.fcl" +#include "services_icarus_simulation.fcl" +#include "simulationservices.fcl" +#include "backtrackerservice.fcl" +#include "crtt0tagging.fcl" +#include "rootoutput_icarus.fcl" + +process_name: CRTT0Tagging + +services: +{ + ParticleInventoryService: @local::standard_particleinventoryservice + BackTrackerService: @local::standard_backtrackerservice # from `backtrackerservice.fcl` (`larsim`) + message: @local::icarus_message_services_prod_debug + @table::icarus_common_services + # Load the service that manages root files for histograms. + TFileService: { fileName: "crtt0tagging_hist.root" } + +} # services +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" + +outputs.out1: @local::icarus_rootoutput + +# The 'physics' section defines and configures some modules to do work on each event. +physics: +{ + producers: + { + CRTT0Tagging: @local::icarus_crtt0taggingmc + } + + # Schedule job step(s) for execution by defining the analysis module for this job. + reco: [ CRTT0Tagging ] + + stream1: [ out1 ] +} diff --git a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc index 438eeaab3..ffd08ab21 100644 --- a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc +++ b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc @@ -160,6 +160,7 @@ class DaqDecoderICARUSTPCwROI : public art::ReplicatedProducer // Fcl parameters. std::vector fFragmentsLabelVec; ///< The input artdaq fragment label vector (for more than one) + bool fOutputChannelROIs; ///< Should we output the ROIs we found? bool fOutputRawWaveform; ///< Should we output pedestal corrected (not noise filtered)? bool fOutputCorrection; ///< Should we output the coherent noise correction vectors? bool fOutputMorphed; ///< Should we output the morphological filter vectors? @@ -238,7 +239,9 @@ DaqDecoderICARUSTPCwROI::DaqDecoderICARUSTPCwROI(fhicl::ParameterSet const & pse for(const auto& fragmentLabel : fFragmentsLabelVec) { produces>(fragmentLabel.instance()); - produces>(fragmentLabel.instance()); + + if (fOutputChannelROIs) + produces>(fragmentLabel.instance()); if (fOutputRawWaveform) produces>(fragmentLabel.instance() + fOutputRawWavePath); @@ -309,6 +312,7 @@ DaqDecoderICARUSTPCwROI::~DaqDecoderICARUSTPCwROI() void DaqDecoderICARUSTPCwROI::configure(fhicl::ParameterSet const & pset) { fFragmentsLabelVec = pset.get>("FragmentsLabelVec", std::vector()={"daq:PHYSCRATEDATA"}); + fOutputChannelROIs = pset.get("OutputChannelROIs", true); fOutputRawWaveform = pset.get("OutputRawWaveform", false); fOutputCorrection = pset.get("OutputCorrection", false); fOutputMorphed = pset.get("OutputMorphed", false); @@ -416,14 +420,15 @@ void DaqDecoderICARUSTPCwROI::produce(art::Event & event, art::ProcessingFrame c // Now transfer ownership to the event store event.put(std::move(rawDigitCollection), fragmentLabel.instance()); - // Do the same to output the candidate ROIs - ChannelROICollectionPtr channelROICollection = std::make_unique>(std::move_iterator(concurrentROIs.begin()), + if (fOutputChannelROIs) + { + // Do the same to output the candidate ROIs + ChannelROICollectionPtr channelROICollection = std::make_unique>(std::move_iterator(concurrentROIs.begin()), std::move_iterator(concurrentROIs.end())); + std::sort(channelROICollection->begin(),channelROICollection->end(),[](const auto& left, const auto& right){return left.Channel() < right.Channel();}); - std::sort(channelROICollection->begin(),channelROICollection->end(),[](const auto& left, const auto& right){return left.Channel() < right.Channel();}); - - event.put(std::move(channelROICollection), fragmentLabel.instance()); - + event.put(std::move(channelROICollection), fragmentLabel.instance()); + } if (fOutputRawWaveform) { @@ -652,15 +657,24 @@ void DaqDecoderICARUSTPCwROI::processSingleFragment(size_t if (fOutputMorphed) { - const icarus_signal_processing::VectorFloat& corrections = decoderTool->getMorphedWaveforms()[chanIdx]; + const icarus_signal_processing::VectorFloat& morphWaveform = decoderTool->getMorphedWaveforms()[chanIdx]; // Need to convert from float to short int - std::transform(corrections.begin(),corrections.end(),wvfm.begin(),[](const auto& val){return short(std::round(val));}); + std::transform(morphWaveform.begin(),morphWaveform.end(),wvfm.begin(),[](const auto& val){return short(std::round(val));}); + + // Get the morphological waveform mean position and spread from PCA + Eigen::Vector meanPos; + Eigen::Vector eigenValues; + Eigen::Matrix eigenVectors; + + icarus_signal_processing::VectorFloat localCopy = morphWaveform; + + waveformTools.principalComponents(localCopy, meanPos, eigenVectors, eigenValues, 6., 3., false); //ConcurrentRawDigitCol::iterator newRawObjItr = coherentRawDigitCol.emplace_back(channel,wvfm.size(),wvfm); ConcurrentRawDigitCol::iterator newRawObjItr = morphedRawDigitCol.push_back(raw::RawDigit(channel,wvfm.size(),wvfm)); - newRawObjItr->SetPedestal(0.,0.); + newRawObjItr->SetPedestal(meanPos[1],std::sqrt(eigenValues[0])); } // Now determine the pedestal and correct for it diff --git a/icaruscode/Decode/DecoderTools/TPCDecoderFilter1D_tool.cc b/icaruscode/Decode/DecoderTools/TPCDecoderFilter1D_tool.cc index 9cd94a71c..c4be4f88a 100644 --- a/icaruscode/Decode/DecoderTools/TPCDecoderFilter1D_tool.cc +++ b/icaruscode/Decode/DecoderTools/TPCDecoderFilter1D_tool.cc @@ -19,6 +19,8 @@ // LArSoft includes #include "larcore/Geometry/WireReadout.h" +#include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" +#include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" #include "sbndaq-artdaq-core/Overlays/ICARUS/PhysCrateFragment.hh" @@ -187,9 +189,13 @@ class TPCDecoderFilter1D : virtual public IDecoderFilter // Keep track of the FFT icarus_signal_processing::FFTFilterFunctionVec fFFTFilterFunctionVec; + // channel status DB + const lariov::ChannelStatusProvider* fChannelStatus; }; -TPCDecoderFilter1D::TPCDecoderFilter1D(fhicl::ParameterSet const &pset) +TPCDecoderFilter1D::TPCDecoderFilter1D(fhicl::ParameterSet const &pset) : + fChannelStatus(&art::ServiceHandle()->GetProvider()) + { std::cout << "TPCDecoderFilter1D is calling configure method" << std::endl; this->configure(pset); @@ -408,8 +414,20 @@ void TPCDecoderFilter1D::process_fragment(detinfo::DetectorClocksData const&, icarus_signal_processing::VectorFloat& pedCorDataVec = fPedCorWaveforms[channelOnBoard]; + // Recover the channel ID + int channelID = channelPlanePairVec[chanIdx].first; + // Keep track of the channel - fChannelIDVec[channelOnBoard] = channelPlanePairVec[chanIdx].first; + fChannelIDVec[channelOnBoard] = channelID; + + // Is this a valid channel and what is its status? + if (fChannelStatus->IsPresent(channelID)) + { + // If the channel is bad then we "protect" the entire channel (it will not be used in noise removal) + // Note that the array has already been cleared before calling this function so no need to set opposite case + if (fChannelStatus->IsBad(channelID)) + std::fill(fSelectVals[channelOnBoard].begin(),fSelectVals[channelOnBoard].end(),true); + } // Handle the filter function to use for this channel unsigned int plane = channelPlanePairVec[chanIdx].second; diff --git a/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc b/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc index 64e57e5fe..c5e590b24 100644 --- a/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc +++ b/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc @@ -19,6 +19,8 @@ // LArSoft includes #include "larcore/Geometry/WireReadout.h" +#include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" +#include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" #include "sbndaq-artdaq-core/Overlays/ICARUS/PhysCrateFragment.hh" @@ -156,6 +158,8 @@ class TPCNoiseFilter1DMC : virtual public INoiseFilter bool fUseFFTFilter; //< Turn on/off the use of the FFT filter bool fLowFreqCorrection; //< Apply low frequency noise correction bool fDiagnosticOutput; //< If true will spew endless messages to output + bool fRemoveBadChannels; //< Will remove bad channels from calculation + bool fRemoveBadRMS; //< Will ignore channels with too low or too high rms FloatPairVec fFFTSigmaValsVec; //< Gives the sigmas for the filter function FloatPairVec fFFTCutoffValsVec; //< Gives the cutoffs for the filter function std::string fDenoiserType; //< Describes the specific denoiser to use @@ -187,9 +191,13 @@ class TPCNoiseFilter1DMC : virtual public INoiseFilter // Keep track of the FFT icarus_signal_processing::FFTFilterFunctionVec fFFTFilterFunctionVec; + + // channel status DB + const lariov::ChannelStatusProvider* fChannelStatus; }; -TPCNoiseFilter1DMC::TPCNoiseFilter1DMC(fhicl::ParameterSet const &pset) +TPCNoiseFilter1DMC::TPCNoiseFilter1DMC(fhicl::ParameterSet const &pset) : + fChannelStatus(&art::ServiceHandle()->GetProvider()) { this->configure(pset); @@ -228,6 +236,8 @@ void TPCNoiseFilter1DMC::configure(fhicl::ParameterSet const &pset) fUseFFTFilter = pset.get("UseFFTFilter", true); fLowFreqCorrection = pset.get("LowFreqCorrection", true); fDiagnosticOutput = pset.get("DiagnosticOutput", false); + fRemoveBadChannels = pset.get("RemoveBadChannels", true); + fRemoveBadRMS = pset.get("RemoveBadRMS", true); fFilterModeVec = pset.get>("FilterModeVec", std::vector()={"e","g","d"}); fFFTSigmaValsVec = pset.get("FFTSigmaVals", FloatPairVec()={{1.5,20.}, {1.5,20.}, {2.0,20.}}); @@ -314,8 +324,26 @@ void TPCNoiseFilter1DMC::process_fragment(detinfo::DetectorClocksData const&, icarus_signal_processing::VectorFloat& rawDataVec = fRawWaveforms[idx]; icarus_signal_processing::VectorFloat& pedCorDataVec = fPedCorWaveforms[idx]; + // Make sure our selection and ROI arrays are initialized + std::fill(fSelectVals[idx].begin(),fSelectVals[idx].end(),false); + + // Recover the channel ID + int channelID = channelPlaneVec[idx].first; + // Keep track of the channel - fChannelIDVec[idx] = channelPlaneVec[idx].first; + fChannelIDVec[idx] = channelID; + + // Is this a valid channel and what is its status? + if (fRemoveBadChannels && fChannelStatus->IsPresent(channelID)) + { + // If the channel is bad then we "protect" the entire channel (it will not be used in noise removal) + // Note that the array has already been cleared before calling this function so no need to set opposite case + if (!fChannelStatus->IsGood(channelID)) + { +// std::cout << "--> Channel:" << channelID << " is marked as bad by the channel status service" << std::endl; + std::fill(fSelectVals[idx].begin(),fSelectVals[idx].end(),true); + } + } // We need to recover info on which plane we have std::vector widVec = fChannelMapAlg->ChannelToWire(fChannelIDVec[idx]); @@ -367,6 +395,8 @@ void TPCNoiseFilter1DMC::process_fragment(detinfo::DetectorClocksData const&, fNumTruncBins[idx], fRangeBins[idx]); + if (fRemoveBadRMS && (fFullRMSVals[idx] < 2.5 || fFullRMSVals[idx] > 40.)) std::fill(fSelectVals[idx].begin(),fSelectVals[idx].end(),true); + // Convolve with a filter function //if (fUseFFTFilter) (*fFFTFilterFunctionVec[plane])(pedCorDataVec); if (fUseFFTFilter) @@ -396,9 +426,6 @@ void TPCNoiseFilter1DMC::process_fragment(detinfo::DetectorClocksData const&, // rawDataVec[ rawDataVec.size()/2] = 16. * std::sqrt(eigenValues(0)); // rawDataVec[1+rawDataVec.size()/2] = -16. * std::sqrt(eigenValues(0)); // } - - // Make sure our selection and ROI arrays are initialized - std::fill(fSelectVals[idx].begin(),fSelectVals[idx].end(),false); } (*denoiser)(fWaveLessCoherent.begin(), diff --git a/icaruscode/Decode/DecoderTools/TriggerDecoderV3_tool.cc b/icaruscode/Decode/DecoderTools/TriggerDecoderV3_tool.cc index a53e2cf2b..70e937f19 100644 --- a/icaruscode/Decode/DecoderTools/TriggerDecoderV3_tool.cc +++ b/icaruscode/Decode/DecoderTools/TriggerDecoderV3_tool.cc @@ -196,6 +196,11 @@ namespace daq * and = `0000'0nnn` * * west wall: `0000'0000'00ss'snnn` with = `0000'0sss` * and = `0000'0nnn` + * * `beamToTrigger`: nanoseconds from the beam gate opening to the + * first trigger in the cryostat. The value is converted from ticks + * (`FPGAtickLength`) and is set to + * `sbn::ExtraTriggerInfo::NoTrigger` (a value larger than the beam + * gate duration) if no trigger is available in the cryostat. * * Information may be missing. If a count is not available, its value is * set to `0` (which is an invalid value because their valid range starts @@ -234,6 +239,8 @@ namespace daq * module) to be used. Specifying its tag is mandatory, but if it is * explicitly specified empty, the decoder will try to work around its * absence. + * * `FPGAtickLength` (integral number, default: `25`): the duration of a + * clock tick of the cryostat FPGA, in nanoseconds. * * `AllowDefaultLVDSmap` (flag, default: `false`): if set, when PMT channel * mapping service is not available a legacy encoding pattern will be used * for the `LVDSstatus` bits, and a warning will be printed. If unset and @@ -273,6 +280,7 @@ namespace daq ExtraInfoPtr fTriggerExtra; BeamGateInfoPtr fBeamGateInfo; art::InputTag fTriggerConfigTag; ///< Data product with hardware trigger configuration. + unsigned int fFPGAtickLength; ///< Tick duration of FPGA clock [ns] bool fAllowDefaultLVDSmap; ///< Allow LVDS mapping without mapping database. bool fDiagnosticOutput; ///< Produces large number of diagnostic messages, use with caution! bool fDebug; ///< Use this for debugging this tool @@ -335,7 +343,7 @@ namespace daq sbn::ExtraTriggerInfo::CryostatInfo unpackPrimitiveBits( std::size_t cryostat, bool firstEvent, unsigned long int counts, std::uint64_t connectors01, std::uint64_t connectors23, - sbn::bits::triggerLogicMask triggerLogic + sbn::bits::triggerLogicMask triggerLogic, unsigned int beamToTriggerTicks ) const; /// Encodes all the LVDS bits for the specified `cryostat`. @@ -417,6 +425,7 @@ namespace daq void TriggerDecoderV3::configure(fhicl::ParameterSet const &pset) { fTriggerConfigTag = pset.get("TrigConfigLabel"); + fFPGAtickLength = pset.get("FPGAtickLength", 25); fAllowDefaultLVDSmap = pset.get("AllowDefaultLVDSmap", false); fDiagnosticOutput = pset.get("DiagnosticOutput", false); fDebug = pset.get("Debug", false); @@ -496,8 +505,8 @@ namespace daq { icarus::details::KeyedCSVparser parser; parser.addPatterns({ - { "Cryo. (EAST|WEST) Connector . and .", 1U } - , { "Trigger Type", 1U } + { "Cryo. (EAST|WEST) Connector . and .", 1U } // hex value looks like key + , { "Trigger Type", 1U } // might have been a string (currently it's not) }); std::string_view const dataLine = firstLine(data); try { @@ -800,7 +809,7 @@ namespace daq auto setCryoInfo = [ this,&extra=*fTriggerExtra,isFirstEvent=(triggerID <= 1),data=parsedData ] - (std::size_t cryo) + (std::size_t cryo, bool present) { std::string const Side = (cryo == sbn::ExtraTriggerInfo::EastCryostat) ? "EAST": "WEST"; @@ -808,6 +817,17 @@ namespace daq ? "Cryo1 EAST": "Cryo2 WEST"; // trigger logic: 0x01=adders; 0x02=majority; 0x07=both std::string const triggerLogicKey = "MJ_Adder Source " + Side; + std::string const cryoTriggerFlagKey = "Flag_" + Side; + + // information about the cryostat is always assumed to be available if + // the global trigger is located in it; but it can also be available if + // the trigger tick is not invalid (even in cases like the minimum bias + // in version 3+ which do not have any trigger location set) + // `Flag_XXX` is new in trigger string Version 3 + bool const hasBeamToTriggerInfo + = data.hasItem(cryoTriggerFlagKey) && data.getItem(cryoTriggerFlagKey).getNumber(0); + bool const hasBitInfo = present || hasBeamToTriggerInfo; + int const triggerLogicCode = data.hasItem(triggerLogicKey) ? data.getItem(triggerLogicKey).getNumber(0): 0; sbn::bits::triggerLogicMask triggerLogicMask; @@ -818,17 +838,22 @@ namespace daq else if(triggerLogicCode >= 3) // should be 7 triggerLogicMask = mask(sbn::triggerLogic::PMTAnalogSum, sbn::triggerLogic::PMTPairMajority); + // `Delay_XXX` is new in trigger string Version 3 + unsigned int const beamToTriggerTicks = hasBeamToTriggerInfo + ? data.getItem("Delay_" + Side).getNumber(0) + : std::numeric_limits::max(); + extra.cryostats[cryo] = unpackPrimitiveBits( cryo, isFirstEvent, data.getItem(CrSide + " counts").getNumber(0), - data.getItem(CrSide + " Connector 0 and 1").getNumber(0, 16), - data.getItem(CrSide + " Connector 2 and 3").getNumber(0, 16), - triggerLogicMask + hasBitInfo? data.getItem(CrSide + " Connector 0 and 1").getNumber(0, 16): 0ULL, + hasBitInfo? data.getItem(CrSide + " Connector 2 and 3").getNumber(0, 16): 0ULL, + triggerLogicMask, beamToTriggerTicks ); }; - if (triggerLocation & 1) setCryoInfo(sbn::ExtraTriggerInfo::EastCryostat); - if (triggerLocation & 2) setCryoInfo(sbn::ExtraTriggerInfo::WestCryostat); + setCryoInfo(sbn::ExtraTriggerInfo::EastCryostat, triggerLocation & 1); + setCryoInfo(sbn::ExtraTriggerInfo::WestCryostat, triggerLocation & 2); // // absolute time trigger (raw::ExternalTrigger) @@ -913,7 +938,7 @@ namespace daq sbn::ExtraTriggerInfo::CryostatInfo TriggerDecoderV3::unpackPrimitiveBits( std::size_t cryostat, bool firstEvent, unsigned long int counts, std::uint64_t connectors01, std::uint64_t connectors23, - sbn::bits::triggerLogicMask triggerLogic + sbn::bits::triggerLogicMask triggerLogic, unsigned int beamToTriggerTicks ) const { sbn::ExtraTriggerInfo::CryostatInfo cryoInfo; @@ -928,6 +953,12 @@ namespace daq cryoInfo.triggerLogicBits = static_cast(triggerLogic); + cryoInfo.beamToTrigger + = (beamToTriggerTicks == std::numeric_limits::max()) + ? sbn::ExtraTriggerInfo::CryostatInfo::NoTrigger + : beamToTriggerTicks * fFPGAtickLength + ; + return cryoInfo; } // TriggerDecoderV3::unpackPrimitiveBits() diff --git a/icaruscode/Decode/DecoderTools/decoderTools_icarus.fcl b/icaruscode/Decode/DecoderTools/decoderTools_icarus.fcl index 525a98204..7a7e2374d 100644 --- a/icaruscode/Decode/DecoderTools/decoderTools_icarus.fcl +++ b/icaruscode/Decode/DecoderTools/decoderTools_icarus.fcl @@ -89,10 +89,12 @@ TPCNoiseFilter1DTool: { NSigmaForTrucation: 3.5 StructuringElement: 16 FilterWindow: 10 - Threshold: [1.0,1.0,1.0] + Threshold: [20.0,12.,12.] #--> for PCA: [5.0,3.5,3.5] FilterModeVec: ["e","g","d"] LowFreqCorrection: true UseFFTFilter: false + RemoveBadChannels: true + RemoveBadRMS: false FFTSigmaVals: [ [1.5,20.], [1.5,20.], [1.5,20.] ] FFTCutoffVals: [ [8.,800.], [8.,800.], [4.0,800.] ] FragmentIDMap: [ [0,0x140C], [1,0x140E], [2,0x1410], [6,0x1414], [8,0x150E], [9,0x1510] ] diff --git a/icaruscode/Overlays/CMakeLists.txt b/icaruscode/Overlays/CMakeLists.txt index 63088399c..19322d16d 100644 --- a/icaruscode/Overlays/CMakeLists.txt +++ b/icaruscode/Overlays/CMakeLists.txt @@ -1,8 +1,8 @@ find_package(gallery REQUIRED) -#find_package(larwirecell REQUIRED ) -#find_package(jsoncpp REQUIRED) -#find_package(spdlog REQUIRED) +find_package(larwirecell REQUIRED ) +find_package(jsoncpp REQUIRED) +find_package(spdlog REQUIRED) include_directories( $ENV{JSONCPP_INC} ) link_directories( $ENV{JSONCPP_LIB} ) @@ -44,6 +44,7 @@ art_make_library( WireCellPgraph WireCellRoot jsoncpp + dl ) diff --git a/icaruscode/PMT/Trigger/trigger_emulation_icarus.fcl b/icaruscode/PMT/Trigger/trigger_emulation_icarus.fcl index 8c67abc36..356808b83 100644 --- a/icaruscode/PMT/Trigger/trigger_emulation_icarus.fcl +++ b/icaruscode/PMT/Trigger/trigger_emulation_icarus.fcl @@ -413,16 +413,34 @@ icarus_shifting_triggersim: { InitAuxDetSimChannelLabel: "largeant" InitBeamGateInfoLabel: "triggersimgatesinit" InitSimEnergyDepositLabel: "ionization" + InitSimEnergyDepositLiteLabel: "sedlite" InitSimPhotonsLabel: "largeant" InitWaveformLabel: "opdaq" ShiftAuxDetIDEs: true ShiftBeamGateInfo: true ShiftSimEnergyDeposits: true + ShiftSimEnergyDepositLites: true ShiftSimPhotons: true ShiftWaveforms: true AdditionalOffset: 0.0 # [us] Additional offset to apply to the time shift } + shiftedpriorSCE: { + module_type: AdjustSimForTrigger + InputTriggerLabel: "emuTriggerUnshifted" + InitAuxDetSimChannelLabel: "" + InitBeamGateInfoLabel: "" + InitSimEnergyDepositLabel: "ionization:priorSCE" + InitSimPhotonsLabel: "" + InitWaveformLabel: "" + ShiftAuxDetIDEs: false + ShiftBeamGateInfo: false + ShiftSimEnergyDeposits: true + ShiftSimPhotons: false + ShiftWaveforms: false + AdditionalOffset: 0.0 # [us] Additional offset to apply to the time shift + } + } # producers path: [ @@ -432,6 +450,7 @@ icarus_shifting_triggersim: { , triggersimgatesinit , emuTriggerUnshifted , shifted + , shiftedpriorSCE ] } # icarus_shifting_triggersim diff --git a/icaruscode/TPC/CMakeLists.txt b/icaruscode/TPC/CMakeLists.txt index 20d12e1bc..3bca0be5a 100644 --- a/icaruscode/TPC/CMakeLists.txt +++ b/icaruscode/TPC/CMakeLists.txt @@ -8,3 +8,4 @@ add_subdirectory(SignalProcessing) add_subdirectory(Simulation) add_subdirectory(Tracking) add_subdirectory(ICARUSWireCell) +add_subdirectory(SPAna) diff --git a/icaruscode/TPC/Calorimetry/NormalizeYZSQL_tool.cc b/icaruscode/TPC/Calorimetry/NormalizeYZSQL_tool.cc index 9c4226fcb..9868bd627 100644 --- a/icaruscode/TPC/Calorimetry/NormalizeYZSQL_tool.cc +++ b/icaruscode/TPC/Calorimetry/NormalizeYZSQL_tool.cc @@ -46,12 +46,14 @@ class NormalizeYZSQL : public INormalizeCharge class ScaleInfo { public: struct Point { + int iplane; int itpc; double y, z; }; class ScaleBin { public: + int iplane; int itpc; double ylo; double yhi; @@ -94,6 +96,7 @@ DEFINE_ART_CLASS_TOOL(NormalizeYZSQL) constexpr bool icarus::calo::NormalizeYZSQL::ScaleInfo::ScaleBin::operator< (const ScaleBin& other) const noexcept { + if (iplane != other.iplane) return iplane < other.iplane; if (itpc != other.itpc) return itpc < other.itpc; if (yhi != other.yhi) return yhi < other.yhi; return zhi < other.zhi; @@ -103,6 +106,7 @@ bool icarus::calo::NormalizeYZSQL::ScaleInfo::BinComp::operator() (const ScaleBin& a, const Point& b) const noexcept { // the bin `a` must be strictly before the point `b` + if (a.iplane != b.iplane) return a.iplane < b.iplane; if (a.itpc != b.itpc) return a.itpc < b.itpc; if (a.yhi <= b.y) return true; if (a.ylo > b.y) return false; @@ -113,6 +117,7 @@ bool icarus::calo::NormalizeYZSQL::ScaleInfo::BinComp::operator() (const Point& a, const ScaleBin& b) const noexcept { // the point `a` must be strictly before the bin `b` + if (a.iplane != b.iplane) return a.iplane < b.iplane; if (a.itpc != b.itpc) return a.itpc < b.itpc; if (a.y < b.ylo) return true; if (a.y >= b.yhi) return false; @@ -122,6 +127,7 @@ bool icarus::calo::NormalizeYZSQL::ScaleInfo::BinComp::operator() bool icarus::calo::NormalizeYZSQL::ScaleInfo::ScaleBin::contains (const Point& point) const noexcept { + if (point.iplane != iplane) return false; if (point.itpc != itpc) return false; if ((point.y < ylo) || (point.y >= yhi)) return false; return ((point.z >= zlo) && (point.z < zhi)); @@ -154,6 +160,7 @@ icarus::calo::NormalizeYZSQL::NormalizeYZSQL(fhicl::ParameterSet const &pset): void icarus::calo::NormalizeYZSQL::configure(const fhicl::ParameterSet& pset) {} const icarus::calo::NormalizeYZSQL::ScaleInfo& icarus::calo::NormalizeYZSQL::GetScaleInfo(uint64_t run) { + // check the cache if (fScaleInfos.count(run)) { return fScaleInfos.at(run); @@ -173,7 +180,13 @@ const icarus::calo::NormalizeYZSQL::ScaleInfo& icarus::calo::NormalizeYZSQL::Get // Iterate over the channels thisscale.bins.reserve(channels.size()); + for (unsigned ch = 0; ch < channels.size(); ch++) { + + long lplane; + fDB.GetNamedChannelData(ch, "plane", lplane); + int iplane(lplane); + std::string tpcname; fDB.GetNamedChannelData(ch, "tpc", tpcname); int itpc = -1; @@ -201,6 +214,7 @@ const icarus::calo::NormalizeYZSQL::ScaleInfo& icarus::calo::NormalizeYZSQL::Get bin.yhi = yhi; bin.zlo = zlo; bin.zhi = zhi; + bin.iplane = iplane; bin.itpc = itpc; bin.scale = scale; @@ -215,9 +229,13 @@ const icarus::calo::NormalizeYZSQL::ScaleInfo& icarus::calo::NormalizeYZSQL::Get double icarus::calo::NormalizeYZSQL::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 const& i = GetScaleInfo(e.id().runID().run()); + // plane + int plane = hit.WireID().Plane; + // compute itpc int cryo = hit.WireID().Cryostat; int tpc = hit.WireID().TPC; @@ -226,7 +244,7 @@ double icarus::calo::NormalizeYZSQL::Normalize(double dQdx, const art::Event &e, double y = location.y(); double z = location.z(); - ScaleInfo::Point const point { itpc, y, z }; + ScaleInfo::Point const point { plane, itpc, y, z }; ScaleInfo::ScaleBin const* b = i.findBin(point); double const scale = b? b->scale: 1; @@ -234,7 +252,7 @@ double icarus::calo::NormalizeYZSQL::Normalize(double dQdx, const art::Event &e, // TODO: what to do if no lifetime is found? throw an exception?? } - if (fVerbose) std::cout << "NormalizeYZSQL Tool -- Data Cryo: " << cryo << " TPC: " << tpc << " iTPC: " << itpc << " Y: " << y << " Z: " << z << " scale: " << scale << std::endl; + if (fVerbose) std::cout << "NormalizeYZSQL Tool -- Data Cryo: " << cryo << " Plane: " << plane << " TPC: " << tpc << " iTPC: " << itpc << " Y: " << y << " Z: " << z << " scale: " << scale << std::endl; return dQdx / scale; } diff --git a/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl b/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl index 623cc0fa8..6ca52f145 100644 --- a/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl +++ b/icaruscode/TPC/Calorimetry/calorimetryICARUS.fcl @@ -10,6 +10,9 @@ icarus_calorimetryalgmc: @local::standard_calorimetryalgmc # 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] +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] icarus_calorimetryalgdata.CalAreaConstants: @local::icarus_data_calconst icarus_calorimetryalgdata.CaloDoLifeTimeCorrection: false # handled by NormTools diff --git a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl index 09579df0a..2a69eb647 100644 --- a/icaruscode/TPC/Calorimetry/normtools_icarus.fcl +++ b/icaruscode/TPC/Calorimetry/normtools_icarus.fcl @@ -53,8 +53,8 @@ tpcgain_local: { yznorm_sql: { tool_type: NormalizeYZSQL - DBFileName: tpc_yz_correction_data - DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_yz_correction_data + DBFileName: tpc_yz_correction_allplanes_data + DBTag: @local::ICARUS_Calibration_GlobalTags.tpc_yz_correction_allplanes_data Verbose: false } diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index d1430c9e3..6bc7c326f 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -12,9 +12,9 @@ icarus_simwire_wirecell: { tool_type: WCLS apps: ["Pgrapher"] - // logsinks: ["stdout"] - // loglevels: ["magnify:debug"] - plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft"] + //logsinks: ["stdout"] + //loglevels: ["magnify:debug"] + plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft", "WireCellHio"] // needs to be found via your WIRECELL_PATH configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet"] // Contract note: these exact "type:name" must be used to identify @@ -28,17 +28,14 @@ icarus_simwire_wirecell: "wclsFrameSaver:simdigits1", "wclsFrameSaver:simdigits2", "wclsFrameSaver:simdigits3" - // ,"wclsFrameSaver:nfdigits", - // "wclsFrameSaver:spsignals", - // "wclsFrameSaver:spthresholds" ] // Make available parameters via Jsonnet's std.extVar() params: { - // Changing this to match Gray's latest data drive field responses - //files_fields: "garfield-icarus-fnal-rev2.json.bz2" files_fields: "icarus_fnal_fit_ks_P0nom.json.bz2" - file_rcresp: "" # use the RCResponse by default - } + file_rcresp: "icarus_fnal_rc_tail.json" # use the RCResponse by default + cathode_input_format: "array" # scalar (flat) or array (bent) + SimEnergyDepositLabel: "ionization" + } structs: { # load values from simulationservices_icarus.fcl # Longitudinal diffusion constant [cm2/ns] @@ -51,54 +48,800 @@ icarus_simwire_wirecell: # Electron drift speed, assumes a certain applied E-field [mm/us] # driftSpeed: 1.5756 # Scaling Parameters from int and coh noise components - int_noise_scale: 1.0 - coh_noise_scale: 1.0 + int_noise_scale: 1.0 + coh_noise_scale: 1.0 - include_noise: true # noise on by default overlay_drifter: false # default drifter by default # Gain and shaping time - //gain0: 14.9654 # mV/fC - //gain1: 14.9654 # mV/fC - //gain2: 14.9654 # mV/fC gain0: 17.05212 # mV/fC gain1: 12.6181926 # mV/fC gain2: 13.0261362 # mV/fC shaping0: 1.3 # us - shaping1: 1.3 # us + 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 - + } } } -# TUNED FR CONFIG -icarus_simwire_wirecell_fitSR: @local::icarus_simwire_wirecell -# Add in the ER tail -icarus_simwire_wirecell_fitSR.wcls_main.params.file_rcresp: "icarus_fnal_rc_tail.json" -# Add in the tuned field responses -icarus_simwire_wirecell_fitSR.wcls_main.params.files_fields: "icarus_fnal_fit_ks_P0nom.json.bz2" -# futz with shaping+gain values (note these are really just scale factors and should not be taken literally) -icarus_simwire_wirecell_fitSR.wcls_main.structs.gain0: 11.9918701 # mV/fC -icarus_simwire_wirecell_fitSR.wcls_main.structs.gain1: 12.6181926 # mV/fC -icarus_simwire_wirecell_fitSR.wcls_main.structs.gain2: 13.0261362 # mV/fC -icarus_simwire_wirecell_fitSR.wcls_main.structs.shaping1: 1.45 # us - -# TUNED FR CONFIG w/ Front Induction Nominal -icarus_simwire_wirecell_fitSR_P0nom: @local::icarus_simwire_wirecell -# Add in the ER tail -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.params.file_rcresp: "icarus_fnal_rc_tail.json" -# Add in the tuned field responses (except for P0) -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.params.files_fields: "icarus_fnal_fit_ks_P0nom.json.bz2" -# futz with shaping+gain values (note these are really just scale factors and should not be taken literally) -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.structs.gain0: 17.05212 # mV/fC -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.structs.gain1: 12.6181926 # mV/fC -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.structs.gain2: 13.0261362 # mV/fC -icarus_simwire_wirecell_fitSR_P0nom.wcls_main.structs.shaping1: 1.45 # us +# SimChannel only (SConly) CONFIG +icarus_simwire_wirecell_SConly: @local::icarus_simwire_wirecell +icarus_simwire_wirecell_SConly.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-true.jsonnet"] +icarus_simwire_wirecell_SConly.wcls_main.outputers:[ + "wclsDepoFluxWriter:postdrift" +] + +icarus_simwire_wirecell_shifted: @local::icarus_simwire_wirecell +icarus_simwire_wirecell_shifted.wcls_main.params.SimEnergyDepositLabel: "shifted" + +icarus_simwire_wirecell_filtersed: @local::icarus_simwire_wirecell +icarus_simwire_wirecell_filtersed.wcls_main.params.SimEnergyDepositLabel: "filtersed" + +icarus_simwire_wirecell_yz: @local::icarus_simwire_wirecell_filtersed +icarus_simwire_wirecell_yz.wcls_main.configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet"] +icarus_simwire_wirecell_yz.wcls_main.outputers: [ + "wclsDepoFluxWriter:postdrift0", + "wclsDepoFluxWriter:postdrift1", + "wclsDepoFluxWriter:postdrift2", + "wclsDepoFluxWriter:postdrift3", + "wclsDepoFluxWriter:postdrift4", + "wclsDepoFluxWriter:postdrift5", + "wclsDepoFluxWriter:postdrift6", + "wclsDepoFluxWriter:postdrift7", + "wclsDepoFluxWriter:postdrift8", + "wclsDepoFluxWriter:postdrift9", + "wclsDepoFluxWriter:postdrift10", + "wclsDepoFluxWriter:postdrift11", + "wclsDepoFluxWriter:postdrift12", + "wclsDepoFluxWriter:postdrift13", + "wclsDepoFluxWriter:postdrift14", + "wclsDepoFluxWriter:postdrift15", + "wclsDepoFluxWriter:postdrift16", + "wclsDepoFluxWriter:postdrift17", + "wclsDepoFluxWriter:postdrift18", + "wclsDepoFluxWriter:postdrift19", + "wclsDepoFluxWriter:postdrift20", + "wclsDepoFluxWriter:postdrift21", + "wclsDepoFluxWriter:postdrift22", + "wclsDepoFluxWriter:postdrift23", + "wclsDepoFluxWriter:postdrift24", + "wclsDepoFluxWriter:postdrift25", + "wclsDepoFluxWriter:postdrift26", + "wclsDepoFluxWriter:postdrift27", + "wclsDepoFluxWriter:postdrift28", + "wclsDepoFluxWriter:postdrift29", + "wclsDepoFluxWriter:postdrift30", + "wclsDepoFluxWriter:postdrift31", + "wclsDepoFluxWriter:postdrift32", + "wclsDepoFluxWriter:postdrift33", + "wclsDepoFluxWriter:postdrift34", + "wclsDepoFluxWriter:postdrift35", + "wclsDepoFluxWriter:postdrift36", + "wclsDepoFluxWriter:postdrift37", + "wclsDepoFluxWriter:postdrift38", + "wclsDepoFluxWriter:postdrift39", + "wclsDepoFluxWriter:postdrift40", + "wclsDepoFluxWriter:postdrift41", + "wclsDepoFluxWriter:postdrift42", + "wclsDepoFluxWriter:postdrift43", + "wclsDepoFluxWriter:postdrift44", + "wclsDepoFluxWriter:postdrift45", + "wclsDepoFluxWriter:postdrift46", + "wclsDepoFluxWriter:postdrift47", + "wclsDepoFluxWriter:postdrift48", + "wclsDepoFluxWriter:postdrift49", + "wclsDepoFluxWriter:postdrift50", + "wclsDepoFluxWriter:postdrift51", + "wclsDepoFluxWriter:postdrift52", + "wclsDepoFluxWriter:postdrift53", + "wclsDepoFluxWriter:postdrift54", + "wclsDepoFluxWriter:postdrift55", + "wclsDepoFluxWriter:postdrift56", + "wclsDepoFluxWriter:postdrift57", + "wclsDepoFluxWriter:postdrift58", + "wclsDepoFluxWriter:postdrift59", + "wclsDepoFluxWriter:postdrift60", + "wclsDepoFluxWriter:postdrift61", + "wclsDepoFluxWriter:postdrift62", + "wclsDepoFluxWriter:postdrift63", + "wclsDepoFluxWriter:postdrift64", + "wclsDepoFluxWriter:postdrift65", + "wclsDepoFluxWriter:postdrift66", + "wclsDepoFluxWriter:postdrift67", + "wclsDepoFluxWriter:postdrift68", + "wclsDepoFluxWriter:postdrift69", + "wclsDepoFluxWriter:postdrift70", + "wclsDepoFluxWriter:postdrift71", + "wclsDepoFluxWriter:postdrift72", + "wclsDepoFluxWriter:postdrift73", + "wclsDepoFluxWriter:postdrift74", + "wclsDepoFluxWriter:postdrift75", + "wclsDepoFluxWriter:postdrift76", + "wclsDepoFluxWriter:postdrift77", + "wclsDepoFluxWriter:postdrift78", + "wclsDepoFluxWriter:postdrift79", + "wclsDepoFluxWriter:postdrift80", + "wclsDepoFluxWriter:postdrift81", + "wclsDepoFluxWriter:postdrift82", + "wclsDepoFluxWriter:postdrift83", + "wclsDepoFluxWriter:postdrift84", + "wclsDepoFluxWriter:postdrift85", + "wclsDepoFluxWriter:postdrift86", + "wclsDepoFluxWriter:postdrift87", + "wclsDepoFluxWriter:postdrift88", + "wclsDepoFluxWriter:postdrift89", + "wclsDepoFluxWriter:postdrift90", + "wclsDepoFluxWriter:postdrift91", + "wclsDepoFluxWriter:postdrift92", + "wclsDepoFluxWriter:postdrift93", + "wclsDepoFluxWriter:postdrift94", + "wclsDepoFluxWriter:postdrift95", + "wclsDepoFluxWriter:postdrift96", + "wclsDepoFluxWriter:postdrift97", + "wclsDepoFluxWriter:postdrift98", + "wclsDepoFluxWriter:postdrift99", + "wclsDepoFluxWriter:postdrift100", + "wclsDepoFluxWriter:postdrift101", + "wclsDepoFluxWriter:postdrift102", + "wclsDepoFluxWriter:postdrift103", + "wclsDepoFluxWriter:postdrift104", + "wclsDepoFluxWriter:postdrift105", + "wclsDepoFluxWriter:postdrift106", + "wclsDepoFluxWriter:postdrift107", + "wclsDepoFluxWriter:postdrift108", + "wclsDepoFluxWriter:postdrift109", + "wclsDepoFluxWriter:postdrift110", + "wclsDepoFluxWriter:postdrift111", + "wclsDepoFluxWriter:postdrift112", + "wclsDepoFluxWriter:postdrift113", + "wclsDepoFluxWriter:postdrift114", + "wclsDepoFluxWriter:postdrift115", + "wclsDepoFluxWriter:postdrift116", + "wclsDepoFluxWriter:postdrift117", + "wclsDepoFluxWriter:postdrift118", + "wclsDepoFluxWriter:postdrift119", + "wclsDepoFluxWriter:postdrift120", + "wclsDepoFluxWriter:postdrift121", + "wclsDepoFluxWriter:postdrift122", + "wclsDepoFluxWriter:postdrift123", + "wclsDepoFluxWriter:postdrift124", + "wclsDepoFluxWriter:postdrift125", + "wclsDepoFluxWriter:postdrift126", + "wclsDepoFluxWriter:postdrift127", + "wclsDepoFluxWriter:postdrift128", + "wclsDepoFluxWriter:postdrift129", + "wclsDepoFluxWriter:postdrift130", + "wclsDepoFluxWriter:postdrift131", + "wclsDepoFluxWriter:postdrift132", + "wclsDepoFluxWriter:postdrift133", + "wclsDepoFluxWriter:postdrift134", + "wclsDepoFluxWriter:postdrift135", + "wclsDepoFluxWriter:postdrift136", + "wclsDepoFluxWriter:postdrift137", + "wclsDepoFluxWriter:postdrift138", + "wclsDepoFluxWriter:postdrift139", + "wclsDepoFluxWriter:postdrift140", + "wclsDepoFluxWriter:postdrift141", + "wclsDepoFluxWriter:postdrift142", + "wclsDepoFluxWriter:postdrift143", + "wclsDepoFluxWriter:postdrift144", + "wclsDepoFluxWriter:postdrift145", + "wclsDepoFluxWriter:postdrift146", + "wclsDepoFluxWriter:postdrift147", + "wclsDepoFluxWriter:postdrift148", + "wclsDepoFluxWriter:postdrift149", + "wclsDepoFluxWriter:postdrift150", + "wclsDepoFluxWriter:postdrift151", + "wclsDepoFluxWriter:postdrift152", + "wclsDepoFluxWriter:postdrift153", + "wclsDepoFluxWriter:postdrift154", + "wclsDepoFluxWriter:postdrift155", + "wclsDepoFluxWriter:postdrift156", + "wclsDepoFluxWriter:postdrift157", + "wclsDepoFluxWriter:postdrift158", + "wclsDepoFluxWriter:postdrift159", + "wclsDepoFluxWriter:postdrift160", + "wclsDepoFluxWriter:postdrift161", + "wclsDepoFluxWriter:postdrift162", + "wclsDepoFluxWriter:postdrift163", + "wclsDepoFluxWriter:postdrift164", + "wclsDepoFluxWriter:postdrift165", + "wclsDepoFluxWriter:postdrift166", + "wclsDepoFluxWriter:postdrift167", + "wclsDepoFluxWriter:postdrift168", + "wclsDepoFluxWriter:postdrift169", + "wclsDepoFluxWriter:postdrift170", + "wclsDepoFluxWriter:postdrift171", + "wclsDepoFluxWriter:postdrift172", + "wclsDepoFluxWriter:postdrift173", + "wclsDepoFluxWriter:postdrift174", + "wclsDepoFluxWriter:postdrift175", + "wclsDepoFluxWriter:postdrift176", + "wclsDepoFluxWriter:postdrift177", + "wclsDepoFluxWriter:postdrift178", + "wclsDepoFluxWriter:postdrift179", + "wclsDepoFluxWriter:postdrift180", + "wclsDepoFluxWriter:postdrift181", + "wclsDepoFluxWriter:postdrift182", + "wclsDepoFluxWriter:postdrift183", + "wclsDepoFluxWriter:postdrift184", + "wclsDepoFluxWriter:postdrift185", + "wclsDepoFluxWriter:postdrift186", + "wclsDepoFluxWriter:postdrift187", + "wclsDepoFluxWriter:postdrift188", + "wclsDepoFluxWriter:postdrift189", + "wclsDepoFluxWriter:postdrift190", + "wclsDepoFluxWriter:postdrift191", + "wclsDepoFluxWriter:postdrift192", + "wclsDepoFluxWriter:postdrift193", + "wclsDepoFluxWriter:postdrift194", + "wclsDepoFluxWriter:postdrift195", + "wclsDepoFluxWriter:postdrift196", + "wclsDepoFluxWriter:postdrift197", + "wclsDepoFluxWriter:postdrift198", + "wclsDepoFluxWriter:postdrift199", + "wclsDepoFluxWriter:postdrift200", + "wclsDepoFluxWriter:postdrift201", + "wclsDepoFluxWriter:postdrift202", + "wclsDepoFluxWriter:postdrift203", + "wclsDepoFluxWriter:postdrift204", + "wclsDepoFluxWriter:postdrift205", + "wclsDepoFluxWriter:postdrift206", + "wclsDepoFluxWriter:postdrift207", + "wclsDepoFluxWriter:postdrift208", + "wclsDepoFluxWriter:postdrift209", + "wclsDepoFluxWriter:postdrift210", + "wclsDepoFluxWriter:postdrift211", + "wclsDepoFluxWriter:postdrift212", + "wclsDepoFluxWriter:postdrift213", + "wclsDepoFluxWriter:postdrift214", + "wclsDepoFluxWriter:postdrift215", + "wclsDepoFluxWriter:postdrift216", + "wclsDepoFluxWriter:postdrift217", + "wclsDepoFluxWriter:postdrift218", + "wclsDepoFluxWriter:postdrift219", + "wclsDepoFluxWriter:postdrift220", + "wclsDepoFluxWriter:postdrift221", + "wclsDepoFluxWriter:postdrift222", + "wclsDepoFluxWriter:postdrift223", + "wclsDepoFluxWriter:postdrift224", + "wclsDepoFluxWriter:postdrift225", + "wclsDepoFluxWriter:postdrift226", + "wclsDepoFluxWriter:postdrift227", + "wclsDepoFluxWriter:postdrift228", + "wclsDepoFluxWriter:postdrift229", + "wclsDepoFluxWriter:postdrift230", + "wclsDepoFluxWriter:postdrift231", + "wclsDepoFluxWriter:postdrift232", + "wclsDepoFluxWriter:postdrift233", + "wclsDepoFluxWriter:postdrift234", + "wclsDepoFluxWriter:postdrift235", + "wclsDepoFluxWriter:postdrift236", + "wclsDepoFluxWriter:postdrift237", + "wclsDepoFluxWriter:postdrift238", + "wclsDepoFluxWriter:postdrift239", + "wclsDepoFluxWriter:postdrift240", + "wclsDepoFluxWriter:postdrift241", + "wclsDepoFluxWriter:postdrift242", + "wclsDepoFluxWriter:postdrift243", + "wclsDepoFluxWriter:postdrift244", + "wclsDepoFluxWriter:postdrift245", + "wclsDepoFluxWriter:postdrift246", + "wclsDepoFluxWriter:postdrift247", + "wclsDepoFluxWriter:postdrift248", + "wclsDepoFluxWriter:postdrift249", + "wclsDepoFluxWriter:postdrift250", + "wclsDepoFluxWriter:postdrift251", + "wclsDepoFluxWriter:postdrift252", + "wclsDepoFluxWriter:postdrift253", + "wclsDepoFluxWriter:postdrift254", + "wclsDepoFluxWriter:postdrift255", + "wclsDepoFluxWriter:postdrift256", + "wclsDepoFluxWriter:postdrift257", + "wclsDepoFluxWriter:postdrift258", + "wclsDepoFluxWriter:postdrift259", + "wclsDepoFluxWriter:postdrift260", + "wclsDepoFluxWriter:postdrift261", + "wclsDepoFluxWriter:postdrift262", + "wclsDepoFluxWriter:postdrift263", + "wclsDepoFluxWriter:postdrift264", + "wclsDepoFluxWriter:postdrift265", + "wclsDepoFluxWriter:postdrift266", + "wclsDepoFluxWriter:postdrift267", + "wclsDepoFluxWriter:postdrift268", + "wclsDepoFluxWriter:postdrift269", + "wclsDepoFluxWriter:postdrift270", + "wclsDepoFluxWriter:postdrift271", + "wclsDepoFluxWriter:postdrift272", + "wclsDepoFluxWriter:postdrift273", + "wclsDepoFluxWriter:postdrift274", + "wclsDepoFluxWriter:postdrift275", + "wclsDepoFluxWriter:postdrift276", + "wclsDepoFluxWriter:postdrift277", + "wclsDepoFluxWriter:postdrift278", + "wclsDepoFluxWriter:postdrift279", + "wclsDepoFluxWriter:postdrift280", + "wclsDepoFluxWriter:postdrift281", + "wclsDepoFluxWriter:postdrift282", + "wclsDepoFluxWriter:postdrift283", + "wclsDepoFluxWriter:postdrift284", + "wclsDepoFluxWriter:postdrift285", + "wclsDepoFluxWriter:postdrift286", + "wclsDepoFluxWriter:postdrift287", + "wclsDepoFluxWriter:postdrift288", + "wclsDepoFluxWriter:postdrift289", + "wclsDepoFluxWriter:postdrift290", + "wclsDepoFluxWriter:postdrift291", + "wclsDepoFluxWriter:postdrift292", + "wclsDepoFluxWriter:postdrift293", + "wclsDepoFluxWriter:postdrift294", + "wclsDepoFluxWriter:postdrift295", + "wclsDepoFluxWriter:postdrift296", + "wclsDepoFluxWriter:postdrift297", + "wclsDepoFluxWriter:postdrift298", + "wclsDepoFluxWriter:postdrift299", + "wclsDepoFluxWriter:postdrift300", + "wclsDepoFluxWriter:postdrift301", + "wclsDepoFluxWriter:postdrift302", + "wclsDepoFluxWriter:postdrift303", + "wclsDepoFluxWriter:postdrift304", + "wclsDepoFluxWriter:postdrift305", + "wclsDepoFluxWriter:postdrift306", + "wclsDepoFluxWriter:postdrift307", + "wclsDepoFluxWriter:postdrift308", + "wclsDepoFluxWriter:postdrift309", + "wclsDepoFluxWriter:postdrift310", + "wclsDepoFluxWriter:postdrift311", + "wclsDepoFluxWriter:postdrift312", + "wclsDepoFluxWriter:postdrift313", + "wclsDepoFluxWriter:postdrift314", + "wclsDepoFluxWriter:postdrift315", + "wclsDepoFluxWriter:postdrift316", + "wclsDepoFluxWriter:postdrift317", + "wclsDepoFluxWriter:postdrift318", + "wclsDepoFluxWriter:postdrift319", + "wclsDepoFluxWriter:postdrift320", + "wclsDepoFluxWriter:postdrift321", + "wclsDepoFluxWriter:postdrift322", + "wclsDepoFluxWriter:postdrift323", + "wclsDepoFluxWriter:postdrift324", + "wclsDepoFluxWriter:postdrift325", + "wclsDepoFluxWriter:postdrift326", + "wclsDepoFluxWriter:postdrift327", + "wclsDepoFluxWriter:postdrift328", + "wclsDepoFluxWriter:postdrift329", + "wclsDepoFluxWriter:postdrift330", + "wclsDepoFluxWriter:postdrift331", + "wclsDepoFluxWriter:postdrift332", + "wclsDepoFluxWriter:postdrift333", + "wclsDepoFluxWriter:postdrift334", + "wclsDepoFluxWriter:postdrift335", + "wclsDepoFluxWriter:postdrift336", + "wclsDepoFluxWriter:postdrift337", + "wclsDepoFluxWriter:postdrift338", + "wclsDepoFluxWriter:postdrift339", + "wclsDepoFluxWriter:postdrift340", + "wclsDepoFluxWriter:postdrift341", + "wclsDepoFluxWriter:postdrift342", + "wclsDepoFluxWriter:postdrift343", + "wclsDepoFluxWriter:postdrift344", + "wclsDepoFluxWriter:postdrift345", + "wclsDepoFluxWriter:postdrift346", + "wclsDepoFluxWriter:postdrift347", + "wclsDepoFluxWriter:postdrift348", + "wclsDepoFluxWriter:postdrift349", + "wclsDepoFluxWriter:postdrift350", + "wclsDepoFluxWriter:postdrift351", + "wclsDepoFluxWriter:postdrift352", + "wclsDepoFluxWriter:postdrift353", + "wclsDepoFluxWriter:postdrift354", + "wclsDepoFluxWriter:postdrift355", + "wclsDepoFluxWriter:postdrift356", + "wclsDepoFluxWriter:postdrift357", + "wclsDepoFluxWriter:postdrift358", + "wclsDepoFluxWriter:postdrift359", + "wclsFrameSaver:simdigits0", + "wclsFrameSaver:simdigits1", + "wclsFrameSaver:simdigits2", + "wclsFrameSaver:simdigits3" +] +icarus_simwire_wirecell_yz.wcls_main.params.files_fields: '"icarus_final_fit_dqdx0.json.bz2", + "icarus_final_fit_dqdx1.json.bz2", + "icarus_final_fit_dqdx2.json.bz2", + "icarus_final_fit_dqdx3.json.bz2", + "icarus_final_fit_dqdx4.json.bz2", + "icarus_final_fit_dqdx5.json.bz2", + "icarus_final_fit_dqdx6.json.bz2", + "icarus_final_fit_dqdx7.json.bz2", + "icarus_final_fit_dqdx8.json.bz2", + "icarus_final_fit_dqdx9.json.bz2", + "icarus_final_fit_dqdx10.json.bz2", + "icarus_final_fit_dqdx11.json.bz2", + "icarus_final_fit_dqdx12.json.bz2", + "icarus_final_fit_dqdx13.json.bz2", + "icarus_final_fit_dqdx14.json.bz2"' + +icarus_simwire_wirecell_yz.wcls_main.structs.lifetime_TPCEE: @local::icarus_detproperties.Electronlifetime +icarus_simwire_wirecell_yz.wcls_main.structs.lifetime_TPCEW: @local::icarus_detproperties.Electronlifetime +icarus_simwire_wirecell_yz.wcls_main.structs.lifetime_TPCWE: @local::icarus_detproperties.Electronlifetime +icarus_simwire_wirecell_yz.wcls_main.structs.lifetime_TPCWW: @local::icarus_detproperties.Electronlifetime + +# config for overlays +icarus_simwire_wirecell_yz_overlay: @local::icarus_simwire_wirecell_yz + +icarus_simwire_wirecell_yz_overlay.wcls_main.structs.coh_noise_scale: 0.0 # disable noise +icarus_simwire_wirecell_yz_overlay.wcls_main.structs.int_noise_scale: 0.0 # ditto +icarus_simwire_wirecell_yz_overlay.wcls_main.structs.overlay_drifter: true +icarus_simwire_wirecell_yz_overlay.wcls_main.plugins: [@sequence::icarus_simwire_wirecell_yz_overlay.wcls_main.plugins, "WireCellICARUSDrifter"] +icarus_simwire_wirecell_yz_overlay.wcls_main.inputers: ["wclsSimDepoSetSource:electron", + 'wclsICARUSDrifter:drifter0', + 'wclsICARUSDrifter:drifter1', + 'wclsICARUSDrifter:drifter2', + 'wclsICARUSDrifter:drifter3', + 'wclsICARUSDrifter:drifter4', + 'wclsICARUSDrifter:drifter5', + 'wclsICARUSDrifter:drifter6', + 'wclsICARUSDrifter:drifter7', + 'wclsICARUSDrifter:drifter8', + 'wclsICARUSDrifter:drifter9', + 'wclsICARUSDrifter:drifter10', + 'wclsICARUSDrifter:drifter11', + 'wclsICARUSDrifter:drifter12', + 'wclsICARUSDrifter:drifter13', + 'wclsICARUSDrifter:drifter14', + 'wclsICARUSDrifter:drifter15', + 'wclsICARUSDrifter:drifter16', + 'wclsICARUSDrifter:drifter17', + 'wclsICARUSDrifter:drifter18', + 'wclsICARUSDrifter:drifter19', + 'wclsICARUSDrifter:drifter20', + 'wclsICARUSDrifter:drifter21', + 'wclsICARUSDrifter:drifter22', + 'wclsICARUSDrifter:drifter23', + 'wclsICARUSDrifter:drifter24', + 'wclsICARUSDrifter:drifter25', + 'wclsICARUSDrifter:drifter26', + 'wclsICARUSDrifter:drifter27', + 'wclsICARUSDrifter:drifter28', + 'wclsICARUSDrifter:drifter29', + 'wclsICARUSDrifter:drifter30', + 'wclsICARUSDrifter:drifter31', + 'wclsICARUSDrifter:drifter32', + 'wclsICARUSDrifter:drifter33', + 'wclsICARUSDrifter:drifter34', + 'wclsICARUSDrifter:drifter35', + 'wclsICARUSDrifter:drifter36', + 'wclsICARUSDrifter:drifter37', + 'wclsICARUSDrifter:drifter38', + 'wclsICARUSDrifter:drifter39', + 'wclsICARUSDrifter:drifter40', + 'wclsICARUSDrifter:drifter41', + 'wclsICARUSDrifter:drifter42', + 'wclsICARUSDrifter:drifter43', + 'wclsICARUSDrifter:drifter44', + 'wclsICARUSDrifter:drifter45', + 'wclsICARUSDrifter:drifter46', + 'wclsICARUSDrifter:drifter47', + 'wclsICARUSDrifter:drifter48', + 'wclsICARUSDrifter:drifter49', + 'wclsICARUSDrifter:drifter50', + 'wclsICARUSDrifter:drifter51', + 'wclsICARUSDrifter:drifter52', + 'wclsICARUSDrifter:drifter53', + 'wclsICARUSDrifter:drifter54', + 'wclsICARUSDrifter:drifter55', + 'wclsICARUSDrifter:drifter56', + 'wclsICARUSDrifter:drifter57', + 'wclsICARUSDrifter:drifter58', + 'wclsICARUSDrifter:drifter59', + 'wclsICARUSDrifter:drifter60', + 'wclsICARUSDrifter:drifter61', + 'wclsICARUSDrifter:drifter62', + 'wclsICARUSDrifter:drifter63', + 'wclsICARUSDrifter:drifter64', + 'wclsICARUSDrifter:drifter65', + 'wclsICARUSDrifter:drifter66', + 'wclsICARUSDrifter:drifter67', + 'wclsICARUSDrifter:drifter68', + 'wclsICARUSDrifter:drifter69', + 'wclsICARUSDrifter:drifter70', + 'wclsICARUSDrifter:drifter71', + 'wclsICARUSDrifter:drifter72', + 'wclsICARUSDrifter:drifter73', + 'wclsICARUSDrifter:drifter74', + 'wclsICARUSDrifter:drifter75', + 'wclsICARUSDrifter:drifter76', + 'wclsICARUSDrifter:drifter77', + 'wclsICARUSDrifter:drifter78', + 'wclsICARUSDrifter:drifter79', + 'wclsICARUSDrifter:drifter80', + 'wclsICARUSDrifter:drifter81', + 'wclsICARUSDrifter:drifter82', + 'wclsICARUSDrifter:drifter83', + 'wclsICARUSDrifter:drifter84', + 'wclsICARUSDrifter:drifter85', + 'wclsICARUSDrifter:drifter86', + 'wclsICARUSDrifter:drifter87', + 'wclsICARUSDrifter:drifter88', + 'wclsICARUSDrifter:drifter89', + 'wclsICARUSDrifter:drifter90', + 'wclsICARUSDrifter:drifter91', + 'wclsICARUSDrifter:drifter92', + 'wclsICARUSDrifter:drifter93', + 'wclsICARUSDrifter:drifter94', + 'wclsICARUSDrifter:drifter95', + 'wclsICARUSDrifter:drifter96', + 'wclsICARUSDrifter:drifter97', + 'wclsICARUSDrifter:drifter98', + 'wclsICARUSDrifter:drifter99', + 'wclsICARUSDrifter:drifter100', + 'wclsICARUSDrifter:drifter101', + 'wclsICARUSDrifter:drifter102', + 'wclsICARUSDrifter:drifter103', + 'wclsICARUSDrifter:drifter104', + 'wclsICARUSDrifter:drifter105', + 'wclsICARUSDrifter:drifter106', + 'wclsICARUSDrifter:drifter107', + 'wclsICARUSDrifter:drifter108', + 'wclsICARUSDrifter:drifter109', + 'wclsICARUSDrifter:drifter110', + 'wclsICARUSDrifter:drifter111', + 'wclsICARUSDrifter:drifter112', + 'wclsICARUSDrifter:drifter113', + 'wclsICARUSDrifter:drifter114', + 'wclsICARUSDrifter:drifter115', + 'wclsICARUSDrifter:drifter116', + 'wclsICARUSDrifter:drifter117', + 'wclsICARUSDrifter:drifter118', + 'wclsICARUSDrifter:drifter119', + 'wclsICARUSDrifter:drifter120', + 'wclsICARUSDrifter:drifter121', + 'wclsICARUSDrifter:drifter122', + 'wclsICARUSDrifter:drifter123', + 'wclsICARUSDrifter:drifter124', + 'wclsICARUSDrifter:drifter125', + 'wclsICARUSDrifter:drifter126', + 'wclsICARUSDrifter:drifter127', + 'wclsICARUSDrifter:drifter128', + 'wclsICARUSDrifter:drifter129', + 'wclsICARUSDrifter:drifter130', + 'wclsICARUSDrifter:drifter131', + 'wclsICARUSDrifter:drifter132', + 'wclsICARUSDrifter:drifter133', + 'wclsICARUSDrifter:drifter134', + 'wclsICARUSDrifter:drifter135', + 'wclsICARUSDrifter:drifter136', + 'wclsICARUSDrifter:drifter137', + 'wclsICARUSDrifter:drifter138', + 'wclsICARUSDrifter:drifter139', + 'wclsICARUSDrifter:drifter140', + 'wclsICARUSDrifter:drifter141', + 'wclsICARUSDrifter:drifter142', + 'wclsICARUSDrifter:drifter143', + 'wclsICARUSDrifter:drifter144', + 'wclsICARUSDrifter:drifter145', + 'wclsICARUSDrifter:drifter146', + 'wclsICARUSDrifter:drifter147', + 'wclsICARUSDrifter:drifter148', + 'wclsICARUSDrifter:drifter149', + 'wclsICARUSDrifter:drifter150', + 'wclsICARUSDrifter:drifter151', + 'wclsICARUSDrifter:drifter152', + 'wclsICARUSDrifter:drifter153', + 'wclsICARUSDrifter:drifter154', + 'wclsICARUSDrifter:drifter155', + 'wclsICARUSDrifter:drifter156', + 'wclsICARUSDrifter:drifter157', + 'wclsICARUSDrifter:drifter158', + 'wclsICARUSDrifter:drifter159', + 'wclsICARUSDrifter:drifter160', + 'wclsICARUSDrifter:drifter161', + 'wclsICARUSDrifter:drifter162', + 'wclsICARUSDrifter:drifter163', + 'wclsICARUSDrifter:drifter164', + 'wclsICARUSDrifter:drifter165', + 'wclsICARUSDrifter:drifter166', + 'wclsICARUSDrifter:drifter167', + 'wclsICARUSDrifter:drifter168', + 'wclsICARUSDrifter:drifter169', + 'wclsICARUSDrifter:drifter170', + 'wclsICARUSDrifter:drifter171', + 'wclsICARUSDrifter:drifter172', + 'wclsICARUSDrifter:drifter173', + 'wclsICARUSDrifter:drifter174', + 'wclsICARUSDrifter:drifter175', + 'wclsICARUSDrifter:drifter176', + 'wclsICARUSDrifter:drifter177', + 'wclsICARUSDrifter:drifter178', + 'wclsICARUSDrifter:drifter179', + 'wclsICARUSDrifter:drifter180', + 'wclsICARUSDrifter:drifter181', + 'wclsICARUSDrifter:drifter182', + 'wclsICARUSDrifter:drifter183', + 'wclsICARUSDrifter:drifter184', + 'wclsICARUSDrifter:drifter185', + 'wclsICARUSDrifter:drifter186', + 'wclsICARUSDrifter:drifter187', + 'wclsICARUSDrifter:drifter188', + 'wclsICARUSDrifter:drifter189', + 'wclsICARUSDrifter:drifter190', + 'wclsICARUSDrifter:drifter191', + 'wclsICARUSDrifter:drifter192', + 'wclsICARUSDrifter:drifter193', + 'wclsICARUSDrifter:drifter194', + 'wclsICARUSDrifter:drifter195', + 'wclsICARUSDrifter:drifter196', + 'wclsICARUSDrifter:drifter197', + 'wclsICARUSDrifter:drifter198', + 'wclsICARUSDrifter:drifter199', + 'wclsICARUSDrifter:drifter200', + 'wclsICARUSDrifter:drifter201', + 'wclsICARUSDrifter:drifter202', + 'wclsICARUSDrifter:drifter203', + 'wclsICARUSDrifter:drifter204', + 'wclsICARUSDrifter:drifter205', + 'wclsICARUSDrifter:drifter206', + 'wclsICARUSDrifter:drifter207', + 'wclsICARUSDrifter:drifter208', + 'wclsICARUSDrifter:drifter209', + 'wclsICARUSDrifter:drifter210', + 'wclsICARUSDrifter:drifter211', + 'wclsICARUSDrifter:drifter212', + 'wclsICARUSDrifter:drifter213', + 'wclsICARUSDrifter:drifter214', + 'wclsICARUSDrifter:drifter215', + 'wclsICARUSDrifter:drifter216', + 'wclsICARUSDrifter:drifter217', + 'wclsICARUSDrifter:drifter218', + 'wclsICARUSDrifter:drifter219', + 'wclsICARUSDrifter:drifter220', + 'wclsICARUSDrifter:drifter221', + 'wclsICARUSDrifter:drifter222', + 'wclsICARUSDrifter:drifter223', + 'wclsICARUSDrifter:drifter224', + 'wclsICARUSDrifter:drifter225', + 'wclsICARUSDrifter:drifter226', + 'wclsICARUSDrifter:drifter227', + 'wclsICARUSDrifter:drifter228', + 'wclsICARUSDrifter:drifter229', + 'wclsICARUSDrifter:drifter230', + 'wclsICARUSDrifter:drifter231', + 'wclsICARUSDrifter:drifter232', + 'wclsICARUSDrifter:drifter233', + 'wclsICARUSDrifter:drifter234', + 'wclsICARUSDrifter:drifter235', + 'wclsICARUSDrifter:drifter236', + 'wclsICARUSDrifter:drifter237', + 'wclsICARUSDrifter:drifter238', + 'wclsICARUSDrifter:drifter239', + 'wclsICARUSDrifter:drifter240', + 'wclsICARUSDrifter:drifter241', + 'wclsICARUSDrifter:drifter242', + 'wclsICARUSDrifter:drifter243', + 'wclsICARUSDrifter:drifter244', + 'wclsICARUSDrifter:drifter245', + 'wclsICARUSDrifter:drifter246', + 'wclsICARUSDrifter:drifter247', + 'wclsICARUSDrifter:drifter248', + 'wclsICARUSDrifter:drifter249', + 'wclsICARUSDrifter:drifter250', + 'wclsICARUSDrifter:drifter251', + 'wclsICARUSDrifter:drifter252', + 'wclsICARUSDrifter:drifter253', + 'wclsICARUSDrifter:drifter254', + 'wclsICARUSDrifter:drifter255', + 'wclsICARUSDrifter:drifter256', + 'wclsICARUSDrifter:drifter257', + 'wclsICARUSDrifter:drifter258', + 'wclsICARUSDrifter:drifter259', + 'wclsICARUSDrifter:drifter260', + 'wclsICARUSDrifter:drifter261', + 'wclsICARUSDrifter:drifter262', + 'wclsICARUSDrifter:drifter263', + 'wclsICARUSDrifter:drifter264', + 'wclsICARUSDrifter:drifter265', + 'wclsICARUSDrifter:drifter266', + 'wclsICARUSDrifter:drifter267', + 'wclsICARUSDrifter:drifter268', + 'wclsICARUSDrifter:drifter269', + 'wclsICARUSDrifter:drifter270', + 'wclsICARUSDrifter:drifter271', + 'wclsICARUSDrifter:drifter272', + 'wclsICARUSDrifter:drifter273', + 'wclsICARUSDrifter:drifter274', + 'wclsICARUSDrifter:drifter275', + 'wclsICARUSDrifter:drifter276', + 'wclsICARUSDrifter:drifter277', + 'wclsICARUSDrifter:drifter278', + 'wclsICARUSDrifter:drifter279', + 'wclsICARUSDrifter:drifter280', + 'wclsICARUSDrifter:drifter281', + 'wclsICARUSDrifter:drifter282', + 'wclsICARUSDrifter:drifter283', + 'wclsICARUSDrifter:drifter284', + 'wclsICARUSDrifter:drifter285', + 'wclsICARUSDrifter:drifter286', + 'wclsICARUSDrifter:drifter287', + 'wclsICARUSDrifter:drifter288', + 'wclsICARUSDrifter:drifter289', + 'wclsICARUSDrifter:drifter290', + 'wclsICARUSDrifter:drifter291', + 'wclsICARUSDrifter:drifter292', + 'wclsICARUSDrifter:drifter293', + 'wclsICARUSDrifter:drifter294', + 'wclsICARUSDrifter:drifter295', + 'wclsICARUSDrifter:drifter296', + 'wclsICARUSDrifter:drifter297', + 'wclsICARUSDrifter:drifter298', + 'wclsICARUSDrifter:drifter299', + 'wclsICARUSDrifter:drifter300', + 'wclsICARUSDrifter:drifter301', + 'wclsICARUSDrifter:drifter302', + 'wclsICARUSDrifter:drifter303', + 'wclsICARUSDrifter:drifter304', + 'wclsICARUSDrifter:drifter305', + 'wclsICARUSDrifter:drifter306', + 'wclsICARUSDrifter:drifter307', + 'wclsICARUSDrifter:drifter308', + 'wclsICARUSDrifter:drifter309', + 'wclsICARUSDrifter:drifter310', + 'wclsICARUSDrifter:drifter311', + 'wclsICARUSDrifter:drifter312', + 'wclsICARUSDrifter:drifter313', + 'wclsICARUSDrifter:drifter314', + 'wclsICARUSDrifter:drifter315', + 'wclsICARUSDrifter:drifter316', + 'wclsICARUSDrifter:drifter317', + 'wclsICARUSDrifter:drifter318', + 'wclsICARUSDrifter:drifter319', + 'wclsICARUSDrifter:drifter320', + 'wclsICARUSDrifter:drifter321', + 'wclsICARUSDrifter:drifter322', + 'wclsICARUSDrifter:drifter323', + 'wclsICARUSDrifter:drifter324', + 'wclsICARUSDrifter:drifter325', + 'wclsICARUSDrifter:drifter326', + 'wclsICARUSDrifter:drifter327', + 'wclsICARUSDrifter:drifter328', + 'wclsICARUSDrifter:drifter329', + 'wclsICARUSDrifter:drifter330', + 'wclsICARUSDrifter:drifter331', + 'wclsICARUSDrifter:drifter332', + 'wclsICARUSDrifter:drifter333', + 'wclsICARUSDrifter:drifter334', + 'wclsICARUSDrifter:drifter335', + 'wclsICARUSDrifter:drifter336', + 'wclsICARUSDrifter:drifter337', + 'wclsICARUSDrifter:drifter338', + 'wclsICARUSDrifter:drifter339', + 'wclsICARUSDrifter:drifter340', + 'wclsICARUSDrifter:drifter341', + 'wclsICARUSDrifter:drifter342', + 'wclsICARUSDrifter:drifter343', + 'wclsICARUSDrifter:drifter344', + 'wclsICARUSDrifter:drifter345', + 'wclsICARUSDrifter:drifter346', + 'wclsICARUSDrifter:drifter347', + 'wclsICARUSDrifter:drifter348', + 'wclsICARUSDrifter:drifter349', + 'wclsICARUSDrifter:drifter350', + 'wclsICARUSDrifter:drifter351', + 'wclsICARUSDrifter:drifter352', + 'wclsICARUSDrifter:drifter353', + 'wclsICARUSDrifter:drifter354', + 'wclsICARUSDrifter:drifter355', + 'wclsICARUSDrifter:drifter356', + 'wclsICARUSDrifter:drifter357', + 'wclsICARUSDrifter:drifter358', + 'wclsICARUSDrifter:drifter359' +] + + END_PROLOG diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/chndb-base.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/chndb-base.jsonnet index 02ba66873..ba2e7d4b6 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/chndb-base.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/chndb-base.jsonnet @@ -28,7 +28,10 @@ function(params, anode, field, n, rms_cuts=[]) // Externally determined "bad" channels. - bad: [], + bad: [ + 167, 1795, 1796, 1824, 1826, 1828, 1830, 1860, 1888, 1889, 1890, 1891, 1922, 2013, 2806, 3725, 3743, 4262, 5572, 8523, 8524, 8525, 8526, 8527, 8945, 9180, 9387, 9391, 9664, 10138, 12051, 14028, 14403, 15307, 15737, 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030, 16031, 16937, 17201, 19580, 23225, 23457, 23984, 23985, 25662, 27219, 27231, 27335, 27967, 28640, 28804, 28805, 28806, 28807, 28808, 28809, 28810, 30496, 30497, 30498, 30499, 30500, 30501, 30502, 30503, 30504, 30505, 30506, 30507, 30508, 30509, 30510, 30511, 30512, 30513, 30514, 30515, 30516, 30517, 30518, 30519, 30520, 30521, 30522, 30523, 30524, 30525, 30526, 30527, 30705, 31316, 31317, 31726, 34220, 38294, 41501, 41975, 42851, 43231, 43518, 44051, 44410, 49216, 49792, 49793, 49794, 49795, 49796, 49797, 49798, 49799, 49800, 49801, 49802, 49803, 49804, 49805, 49806, 49807, 49808, 49809, 49810, 49811, 49812, 49813, 49814, 49815, 49816, 49817, 49818, 49819, 49820, 49821, 49822, 49823, 50080, 50081, 50082, 50083, 50084, 50085, 50086, 50087, 50088, 50089, 50090, 50091, 50092, 50093, 50094, 50095, 50096, 50097, 50098, 50099, 50100, 50101, 50102, 50103, 50104, 50105, 50106, 50107, 50108, 50109, 50110, 50111, 50673, 51900, // v3r3 + 1858, 1887, 1892, 3355, 2525, 6289, 7402, 47914, 18132, 18609, // added + ], // Overide defaults for specific channels. If an info is // mentioned for a particular channel in multiple objects in this @@ -41,7 +44,7 @@ function(params, anode, field, n, rms_cuts=[]) // repeat values found here in subsequent entries unless you // wish to change them. { - channels: util.anode_channels(n), + channels: util.anode_channels_twofaced(n), nominal_baseline: 2048.0, // adc count gain_correction: 1.0, // unitless response_offset: 0.0, // ticks? diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/dnnroi.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/dnnroi.jsonnet new file mode 100644 index 000000000..b58f12840 --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/dnnroi.jsonnet @@ -0,0 +1,113 @@ +// This produces a function to configure DNN-ROI for one APA given +// anode and torch service (ts) objects. +// +// The prefix is prepended to all internal node names if uniqueness +// beyond anode ID is needed. The output_scale allows for an ad-hoc +// scaling of dnnroi output. The U and W planes will go through +// dnnroi while hte W plane will be shunted. What comes out will be a +// unified frame with frame tag "dnnspN" where "N" is the anode ID. + +local wc = import "wirecell.jsonnet"; +local pg = import "pgraph.jsonnet"; + +function (anode, ts_u, ts_v, prefix="dnnroi", output_scale=1, nchunk_u=2, nchunk_v=4) + local apaid = anode.data.ident; + local prename = prefix + std.toString(apaid); + local intags = ['loose_lf%d'%apaid, 'mp2_roi%d'%apaid, + 'mp3_roi%d'%apaid]; + + local dnnroi_u = pg.pnode({ + type: "DNNROIFinding", + name: prename+"u", + data: { + anode: wc.tn(anode), + plane: 0, + nticks: 4096, + intags: intags, + decon_charge_tag: "decon%d" %apaid, + outtag: "dnnsp%du"%apaid, + output_scale: output_scale, + input_scale: 0.00025, + forward: wc.tn(ts_u), + tick_per_slice: 4, + save_negative_charge: true, + nchunks: nchunk_u + } + }, nin=1, nout=1, uses=[ts_u, anode]); + local dnnroi_v = pg.pnode({ + type: "DNNROIFinding", + name: prename+"v", + data: { + anode: wc.tn(anode), + plane: 1, + nticks: 4096, + intags: intags, + decon_charge_tag: "decon%d" %apaid, + outtag: "dnnsp%dv"%apaid, + output_scale: output_scale, + input_scale: 0.00025, + forward: wc.tn(ts_v), + tick_per_slice: 4, + save_negative_charge: true, + nchunks: nchunk_v + } + }, nin=1, nout=1, uses=[ts_v, anode]); + local dnnroi_w = pg.pnode({ + type: "PlaneSelector", + name: prename+"w", + data: { + anode: wc.tn(anode), + plane: 2, + tags: ["gauss%d"%apaid], + tag_rules: [{ + frame: {".*":"DNNROIFinding"}, + trace: {["gauss%d"%apaid]:"dnnsp%dw"%apaid}, + }], + } + }, nin=1, nout=1, uses=[anode]); + + local dnnpipes = [dnnroi_u, dnnroi_v, dnnroi_w]; + local dnnfanout = pg.pnode({ + type: "FrameFanout", + name: prename, + data: { + multiplicity: 3 + } + }, nin=1, nout=3); + + local dnnfanin = pg.pnode({ + type: "FrameFanin", + name: prename, + data: { + multiplicity: 3, + tag_rules: [{ + frame: {".*": "dnnsp%d%s" % [apaid,plane]}, + trace: {".*": "dnnsp%d%s" % [apaid,plane]}, + } for plane in ["u", "v", "w"]] + }, + }, nin=3, nout=1); + + local retagger = pg.pnode({ + type: "Retagger", + name: 'dnnroi%d' % apaid, + 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 gaussN to gauss. + frame: { + ".*": "dnnsp%d" % apaid + }, + merge: { + ["dnnsp%d." % apaid]: "dnnsp%d" % apaid + }, + }], + }, + }, nin=1, nout=1); + + pg.intern(innodes=[dnnfanout], + outnodes=[retagger], + centernodes=dnnpipes+[dnnfanin], + edges=[pg.edge(dnnfanout, dnnpipes[ind], ind, 0) for ind in [0,1,2]] + + [pg.edge(dnnpipes[ind], dnnfanin, 0, ind) for ind in [0,1,2]] + + [pg.edge(dnnfanin, retagger, 0, 0)]) diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/funcs.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/funcs.jsonnet index 5f2f0be20..623d03367 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/funcs.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/funcs.jsonnet @@ -25,6 +25,12 @@ local g = import 'pgraph.jsonnet'; anode_channels(n):: std.flattenArrays([std.range(startch[n][w], startch[n][w]+wireplanes[w]) for w in std.range(0,2)]), // anode_channels(n):: std.range(1056 * (n % 2) + 13312 * (n - n % 2) / 2, 1056 * (n % 2 + 1) - 1 + 13312 * (n - n % 2) / 2) + std.range(1056 * 2 + 13312 * (n - n % 2) / 2, 13312 - 1 + 13312 * (n - n % 2) / 2), + // Channels on each anode, in the "two-faced" configuration + anode_channels_twofaced(n):: std.range(startch[2*n][0], startch[2*n][0]+wireplanes[0]) + + std.range(startch[2*n+1][0], startch[2*n+1][0]+wireplanes[0]) + + std.range(startch[2*n][1], startch[2*n][1]+wireplanes[1]) + + std.range(startch[2*n][2], startch[2*n][2]+wireplanes[2]), + // Return the number of split (1 or 2) for an anode anode_split(ident):: (ident%100 - ident%10)/10, @@ -81,6 +87,1193 @@ local g = import 'pgraph.jsonnet'; name=name), }.ret, + // Build a depofanout-[signal]-[framesummer]-[pipelines]-fanin graph. + // FrameSummer add up the two "split" anodes into one frame. + // Each branch of the pipelines operates on the summed signal frame. + fansummeryz :: function(fout, sigpipes, summers, actpipes, fin, name="fansummeryz", outtags=[], tag_rules=[]) { + + local fanoutmult = std.length(sigpipes), + local faninmult = std.length(actpipes), + + local fanout = g.pnode({ + type: fout, + name: name, + data: { + multiplicity: fanoutmult, + tag_rules: tag_rules, + }, + }, nin=1, nout=fanoutmult), + + + local fanin = g.pnode({ + type: fin, + name: name, + data: { + multiplicity: faninmult, + tags: outtags, + }, + }, nin=faninmult, nout=1), + + local reduceryz = g.intern(innodes=sigpipes, + outnodes=actpipes, + centernodes=summers, + edges= + // connecting signal and summer + [g.edge(sigpipes[0], summers[0],0,0)] + + [g.edge(sigpipes[1], summers[0],0,1)] + + [g.edge(sigpipes[2], summers[0],0,2)] + + [g.edge(sigpipes[3], summers[0],0,3)] + + [g.edge(sigpipes[4], summers[0],0,4)] + + [g.edge(sigpipes[5], summers[0],0,5)] + + [g.edge(sigpipes[6], summers[0],0,6)] + + [g.edge(sigpipes[7], summers[0],0,7)] + + [g.edge(sigpipes[8], summers[0],0,8)] + + [g.edge(sigpipes[9], summers[0],0,9)] + + [g.edge(sigpipes[10], summers[0],0,10)] + + [g.edge(sigpipes[11], summers[0],0,11)] + + [g.edge(sigpipes[12], summers[0],0,12)] + + [g.edge(sigpipes[13], summers[0],0,13)] + + [g.edge(sigpipes[14], summers[0],0,14)] + + [g.edge(sigpipes[15], summers[0],0,15)] + + [g.edge(sigpipes[16], summers[0],0,16)] + + [g.edge(sigpipes[17], summers[0],0,17)] + + [g.edge(sigpipes[18], summers[0],0,18)] + + [g.edge(sigpipes[19], summers[0],0,19)] + + [g.edge(sigpipes[20], summers[0],0,20)] + + [g.edge(sigpipes[21], summers[0],0,21)] + + [g.edge(sigpipes[22], summers[0],0,22)] + + [g.edge(sigpipes[23], summers[0],0,23)] + + [g.edge(sigpipes[24], summers[0],0,24)] + + [g.edge(sigpipes[25], summers[0],0,25)] + + [g.edge(sigpipes[26], summers[0],0,26)] + + [g.edge(sigpipes[27], summers[0],0,27)] + + [g.edge(sigpipes[28], summers[0],0,28)] + + [g.edge(sigpipes[29], summers[0],0,29)] + + [g.edge(sigpipes[30], summers[0],0,30)] + + [g.edge(sigpipes[31], summers[0],0,31)] + + [g.edge(sigpipes[32], summers[0],0,32)] + + [g.edge(sigpipes[33], summers[0],0,33)] + + [g.edge(sigpipes[34], summers[0],0,34)] + + [g.edge(sigpipes[35], summers[0],0,35)] + + [g.edge(sigpipes[36], summers[0],0,36)] + + [g.edge(sigpipes[37], summers[0],0,37)] + + [g.edge(sigpipes[38], summers[0],0,38)] + + [g.edge(sigpipes[39], summers[0],0,39)] + + [g.edge(sigpipes[40], summers[0],0,40)] + + [g.edge(sigpipes[41], summers[0],0,41)] + + [g.edge(sigpipes[42], summers[0],0,42)] + + [g.edge(sigpipes[43], summers[0],0,43)] + + [g.edge(sigpipes[44], summers[0],0,44)] + + [g.edge(sigpipes[45], summers[0],0,45)] + + [g.edge(sigpipes[46], summers[0],0,46)] + + [g.edge(sigpipes[47], summers[0],0,47)] + + [g.edge(sigpipes[48], summers[0],0,48)] + + [g.edge(sigpipes[49], summers[0],0,49)] + + [g.edge(sigpipes[50], summers[0],0,50)] + + [g.edge(sigpipes[51], summers[0],0,51)] + + [g.edge(sigpipes[52], summers[0],0,52)] + + [g.edge(sigpipes[53], summers[0],0,53)] + + [g.edge(sigpipes[54], summers[0],0,54)] + + [g.edge(sigpipes[55], summers[0],0,55)] + + [g.edge(sigpipes[56], summers[0],0,56)] + + [g.edge(sigpipes[57], summers[0],0,57)] + + [g.edge(sigpipes[58], summers[0],0,58)] + + [g.edge(sigpipes[59], summers[0],0,59)] + + [g.edge(sigpipes[60], summers[0],0,60)] + + [g.edge(sigpipes[61], summers[0],0,61)] + + [g.edge(sigpipes[62], summers[0],0,62)] + + [g.edge(sigpipes[63], summers[0],0,63)] + + [g.edge(sigpipes[64], summers[0],0,64)] + + [g.edge(sigpipes[65], summers[0],0,65)] + + [g.edge(sigpipes[66], summers[0],0,66)] + + [g.edge(sigpipes[67], summers[0],0,67)] + + [g.edge(sigpipes[68], summers[0],0,68)] + + [g.edge(sigpipes[69], summers[0],0,69)] + + [g.edge(sigpipes[70], summers[0],0,70)] + + [g.edge(sigpipes[71], summers[0],0,71)] + + [g.edge(sigpipes[72], summers[0],0,72)] + + [g.edge(sigpipes[73], summers[0],0,73)] + + [g.edge(sigpipes[74], summers[0],0,74)] + + [g.edge(sigpipes[75], summers[0],0,75)] + + [g.edge(sigpipes[76], summers[0],0,76)] + + [g.edge(sigpipes[77], summers[0],0,77)] + + [g.edge(sigpipes[78], summers[0],0,78)] + + [g.edge(sigpipes[79], summers[0],0,79)] + + [g.edge(sigpipes[80], summers[0],0,80)] + + [g.edge(sigpipes[81], summers[0],0,81)] + + [g.edge(sigpipes[82], summers[0],0,82)] + + [g.edge(sigpipes[83], summers[0],0,83)] + + [g.edge(sigpipes[84], summers[0],0,84)] + + [g.edge(sigpipes[85], summers[0],0,85)] + + [g.edge(sigpipes[86], summers[0],0,86)] + + [g.edge(sigpipes[87], summers[0],0,87)] + + [g.edge(sigpipes[88], summers[0],0,88)] + + [g.edge(sigpipes[89], summers[0],0,89)] + + [g.edge(sigpipes[90], summers[1],0,0)] + + [g.edge(sigpipes[91], summers[1],0,1)] + + [g.edge(sigpipes[92], summers[1],0,2)] + + [g.edge(sigpipes[93], summers[1],0,3)] + + [g.edge(sigpipes[94], summers[1],0,4)] + + [g.edge(sigpipes[95], summers[1],0,5)] + + [g.edge(sigpipes[96], summers[1],0,6)] + + [g.edge(sigpipes[97], summers[1],0,7)] + + [g.edge(sigpipes[98], summers[1],0,8)] + + [g.edge(sigpipes[99], summers[1],0,9)] + + [g.edge(sigpipes[100], summers[1],0,10)] + + [g.edge(sigpipes[101], summers[1],0,11)] + + [g.edge(sigpipes[102], summers[1],0,12)] + + [g.edge(sigpipes[103], summers[1],0,13)] + + [g.edge(sigpipes[104], summers[1],0,14)] + + [g.edge(sigpipes[105], summers[1],0,15)] + + [g.edge(sigpipes[106], summers[1],0,16)] + + [g.edge(sigpipes[107], summers[1],0,17)] + + [g.edge(sigpipes[108], summers[1],0,18)] + + [g.edge(sigpipes[109], summers[1],0,19)] + + [g.edge(sigpipes[110], summers[1],0,20)] + + [g.edge(sigpipes[111], summers[1],0,21)] + + [g.edge(sigpipes[112], summers[1],0,22)] + + [g.edge(sigpipes[113], summers[1],0,23)] + + [g.edge(sigpipes[114], summers[1],0,24)] + + [g.edge(sigpipes[115], summers[1],0,25)] + + [g.edge(sigpipes[116], summers[1],0,26)] + + [g.edge(sigpipes[117], summers[1],0,27)] + + [g.edge(sigpipes[118], summers[1],0,28)] + + [g.edge(sigpipes[119], summers[1],0,29)] + + [g.edge(sigpipes[120], summers[1],0,30)] + + [g.edge(sigpipes[121], summers[1],0,31)] + + [g.edge(sigpipes[122], summers[1],0,32)] + + [g.edge(sigpipes[123], summers[1],0,33)] + + [g.edge(sigpipes[124], summers[1],0,34)] + + [g.edge(sigpipes[125], summers[1],0,35)] + + [g.edge(sigpipes[126], summers[1],0,36)] + + [g.edge(sigpipes[127], summers[1],0,37)] + + [g.edge(sigpipes[128], summers[1],0,38)] + + [g.edge(sigpipes[129], summers[1],0,39)] + + [g.edge(sigpipes[130], summers[1],0,40)] + + [g.edge(sigpipes[131], summers[1],0,41)] + + [g.edge(sigpipes[132], summers[1],0,42)] + + [g.edge(sigpipes[133], summers[1],0,43)] + + [g.edge(sigpipes[134], summers[1],0,44)] + + [g.edge(sigpipes[135], summers[1],0,45)] + + [g.edge(sigpipes[136], summers[1],0,46)] + + [g.edge(sigpipes[137], summers[1],0,47)] + + [g.edge(sigpipes[138], summers[1],0,48)] + + [g.edge(sigpipes[139], summers[1],0,49)] + + [g.edge(sigpipes[140], summers[1],0,50)] + + [g.edge(sigpipes[141], summers[1],0,51)] + + [g.edge(sigpipes[142], summers[1],0,52)] + + [g.edge(sigpipes[143], summers[1],0,53)] + + [g.edge(sigpipes[144], summers[1],0,54)] + + [g.edge(sigpipes[145], summers[1],0,55)] + + [g.edge(sigpipes[146], summers[1],0,56)] + + [g.edge(sigpipes[147], summers[1],0,57)] + + [g.edge(sigpipes[148], summers[1],0,58)] + + [g.edge(sigpipes[149], summers[1],0,59)] + + [g.edge(sigpipes[150], summers[1],0,60)] + + [g.edge(sigpipes[151], summers[1],0,61)] + + [g.edge(sigpipes[152], summers[1],0,62)] + + [g.edge(sigpipes[153], summers[1],0,63)] + + [g.edge(sigpipes[154], summers[1],0,64)] + + [g.edge(sigpipes[155], summers[1],0,65)] + + [g.edge(sigpipes[156], summers[1],0,66)] + + [g.edge(sigpipes[157], summers[1],0,67)] + + [g.edge(sigpipes[158], summers[1],0,68)] + + [g.edge(sigpipes[159], summers[1],0,69)] + + [g.edge(sigpipes[160], summers[1],0,70)] + + [g.edge(sigpipes[161], summers[1],0,71)] + + [g.edge(sigpipes[162], summers[1],0,72)] + + [g.edge(sigpipes[163], summers[1],0,73)] + + [g.edge(sigpipes[164], summers[1],0,74)] + + [g.edge(sigpipes[165], summers[1],0,75)] + + [g.edge(sigpipes[166], summers[1],0,76)] + + [g.edge(sigpipes[167], summers[1],0,77)] + + [g.edge(sigpipes[168], summers[1],0,78)] + + [g.edge(sigpipes[169], summers[1],0,79)] + + [g.edge(sigpipes[170], summers[1],0,80)] + + [g.edge(sigpipes[171], summers[1],0,81)] + + [g.edge(sigpipes[172], summers[1],0,82)] + + [g.edge(sigpipes[173], summers[1],0,83)] + + [g.edge(sigpipes[174], summers[1],0,84)] + + [g.edge(sigpipes[175], summers[1],0,85)] + + [g.edge(sigpipes[176], summers[1],0,86)] + + [g.edge(sigpipes[177], summers[1],0,87)] + + [g.edge(sigpipes[178], summers[1],0,88)] + + [g.edge(sigpipes[179], summers[1],0,89)] + + [g.edge(sigpipes[180], summers[2],0,0)] + + [g.edge(sigpipes[181], summers[2],0,1)] + + [g.edge(sigpipes[182], summers[2],0,2)] + + [g.edge(sigpipes[183], summers[2],0,3)] + + [g.edge(sigpipes[184], summers[2],0,4)] + + [g.edge(sigpipes[185], summers[2],0,5)] + + [g.edge(sigpipes[186], summers[2],0,6)] + + [g.edge(sigpipes[187], summers[2],0,7)] + + [g.edge(sigpipes[188], summers[2],0,8)] + + [g.edge(sigpipes[189], summers[2],0,9)] + + [g.edge(sigpipes[190], summers[2],0,10)] + + [g.edge(sigpipes[191], summers[2],0,11)] + + [g.edge(sigpipes[192], summers[2],0,12)] + + [g.edge(sigpipes[193], summers[2],0,13)] + + [g.edge(sigpipes[194], summers[2],0,14)] + + [g.edge(sigpipes[195], summers[2],0,15)] + + [g.edge(sigpipes[196], summers[2],0,16)] + + [g.edge(sigpipes[197], summers[2],0,17)] + + [g.edge(sigpipes[198], summers[2],0,18)] + + [g.edge(sigpipes[199], summers[2],0,19)] + + [g.edge(sigpipes[200], summers[2],0,20)] + + [g.edge(sigpipes[201], summers[2],0,21)] + + [g.edge(sigpipes[202], summers[2],0,22)] + + [g.edge(sigpipes[203], summers[2],0,23)] + + [g.edge(sigpipes[204], summers[2],0,24)] + + [g.edge(sigpipes[205], summers[2],0,25)] + + [g.edge(sigpipes[206], summers[2],0,26)] + + [g.edge(sigpipes[207], summers[2],0,27)] + + [g.edge(sigpipes[208], summers[2],0,28)] + + [g.edge(sigpipes[209], summers[2],0,29)] + + [g.edge(sigpipes[210], summers[2],0,30)] + + [g.edge(sigpipes[211], summers[2],0,31)] + + [g.edge(sigpipes[212], summers[2],0,32)] + + [g.edge(sigpipes[213], summers[2],0,33)] + + [g.edge(sigpipes[214], summers[2],0,34)] + + [g.edge(sigpipes[215], summers[2],0,35)] + + [g.edge(sigpipes[216], summers[2],0,36)] + + [g.edge(sigpipes[217], summers[2],0,37)] + + [g.edge(sigpipes[218], summers[2],0,38)] + + [g.edge(sigpipes[219], summers[2],0,39)] + + [g.edge(sigpipes[220], summers[2],0,40)] + + [g.edge(sigpipes[221], summers[2],0,41)] + + [g.edge(sigpipes[222], summers[2],0,42)] + + [g.edge(sigpipes[223], summers[2],0,43)] + + [g.edge(sigpipes[224], summers[2],0,44)] + + [g.edge(sigpipes[225], summers[2],0,45)] + + [g.edge(sigpipes[226], summers[2],0,46)] + + [g.edge(sigpipes[227], summers[2],0,47)] + + [g.edge(sigpipes[228], summers[2],0,48)] + + [g.edge(sigpipes[229], summers[2],0,49)] + + [g.edge(sigpipes[230], summers[2],0,50)] + + [g.edge(sigpipes[231], summers[2],0,51)] + + [g.edge(sigpipes[232], summers[2],0,52)] + + [g.edge(sigpipes[233], summers[2],0,53)] + + [g.edge(sigpipes[234], summers[2],0,54)] + + [g.edge(sigpipes[235], summers[2],0,55)] + + [g.edge(sigpipes[236], summers[2],0,56)] + + [g.edge(sigpipes[237], summers[2],0,57)] + + [g.edge(sigpipes[238], summers[2],0,58)] + + [g.edge(sigpipes[239], summers[2],0,59)] + + [g.edge(sigpipes[240], summers[2],0,60)] + + [g.edge(sigpipes[241], summers[2],0,61)] + + [g.edge(sigpipes[242], summers[2],0,62)] + + [g.edge(sigpipes[243], summers[2],0,63)] + + [g.edge(sigpipes[244], summers[2],0,64)] + + [g.edge(sigpipes[245], summers[2],0,65)] + + [g.edge(sigpipes[246], summers[2],0,66)] + + [g.edge(sigpipes[247], summers[2],0,67)] + + [g.edge(sigpipes[248], summers[2],0,68)] + + [g.edge(sigpipes[249], summers[2],0,69)] + + [g.edge(sigpipes[250], summers[2],0,70)] + + [g.edge(sigpipes[251], summers[2],0,71)] + + [g.edge(sigpipes[252], summers[2],0,72)] + + [g.edge(sigpipes[253], summers[2],0,73)] + + [g.edge(sigpipes[254], summers[2],0,74)] + + [g.edge(sigpipes[255], summers[2],0,75)] + + [g.edge(sigpipes[256], summers[2],0,76)] + + [g.edge(sigpipes[257], summers[2],0,77)] + + [g.edge(sigpipes[258], summers[2],0,78)] + + [g.edge(sigpipes[259], summers[2],0,79)] + + [g.edge(sigpipes[260], summers[2],0,80)] + + [g.edge(sigpipes[261], summers[2],0,81)] + + [g.edge(sigpipes[262], summers[2],0,82)] + + [g.edge(sigpipes[263], summers[2],0,83)] + + [g.edge(sigpipes[264], summers[2],0,84)] + + [g.edge(sigpipes[265], summers[2],0,85)] + + [g.edge(sigpipes[266], summers[2],0,86)] + + [g.edge(sigpipes[267], summers[2],0,87)] + + [g.edge(sigpipes[268], summers[2],0,88)] + + [g.edge(sigpipes[269], summers[2],0,89)] + + [g.edge(sigpipes[270], summers[3],0,0)] + + [g.edge(sigpipes[271], summers[3],0,1)] + + [g.edge(sigpipes[272], summers[3],0,2)] + + [g.edge(sigpipes[273], summers[3],0,3)] + + [g.edge(sigpipes[274], summers[3],0,4)] + + [g.edge(sigpipes[275], summers[3],0,5)] + + [g.edge(sigpipes[276], summers[3],0,6)] + + [g.edge(sigpipes[277], summers[3],0,7)] + + [g.edge(sigpipes[278], summers[3],0,8)] + + [g.edge(sigpipes[279], summers[3],0,9)] + + [g.edge(sigpipes[280], summers[3],0,10)] + + [g.edge(sigpipes[281], summers[3],0,11)] + + [g.edge(sigpipes[282], summers[3],0,12)] + + [g.edge(sigpipes[283], summers[3],0,13)] + + [g.edge(sigpipes[284], summers[3],0,14)] + + [g.edge(sigpipes[285], summers[3],0,15)] + + [g.edge(sigpipes[286], summers[3],0,16)] + + [g.edge(sigpipes[287], summers[3],0,17)] + + [g.edge(sigpipes[288], summers[3],0,18)] + + [g.edge(sigpipes[289], summers[3],0,19)] + + [g.edge(sigpipes[290], summers[3],0,20)] + + [g.edge(sigpipes[291], summers[3],0,21)] + + [g.edge(sigpipes[292], summers[3],0,22)] + + [g.edge(sigpipes[293], summers[3],0,23)] + + [g.edge(sigpipes[294], summers[3],0,24)] + + [g.edge(sigpipes[295], summers[3],0,25)] + + [g.edge(sigpipes[296], summers[3],0,26)] + + [g.edge(sigpipes[297], summers[3],0,27)] + + [g.edge(sigpipes[298], summers[3],0,28)] + + [g.edge(sigpipes[299], summers[3],0,29)] + + [g.edge(sigpipes[300], summers[3],0,30)] + + [g.edge(sigpipes[301], summers[3],0,31)] + + [g.edge(sigpipes[302], summers[3],0,32)] + + [g.edge(sigpipes[303], summers[3],0,33)] + + [g.edge(sigpipes[304], summers[3],0,34)] + + [g.edge(sigpipes[305], summers[3],0,35)] + + [g.edge(sigpipes[306], summers[3],0,36)] + + [g.edge(sigpipes[307], summers[3],0,37)] + + [g.edge(sigpipes[308], summers[3],0,38)] + + [g.edge(sigpipes[309], summers[3],0,39)] + + [g.edge(sigpipes[310], summers[3],0,40)] + + [g.edge(sigpipes[311], summers[3],0,41)] + + [g.edge(sigpipes[312], summers[3],0,42)] + + [g.edge(sigpipes[313], summers[3],0,43)] + + [g.edge(sigpipes[314], summers[3],0,44)] + + [g.edge(sigpipes[315], summers[3],0,45)] + + [g.edge(sigpipes[316], summers[3],0,46)] + + [g.edge(sigpipes[317], summers[3],0,47)] + + [g.edge(sigpipes[318], summers[3],0,48)] + + [g.edge(sigpipes[319], summers[3],0,49)] + + [g.edge(sigpipes[320], summers[3],0,50)] + + [g.edge(sigpipes[321], summers[3],0,51)] + + [g.edge(sigpipes[322], summers[3],0,52)] + + [g.edge(sigpipes[323], summers[3],0,53)] + + [g.edge(sigpipes[324], summers[3],0,54)] + + [g.edge(sigpipes[325], summers[3],0,55)] + + [g.edge(sigpipes[326], summers[3],0,56)] + + [g.edge(sigpipes[327], summers[3],0,57)] + + [g.edge(sigpipes[328], summers[3],0,58)] + + [g.edge(sigpipes[329], summers[3],0,59)] + + [g.edge(sigpipes[330], summers[3],0,60)] + + [g.edge(sigpipes[331], summers[3],0,61)] + + [g.edge(sigpipes[332], summers[3],0,62)] + + [g.edge(sigpipes[333], summers[3],0,63)] + + [g.edge(sigpipes[334], summers[3],0,64)] + + [g.edge(sigpipes[335], summers[3],0,65)] + + [g.edge(sigpipes[336], summers[3],0,66)] + + [g.edge(sigpipes[337], summers[3],0,67)] + + [g.edge(sigpipes[338], summers[3],0,68)] + + [g.edge(sigpipes[339], summers[3],0,69)] + + [g.edge(sigpipes[340], summers[3],0,70)] + + [g.edge(sigpipes[341], summers[3],0,71)] + + [g.edge(sigpipes[342], summers[3],0,72)] + + [g.edge(sigpipes[343], summers[3],0,73)] + + [g.edge(sigpipes[344], summers[3],0,74)] + + [g.edge(sigpipes[345], summers[3],0,75)] + + [g.edge(sigpipes[346], summers[3],0,76)] + + [g.edge(sigpipes[347], summers[3],0,77)] + + [g.edge(sigpipes[348], summers[3],0,78)] + + [g.edge(sigpipes[349], summers[3],0,79)] + + [g.edge(sigpipes[350], summers[3],0,80)] + + [g.edge(sigpipes[351], summers[3],0,81)] + + [g.edge(sigpipes[352], summers[3],0,82)] + + [g.edge(sigpipes[353], summers[3],0,83)] + + [g.edge(sigpipes[354], summers[3],0,84)] + + [g.edge(sigpipes[355], summers[3],0,85)] + + [g.edge(sigpipes[356], summers[3],0,86)] + + [g.edge(sigpipes[357], summers[3],0,87)] + + [g.edge(sigpipes[358], summers[3],0,88)] + + [g.edge(sigpipes[359], summers[3],0,89)] + // connecting summer and the operator pipelines + + [g.edge(summers[n], actpipes[n]) for n in std.range(0,faninmult-1)], + name=name), + + ret: g.intern(innodes=[fanout], + outnodes=[fanin], + centernodes=[reduceryz], + edges= + [g.edge(fanout, sigpipes[n], n, 0) for n in std.range(0, fanoutmult-1)] + + [g.edge(reduceryz, fanin, n, n) for n in std.range(0, faninmult-1)], + name=name), + }.ret, + + + + // Build a depofanout-[drift]-[signal]-[framesummer]-[pipelines]-fanin graph. + // FrameSummer add up the two "split" anodes into one frame. + // Each branch of the pipelines operates on the summed signal frame. + fandrifter :: function(fout,driftpipes, sigpipes, summers, actpipes, fin, name="fandrifter", outtags=[], tag_rules=[]) { + + local fanoutmult = std.length(driftpipes), + local faninmult = std.length(actpipes), + + local fanout = g.pnode({ + type: fout, + name: name, + data: { + multiplicity: fanoutmult, + tag_rules: tag_rules, + }, + }, nin=1, nout=fanoutmult), + + + local fanin = g.pnode({ + type: fin, + name: name, + data: { + multiplicity: faninmult, + tags: outtags, + }, + }, nin=faninmult, nout=1), + + local drift = g.intern(innodes=driftpipes, + outnodes=actpipes, + centernodes=sigpipes+summers, + edges= + [g.edge(driftpipes[n], sigpipes[n]) for n in std.range(0,fanoutmult-1)] + // connecting signal and summer + + [g.edge(sigpipes[0], summers[0],0,0)] + + [g.edge(sigpipes[1], summers[0],0,1)] + + [g.edge(sigpipes[2], summers[0],0,2)] + + [g.edge(sigpipes[3], summers[0],0,3)] + + [g.edge(sigpipes[4], summers[0],0,4)] + + [g.edge(sigpipes[5], summers[0],0,5)] + + [g.edge(sigpipes[6], summers[0],0,6)] + + [g.edge(sigpipes[7], summers[0],0,7)] + + [g.edge(sigpipes[8], summers[0],0,8)] + + [g.edge(sigpipes[9], summers[0],0,9)] + + [g.edge(sigpipes[10], summers[0],0,10)] + + [g.edge(sigpipes[11], summers[0],0,11)] + + [g.edge(sigpipes[12], summers[0],0,12)] + + [g.edge(sigpipes[13], summers[0],0,13)] + + [g.edge(sigpipes[14], summers[0],0,14)] + + [g.edge(sigpipes[15], summers[0],0,15)] + + [g.edge(sigpipes[16], summers[0],0,16)] + + [g.edge(sigpipes[17], summers[0],0,17)] + + [g.edge(sigpipes[18], summers[0],0,18)] + + [g.edge(sigpipes[19], summers[0],0,19)] + + [g.edge(sigpipes[20], summers[0],0,20)] + + [g.edge(sigpipes[21], summers[0],0,21)] + + [g.edge(sigpipes[22], summers[0],0,22)] + + [g.edge(sigpipes[23], summers[0],0,23)] + + [g.edge(sigpipes[24], summers[0],0,24)] + + [g.edge(sigpipes[25], summers[0],0,25)] + + [g.edge(sigpipes[26], summers[0],0,26)] + + [g.edge(sigpipes[27], summers[0],0,27)] + + [g.edge(sigpipes[28], summers[0],0,28)] + + [g.edge(sigpipes[29], summers[0],0,29)] + + [g.edge(sigpipes[30], summers[0],0,30)] + + [g.edge(sigpipes[31], summers[0],0,31)] + + [g.edge(sigpipes[32], summers[0],0,32)] + + [g.edge(sigpipes[33], summers[0],0,33)] + + [g.edge(sigpipes[34], summers[0],0,34)] + + [g.edge(sigpipes[35], summers[0],0,35)] + + [g.edge(sigpipes[36], summers[0],0,36)] + + [g.edge(sigpipes[37], summers[0],0,37)] + + [g.edge(sigpipes[38], summers[0],0,38)] + + [g.edge(sigpipes[39], summers[0],0,39)] + + [g.edge(sigpipes[40], summers[0],0,40)] + + [g.edge(sigpipes[41], summers[0],0,41)] + + [g.edge(sigpipes[42], summers[0],0,42)] + + [g.edge(sigpipes[43], summers[0],0,43)] + + [g.edge(sigpipes[44], summers[0],0,44)] + + [g.edge(sigpipes[45], summers[0],0,45)] + + [g.edge(sigpipes[46], summers[0],0,46)] + + [g.edge(sigpipes[47], summers[0],0,47)] + + [g.edge(sigpipes[48], summers[0],0,48)] + + [g.edge(sigpipes[49], summers[0],0,49)] + + [g.edge(sigpipes[50], summers[0],0,50)] + + [g.edge(sigpipes[51], summers[0],0,51)] + + [g.edge(sigpipes[52], summers[0],0,52)] + + [g.edge(sigpipes[53], summers[0],0,53)] + + [g.edge(sigpipes[54], summers[0],0,54)] + + [g.edge(sigpipes[55], summers[0],0,55)] + + [g.edge(sigpipes[56], summers[0],0,56)] + + [g.edge(sigpipes[57], summers[0],0,57)] + + [g.edge(sigpipes[58], summers[0],0,58)] + + [g.edge(sigpipes[59], summers[0],0,59)] + + [g.edge(sigpipes[60], summers[0],0,60)] + + [g.edge(sigpipes[61], summers[0],0,61)] + + [g.edge(sigpipes[62], summers[0],0,62)] + + [g.edge(sigpipes[63], summers[0],0,63)] + + [g.edge(sigpipes[64], summers[0],0,64)] + + [g.edge(sigpipes[65], summers[0],0,65)] + + [g.edge(sigpipes[66], summers[0],0,66)] + + [g.edge(sigpipes[67], summers[0],0,67)] + + [g.edge(sigpipes[68], summers[0],0,68)] + + [g.edge(sigpipes[69], summers[0],0,69)] + + [g.edge(sigpipes[70], summers[0],0,70)] + + [g.edge(sigpipes[71], summers[0],0,71)] + + [g.edge(sigpipes[72], summers[0],0,72)] + + [g.edge(sigpipes[73], summers[0],0,73)] + + [g.edge(sigpipes[74], summers[0],0,74)] + + [g.edge(sigpipes[75], summers[0],0,75)] + + [g.edge(sigpipes[76], summers[0],0,76)] + + [g.edge(sigpipes[77], summers[0],0,77)] + + [g.edge(sigpipes[78], summers[0],0,78)] + + [g.edge(sigpipes[79], summers[0],0,79)] + + [g.edge(sigpipes[80], summers[0],0,80)] + + [g.edge(sigpipes[81], summers[0],0,81)] + + [g.edge(sigpipes[82], summers[0],0,82)] + + [g.edge(sigpipes[83], summers[0],0,83)] + + [g.edge(sigpipes[84], summers[0],0,84)] + + [g.edge(sigpipes[85], summers[0],0,85)] + + [g.edge(sigpipes[86], summers[0],0,86)] + + [g.edge(sigpipes[87], summers[0],0,87)] + + [g.edge(sigpipes[88], summers[0],0,88)] + + [g.edge(sigpipes[89], summers[0],0,89)] + + [g.edge(sigpipes[90], summers[1],0,0)] + + [g.edge(sigpipes[91], summers[1],0,1)] + + [g.edge(sigpipes[92], summers[1],0,2)] + + [g.edge(sigpipes[93], summers[1],0,3)] + + [g.edge(sigpipes[94], summers[1],0,4)] + + [g.edge(sigpipes[95], summers[1],0,5)] + + [g.edge(sigpipes[96], summers[1],0,6)] + + [g.edge(sigpipes[97], summers[1],0,7)] + + [g.edge(sigpipes[98], summers[1],0,8)] + + [g.edge(sigpipes[99], summers[1],0,9)] + + [g.edge(sigpipes[100], summers[1],0,10)] + + [g.edge(sigpipes[101], summers[1],0,11)] + + [g.edge(sigpipes[102], summers[1],0,12)] + + [g.edge(sigpipes[103], summers[1],0,13)] + + [g.edge(sigpipes[104], summers[1],0,14)] + + [g.edge(sigpipes[105], summers[1],0,15)] + + [g.edge(sigpipes[106], summers[1],0,16)] + + [g.edge(sigpipes[107], summers[1],0,17)] + + [g.edge(sigpipes[108], summers[1],0,18)] + + [g.edge(sigpipes[109], summers[1],0,19)] + + [g.edge(sigpipes[110], summers[1],0,20)] + + [g.edge(sigpipes[111], summers[1],0,21)] + + [g.edge(sigpipes[112], summers[1],0,22)] + + [g.edge(sigpipes[113], summers[1],0,23)] + + [g.edge(sigpipes[114], summers[1],0,24)] + + [g.edge(sigpipes[115], summers[1],0,25)] + + [g.edge(sigpipes[116], summers[1],0,26)] + + [g.edge(sigpipes[117], summers[1],0,27)] + + [g.edge(sigpipes[118], summers[1],0,28)] + + [g.edge(sigpipes[119], summers[1],0,29)] + + [g.edge(sigpipes[120], summers[1],0,30)] + + [g.edge(sigpipes[121], summers[1],0,31)] + + [g.edge(sigpipes[122], summers[1],0,32)] + + [g.edge(sigpipes[123], summers[1],0,33)] + + [g.edge(sigpipes[124], summers[1],0,34)] + + [g.edge(sigpipes[125], summers[1],0,35)] + + [g.edge(sigpipes[126], summers[1],0,36)] + + [g.edge(sigpipes[127], summers[1],0,37)] + + [g.edge(sigpipes[128], summers[1],0,38)] + + [g.edge(sigpipes[129], summers[1],0,39)] + + [g.edge(sigpipes[130], summers[1],0,40)] + + [g.edge(sigpipes[131], summers[1],0,41)] + + [g.edge(sigpipes[132], summers[1],0,42)] + + [g.edge(sigpipes[133], summers[1],0,43)] + + [g.edge(sigpipes[134], summers[1],0,44)] + + [g.edge(sigpipes[135], summers[1],0,45)] + + [g.edge(sigpipes[136], summers[1],0,46)] + + [g.edge(sigpipes[137], summers[1],0,47)] + + [g.edge(sigpipes[138], summers[1],0,48)] + + [g.edge(sigpipes[139], summers[1],0,49)] + + [g.edge(sigpipes[140], summers[1],0,50)] + + [g.edge(sigpipes[141], summers[1],0,51)] + + [g.edge(sigpipes[142], summers[1],0,52)] + + [g.edge(sigpipes[143], summers[1],0,53)] + + [g.edge(sigpipes[144], summers[1],0,54)] + + [g.edge(sigpipes[145], summers[1],0,55)] + + [g.edge(sigpipes[146], summers[1],0,56)] + + [g.edge(sigpipes[147], summers[1],0,57)] + + [g.edge(sigpipes[148], summers[1],0,58)] + + [g.edge(sigpipes[149], summers[1],0,59)] + + [g.edge(sigpipes[150], summers[1],0,60)] + + [g.edge(sigpipes[151], summers[1],0,61)] + + [g.edge(sigpipes[152], summers[1],0,62)] + + [g.edge(sigpipes[153], summers[1],0,63)] + + [g.edge(sigpipes[154], summers[1],0,64)] + + [g.edge(sigpipes[155], summers[1],0,65)] + + [g.edge(sigpipes[156], summers[1],0,66)] + + [g.edge(sigpipes[157], summers[1],0,67)] + + [g.edge(sigpipes[158], summers[1],0,68)] + + [g.edge(sigpipes[159], summers[1],0,69)] + + [g.edge(sigpipes[160], summers[1],0,70)] + + [g.edge(sigpipes[161], summers[1],0,71)] + + [g.edge(sigpipes[162], summers[1],0,72)] + + [g.edge(sigpipes[163], summers[1],0,73)] + + [g.edge(sigpipes[164], summers[1],0,74)] + + [g.edge(sigpipes[165], summers[1],0,75)] + + [g.edge(sigpipes[166], summers[1],0,76)] + + [g.edge(sigpipes[167], summers[1],0,77)] + + [g.edge(sigpipes[168], summers[1],0,78)] + + [g.edge(sigpipes[169], summers[1],0,79)] + + [g.edge(sigpipes[170], summers[1],0,80)] + + [g.edge(sigpipes[171], summers[1],0,81)] + + [g.edge(sigpipes[172], summers[1],0,82)] + + [g.edge(sigpipes[173], summers[1],0,83)] + + [g.edge(sigpipes[174], summers[1],0,84)] + + [g.edge(sigpipes[175], summers[1],0,85)] + + [g.edge(sigpipes[176], summers[1],0,86)] + + [g.edge(sigpipes[177], summers[1],0,87)] + + [g.edge(sigpipes[178], summers[1],0,88)] + + [g.edge(sigpipes[179], summers[1],0,89)] + + [g.edge(sigpipes[180], summers[2],0,0)] + + [g.edge(sigpipes[181], summers[2],0,1)] + + [g.edge(sigpipes[182], summers[2],0,2)] + + [g.edge(sigpipes[183], summers[2],0,3)] + + [g.edge(sigpipes[184], summers[2],0,4)] + + [g.edge(sigpipes[185], summers[2],0,5)] + + [g.edge(sigpipes[186], summers[2],0,6)] + + [g.edge(sigpipes[187], summers[2],0,7)] + + [g.edge(sigpipes[188], summers[2],0,8)] + + [g.edge(sigpipes[189], summers[2],0,9)] + + [g.edge(sigpipes[190], summers[2],0,10)] + + [g.edge(sigpipes[191], summers[2],0,11)] + + [g.edge(sigpipes[192], summers[2],0,12)] + + [g.edge(sigpipes[193], summers[2],0,13)] + + [g.edge(sigpipes[194], summers[2],0,14)] + + [g.edge(sigpipes[195], summers[2],0,15)] + + [g.edge(sigpipes[196], summers[2],0,16)] + + [g.edge(sigpipes[197], summers[2],0,17)] + + [g.edge(sigpipes[198], summers[2],0,18)] + + [g.edge(sigpipes[199], summers[2],0,19)] + + [g.edge(sigpipes[200], summers[2],0,20)] + + [g.edge(sigpipes[201], summers[2],0,21)] + + [g.edge(sigpipes[202], summers[2],0,22)] + + [g.edge(sigpipes[203], summers[2],0,23)] + + [g.edge(sigpipes[204], summers[2],0,24)] + + [g.edge(sigpipes[205], summers[2],0,25)] + + [g.edge(sigpipes[206], summers[2],0,26)] + + [g.edge(sigpipes[207], summers[2],0,27)] + + [g.edge(sigpipes[208], summers[2],0,28)] + + [g.edge(sigpipes[209], summers[2],0,29)] + + [g.edge(sigpipes[210], summers[2],0,30)] + + [g.edge(sigpipes[211], summers[2],0,31)] + + [g.edge(sigpipes[212], summers[2],0,32)] + + [g.edge(sigpipes[213], summers[2],0,33)] + + [g.edge(sigpipes[214], summers[2],0,34)] + + [g.edge(sigpipes[215], summers[2],0,35)] + + [g.edge(sigpipes[216], summers[2],0,36)] + + [g.edge(sigpipes[217], summers[2],0,37)] + + [g.edge(sigpipes[218], summers[2],0,38)] + + [g.edge(sigpipes[219], summers[2],0,39)] + + [g.edge(sigpipes[220], summers[2],0,40)] + + [g.edge(sigpipes[221], summers[2],0,41)] + + [g.edge(sigpipes[222], summers[2],0,42)] + + [g.edge(sigpipes[223], summers[2],0,43)] + + [g.edge(sigpipes[224], summers[2],0,44)] + + [g.edge(sigpipes[225], summers[2],0,45)] + + [g.edge(sigpipes[226], summers[2],0,46)] + + [g.edge(sigpipes[227], summers[2],0,47)] + + [g.edge(sigpipes[228], summers[2],0,48)] + + [g.edge(sigpipes[229], summers[2],0,49)] + + [g.edge(sigpipes[230], summers[2],0,50)] + + [g.edge(sigpipes[231], summers[2],0,51)] + + [g.edge(sigpipes[232], summers[2],0,52)] + + [g.edge(sigpipes[233], summers[2],0,53)] + + [g.edge(sigpipes[234], summers[2],0,54)] + + [g.edge(sigpipes[235], summers[2],0,55)] + + [g.edge(sigpipes[236], summers[2],0,56)] + + [g.edge(sigpipes[237], summers[2],0,57)] + + [g.edge(sigpipes[238], summers[2],0,58)] + + [g.edge(sigpipes[239], summers[2],0,59)] + + [g.edge(sigpipes[240], summers[2],0,60)] + + [g.edge(sigpipes[241], summers[2],0,61)] + + [g.edge(sigpipes[242], summers[2],0,62)] + + [g.edge(sigpipes[243], summers[2],0,63)] + + [g.edge(sigpipes[244], summers[2],0,64)] + + [g.edge(sigpipes[245], summers[2],0,65)] + + [g.edge(sigpipes[246], summers[2],0,66)] + + [g.edge(sigpipes[247], summers[2],0,67)] + + [g.edge(sigpipes[248], summers[2],0,68)] + + [g.edge(sigpipes[249], summers[2],0,69)] + + [g.edge(sigpipes[250], summers[2],0,70)] + + [g.edge(sigpipes[251], summers[2],0,71)] + + [g.edge(sigpipes[252], summers[2],0,72)] + + [g.edge(sigpipes[253], summers[2],0,73)] + + [g.edge(sigpipes[254], summers[2],0,74)] + + [g.edge(sigpipes[255], summers[2],0,75)] + + [g.edge(sigpipes[256], summers[2],0,76)] + + [g.edge(sigpipes[257], summers[2],0,77)] + + [g.edge(sigpipes[258], summers[2],0,78)] + + [g.edge(sigpipes[259], summers[2],0,79)] + + [g.edge(sigpipes[260], summers[2],0,80)] + + [g.edge(sigpipes[261], summers[2],0,81)] + + [g.edge(sigpipes[262], summers[2],0,82)] + + [g.edge(sigpipes[263], summers[2],0,83)] + + [g.edge(sigpipes[264], summers[2],0,84)] + + [g.edge(sigpipes[265], summers[2],0,85)] + + [g.edge(sigpipes[266], summers[2],0,86)] + + [g.edge(sigpipes[267], summers[2],0,87)] + + [g.edge(sigpipes[268], summers[2],0,88)] + + [g.edge(sigpipes[269], summers[2],0,89)] + + [g.edge(sigpipes[270], summers[3],0,0)] + + [g.edge(sigpipes[271], summers[3],0,1)] + + [g.edge(sigpipes[272], summers[3],0,2)] + + [g.edge(sigpipes[273], summers[3],0,3)] + + [g.edge(sigpipes[274], summers[3],0,4)] + + [g.edge(sigpipes[275], summers[3],0,5)] + + [g.edge(sigpipes[276], summers[3],0,6)] + + [g.edge(sigpipes[277], summers[3],0,7)] + + [g.edge(sigpipes[278], summers[3],0,8)] + + [g.edge(sigpipes[279], summers[3],0,9)] + + [g.edge(sigpipes[280], summers[3],0,10)] + + [g.edge(sigpipes[281], summers[3],0,11)] + + [g.edge(sigpipes[282], summers[3],0,12)] + + [g.edge(sigpipes[283], summers[3],0,13)] + + [g.edge(sigpipes[284], summers[3],0,14)] + + [g.edge(sigpipes[285], summers[3],0,15)] + + [g.edge(sigpipes[286], summers[3],0,16)] + + [g.edge(sigpipes[287], summers[3],0,17)] + + [g.edge(sigpipes[288], summers[3],0,18)] + + [g.edge(sigpipes[289], summers[3],0,19)] + + [g.edge(sigpipes[290], summers[3],0,20)] + + [g.edge(sigpipes[291], summers[3],0,21)] + + [g.edge(sigpipes[292], summers[3],0,22)] + + [g.edge(sigpipes[293], summers[3],0,23)] + + [g.edge(sigpipes[294], summers[3],0,24)] + + [g.edge(sigpipes[295], summers[3],0,25)] + + [g.edge(sigpipes[296], summers[3],0,26)] + + [g.edge(sigpipes[297], summers[3],0,27)] + + [g.edge(sigpipes[298], summers[3],0,28)] + + [g.edge(sigpipes[299], summers[3],0,29)] + + [g.edge(sigpipes[300], summers[3],0,30)] + + [g.edge(sigpipes[301], summers[3],0,31)] + + [g.edge(sigpipes[302], summers[3],0,32)] + + [g.edge(sigpipes[303], summers[3],0,33)] + + [g.edge(sigpipes[304], summers[3],0,34)] + + [g.edge(sigpipes[305], summers[3],0,35)] + + [g.edge(sigpipes[306], summers[3],0,36)] + + [g.edge(sigpipes[307], summers[3],0,37)] + + [g.edge(sigpipes[308], summers[3],0,38)] + + [g.edge(sigpipes[309], summers[3],0,39)] + + [g.edge(sigpipes[310], summers[3],0,40)] + + [g.edge(sigpipes[311], summers[3],0,41)] + + [g.edge(sigpipes[312], summers[3],0,42)] + + [g.edge(sigpipes[313], summers[3],0,43)] + + [g.edge(sigpipes[314], summers[3],0,44)] + + [g.edge(sigpipes[315], summers[3],0,45)] + + [g.edge(sigpipes[316], summers[3],0,46)] + + [g.edge(sigpipes[317], summers[3],0,47)] + + [g.edge(sigpipes[318], summers[3],0,48)] + + [g.edge(sigpipes[319], summers[3],0,49)] + + [g.edge(sigpipes[320], summers[3],0,50)] + + [g.edge(sigpipes[321], summers[3],0,51)] + + [g.edge(sigpipes[322], summers[3],0,52)] + + [g.edge(sigpipes[323], summers[3],0,53)] + + [g.edge(sigpipes[324], summers[3],0,54)] + + [g.edge(sigpipes[325], summers[3],0,55)] + + [g.edge(sigpipes[326], summers[3],0,56)] + + [g.edge(sigpipes[327], summers[3],0,57)] + + [g.edge(sigpipes[328], summers[3],0,58)] + + [g.edge(sigpipes[329], summers[3],0,59)] + + [g.edge(sigpipes[330], summers[3],0,60)] + + [g.edge(sigpipes[331], summers[3],0,61)] + + [g.edge(sigpipes[332], summers[3],0,62)] + + [g.edge(sigpipes[333], summers[3],0,63)] + + [g.edge(sigpipes[334], summers[3],0,64)] + + [g.edge(sigpipes[335], summers[3],0,65)] + + [g.edge(sigpipes[336], summers[3],0,66)] + + [g.edge(sigpipes[337], summers[3],0,67)] + + [g.edge(sigpipes[338], summers[3],0,68)] + + [g.edge(sigpipes[339], summers[3],0,69)] + + [g.edge(sigpipes[340], summers[3],0,70)] + + [g.edge(sigpipes[341], summers[3],0,71)] + + [g.edge(sigpipes[342], summers[3],0,72)] + + [g.edge(sigpipes[343], summers[3],0,73)] + + [g.edge(sigpipes[344], summers[3],0,74)] + + [g.edge(sigpipes[345], summers[3],0,75)] + + [g.edge(sigpipes[346], summers[3],0,76)] + + [g.edge(sigpipes[347], summers[3],0,77)] + + [g.edge(sigpipes[348], summers[3],0,78)] + + [g.edge(sigpipes[349], summers[3],0,79)] + + [g.edge(sigpipes[350], summers[3],0,80)] + + [g.edge(sigpipes[351], summers[3],0,81)] + + [g.edge(sigpipes[352], summers[3],0,82)] + + [g.edge(sigpipes[353], summers[3],0,83)] + + [g.edge(sigpipes[354], summers[3],0,84)] + + [g.edge(sigpipes[355], summers[3],0,85)] + + [g.edge(sigpipes[356], summers[3],0,86)] + + [g.edge(sigpipes[357], summers[3],0,87)] + + [g.edge(sigpipes[358], summers[3],0,88)] + + [g.edge(sigpipes[359], summers[3],0,89)] + // connecting summer and the operator pipelines + + [g.edge(summers[n], actpipes[n]) for n in std.range(0,faninmult-1)], + name=name), + + local signal = g.intern(innodes=sigpipes, + outnodes=actpipes, + centernodes=summers, + edges= + // connecting signal and summer + + [g.edge(sigpipes[0], summers[0],0,0)] + + [g.edge(sigpipes[1], summers[0],0,1)] + + [g.edge(sigpipes[2], summers[0],0,2)] + + [g.edge(sigpipes[3], summers[0],0,3)] + + [g.edge(sigpipes[4], summers[0],0,4)] + + [g.edge(sigpipes[5], summers[0],0,5)] + + [g.edge(sigpipes[6], summers[0],0,6)] + + [g.edge(sigpipes[7], summers[0],0,7)] + + [g.edge(sigpipes[8], summers[0],0,8)] + + [g.edge(sigpipes[9], summers[0],0,9)] + + [g.edge(sigpipes[10], summers[0],0,10)] + + [g.edge(sigpipes[11], summers[0],0,11)] + + [g.edge(sigpipes[12], summers[0],0,12)] + + [g.edge(sigpipes[13], summers[0],0,13)] + + [g.edge(sigpipes[14], summers[0],0,14)] + + [g.edge(sigpipes[15], summers[0],0,15)] + + [g.edge(sigpipes[16], summers[0],0,16)] + + [g.edge(sigpipes[17], summers[0],0,17)] + + [g.edge(sigpipes[18], summers[0],0,18)] + + [g.edge(sigpipes[19], summers[0],0,19)] + + [g.edge(sigpipes[20], summers[0],0,20)] + + [g.edge(sigpipes[21], summers[0],0,21)] + + [g.edge(sigpipes[22], summers[0],0,22)] + + [g.edge(sigpipes[23], summers[0],0,23)] + + [g.edge(sigpipes[24], summers[0],0,24)] + + [g.edge(sigpipes[25], summers[0],0,25)] + + [g.edge(sigpipes[26], summers[0],0,26)] + + [g.edge(sigpipes[27], summers[0],0,27)] + + [g.edge(sigpipes[28], summers[0],0,28)] + + [g.edge(sigpipes[29], summers[0],0,29)] + + [g.edge(sigpipes[30], summers[0],0,30)] + + [g.edge(sigpipes[31], summers[0],0,31)] + + [g.edge(sigpipes[32], summers[0],0,32)] + + [g.edge(sigpipes[33], summers[0],0,33)] + + [g.edge(sigpipes[34], summers[0],0,34)] + + [g.edge(sigpipes[35], summers[0],0,35)] + + [g.edge(sigpipes[36], summers[0],0,36)] + + [g.edge(sigpipes[37], summers[0],0,37)] + + [g.edge(sigpipes[38], summers[0],0,38)] + + [g.edge(sigpipes[39], summers[0],0,39)] + + [g.edge(sigpipes[40], summers[0],0,40)] + + [g.edge(sigpipes[41], summers[0],0,41)] + + [g.edge(sigpipes[42], summers[0],0,42)] + + [g.edge(sigpipes[43], summers[0],0,43)] + + [g.edge(sigpipes[44], summers[0],0,44)] + + [g.edge(sigpipes[45], summers[0],0,45)] + + [g.edge(sigpipes[46], summers[0],0,46)] + + [g.edge(sigpipes[47], summers[0],0,47)] + + [g.edge(sigpipes[48], summers[0],0,48)] + + [g.edge(sigpipes[49], summers[0],0,49)] + + [g.edge(sigpipes[50], summers[0],0,50)] + + [g.edge(sigpipes[51], summers[0],0,51)] + + [g.edge(sigpipes[52], summers[0],0,52)] + + [g.edge(sigpipes[53], summers[0],0,53)] + + [g.edge(sigpipes[54], summers[0],0,54)] + + [g.edge(sigpipes[55], summers[0],0,55)] + + [g.edge(sigpipes[56], summers[0],0,56)] + + [g.edge(sigpipes[57], summers[0],0,57)] + + [g.edge(sigpipes[58], summers[0],0,58)] + + [g.edge(sigpipes[59], summers[0],0,59)] + + [g.edge(sigpipes[60], summers[0],0,60)] + + [g.edge(sigpipes[61], summers[0],0,61)] + + [g.edge(sigpipes[62], summers[0],0,62)] + + [g.edge(sigpipes[63], summers[0],0,63)] + + [g.edge(sigpipes[64], summers[0],0,64)] + + [g.edge(sigpipes[65], summers[0],0,65)] + + [g.edge(sigpipes[66], summers[0],0,66)] + + [g.edge(sigpipes[67], summers[0],0,67)] + + [g.edge(sigpipes[68], summers[0],0,68)] + + [g.edge(sigpipes[69], summers[0],0,69)] + + [g.edge(sigpipes[70], summers[0],0,70)] + + [g.edge(sigpipes[71], summers[0],0,71)] + + [g.edge(sigpipes[72], summers[0],0,72)] + + [g.edge(sigpipes[73], summers[0],0,73)] + + [g.edge(sigpipes[74], summers[0],0,74)] + + [g.edge(sigpipes[75], summers[0],0,75)] + + [g.edge(sigpipes[76], summers[0],0,76)] + + [g.edge(sigpipes[77], summers[0],0,77)] + + [g.edge(sigpipes[78], summers[0],0,78)] + + [g.edge(sigpipes[79], summers[0],0,79)] + + [g.edge(sigpipes[80], summers[0],0,80)] + + [g.edge(sigpipes[81], summers[0],0,81)] + + [g.edge(sigpipes[82], summers[0],0,82)] + + [g.edge(sigpipes[83], summers[0],0,83)] + + [g.edge(sigpipes[84], summers[0],0,84)] + + [g.edge(sigpipes[85], summers[0],0,85)] + + [g.edge(sigpipes[86], summers[0],0,86)] + + [g.edge(sigpipes[87], summers[0],0,87)] + + [g.edge(sigpipes[88], summers[0],0,88)] + + [g.edge(sigpipes[89], summers[0],0,89)] + + [g.edge(sigpipes[90], summers[1],0,0)] + + [g.edge(sigpipes[91], summers[1],0,1)] + + [g.edge(sigpipes[92], summers[1],0,2)] + + [g.edge(sigpipes[93], summers[1],0,3)] + + [g.edge(sigpipes[94], summers[1],0,4)] + + [g.edge(sigpipes[95], summers[1],0,5)] + + [g.edge(sigpipes[96], summers[1],0,6)] + + [g.edge(sigpipes[97], summers[1],0,7)] + + [g.edge(sigpipes[98], summers[1],0,8)] + + [g.edge(sigpipes[99], summers[1],0,9)] + + [g.edge(sigpipes[100], summers[1],0,10)] + + [g.edge(sigpipes[101], summers[1],0,11)] + + [g.edge(sigpipes[102], summers[1],0,12)] + + [g.edge(sigpipes[103], summers[1],0,13)] + + [g.edge(sigpipes[104], summers[1],0,14)] + + [g.edge(sigpipes[105], summers[1],0,15)] + + [g.edge(sigpipes[106], summers[1],0,16)] + + [g.edge(sigpipes[107], summers[1],0,17)] + + [g.edge(sigpipes[108], summers[1],0,18)] + + [g.edge(sigpipes[109], summers[1],0,19)] + + [g.edge(sigpipes[110], summers[1],0,20)] + + [g.edge(sigpipes[111], summers[1],0,21)] + + [g.edge(sigpipes[112], summers[1],0,22)] + + [g.edge(sigpipes[113], summers[1],0,23)] + + [g.edge(sigpipes[114], summers[1],0,24)] + + [g.edge(sigpipes[115], summers[1],0,25)] + + [g.edge(sigpipes[116], summers[1],0,26)] + + [g.edge(sigpipes[117], summers[1],0,27)] + + [g.edge(sigpipes[118], summers[1],0,28)] + + [g.edge(sigpipes[119], summers[1],0,29)] + + [g.edge(sigpipes[120], summers[1],0,30)] + + [g.edge(sigpipes[121], summers[1],0,31)] + + [g.edge(sigpipes[122], summers[1],0,32)] + + [g.edge(sigpipes[123], summers[1],0,33)] + + [g.edge(sigpipes[124], summers[1],0,34)] + + [g.edge(sigpipes[125], summers[1],0,35)] + + [g.edge(sigpipes[126], summers[1],0,36)] + + [g.edge(sigpipes[127], summers[1],0,37)] + + [g.edge(sigpipes[128], summers[1],0,38)] + + [g.edge(sigpipes[129], summers[1],0,39)] + + [g.edge(sigpipes[130], summers[1],0,40)] + + [g.edge(sigpipes[131], summers[1],0,41)] + + [g.edge(sigpipes[132], summers[1],0,42)] + + [g.edge(sigpipes[133], summers[1],0,43)] + + [g.edge(sigpipes[134], summers[1],0,44)] + + [g.edge(sigpipes[135], summers[1],0,45)] + + [g.edge(sigpipes[136], summers[1],0,46)] + + [g.edge(sigpipes[137], summers[1],0,47)] + + [g.edge(sigpipes[138], summers[1],0,48)] + + [g.edge(sigpipes[139], summers[1],0,49)] + + [g.edge(sigpipes[140], summers[1],0,50)] + + [g.edge(sigpipes[141], summers[1],0,51)] + + [g.edge(sigpipes[142], summers[1],0,52)] + + [g.edge(sigpipes[143], summers[1],0,53)] + + [g.edge(sigpipes[144], summers[1],0,54)] + + [g.edge(sigpipes[145], summers[1],0,55)] + + [g.edge(sigpipes[146], summers[1],0,56)] + + [g.edge(sigpipes[147], summers[1],0,57)] + + [g.edge(sigpipes[148], summers[1],0,58)] + + [g.edge(sigpipes[149], summers[1],0,59)] + + [g.edge(sigpipes[150], summers[1],0,60)] + + [g.edge(sigpipes[151], summers[1],0,61)] + + [g.edge(sigpipes[152], summers[1],0,62)] + + [g.edge(sigpipes[153], summers[1],0,63)] + + [g.edge(sigpipes[154], summers[1],0,64)] + + [g.edge(sigpipes[155], summers[1],0,65)] + + [g.edge(sigpipes[156], summers[1],0,66)] + + [g.edge(sigpipes[157], summers[1],0,67)] + + [g.edge(sigpipes[158], summers[1],0,68)] + + [g.edge(sigpipes[159], summers[1],0,69)] + + [g.edge(sigpipes[160], summers[1],0,70)] + + [g.edge(sigpipes[161], summers[1],0,71)] + + [g.edge(sigpipes[162], summers[1],0,72)] + + [g.edge(sigpipes[163], summers[1],0,73)] + + [g.edge(sigpipes[164], summers[1],0,74)] + + [g.edge(sigpipes[165], summers[1],0,75)] + + [g.edge(sigpipes[166], summers[1],0,76)] + + [g.edge(sigpipes[167], summers[1],0,77)] + + [g.edge(sigpipes[168], summers[1],0,78)] + + [g.edge(sigpipes[169], summers[1],0,79)] + + [g.edge(sigpipes[170], summers[1],0,80)] + + [g.edge(sigpipes[171], summers[1],0,81)] + + [g.edge(sigpipes[172], summers[1],0,82)] + + [g.edge(sigpipes[173], summers[1],0,83)] + + [g.edge(sigpipes[174], summers[1],0,84)] + + [g.edge(sigpipes[175], summers[1],0,85)] + + [g.edge(sigpipes[176], summers[1],0,86)] + + [g.edge(sigpipes[177], summers[1],0,87)] + + [g.edge(sigpipes[178], summers[1],0,88)] + + [g.edge(sigpipes[179], summers[1],0,89)] + + [g.edge(sigpipes[180], summers[2],0,0)] + + [g.edge(sigpipes[181], summers[2],0,1)] + + [g.edge(sigpipes[182], summers[2],0,2)] + + [g.edge(sigpipes[183], summers[2],0,3)] + + [g.edge(sigpipes[184], summers[2],0,4)] + + [g.edge(sigpipes[185], summers[2],0,5)] + + [g.edge(sigpipes[186], summers[2],0,6)] + + [g.edge(sigpipes[187], summers[2],0,7)] + + [g.edge(sigpipes[188], summers[2],0,8)] + + [g.edge(sigpipes[189], summers[2],0,9)] + + [g.edge(sigpipes[190], summers[2],0,10)] + + [g.edge(sigpipes[191], summers[2],0,11)] + + [g.edge(sigpipes[192], summers[2],0,12)] + + [g.edge(sigpipes[193], summers[2],0,13)] + + [g.edge(sigpipes[194], summers[2],0,14)] + + [g.edge(sigpipes[195], summers[2],0,15)] + + [g.edge(sigpipes[196], summers[2],0,16)] + + [g.edge(sigpipes[197], summers[2],0,17)] + + [g.edge(sigpipes[198], summers[2],0,18)] + + [g.edge(sigpipes[199], summers[2],0,19)] + + [g.edge(sigpipes[200], summers[2],0,20)] + + [g.edge(sigpipes[201], summers[2],0,21)] + + [g.edge(sigpipes[202], summers[2],0,22)] + + [g.edge(sigpipes[203], summers[2],0,23)] + + [g.edge(sigpipes[204], summers[2],0,24)] + + [g.edge(sigpipes[205], summers[2],0,25)] + + [g.edge(sigpipes[206], summers[2],0,26)] + + [g.edge(sigpipes[207], summers[2],0,27)] + + [g.edge(sigpipes[208], summers[2],0,28)] + + [g.edge(sigpipes[209], summers[2],0,29)] + + [g.edge(sigpipes[210], summers[2],0,30)] + + [g.edge(sigpipes[211], summers[2],0,31)] + + [g.edge(sigpipes[212], summers[2],0,32)] + + [g.edge(sigpipes[213], summers[2],0,33)] + + [g.edge(sigpipes[214], summers[2],0,34)] + + [g.edge(sigpipes[215], summers[2],0,35)] + + [g.edge(sigpipes[216], summers[2],0,36)] + + [g.edge(sigpipes[217], summers[2],0,37)] + + [g.edge(sigpipes[218], summers[2],0,38)] + + [g.edge(sigpipes[219], summers[2],0,39)] + + [g.edge(sigpipes[220], summers[2],0,40)] + + [g.edge(sigpipes[221], summers[2],0,41)] + + [g.edge(sigpipes[222], summers[2],0,42)] + + [g.edge(sigpipes[223], summers[2],0,43)] + + [g.edge(sigpipes[224], summers[2],0,44)] + + [g.edge(sigpipes[225], summers[2],0,45)] + + [g.edge(sigpipes[226], summers[2],0,46)] + + [g.edge(sigpipes[227], summers[2],0,47)] + + [g.edge(sigpipes[228], summers[2],0,48)] + + [g.edge(sigpipes[229], summers[2],0,49)] + + [g.edge(sigpipes[230], summers[2],0,50)] + + [g.edge(sigpipes[231], summers[2],0,51)] + + [g.edge(sigpipes[232], summers[2],0,52)] + + [g.edge(sigpipes[233], summers[2],0,53)] + + [g.edge(sigpipes[234], summers[2],0,54)] + + [g.edge(sigpipes[235], summers[2],0,55)] + + [g.edge(sigpipes[236], summers[2],0,56)] + + [g.edge(sigpipes[237], summers[2],0,57)] + + [g.edge(sigpipes[238], summers[2],0,58)] + + [g.edge(sigpipes[239], summers[2],0,59)] + + [g.edge(sigpipes[240], summers[2],0,60)] + + [g.edge(sigpipes[241], summers[2],0,61)] + + [g.edge(sigpipes[242], summers[2],0,62)] + + [g.edge(sigpipes[243], summers[2],0,63)] + + [g.edge(sigpipes[244], summers[2],0,64)] + + [g.edge(sigpipes[245], summers[2],0,65)] + + [g.edge(sigpipes[246], summers[2],0,66)] + + [g.edge(sigpipes[247], summers[2],0,67)] + + [g.edge(sigpipes[248], summers[2],0,68)] + + [g.edge(sigpipes[249], summers[2],0,69)] + + [g.edge(sigpipes[250], summers[2],0,70)] + + [g.edge(sigpipes[251], summers[2],0,71)] + + [g.edge(sigpipes[252], summers[2],0,72)] + + [g.edge(sigpipes[253], summers[2],0,73)] + + [g.edge(sigpipes[254], summers[2],0,74)] + + [g.edge(sigpipes[255], summers[2],0,75)] + + [g.edge(sigpipes[256], summers[2],0,76)] + + [g.edge(sigpipes[257], summers[2],0,77)] + + [g.edge(sigpipes[258], summers[2],0,78)] + + [g.edge(sigpipes[259], summers[2],0,79)] + + [g.edge(sigpipes[260], summers[2],0,80)] + + [g.edge(sigpipes[261], summers[2],0,81)] + + [g.edge(sigpipes[262], summers[2],0,82)] + + [g.edge(sigpipes[263], summers[2],0,83)] + + [g.edge(sigpipes[264], summers[2],0,84)] + + [g.edge(sigpipes[265], summers[2],0,85)] + + [g.edge(sigpipes[266], summers[2],0,86)] + + [g.edge(sigpipes[267], summers[2],0,87)] + + [g.edge(sigpipes[268], summers[2],0,88)] + + [g.edge(sigpipes[269], summers[2],0,89)] + + [g.edge(sigpipes[270], summers[3],0,0)] + + [g.edge(sigpipes[271], summers[3],0,1)] + + [g.edge(sigpipes[272], summers[3],0,2)] + + [g.edge(sigpipes[273], summers[3],0,3)] + + [g.edge(sigpipes[274], summers[3],0,4)] + + [g.edge(sigpipes[275], summers[3],0,5)] + + [g.edge(sigpipes[276], summers[3],0,6)] + + [g.edge(sigpipes[277], summers[3],0,7)] + + [g.edge(sigpipes[278], summers[3],0,8)] + + [g.edge(sigpipes[279], summers[3],0,9)] + + [g.edge(sigpipes[280], summers[3],0,10)] + + [g.edge(sigpipes[281], summers[3],0,11)] + + [g.edge(sigpipes[282], summers[3],0,12)] + + [g.edge(sigpipes[283], summers[3],0,13)] + + [g.edge(sigpipes[284], summers[3],0,14)] + + [g.edge(sigpipes[285], summers[3],0,15)] + + [g.edge(sigpipes[286], summers[3],0,16)] + + [g.edge(sigpipes[287], summers[3],0,17)] + + [g.edge(sigpipes[288], summers[3],0,18)] + + [g.edge(sigpipes[289], summers[3],0,19)] + + [g.edge(sigpipes[290], summers[3],0,20)] + + [g.edge(sigpipes[291], summers[3],0,21)] + + [g.edge(sigpipes[292], summers[3],0,22)] + + [g.edge(sigpipes[293], summers[3],0,23)] + + [g.edge(sigpipes[294], summers[3],0,24)] + + [g.edge(sigpipes[295], summers[3],0,25)] + + [g.edge(sigpipes[296], summers[3],0,26)] + + [g.edge(sigpipes[297], summers[3],0,27)] + + [g.edge(sigpipes[298], summers[3],0,28)] + + [g.edge(sigpipes[299], summers[3],0,29)] + + [g.edge(sigpipes[300], summers[3],0,30)] + + [g.edge(sigpipes[301], summers[3],0,31)] + + [g.edge(sigpipes[302], summers[3],0,32)] + + [g.edge(sigpipes[303], summers[3],0,33)] + + [g.edge(sigpipes[304], summers[3],0,34)] + + [g.edge(sigpipes[305], summers[3],0,35)] + + [g.edge(sigpipes[306], summers[3],0,36)] + + [g.edge(sigpipes[307], summers[3],0,37)] + + [g.edge(sigpipes[308], summers[3],0,38)] + + [g.edge(sigpipes[309], summers[3],0,39)] + + [g.edge(sigpipes[310], summers[3],0,40)] + + [g.edge(sigpipes[311], summers[3],0,41)] + + [g.edge(sigpipes[312], summers[3],0,42)] + + [g.edge(sigpipes[313], summers[3],0,43)] + + [g.edge(sigpipes[314], summers[3],0,44)] + + [g.edge(sigpipes[315], summers[3],0,45)] + + [g.edge(sigpipes[316], summers[3],0,46)] + + [g.edge(sigpipes[317], summers[3],0,47)] + + [g.edge(sigpipes[318], summers[3],0,48)] + + [g.edge(sigpipes[319], summers[3],0,49)] + + [g.edge(sigpipes[320], summers[3],0,50)] + + [g.edge(sigpipes[321], summers[3],0,51)] + + [g.edge(sigpipes[322], summers[3],0,52)] + + [g.edge(sigpipes[323], summers[3],0,53)] + + [g.edge(sigpipes[324], summers[3],0,54)] + + [g.edge(sigpipes[325], summers[3],0,55)] + + [g.edge(sigpipes[326], summers[3],0,56)] + + [g.edge(sigpipes[327], summers[3],0,57)] + + [g.edge(sigpipes[328], summers[3],0,58)] + + [g.edge(sigpipes[329], summers[3],0,59)] + + [g.edge(sigpipes[330], summers[3],0,60)] + + [g.edge(sigpipes[331], summers[3],0,61)] + + [g.edge(sigpipes[332], summers[3],0,62)] + + [g.edge(sigpipes[333], summers[3],0,63)] + + [g.edge(sigpipes[334], summers[3],0,64)] + + [g.edge(sigpipes[335], summers[3],0,65)] + + [g.edge(sigpipes[336], summers[3],0,66)] + + [g.edge(sigpipes[337], summers[3],0,67)] + + [g.edge(sigpipes[338], summers[3],0,68)] + + [g.edge(sigpipes[339], summers[3],0,69)] + + [g.edge(sigpipes[340], summers[3],0,70)] + + [g.edge(sigpipes[341], summers[3],0,71)] + + [g.edge(sigpipes[342], summers[3],0,72)] + + [g.edge(sigpipes[343], summers[3],0,73)] + + [g.edge(sigpipes[344], summers[3],0,74)] + + [g.edge(sigpipes[345], summers[3],0,75)] + + [g.edge(sigpipes[346], summers[3],0,76)] + + [g.edge(sigpipes[347], summers[3],0,77)] + + [g.edge(sigpipes[348], summers[3],0,78)] + + [g.edge(sigpipes[349], summers[3],0,79)] + + [g.edge(sigpipes[350], summers[3],0,80)] + + [g.edge(sigpipes[351], summers[3],0,81)] + + [g.edge(sigpipes[352], summers[3],0,82)] + + [g.edge(sigpipes[353], summers[3],0,83)] + + [g.edge(sigpipes[354], summers[3],0,84)] + + [g.edge(sigpipes[355], summers[3],0,85)] + + [g.edge(sigpipes[356], summers[3],0,86)] + + [g.edge(sigpipes[357], summers[3],0,87)] + + [g.edge(sigpipes[358], summers[3],0,88)] + + [g.edge(sigpipes[359], summers[3],0,89)] + // connecting summer and the operator pipelines + + [g.edge(summers[n], actpipes[n]) for n in std.range(0,faninmult-1)], + name=name), + + + ret: g.intern(innodes=[fanout], + outnodes=[fanin], + centernodes=[drift], + edges= + [g.edge(fanout, driftpipes[n], n, 0) for n in std.range(0, fanoutmult-1)] + + [g.edge(drift, fanin, n, n) for n in std.range(0, faninmult-1)], + name=name), + }.ret, + + + + + // Build a fanout-[pipelines]-fanin graph. pipelines is a list of // pnode objects, one for each spine of the fan. fanpipe:: function(fout, pipelines, fin, name='fanpipe', outtags=[], fout_tag_rules=[], fin_tag_rules=[]) { @@ -116,4 +1309,156 @@ local g = import 'pgraph.jsonnet'; [g.edge(pipelines[n], fanin, 0, n) for n in std.range(0, fanmult - 1)], name=name), }.ret, + + multifanpipe :: function( fout, pipelines, fin, + fout_nnodes=[1,8,16], fout_multi=[8,2,7], + fin_nnodes=[1,8,16], fin_multi=[8,2,7], + name='multifanpipe', outtags=[], tag_rules=null ) { + local fout_nlayers = std.length(fout_multi), + assert fout_nlayers >= 2 : "fout_nlayers should be >= 2", + local fin_nlayers = std.length(fin_multi), + assert fin_nlayers >= 2 : "fin_nlayers should be >= 2", + local npipe = std.length(pipelines), + assert npipe == fout_nnodes[fout_nlayers-1]*fout_multi[fout_nlayers-1] : + "fout layout error npipe=%d, "%npipe + "fout=%d"%(fout_nnodes[fout_nlayers-1]*fout_multi[fout_nlayers-1]), + assert npipe == fin_nnodes[fin_nlayers-1]*fin_multi[fin_nlayers-1] : + "fin layout error npipe=%d, "%npipe + "fin=%d"%(fin_nnodes[fin_nlayers-1]*fin_multi[fin_nlayers-1]), + + // function to create nodes for one layer + local fout_layer(ilayer,nnodes,nmulti) = { + ret : [ + g.pnode({ + type: fout, + name: name+"_fout_%d"%ilayer + "_%d"%inode, + data: { + multiplicity: nmulti, + tag_rules: [], + }}, nin=1, nout=nmulti + ) for inode in std.range(0,nnodes-1)], + }.ret, + // nodes for all layers + local fout_layers = [ + fout_layer(ilayer, + fout_nnodes[ilayer], + fout_multi[ilayer]) + for ilayer in std.range(0,fout_nlayers-1) + ], + // make edges to make a combo node + local fout_node = g.intern( + innodes = fout_layers[0], + centernodes = if fout_nlayers == 2 then [] else std.flattenArrays([fout_layers[i] for i in std.range(1,fout_nlayers-2)]), + outnodes = fout_layers[fout_nlayers-1], + edges = std.flattenArrays( + [ + [ + g.edge( + fout_layers[ilayer-1][std.floor(inode/fout_multi[ilayer-1])], + fout_layers[ilayer][inode], + inode%fout_multi[ilayer-1], + 0) + for inode in std.range(0,fout_nnodes[ilayer]-1)] + for ilayer in std.range(1,fout_nlayers-1)]) + ), + + // similarly build the multi-layer fan in combo node + // note the backward layer counting + local fin_layer(ilayer,nnodes,nmulti) = { + ret : [ + g.pnode({ + type: fin, + name: name+"_fin_%d"%ilayer + "_%d"%inode, + data: { + multiplicity: nmulti, + tags: outtags, + tag_rules: [tag_rules for irule in std.range(0,nmulti-1)], + }}, nin=nmulti, nout=1 + ) for inode in std.range(0,nnodes-1)], + }.ret, + local fin_layers = [ + fin_layer(ilayer, + fin_nnodes[ilayer], + fin_multi[ilayer]) + for ilayer in std.range(0,fin_nlayers-1) + ], + local fin_node = g.intern( + innodes = fin_layers[fin_nlayers-1], + centernodes = if fin_nlayers == 2 then [] else std.flattenArrays([fin_layers[i] for i in std.range(1,fout_nlayers-2)]), + outnodes = fin_layers[0], + edges = std.flattenArrays( + [ + [ + g.edge( + fin_layers[ilayer][inode], + fin_layers[ilayer-1][std.floor(inode/fin_multi[ilayer-1])], + 0, + inode%fin_multi[ilayer-1]) + for inode in std.range(0,fin_nnodes[ilayer]-1)] + for ilayer in std.range(1,fin_nlayers-1)]) + ), + + // connect comb_fan_out-piples-combo_fan_in + ret : g.intern( + innodes = [fout_node], + centernodes = pipelines, + outnodes = [fin_node], + edges = [g.edge(fout_node,pipelines[n],n,0) for n in std.range(0,npipe-1)] + + [g.edge(pipelines[n],fin_node,0,n) for n in std.range(0,npipe-1)], + ), + }.ret, + + // similar as multifanpipe but jusnt fan-out then pipelines with ending sinks + multifanout :: function( fout, pipelines, + fout_nnodes=[1,8,16], fout_multi=[8,2,7], + name='multifanout', tag_rules=[] ) { + local fout_nlayers = std.length(fout_multi), + assert fout_nlayers >= 2 : "fout_nlayers should be >= 2", + local npipe = std.length(pipelines), + assert npipe == fout_nnodes[fout_nlayers-1]*fout_multi[fout_nlayers-1] : + "fout layout error npipe=%d, "%npipe + "fout=%d"%(fout_nnodes[fout_nlayers-1]*fout_multi[fout_nlayers-1]), + + // function to create nodes for one layer + local fout_layer(ilayer,nnodes,nmulti) = { + ret : [ + g.pnode({ + type: fout, + name: name+"_fout_%d"%ilayer + "_%d"%inode, + data: { + multiplicity: nmulti, + tag_rules: [], + }}, nin=1, nout=nmulti + ) for inode in std.range(0,nnodes-1)], + }.ret, + // nodes for all layers + local fout_layers = [ + fout_layer(ilayer, + fout_nnodes[ilayer], + fout_multi[ilayer]) + for ilayer in std.range(0,fout_nlayers-1) + ], + // make edges to make a combo node + local fout_node = g.intern( + innodes = fout_layers[0], + centernodes = if fout_nlayers == 2 then [] else std.flattenArrays([fout_layers[i] for i in std.range(1,fout_nlayers-2)]), + outnodes = fout_layers[fout_nlayers-1], + edges = std.flattenArrays( + [ + [ + g.edge( + fout_layers[ilayer-1][std.floor(inode/fout_multi[ilayer-1])], + fout_layers[ilayer][inode], + inode%fout_multi[ilayer-1], + 0) + for inode in std.range(0,fout_nnodes[ilayer]-1)] + for ilayer in std.range(1,fout_nlayers-1)]) + ), + + // connect comb_fan_out-piples + ret : g.intern( + innodes = [fout_node], + centernodes = pipelines, + outnodes = [], + edges = [g.edge(fout_node,pipelines[n],n,0) for n in std.range(0,npipe-1)] + ), + }.ret, + } diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/nf.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/nf.jsonnet index cc8b758ce..8cecf585a 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/nf.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/nf.jsonnet @@ -3,34 +3,8 @@ local g = import 'pgraph.jsonnet'; local wc = import 'wirecell.jsonnet'; -local default_dft = { type: 'FftwDFT' }; - -function(params, anode, chndbobj, tools, name='', dft=default_dft) +function(anode, chndbobj, tools, name='') { - - local single = { - type: 'icarusOneChannelNoise', - name: name, - uses: [dft, chndbobj, anode, tools.rc_resp], - data: { - noisedb: wc.tn(chndbobj), - anode: wc.tn(anode), - rcresp: wc.tn(tools.rc_resp), - dft: wc.tn(dft), - }, - }, - local grouped = { - type: 'mbCoherentNoiseSub', - name: name, - uses: [dft, chndbobj, anode], - data: { - noisedb: wc.tn(chndbobj), - anode: wc.tn(anode), - dft: wc.tn(dft), - rms_threshold: 0.0, - }, - }, - local obnf = g.pnode({ type: 'OmnibusNoiseFilter', name: name, @@ -43,18 +17,16 @@ function(params, anode, chndbobj, tools, name='', dft=default_dft) // only when the channelmask is merged to `bad` // maskmap: {sticky: "bad", ledge: "bad", noisy: "bad"}, channel_filters: [ - wc.tn(single), ], grouped_filters: [ - // wc.tn(grouped), ], channel_status_filters: [ ], noisedb: wc.tn(chndbobj), - intraces: 'orig%d' % anode.data.ident, // frame tag get all traces - outtraces: 'raw%d' % anode.data.ident, + intraces: 'orig%d' % anode.data.ident, + outtraces: 'orig%d' % anode.data.ident, }, - }, uses=[chndbobj, anode, tools.rc_resp, single, grouped], nin=1, nout=1), + }, uses=[chndbobj, anode], nin=1, nout=1), pipe: g.pipeline([obnf], name=name), diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/params.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/params.jsonnet index 36ac67410..955e21637 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/params.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/params.jsonnet @@ -4,6 +4,10 @@ local wc = import "wirecell.jsonnet"; local base = import "pgrapher/common/params.jsonnet"; +local cathode_input_format = std.extVar('cathode_input_format'); // scalar, array +local east = import "cathode-east.jsonnet"; +local west = import "cathode-west.jsonnet"; + base { det : { @@ -50,7 +54,13 @@ base { { anode: xanode[a], response: xresponse[a], - cathode: xcathode[a], + //cathode: xcathode[a], + cathode: if cathode_input_format == 'scalar' then xcathode[a] + else { + x: if anode<2 then [v*wc.cm for v in east.x] else [v*wc.cm for v in west.x], + y: if anode<2 then [v*wc.cm for v in east.y] else [v*wc.cm for v in west.y], + z: if anode<2 then [v*wc.cm for v in east.z] else [v*wc.cm for v in west.z], + }, }, null @@ -128,7 +138,23 @@ base { files: { wires: "icarus-wires-dualanode-v5.json.bz2", - fields: ["icarus_fnal_fit_ks_P0nom.json.bz2"], + //fields: ["garfield-icarus-fnal-rev2.json.bz2"], + + fields:["icarus_final_fit_dqdx0.json.bz2", + "icarus_final_fit_dqdx1.json.bz2", + "icarus_final_fit_dqdx2.json.bz2", + "icarus_final_fit_dqdx3.json.bz2", + "icarus_final_fit_dqdx4.json.bz2", + "icarus_final_fit_dqdx5.json.bz2", + "icarus_final_fit_dqdx6.json.bz2", + "icarus_final_fit_dqdx7.json.bz2", + "icarus_final_fit_dqdx8.json.bz2", + "icarus_final_fit_dqdx9.json.bz2", + "icarus_final_fit_dqdx10.json.bz2", + "icarus_final_fit_dqdx11.json.bz2", + "icarus_final_fit_dqdx12.json.bz2", + "icarus_final_fit_dqdx13.json.bz2", + "icarus_final_fit_dqdx14.json.bz2"], // noise: ["icarus_noise_model_int_TPCEE.json.bz2","icarus_noise_model_int_TPCEW.json.bz2","icarus_noise_model_int_TPCWE.json.bz2","icarus_noise_model_int_TPCWW.json.bz2"], // coherent_noise: ["icarus_noise_model_coh_TPCEE.json.bz2","icarus_noise_model_coh_TPCEW.json.bz2","icarus_noise_model_coh_TPCWE.json.bz2","icarus_noise_model_coh_TPCWW.json.bz2"], diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/params_twofaced.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/params_twofaced.jsonnet new file mode 100644 index 000000000..e31a81f37 --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/params_twofaced.jsonnet @@ -0,0 +1,142 @@ +// This file specifies the paramter configuration for the ICARUS detector. It +// inherit from the base params.jsonnet and override the relevant parameters + +local wc = import "wirecell.jsonnet"; +local base = import "pgrapher/common/params.jsonnet"; + +base { + det : { + + // define the 4 APAs. This must use the coordinate system + // defined by the wire geometry file. + // + // The "faces" is consumed by, at least, the Drifter and + // AnodePlane. The "wires" number is used to set + // AnodePlane.ident used to lookup the anode in WireSchema. + // It corresponds to the anode number. + // + // Also see: + // lar -c dump_icarus_geometry.fcl + // wirecell-util wire-volumes icarus-wires-dualanode.json.bz2 + // to help with defining these parameters. + + + // The "response" plane is where the field response functions + // start. Garfield calcualtions start somewhere relative to + // something, here's where that is made concrete. This MUST + // match what field response functions also used. + response_plane: 10*wc.cm, // relative to collection wires + + + // Each wire gets identified with the id number in the geometry + // file. The horizontal induction is split into two, both + // sides are enumerated by "s", while "n" counts the physical anodes. + // NOTE: the actual physical volumes in ICARUS are only 4 + + local xanode = [-359.33*wc.cm, -61.1*wc.cm, 61.1*wc.cm, 359.33*wc.cm], + local offset_response = [if a%2==0 then +10*wc.cm else -10*wc.cm for a in std.range(0,3)], + local xresponse = [xanode[a] + offset_response[a] for a in std.range(0,3)], + local xcathode = [-210.29*wc.cm, -210.29*wc.cm, 210.29*wc.cm, 210.29*wc.cm], + volumes : [ + { + local anode = a, // physical anode number + + wires: (anode), + name: "anode%d"%(anode), + + faces: [ + { + anode: xanode[a], + response: xresponse[a], + cathode: xcathode[a], + }, + { + anode: xanode[a], + response: xresponse[a], + cathode: xcathode[a], + } + ], + } for a in std.range(0,3) + ], + + // This describes some rough, overall bounding box. It's not + // directly needed but can be useful on the Jsonnet side, for + // example when defining some simple kinematics. It is + // represented by a ray going from extreme corners of a + // rectangular solid. Again "wirecell-util wires-info" helps + // to choose something. //FIXME -- ARE CORRECT? + bounds : { + tail: wc.point(-3.65, -1.7, -9.1, wc.m), + head: wc.point(+3.65, +1.4, +8.8, wc.m), + } + }, + + daq: super.daq { + tick: 0.4*wc.us, // 2.5 MHz + nticks: 4096, + }, + + adc: super.adc { + // fix baseline at 2048 (induction), 400 (collection) + baselines: [1650.0*wc.millivolt, 1650.0*wc.millivolt, 322.3*wc.millivolt], + + // From ICARUS paper: https://iopscience.iop.org/article/10.1088/1748-0221/13/12/P12007/pdf + //check (values taken from the FE calibration shown in pg. 7 of the paper) + fullscale: [0.8*wc.millivolt, 3.3*wc.volt], + }, + + elec: [super.elec { + type: "WarmElecResponse", + // Old values: + // ICARUS nominal: 17.8075*wc.mV/wc.fC // 0.027 fC/(ADC*us) + // Match data ADC values (docdb 25161): 14.9654*wc.mV/wc.fC, // 0.0321 fC/(ADC*us) + gain: 14.9654*wc.mV/wc.fC, // 0.0321 fC/(ADC*us) + shaping: 1.3*wc.us, + postgain: 1.0, + start: 0, + }, for _ in [0, 1, 2]], + + + sim: super.sim { + + // For running in LArSoft, the simulation must be in fixed time mode. + fixed: true, + + // The "absolute" time (ie, in G4 time) that the lower edge of + // of final readout tick #0 should correspond to. This is a + // "fixed" notion. + local tick0_time = -340*wc.us, // TriggerOffsetTPC from detectorclocks_icarus.fcl + + // Open the ductor's gate a bit early. + local response_time_offset = $.det.response_plane / $.lar.drift_speed, + local response_nticks = wc.roundToInt(response_time_offset / $.daq.tick), + + ductor : { + nticks: $.daq.nticks + response_nticks, + readout_time: self.nticks * $.daq.tick, + start_time: tick0_time - response_time_offset, + }, + + // To counter the enlarged duration of the ductor, a Reframer + // chops off the little early, extra time. Note, tags depend on how + reframer: { + tbin: response_nticks, + nticks: $.daq.nticks, + } + + }, + + files: { + wires: "icarus_wire_twofaced.json.bz2", + + fields: ["icarus_fnal_fit_ks_P0nom.json.bz2"], + + // noise: ["icarus_noise_model_int_TPCEE.json.bz2","icarus_noise_model_int_TPCEW.json.bz2","icarus_noise_model_int_TPCWE.json.bz2","icarus_noise_model_int_TPCWW.json.bz2"], + // coherent_noise: ["icarus_noise_model_coh_TPCEE.json.bz2","icarus_noise_model_coh_TPCEW.json.bz2","icarus_noise_model_coh_TPCWE.json.bz2","icarus_noise_model_coh_TPCWW.json.bz2"], + wiregroups: "icarus_group_to_channel_map.json.bz2", + noisegroups: ["icarus_noise_model_int_by_board_TPCEE.json.bz2","icarus_noise_model_int_by_board_TPCEW.json.bz2","icarus_noise_model_int_by_board_TPCWE.json.bz2","icarus_noise_model_int_by_board_TPCWW.json.bz2","icarus_noise_model_coh_by_board_TPCEE.json.bz2","icarus_noise_model_coh_by_board_TPCEW.json.bz2","icarus_noise_model_coh_by_board_TPCWE.json.bz2","icarus_noise_model_coh_by_board_TPCWW.json.bz2"], + chresp: null, + }, + +} + diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet index 9a7fb584c..e11d5c8d5 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/sim.jsonnet @@ -18,7 +18,16 @@ function(params, tools) { for n in std.range(0, nanodes-1)], local transforms = [sim.make_depotransform("depotransform-"+tools.anodes[n].name, tools.anodes[n], tools.pirs[0]) for n in std.range(0, nanodes-1)], + + + local transformsyz = [sim.make_depotransform_withplane("depotransform-%d-"%n+tools.anodes[std.floor(n/45)].name+"-plane%d"%std.mod(std.floor(n/15),3),tools.anodes[std.floor(n/45)], [std.mod(std.floor(n/15),3)],tools.pirs[std.mod(n,15)]) + for n in std.range(0, 359)], +// local transformsyz = [sim.make_depotransform_withplane("depotransform-%d-"%n+tools.anodes[std.floor(n/45)].name+"-plane%d"%std.mod(std.floor(n/15),3),tools.anodes[std.floor(n/45)], [std.mod(std.floor(n/15),3)],tools.pirs[0]) + + + local depos2traces = transforms, + local depos2tracesyz = transformsyz, //local depos2traces = zippers, local digitizers = [ @@ -39,6 +48,20 @@ function(params, tools) { }, }, nin=1, nout=1) for n in std.range(0, nanodes-1)], + local reframersyz = [ + g.pnode({ + type: 'Reframer', + name: 'reframer-%d-'%n+tools.anodes[std.floor(n/45)].name, + data: { + anode: wc.tn(tools.anodes[std.floor(n/45)]), + tags: [], // ?? what do? + fill: 0.0, + tbin: params.sim.reframer.tbin, + toffset: 0, + nticks: params.sim.reframer.nticks, + }, + }, nin=1, nout=1) for n in std.range(0, 359)], + // fixme: see https://github.com/WireCell/wire-cell-gen/issues/29 local make_noise_model = function(anode, csdb=null) { @@ -72,15 +95,36 @@ function(params, tools) { local noises = [add_noise(model) for model in noise_models], local outtags = ["orig%d"%n for n in std.range(0, nanodes-1)], + + local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), + local overlay_drifter_data = params.lar { + rng: wc.tn(tools.random), + xregions: xregions, + time_offset: params.sim.depo_toffset, + + drift_speed: params.lar.drift_speed, + fluctuate: params.sim.fluctuate, + + DL: params.lar.DL, + DT: params.lar.DT, + lifetime: params.lar.lifetime, + ar39activity: 0, // no simulated activity + + // DB config + DBFileName: "tpc_elifetime_data", + DBTag: "v2r1", + ELifetimeCorrection: true, + Verbose: false, + TPC: 0, + }, + ret : { analog_pipelines: [g.pipeline([depos2traces[n], reframers[n]], name="simanalogpipe-" + tools.anodes[n].name) for n in std.range(0, nanodes-1)], - signal_pipelines: [g.pipeline([depos2traces[n], reframers[n], digitizers[n]], name="simsigpipe-" + tools.anodes[n].name) for n in std.range(0, nanodes-1)], - splusn_pipelines: [g.pipeline([depos2traces[n], reframers[n], noises[n], digitizers[n]], name="simsignoipipe-" + tools.anodes[n].name) for n in std.range(0, nanodes-1)], @@ -88,31 +132,33 @@ function(params, tools) { signal: f.fanpipe('DepoSetFanout', self.signal_pipelines, 'FrameFanin', "simsignalgraph", outtags), splusn: f.fanpipe('DepoSetFanout', self.splusn_pipelines, 'FrameFanin', "simsplusngraph", outtags), - // Drifter for Overlay MC - overlay_drifter: g.pnode({ - local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), + analog_pipelinesyz: [g.pipeline([depos2tracesyz[n]], + name="simanalogpipe-%d-"%n + tools.anodes[std.floor(n/45)].name) for n in std.range(0, 359)], + signal_pipelinesyz: [g.pipeline([depos2tracesyz[n], reframersyz[n], digitizers[n]], + name="simsigpipe-" + tools.anodes[n].name) for n in std.range(0, nanodes-1)], + splusn_pipelinesyz: [g.pipeline([depos2tracesyz[n], reframersyz[n], noises[n], digitizers[n]], + name="simsignoipipe-" + tools.anodes[n].name) for n in std.range(0, nanodes-1)], - type: "wclsICARUSDrifter", - data: params.lar { - rng: wc.tn(tools.random), - xregions: xregions, - time_offset: params.sim.depo_toffset, + analogyz: f.fanpipe('DepoSetFanout', self.analog_pipelinesyz, 'FrameFanin', "simanaloggraph", outtags), + signalyz: f.fanpipe('DepoSetFanout', self.signal_pipelinesyz, 'FrameFanin', "simsignalgraph", outtags), + splusnyz: f.fanpipe('DepoSetFanout', self.splusn_pipelinesyz, 'FrameFanin', "simsplusngraph", outtags), - drift_speed: params.lar.drift_speed, - fluctuate: params.sim.fluctuate, + drifter_data: params.lar { + rng: wc.tn(tools.random), + xregions: xregions, + time_offset: params.sim.depo_toffset, + drift_speed: params.lar.drift_speed, + fluctuate: params.sim.fluctuate, + DL: params.lar.DL, + DT: params.lar.DT, + }, - DL: params.lar.DL, - DT: params.lar.DT, - lifetime: params.lar.lifetime, - ar39activity: 0, // no simulated activity + // Drifter for Overlay MC + overlay_drifter_data: overlay_drifter_data, - // DB config - DBFileName: "tpc_elifetime_data", - DBTag: "v2r1", - ELifetimeCorrection: true, - Verbose: true, - TPC: 0, - }, + overlay_drifter: g.pnode({ + data: overlay_drifter_data, + type: "wclsICARUSDrifter", }, nin=1, nout=1, uses=[tools.random]), } + sim, // tack on base for user sugar. diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/sp-filters.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/sp-filters.jsonnet index 695b2ec4e..662cec9fb 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/sp-filters.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/sp-filters.jsonnet @@ -40,22 +40,25 @@ local wf(name, data={}) = { [ lf('ROI_tight_lf', { tau: 0.014 * wc.megahertz }), // 0.02 lf('ROI_tighter_lf', { tau: 0.06 * wc.megahertz }), // 0.1 - lf('ROI_loose_lf', { tau: 0.0025 * wc.megahertz }), // 0.0025 + lf('ROI_loose_lf', { tau: 0.006 * wc.megahertz }), // 0.006 hf('Gaus_tight'), - hf('Gaus_wide', { sigma: 0.12 * wc.megahertz }), + hf('Gaus_wide', { + sigma: std.extVar("Gaus_wide_sigma")*wc.megahertz //0.12 * wc.megahertz + }), hf('Wiener_tight_U', { - sigma: 0.148788 * wc.megahertz, - power: 3.76194, + sigma: std.extVar('Wiener_tight_U_sigma')*wc.megahertz, // 0.148788 * wc.megahertz, + power: std.extVar('Wiener_tight_U_power'), //3.76194, }), hf("Wiener_tight_V", { - sigma: 0.1596568 * wc.megahertz, - power: 4.36125 }), + sigma: std.extVar('Wiener_tight_V_sigma')*wc.megahertz, // 0.1596568 * wc.megahertz, + power: std.extVar('Wiener_tight_V_power'), // 4.36125 + }), hf('Wiener_tight_W', { - sigma: 0.13623 * wc.megahertz, - power: 3.35324, + sigma: std.extVar('Wiener_tight_W_sigma')*wc.megahertz, // 0.13623 * wc.megahertz, + power: std.extVar('Wiener_tight_W_power'), // 3.35324, }), hf('Wiener_wide_U', { @@ -71,6 +74,10 @@ local wf(name, data={}) = { power: 4.37928, }), - wf('Wire_ind', { sigma: 1.0 / wc.sqrtpi * 0.75 }), - wf('Wire_col', { sigma: 1.0 / wc.sqrtpi * 3.0 }), + wf('Wire_ind', { + sigma: 1.0 / wc.sqrtpi * std.extVar("Wire_ind_sigma") // 0.75 + }), + wf('Wire_col', { + sigma: 1.0 / wc.sqrtpi * std.extVar("Wire_col_sigma") // 3.0 + }), ] diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/sp.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/sp.jsonnet index ace6dd8be..10650e6bd 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/sp.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/sp.jsonnet @@ -30,7 +30,7 @@ function(params, tools, override = {}) { elecresponse : wc.tn(tools.elec_resp[2]), postgain: 1, // default 1.2 ADC_mV: 4096 / (3300.0 * wc.mV), // default 4096/2000 - troi_col_th_factor: 5.0, // default 5 + troi_col_th_factor: 3.0, // default 5 troi_ind_th_factor: 3.0, // default 3 lroi_rebin: 6, // default 6 lroi_th_factor: 3.5, // default 3.5 diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/splat.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/splat.jsonnet new file mode 100644 index 000000000..14e05416b --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/splat.jsonnet @@ -0,0 +1,62 @@ +local wc = import "wirecell.jsonnet"; +local g = import 'pgraph.jsonnet'; + +// The approximated sim+sigproc +function(params, tools, anode, name=null) { + local sufix = name, + local sp = g.pnode({ + type: 'DepoFluxSplat', + name: sufix, + data: { + anode: wc.tn(anode), + field_response: wc.tn(tools.field), // for speed and origin + sparse: true, + tick: params.daq.tick, + window_start: -340 * wc.us, // TriggerOffsetTPC from detectorclocks_icarus.fcl + window_duration: params.daq.readout_time, + reference_time: -1500 * wc.us - self.window_start, // G4RefTime from detectorclocks_icarus.fcl less window start as per Brett Viren + // Run wirecell-gen morse-* to find these numbers that match the extra + // spread the sigproc induces. + "smear_long": [ + 6.6, + 6.6, + 6.6, + ], + "smear_tran": [ + 1.4, + 1.4, + 0.4, + ] + }, + }, nin=1, nout=1, uses=[anode, tools.field]), + local hio = g.pnode({ + type: 'HDF5FrameTap', + name: 'hio_true%s' % name, + data: { + anode: wc.tn(anode), + trace_tags: ['deposplat%s' % name], + filename: "wc-true-%s.h5" % name, + chunk: [0, 0], // ncol, nrow + gzip: 2, + high_throughput: true, + }, + }, nin=1, nout=1), + local rt = g.pnode({ + type: 'Retagger', + name: sufix, + 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 gaussN to gauss. + frame: { + ".*": "deposplat%s" % sufix + }, + merge: { + ".*": "deposplat%s" % sufix + }, + }], + }, + }, nin=1, nout=1), + ret: g.pipeline([sp, rt, hio], name=sp.name), +}.ret diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet new file mode 100644 index 000000000..32fe2c59f --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet @@ -0,0 +1,390 @@ +// 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 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: "cpu", + concurrency: 1, + }, +}; + +local ts_v = { + type: "TorchService", + name: "dnnroi_v", + data: { + model: "NNs/plane1.ts", + device: "cpu", + 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] diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced.jsonnet similarity index 69% rename from icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig.jsonnet rename to icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced.jsonnet index 5355d1779..a804569da 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced.jsonnet @@ -34,7 +34,11 @@ 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 base = import 'pgrapher/experiment/icarus/simparams.jsonnet'; +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 = [ @@ -116,14 +120,9 @@ local wcls_input = { // 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 mega_anode = { - type: 'MegaAnodePlane', - name: 'meganodes', - data: { - anodes_tn: if volume != -1 then [wc.tn(a) for a in tools.anodes[2*volume:2*(volume+1)]] // single volume - else [wc.tn(anode) for anode in tools.anodes], // all volumes - }, -}; + +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 @@ -134,13 +133,18 @@ local wcls_output = { name: 'nfsaver', data: { // anode: wc.tn(tools.anode), - anode: wc.tn(mega_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=[mega_anode]), + }, nin=1, nout=1, uses=[this_anode]), // The output of signal processing. Note, there are two signal @@ -152,17 +156,52 @@ local wcls_output = { name: 'spsaver%d' %volume, // to use multiple wirecell instances in a fhicl job data: { // anode: wc.tn(tools.anode), - anode: wc.tn(mega_anode), + anode: wc.tn(this_anode), digitize: false, // true means save as RawDigit, else recob::Wire - // frame_tags: ['gauss', 'wiener', 'looseLf'], + // frame_tags: ['gauss', 'wiener', 'looseLf','shrinkROI','extendROI'], // frame_scale: [0.1, 0.1, 0.1], - frame_tags: ['decon','looseLf'], - frame_scale: [0.009,0.009], + // 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: ['gauss'], + frame_scale: [std.extVar('gain_ADC_per_e')], + // nticks: params.daq.nticks, - chanmaskmaps: [], + 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=[mega_anode]), + }, 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' + ], + 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'; @@ -176,24 +215,34 @@ local chndb = [{ } 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(params, tools.anodes[n], chndb[n], tools, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; +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: false, + save_negtive_charge: true, // wiener_tag: "", // gauss_tag: "", - use_roi_refinement: false, - use_roi_debug_mode: true, tight_lf_tag: "", - // loose_lf_tag: "", - cleanup_roi_tag: "", + loose_lf_tag: "", break_roi_loop1_tag: "", break_roi_loop2_tag: "", shrink_roi_tag: "", extend_roi_tag: "", - // m_decon_charge_tag: "", + decon_charge_tag: "", + cleanup_roi_tag: "", + mp2_roi_tag: "", + mp3_roi_tag: "", use_multi_plane_protection: false, - mp_tick_resolution: 10, + 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]; @@ -204,7 +253,7 @@ local chsel_pipes = [ type: 'ChannelSelector', name: 'chsel%d' % n, data: { - channels: util.anode_channels(n), + channels: util.anode_channels_twofaced(n), //tags: ['orig%d' % n], // traces tag }, }, nin=1, nout=1) @@ -220,7 +269,7 @@ local nfsp_pipes = [ chsel_pipes[n], // magnifyio.orig_pipe[n], - // nf_pipes[n], + nf_pipes[n], // magnifyio.raw_pipe[n], sp_pipes[n], @@ -254,18 +303,25 @@ local fanin_tag_rules = [ '.*': '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, ['wiener%d'%ind]:'wiener%d'%ind, - ['threshold%d'%ind]:'threshold%d'%ind, - // ['tight_lf%d'%ind]:'tight_lf%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, + // ['decon%d'%ind]:'decon%d'%ind, }, } for ind in anode_ident ]; -local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp', [], fanout_tag_rules, fanin_tag_rules); +local fanpipe = util.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'nfsp%d' % volume, [], fanout_tag_rules, fanin_tag_rules); local retagger = g.pnode({ type: 'Retagger', @@ -278,11 +334,18 @@ local retagger = g.pnode({ '.*': 'retagger', }, merge: { - 'gauss\\d\\d\\d': 'gauss', - 'wiener\\d\\d\\d': 'wiener', - // 'tight_lf\\d\\d\\d': 'tightLf', - 'loose_lf\\d\\d\\d': 'looseLf', - 'decon\\d\\d\\d': 'decon', + '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', }, }], }, @@ -290,7 +353,6 @@ local retagger = g.pnode({ local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); - local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.sp_signals, sink]); local app = { diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-omit-noise.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-omit-noise.jsonnet deleted file mode 100644 index de5bbfdd9..000000000 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-omit-noise.jsonnet +++ /dev/null @@ -1,271 +0,0 @@ -// Same configuration as in wcls-sim-drift-simchannel.jsonnet -// except that this produces four instances of std::vector -// one per physics module (WW, WE, EE, EW) in ICARUS - -local g = import 'pgraph.jsonnet'; -local f = import 'pgrapher/common/funcs.jsonnet'; -local wc = import 'wirecell.jsonnet'; - -local io = import 'pgrapher/common/fileio.jsonnet'; -local tools_maker = import 'pgrapher/experiment/icarus/tools.jsonnet'; -// local params = import 'pgrapher/experiment/icarus/simparams.jsonnet'; -local base = import 'pgrapher/experiment/icarus/simparams.jsonnet'; -local params = base { - lar: super.lar { - // Longitudinal diffusion constant - DL: std.extVar('DL') * wc.cm2 / wc.ns, - // Transverse diffusion constant - DT: std.extVar('DT') * wc.cm2 / wc.ns, - // Electron lifetime - lifetime: std.extVar('lifetime') * wc.us, - // Electron drift speed, assumes a certain applied E-field - // drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us, - }, -}; - -local tools = tools_maker(params); - -local sim_maker = import 'pgrapher/experiment/icarus/sim.jsonnet'; -local sim = sim_maker(params, tools); - -local nanodes = std.length(tools.anodes); -local anode_iota = std.range(0, nanodes - 1); - - -local output = 'wct-sim-ideal-sig.npz'; - - -//local depos = g.join_sources(g.pnode({type:"DepoMerger", name:"BlipTrackJoiner"}, nin=2, nout=1), -// [sim.ar39(), sim.tracks(tracklist)]); -// local depos = sim.tracks(tracklist, step=1.0 * wc.mm); - -local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; -local wcls = wcls_maker(params, tools); -local wcls_input = { - // depos: wcls.input.depos(name="", art_tag="ionization"), - depos: wcls.input.depos(name='electron', art_tag='ionization'), // default art_tag="blopper" -}; - -// 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 mega_anode = { - type: 'MegaAnodePlane', - name: 'meganodes', - data: { - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - }, -}; - -// A ``duo'' anode consists of two ``splits'' -local duoanodes = [ -{ - type: 'MegaAnodePlane', - name: 'duoanode%d' %n, - data: { - // anodes_tn: ["AnodePlane:anode110", "AnodePlane:anode120"], - anodes_tn: [wc.tn(a) for a in tools.anodes[2*n:2*(n+1)]], - // anodes_tn: [wc.tn(tools.anodes[2*n]), wc.tn(tools.anodes[2*n+1])], - }, -} -for n in std.range(0,3)]; - -local wcls_output = { - // ADC output from simulation - // sim_digits: wcls.output.digits(name="simdigits", tags=["orig"]), - sim_digits: [ - g.pnode({ - type: 'wclsFrameSaver', - name: 'simdigits%d' %n, - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(duoanodes[n]), - digitize: true, // true means save as RawDigit, else recob::Wire - frame_tags: ['daq%d' %n], - // Three options for nticks: - // - If nonzero, force number of ticks in output waveforms. - // - If zero, use whatever input data has. (default) - // - If -1, use value as per LS's detector properties service. - // nticks: params.daq.nticks, - // nticks: -1, - // chanmaskmaps: ['bad'], - }, - }, nin=1, nout=1, uses=[duoanodes[n]]) - for n in std.range(0,3)], - - // 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: wcls.output.digits(name='nfdigits', tags=['raw']), - - // 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: wcls.output.signals(name='spsignals', tags=['gauss', 'wiener']), - - // save "threshold" from normal decon for each channel noise - // used in imaging - sp_thresholds: wcls.output.thresholds(name='spthresholds', tags=['threshold']), -}; - -//local deposio = io.numpy.depos(output); -local drifter = sim.drifter; -local bagger = sim.make_bagger(); - -// signal plus noise pipelines -//local sn_pipes = sim.signal_pipelines; -// local sn_pipes = sim.splusn_pipelines; -local analog_pipes = sim.analog_pipelines; - -local perfect = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; -local chndb = [{ - type: 'OmniChannelNoiseDB', - name: 'ocndbperfect%d' % n, - data: perfect(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 anode_iota]; - - -// local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb_pipes[n]) for n in std.range(0, std.length(tools.anodes)-1)]; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in anode_iota]; - -local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; -local sp = sp_maker(params, tools); -local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; - -local rng = tools.random; -local wcls_simchannel_sink = g.pnode({ - type: 'wclsSimChannelSink', - name: 'postdrift', - data: { - artlabel: 'simpleSC', // where to save in art::Event - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - rng: wc.tn(rng), - tick: params.daq.tick, - start_time: -0.34 * wc.ms, // TriggerOffsetTPC from detectorclocks_icarus.fcl - readout_time: params.daq.readout_time, - nsigma: 3.0, - drift_speed: params.lar.drift_speed, - u_to_rp: 100 * wc.mm, - v_to_rp: 100 * wc.mm, - y_to_rp: 100 * wc.mm, - - // GP: The shaping time of the electronics response (1.3us) shifts the peak - // of the field response time. Eyeballing simulation times, it does this - // by a bit less than the 1.3us. - // - // N.B. for future: there is likely an additional offset on the two induction - // planes due to where the deconvolution precisely defines where the "peak" - // of the pulse is. One may want to refine these parameters to account for that. - // This perturbation shouldn't be more than a tick or two. - u_time_offset: 1.0 * wc.us, - v_time_offset: 1.0 * wc.us, - y_time_offset: 1.0 * wc.us, - - g4_ref_time: -1500 * wc.us, // G4RefTime from detectorclocks_icarus.fcl - use_energy: true, - }, -}, nin=1, nout=1, uses=tools.anodes); - -// local make_noise_model = function(anode, csdb=null) { -// type: "EmpiricalNoiseModel", -// name: "empericalnoise-" + anode.name, -// data: { -// anode: wc.tn(anode), -// chanstat: if std.type(csdb) == "null" then "" else wc.tn(csdb), -// spectra_file: params.files.noise, -// nsamples: params.daq.nticks, -// period: params.daq.tick, -// wire_length_scale: 1.0*wc.cm, // optimization binning -// }, -// uses: [anode] + if std.type(csdb) == "null" then [] else [csdb], -// }; -// local noise_model = make_noise_model(mega_anode); -// local add_noise = function(model, n) g.pnode({ -// type: "AddNoise", -// name: "addnoise%d-" %n + model.name, -// data: { -// rng: wc.tn(tools.random), -// model: wc.tn(model), -// nsamples: params.daq.nticks, -// replacement_percentage: 0.02, // random optimization -// }}, nin=1, nout=1, uses=[model]); -// local noises = [add_noise(noise_model, n) for n in std.range(0,3)]; - -// local digitizer = sim.digitizer(mega_anode, name="digitizer", tag="orig"); -local digitizers = [ - sim.digitizer(mega_anode, name="digitizer%d-" %n + mega_anode.name, tag="daq%d"%n) - for n in std.range(0,3)]; - -local retaggers = [ -g.pnode({ - type: 'Retagger', - name: 'retagger%d' %n, - 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 origN to orig. - frame: { - '.*': 'orig', - }, - merge: { - 'orig\\d': 'daq%d' %n, - }, - }], - }, -}, nin=1, nout=1) -for n in std.range(0, 3)]; - -local frame_summers = [ - g.pnode({ - type: 'FrameSummer', - name: 'framesummer%d' %n, - data: { - align: true, - offset: 0.0*wc.s, - }, - }, nin=2, nout=1) for n in std.range(0, 3)]; - -local actpipes = [g.pipeline([/*noises[n],*/ digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; -local outtags = ['orig%d' % n for n in std.range(0, 3)]; -local pipe_reducer = util.fansummer('DepoSetFanout', analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fansummer', outtags); - -// 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 origN to orig. -// frame: { -// '.*': 'orig', -// }, -// merge: { -// 'orig\\d': 'daq', -// }, -// }], -// }, -// }, nin=1, nout=1); - -//local frameio = io.numpy.frames(output); -local sink = sim.frame_sink; - -// local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink, bagger, pipe_reducer, retagger, wcls_output.sim_digits, sink]); -local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink, bagger, pipe_reducer, sink]); - -local app = { - type: 'Pgrapher', - data: { - edges: g.edges(graph), - }, -}; - - -// Finally, the configuration sequence which is emitted. - -g.uses(graph) + [app] 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 8a6fc221e..e5a0210df 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 @@ -94,7 +94,7 @@ local wcls_input = { data: { model: "", scale: -1, //scale is -1 to correct a sign error in the SimDepoSource converter. - art_tag: "ionization", //name of upstream art producer of depos "label:instance:processName" + art_tag: std.extVar('SimEnergyDepositLabel'), //name of upstream art producer of depos "label:instance:processName" assn_art_tag: "", id_is_track: false, // Use this for "id-is-index" in the output }, @@ -257,7 +257,7 @@ local wcls_simchannel_sink = time_offsets: [std.extVar('time_offset_u') * wc.us, std.extVar('time_offset_v') * wc.us, std.extVar('time_offset_y') * wc.us], // input from art::Event - sed_label: 'ionization', + sed_label: std.extVar('SimEnergyDepositLabel'), // output to art::Event simchan_label: 'simpleSC', diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted-refactored.jsonnet deleted file mode 100644 index a911b6b71..000000000 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted-refactored.jsonnet +++ /dev/null @@ -1,370 +0,0 @@ -// Same configuration as in wcls-multitpc-sim-drift-simchannel.jsonnet -// except the sed_label variable name in wclsDepoFluxWriter set to 'ionization' - -local g = import 'pgraph.jsonnet'; -local f = import 'pgrapher/common/funcs.jsonnet'; -local wc = import 'wirecell.jsonnet'; - -local io = import 'pgrapher/common/fileio.jsonnet'; -local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; -local base = import 'pgrapher/experiment/icarus/simparams.jsonnet'; - -// 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 { - lar: super.lar { - // Longitudinal diffusion constant - DL: std.extVar('DL') * wc.cm2 / wc.ns, - // Transverse diffusion constant - DT: std.extVar('DT') * wc.cm2 / wc.ns, - // Electron lifetime - lifetime: std.extVar('lifetime') * wc.us, - // Electron drift speed, assumes a certain applied E-field - // drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us, - }, - files: super.files { - fields: [ std.extVar('files_fields'), ], - }, - - 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: 4255, - type: "JsonElecResponse", - rc_layers: 1 - } - else super.rc_resp, - - elec: std.mapWithIndex(function (n, eparam) - super.elec[n] + { - gain: eparam.gain, - shaping: eparam.shaping, - }, er_params), -}; - -local tools = tools_maker(params); - -local sim_maker = import 'pgrapher/experiment/icarus/sim.jsonnet'; -local sim = sim_maker(params, tools); - -local nanodes = std.length(tools.anodes); -local anode_iota = std.range(0, nanodes - 1); - - -local output = 'wct-sim-ideal-sig.npz'; - - -//local depos = g.join_sources(g.pnode({type:"DepoMerger", name:"BlipTrackJoiner"}, nin=2, nout=1), -// [sim.ar39(), sim.tracks(tracklist)]); -// local depos = sim.tracks(tracklist, step=1.0 * wc.mm); - -local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; -local wcls = wcls_maker(params, tools); -//local wcls_input = { -// // depos: wcls.input.depos(name="", art_tag="ionization"), -// depos: wcls.input.depos(name='electron', art_tag='ionization'), // default art_tag="blopper" -//}; - -//Haiwang DepoSetSource Implementation: -local wcls_input = { - depos: wcls.input.depos(name="", art_tag="IonAndScint"), - deposet: g.pnode({ - type: 'wclsSimDepoSetSource', - name: "electron", - data: { - model: "", - scale: -1, //scale is -1 to correct a sign error in the SimDepoSource converter. - art_tag: "shifted", //name of upstream art producer of depos "label:instance:processName" - assn_art_tag: "", - id_is_track: false, // Use this for "id-is-index" in the output - }, - }, 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 mega_anode = { - type: 'MegaAnodePlane', - name: 'meganodes', - data: { - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - }, -}; - -// A ``duo'' anode consists of two ``splits'' -local duoanodes = [ -{ - type: 'MegaAnodePlane', - name: 'duoanode%d' %n, - data: { - // anodes_tn: ["AnodePlane:anode110", "AnodePlane:anode120"], - anodes_tn: [wc.tn(a) for a in tools.anodes[2*n:2*(n+1)]], - // anodes_tn: [wc.tn(tools.anodes[2*n]), wc.tn(tools.anodes[2*n+1])], - }, -} -for n in std.range(0,3)]; -local volname = ["EE", "EW", "WE", "WW"]; -local wcls_output = { - // ADC output from simulation - // sim_digits: wcls.output.digits(name="simdigits", tags=["orig"]), - sim_digits: [ - g.pnode({ - type: 'wclsFrameSaver', - name: 'simdigits%d' %n, - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(duoanodes[n]), - digitize: true, // true means save as RawDigit, else recob::Wire - //frame_tags: ['daq%d' %n], - frame_tags: ['TPC%s' %volname[n]], - // Three options for nticks: - // - If nonzero, force number of ticks in output waveforms. - // - If zero, use whatever input data has. (default) - // - If -1, use value as per LS's detector properties service. - // nticks: params.daq.nticks, - // nticks: -1, - // chanmaskmaps: ['bad'], - }, - }, nin=1, nout=1, uses=[duoanodes[n]]) - for n in std.range(0,3)], - - // 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: wcls.output.digits(name='nfdigits', tags=['raw']), - - // 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: wcls.output.signals(name='spsignals', tags=['gauss', 'wiener']), - - // save "threshold" from normal decon for each channel noise - // used in imaging - sp_thresholds: wcls.output.thresholds(name='spthresholds', tags=['threshold']), -}; - -//local deposio = io.numpy.depos(output); -local drifter = sim.drifter; -local setdrifter = g.pnode({ - type: 'DepoSetDrifter', - data: { - drifter: "Drifter" - } - }, nin=1, nout=1, - uses=[drifter]); -local bagger = sim.make_bagger(); - -// signal plus noise pipelines -//local sn_pipes = sim.signal_pipelines; -// local sn_pipes = sim.splusn_pipelines; -local analog_pipes = sim.analog_pipelines; - -local perfect = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; -local chndb = [{ - type: 'OmniChannelNoiseDB', - name: 'ocndbperfect%d' % n, - data: perfect(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, - uses: [tools.anodes[n], tools.field, tools.dft], -} for n in anode_iota]; - - -// local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb_pipes[n]) for n in std.range(0, std.length(tools.anodes)-1)]; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in anode_iota]; - -local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; -local sp = sp_maker(params, tools); -local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; - -local rng = tools.random; -local wcls_simchannel_sink_old = - g.pnode({ - type: 'wclsDepoSetSimChannelSink', - name: 'postdriftold', - data: { - artlabel: 'simpleSCOld', // where to save in art::Event - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - rng: wc.tn(rng), - tick: params.daq.tick, - start_time: -0.34 * wc.ms, // TriggerOffsetTPC from detectorclocks_icarus.fcl - readout_time: params.daq.readout_time, - nsigma: 3.0, - drift_speed: params.lar.drift_speed, - u_to_rp: 100 * wc.mm, - v_to_rp: 100 * wc.mm, - y_to_rp: 100 * wc.mm, - - // GP: The shaping time of the electronics response (1.3us) shifts the peak - // of the field response time. Eyeballing simulation times, it does this - // by a bit less than the 1.3us (1us). - // - // N.B. for future: there is likely an additional offset on the two induction - // planes due to where the deconvolution precisely defines where the "peak" - // of the pulse is. One may want to refine these parameters to account for that. - // This perturbation shouldn't be more than a tick or two. - u_time_offset: std.extVar('time_offset_u') * wc.us, - v_time_offset: std.extVar('time_offset_v') * wc.us, - y_time_offset: std.extVar('time_offset_y') * wc.us, - - g4_ref_time: -1500 * wc.us, // G4RefTime from detectorclocks_icarus.fcl - use_energy: true, - }, - },nin=1, nout=1, uses=tools.anodes); - -local wcls_simchannel_sink = - g.pnode({ - type: 'wclsDepoFluxWriter', - name: 'postdrift', - data: { - anodes: [wc.tn(anode) for anode in tools.anodes], - field_response: wc.tn(tools.field), - - // time binning - tick: params.daq.tick, - window_start: -340 * wc.us, // TriggerOffsetTPC from detectorclocks_icarus.fcl - window_duration: params.daq.readout_time, - - nsigma: 3.0, - - reference_time: -1500 * wc.us - self.window_start, // G4RefTime from detectorclocks_icarus.fcl less window start as per Brett Viren - - smear_long: 0.0, - smear_tran: 0.0, - - time_offsets: [std.extVar('time_offset_u') * wc.us, std.extVar('time_offset_v') * wc.us, std.extVar('time_offset_y') * wc.us], - - // input from art::Event - sed_label: 'shifted', - - // output to art::Event - simchan_label: 'simpleSC', - }, - }, nin=1, nout=1, uses=tools.anodes+[tools.field]); - -local nicks = ["incoTPCEE","incoTPCEW","incoTPCWE","incoTPCWW", "coheTPCEE","coheTPCEW","coheTPCWE","coheTPCWW"]; -local scale_int = std.extVar('int_noise_scale'); -local scale_coh = std.extVar('coh_noise_scale'); -local models = [ - { - type: "GroupNoiseModel", - name: nicks[n], - data: { - // This can also be given as a JSON/Jsonnet file - spectra: params.files.noisegroups[n], - groups: params.files.wiregroups, - scale: if n<4 then scale_int else scale_coh, - nsamples: params.daq.nticks, - tick: params.daq.tick, - } - } for n in std.range(0,7)]; - -local add_noise = function(model, n,t) g.pnode({ - type: t, - name: "addnoise%d-" %n + model.name, - data: { - rng: wc.tn(tools.random), - dft: wc.tn(tools.dft), - model: wc.tn(model), - nsamples: params.daq.nticks, - }}, nin=1, nout=1, uses=[tools.random, tools.dft, model]); -local noises = [add_noise(models[n], n,"IncoherentAddNoise") for n in std.range(0,3)]; -local coh_noises = [add_noise(models[n],n,"CoherentAddNoise") for n in std.range(4,7)]; - -// local digitizer = sim.digitizer(mega_anode, name="digitizer", tag="orig"); -local digitizers = [ - sim.digitizer(mega_anode, name="digitizer%d-" %n + mega_anode.name, tag="TPC%s"%volname[n]) - for n in std.range(0,3)]; - -local retaggers = [ -g.pnode({ - type: 'Retagger', - name: 'retagger%d' %n, - 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 origN to orig. - frame: { - '.*': 'orig', - }, - merge: { - 'orig\\d': 'daq%d' %n, - }, - }], - }, -}, nin=1, nout=1) -for n in std.range(0, 3)]; - -local frame_summers = [ - g.pnode({ - type: 'FrameSummer', - name: 'framesummer%d' %n, - data: { - align: true, - offset: 0.0*wc.s, - }, - }, nin=2, nout=1) for n in std.range(0, 3)]; - -local actpipes = [g.pipeline([noises[n], coh_noises[n], digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; -local outtags = ['orig%d' % n for n in std.range(0, 3)]; -local pipe_reducer = util.fansummer('DepoSetFanout', analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fansummer', outtags); - -// 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 origN to orig. -// frame: { -// '.*': 'orig', -// }, -// merge: { -// 'orig\\d': 'daq', -// }, -// }], -// }, -// }, nin=1, nout=1); - -//local frameio = io.numpy.frames(output); -local sink = sim.frame_sink; - -// local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink.simchannels, bagger, pipe_reducer, retagger, wcls_output.sim_digits, sink]); -//local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink, bagger, pipe_reducer, sink]); -local graph = g.pipeline([wcls_input.deposet, setdrifter, wcls_simchannel_sink_old, wcls_simchannel_sink, pipe_reducer, sink]); - -local app = { - type: 'Pgrapher', - data: { - edges: g.edges(graph), - }, -}; - - -// Finally, the configuration sequence which is emitted. - -g.uses(graph) + [app] diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted.jsonnet deleted file mode 100644 index 25fc902a7..000000000 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-shifted.jsonnet +++ /dev/null @@ -1,371 +0,0 @@ -// Same configuration as in wcls-sim-drift-simchannel.jsonnet -// except that this produces four instances of std::vector -// one per physics module (WW, WE, EE, EW) in ICARUS - -local g = import 'pgraph.jsonnet'; -local f = import 'pgrapher/common/funcs.jsonnet'; -local wc = import 'wirecell.jsonnet'; - -local io = import 'pgrapher/common/fileio.jsonnet'; -local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; -local base = import 'pgrapher/experiment/icarus/simparams.jsonnet'; - -// 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 { - lar: super.lar { - // Longitudinal diffusion constant - DL: std.extVar('DL') * wc.cm2 / wc.ns, - // Transverse diffusion constant - DT: std.extVar('DT') * wc.cm2 / wc.ns, - // Electron lifetime - lifetime: std.extVar('lifetime') * wc.us, - // Electron drift speed, assumes a certain applied E-field - // drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us, - }, - files: super.files { - fields: [ std.extVar('files_fields'), ], - }, - - 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: 4255, - type: "JsonElecResponse", - rc_layers: 1 - } - else super.rc_resp, - - elec: std.mapWithIndex(function (n, eparam) - super.elec[n] + { - gain: eparam.gain, - shaping: eparam.shaping, - }, er_params), -}; - -local tools = tools_maker(params); - -local sim_maker = import 'pgrapher/experiment/icarus/sim.jsonnet'; -local sim = sim_maker(params, tools); - -local nanodes = std.length(tools.anodes); -local anode_iota = std.range(0, nanodes - 1); - - -local output = 'wct-sim-ideal-sig.npz'; - - -//local depos = g.join_sources(g.pnode({type:"DepoMerger", name:"BlipTrackJoiner"}, nin=2, nout=1), -// [sim.ar39(), sim.tracks(tracklist)]); -// local depos = sim.tracks(tracklist, step=1.0 * wc.mm); - -local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; -local wcls = wcls_maker(params, tools); -//local wcls_input = { -// // depos: wcls.input.depos(name="", art_tag="ionization"), -// depos: wcls.input.depos(name='electron', art_tag='ionization'), // default art_tag="blopper" -//}; - -//Haiwang DepoSetSource Implementation: -local wcls_input = { - depos: wcls.input.depos(name="", art_tag="IonAndScint"), - deposet: g.pnode({ - type: 'wclsSimDepoSetSource', - name: "electron", - data: { - model: "", - scale: -1, //scale is -1 to correct a sign error in the SimDepoSource converter. - art_tag: "shifted", //name of upstream art producer of depos "label:instance:processName" - assn_art_tag: "", - id_is_track: false, // Use this for "id-is-index" in the output - }, - }, 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 mega_anode = { - type: 'MegaAnodePlane', - name: 'meganodes', - data: { - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - }, -}; - -// A ``duo'' anode consists of two ``splits'' -local duoanodes = [ -{ - type: 'MegaAnodePlane', - name: 'duoanode%d' %n, - data: { - // anodes_tn: ["AnodePlane:anode110", "AnodePlane:anode120"], - anodes_tn: [wc.tn(a) for a in tools.anodes[2*n:2*(n+1)]], - // anodes_tn: [wc.tn(tools.anodes[2*n]), wc.tn(tools.anodes[2*n+1])], - }, -} -for n in std.range(0,3)]; -local volname = ["EE", "EW", "WE", "WW"]; -local wcls_output = { - // ADC output from simulation - // sim_digits: wcls.output.digits(name="simdigits", tags=["orig"]), - sim_digits: [ - g.pnode({ - type: 'wclsFrameSaver', - name: 'simdigits%d' %n, - data: { - // anode: wc.tn(tools.anode), - anode: wc.tn(duoanodes[n]), - digitize: true, // true means save as RawDigit, else recob::Wire - //frame_tags: ['daq%d' %n], - frame_tags: ['TPC%s' %volname[n]], - // Three options for nticks: - // - If nonzero, force number of ticks in output waveforms. - // - If zero, use whatever input data has. (default) - // - If -1, use value as per LS's detector properties service. - // nticks: params.daq.nticks, - // nticks: -1, - // chanmaskmaps: ['bad'], - }, - }, nin=1, nout=1, uses=[duoanodes[n]]) - for n in std.range(0,3)], - - // 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: wcls.output.digits(name='nfdigits', tags=['raw']), - - // 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: wcls.output.signals(name='spsignals', tags=['gauss', 'wiener']), - - // save "threshold" from normal decon for each channel noise - // used in imaging - sp_thresholds: wcls.output.thresholds(name='spthresholds', tags=['threshold']), -}; - -//local deposio = io.numpy.depos(output); -local drifter = sim.drifter; -local setdrifter = g.pnode({ - type: 'DepoSetDrifter', - data: { - drifter: "Drifter" - } - }, nin=1, nout=1, - uses=[drifter]); -local bagger = sim.make_bagger(); - -// signal plus noise pipelines -//local sn_pipes = sim.signal_pipelines; -// local sn_pipes = sim.splusn_pipelines; -local analog_pipes = sim.analog_pipelines; - -local perfect = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; -local chndb = [{ - type: 'OmniChannelNoiseDB', - name: 'ocndbperfect%d' % n, - data: perfect(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, - uses: [tools.anodes[n], tools.field, tools.dft], -} for n in anode_iota]; - - -// local nf_maker = import 'pgrapher/experiment/icarus/nf.jsonnet'; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb_pipes[n]) for n in std.range(0, std.length(tools.anodes)-1)]; -// local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in anode_iota]; - -local sp_maker = import 'pgrapher/experiment/icarus/sp.jsonnet'; -local sp = sp_maker(params, tools); -local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; - -local rng = tools.random; -local wcls_simchannel_sink_old = - g.pnode({ - type: 'wclsDepoSetSimChannelSink', - name: 'postdriftold', - data: { - artlabel: 'simpleSCOld', // where to save in art::Event - anodes_tn: [wc.tn(anode) for anode in tools.anodes], - rng: wc.tn(rng), - tick: params.daq.tick, - start_time: -0.34 * wc.ms, // TriggerOffsetTPC from detectorclocks_icarus.fcl - readout_time: params.daq.readout_time, - nsigma: 3.0, - drift_speed: params.lar.drift_speed, - u_to_rp: 100 * wc.mm, - v_to_rp: 100 * wc.mm, - y_to_rp: 100 * wc.mm, - - // GP: The shaping time of the electronics response (1.3us) shifts the peak - // of the field response time. Eyeballing simulation times, it does this - // by a bit less than the 1.3us (1us). - // - // N.B. for future: there is likely an additional offset on the two induction - // planes due to where the deconvolution precisely defines where the "peak" - // of the pulse is. One may want to refine these parameters to account for that. - // This perturbation shouldn't be more than a tick or two. - u_time_offset: std.extVar('time_offset_u') * wc.us, - v_time_offset: std.extVar('time_offset_v') * wc.us, - y_time_offset: std.extVar('time_offset_y') * wc.us, - - g4_ref_time: -1500 * wc.us, // G4RefTime from detectorclocks_icarus.fcl - use_energy: true, - }, - },nin=1, nout=1, uses=tools.anodes); - -local wcls_simchannel_sink = - g.pnode({ - type: 'wclsDepoFluxWriter', - name: 'postdrift', - data: { - anodes: [wc.tn(anode) for anode in tools.anodes], - field_response: wc.tn(tools.field), - - // time binning - tick: params.daq.tick, - window_start: -340 * wc.us, // TriggerOffsetTPC from detectorclocks_icarus.fcl - window_duration: params.daq.readout_time, - - nsigma: 3.0, - - reference_time: -1500 * wc.us - self.window_start, // G4RefTime from detectorclocks_icarus.fcl less window start as per Brett Viren - - smear_long: 0.0, - smear_tran: 0.0, - - time_offsets: [std.extVar('time_offset_u') * wc.us, std.extVar('time_offset_v') * wc.us, std.extVar('time_offset_y') * wc.us], - - // input from art::Event - sed_label: 'largeant:TPCActive', - - // output to art::Event - simchan_label: 'simpleSC', - }, - }, nin=1, nout=1, uses=tools.anodes+[tools.field]); - -local nicks = ["incoTPCEE","incoTPCEW","incoTPCWE","incoTPCWW", "coheTPCEE","coheTPCEW","coheTPCWE","coheTPCWW"]; -local scale_int = std.extVar('int_noise_scale'); -local scale_coh = std.extVar('coh_noise_scale'); -local models = [ - { - type: "GroupNoiseModel", - name: nicks[n], - data: { - // This can also be given as a JSON/Jsonnet file - spectra: params.files.noisegroups[n], - groups: params.files.wiregroups, - scale: if n<4 then scale_int else scale_coh, - nsamples: params.daq.nticks, - tick: params.daq.tick, - } - } for n in std.range(0,7)]; - -local add_noise = function(model, n,t) g.pnode({ - type: t, - name: "addnoise%d-" %n + model.name, - data: { - rng: wc.tn(tools.random), - dft: wc.tn(tools.dft), - model: wc.tn(model), - nsamples: params.daq.nticks, - }}, nin=1, nout=1, uses=[tools.random, tools.dft, model]); -local noises = [add_noise(models[n], n,"IncoherentAddNoise") for n in std.range(0,3)]; -local coh_noises = [add_noise(models[n],n,"CoherentAddNoise") for n in std.range(4,7)]; - -// local digitizer = sim.digitizer(mega_anode, name="digitizer", tag="orig"); -local digitizers = [ - sim.digitizer(mega_anode, name="digitizer%d-" %n + mega_anode.name, tag="TPC%s"%volname[n]) - for n in std.range(0,3)]; - -local retaggers = [ -g.pnode({ - type: 'Retagger', - name: 'retagger%d' %n, - 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 origN to orig. - frame: { - '.*': 'orig', - }, - merge: { - 'orig\\d': 'daq%d' %n, - }, - }], - }, -}, nin=1, nout=1) -for n in std.range(0, 3)]; - -local frame_summers = [ - g.pnode({ - type: 'FrameSummer', - name: 'framesummer%d' %n, - data: { - align: true, - offset: 0.0*wc.s, - }, - }, nin=2, nout=1) for n in std.range(0, 3)]; - -local actpipes = [g.pipeline([noises[n], coh_noises[n], digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; -local outtags = ['orig%d' % n for n in std.range(0, 3)]; -local pipe_reducer = util.fansummer('DepoSetFanout', analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fansummer', outtags); - -// 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 origN to orig. -// frame: { -// '.*': 'orig', -// }, -// merge: { -// 'orig\\d': 'daq', -// }, -// }], -// }, -// }, nin=1, nout=1); - -//local frameio = io.numpy.frames(output); -local sink = sim.frame_sink; - -// local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink.simchannels, bagger, pipe_reducer, retagger, wcls_output.sim_digits, sink]); -//local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink, bagger, pipe_reducer, sink]); -local graph = g.pipeline([wcls_input.deposet, setdrifter, wcls_simchannel_sink_old, wcls_simchannel_sink, pipe_reducer, sink]); - -local app = { - type: 'Pgrapher', - data: { - edges: g.edges(graph), - }, -}; - - -// Finally, the configuration sequence which is emitted. - -g.uses(graph) + [app] diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-true.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-true.jsonnet new file mode 100644 index 000000000..35775075d --- /dev/null +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-true.jsonnet @@ -0,0 +1,178 @@ +local g = import 'pgraph.jsonnet'; +local f = import 'pgrapher/common/funcs.jsonnet'; +local wc = import 'wirecell.jsonnet'; + +local io = import 'pgrapher/common/fileio.jsonnet'; +local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet'; +local base = import 'pgrapher/experiment/icarus/simparams.jsonnet'; +local splat = import 'pgrapher/experiment/icarus/splat.jsonnet'; + +// 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 { + lar: super.lar { + // Longitudinal diffusion constant + DL: std.extVar('DL') * wc.cm2 / wc.ns, + // Transverse diffusion constant + DT: std.extVar('DT') * wc.cm2 / wc.ns, + // Electron lifetime + lifetime: std.extVar('lifetime') * wc.us, + // Electron drift speed, assumes a certain applied E-field + // drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us, + }, + files: super.files { + fields: [ std.extVar('files_fields'), ], + }, + + 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: 4255, + type: "JsonElecResponse", + rc_layers: 1 + } + else super.rc_resp, + + elec: std.mapWithIndex(function (n, eparam) + super.elec[n] + { + gain: eparam.gain, + shaping: eparam.shaping, + }, er_params), +}; + +local tools = tools_maker(params); + +local sim_maker = import 'pgrapher/experiment/icarus/sim.jsonnet'; +local sim = sim_maker(params, tools); + +local nanodes = std.length(tools.anodes); +local anode_iota = std.range(0, nanodes - 1); + +local output = 'wct-sim-ideal-sig.npz'; + + +local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; +local wcls = wcls_maker(params, tools); + +//Haiwang DepoSetSource Implementation: +local wcls_input = { + depos: wcls.input.depos(name="", art_tag="IonAndScint"), + deposet: g.pnode({ + type: 'wclsSimDepoSetSource', + name: "electron", + data: { + model: "", + scale: -1, //scale is -1 to correct a sign error in the SimDepoSource converter. + art_tag: "ionization", //name of upstream art producer of depos "label:instance:processName" + assn_art_tag: "", + id_is_track: false, // Use this for "id-is-index" in the output + }, + }, 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 mega_anode = { + type: 'MegaAnodePlane', + name: 'meganodes', + data: { + anodes_tn: [wc.tn(anode) for anode in tools.anodes], + }, +}; + +// A ``duo'' anode consists of two ``splits'' +local duoanodes = [ +{ + type: 'MegaAnodePlane', + name: 'duoanode%d' %n, + data: { + // anodes_tn: ["AnodePlane:anode110", "AnodePlane:anode120"], + anodes_tn: [wc.tn(a) for a in tools.anodes[2*n:2*(n+1)]], + // anodes_tn: [wc.tn(tools.anodes[2*n]), wc.tn(tools.anodes[2*n+1])], + }, +} +for n in std.range(0,3)]; +local volname = ["EE", "EW", "WE", "WW"]; + +local anode_names = ["EES", "EEN", "EWS", "EWN", "WES", "WEN", "WWS", "WWN"]; + +local drifter = sim.drifter; +local setdrifter = g.pnode({ + type: 'DepoSetDrifter', + data: { + drifter: "Drifter" + } + }, nin=1, nout=1, + uses=[drifter]); + +local wcls_simchannel_sink = + g.pnode({ + type: 'wclsDepoFluxWriter', + name: 'postdrift', + data: { + anodes: [wc.tn(anode) for anode in tools.anodes], + field_response: wc.tn(tools.field), + + // time binning + tick: params.daq.tick, + window_start: -340 * wc.us, // TriggerOffsetTPC from detectorclocks_icarus.fcl + window_duration: params.daq.readout_time, + + nsigma: 3.0, + + reference_time: -1500 * wc.us - self.window_start, // G4RefTime from detectorclocks_icarus.fcl less window start as per Brett Viren + + smear_long: 0.0, + smear_tran: 0.0, + + time_offsets: [std.extVar('time_offset_u') * wc.us, std.extVar('time_offset_v') * wc.us, std.extVar('time_offset_y') * wc.us], + + // input from art::Event + sed_label: 'largeant:TPCActive', + + // output to art::Event + simchan_label: 'simpleSC', + }, + }, nin=1, nout=1, uses=tools.anodes+[tools.field]); + +local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; + +local deposplats = [splat(params, tools, tools.anodes[n], name="A%d" % n) for n in anode_iota] ; +local makesplat = util.fanpipe("DepoSetFanout", deposplats, "FrameFanin"); + +local sink = sim.frame_sink; + +local graph = g.pipeline([wcls_input.deposet, setdrifter, wcls_simchannel_sink, makesplat, sink]); + +local app = { + type: 'Pgrapher', + data: { + edges: g.edges(graph), + }, +}; + + +// Finally, the configuration sequence which is emitted. + +g.uses(graph) + [app] diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet similarity index 68% rename from icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel.jsonnet rename to icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet index 9eb729ea3..db363894c 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-yzsim-refactored.jsonnet @@ -39,8 +39,27 @@ local params = base { // Electron drift speed, assumes a certain applied E-field // drift_speed: std.extVar('driftSpeed') * wc.mm / wc.us, }, - files: super.files { - fields: [ std.extVar('files_fields'), ], + + files: super.files { + // 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"] }, rc_resp: if std.extVar('file_rcresp') != "" then @@ -95,7 +114,7 @@ local wcls_input = { data: { model: "", scale: -1, //scale is -1 to correct a sign error in the SimDepoSource converter. - art_tag: "ionization", //name of upstream art producer of depos "label:instance:processName" + art_tag: std.extVar('SimEnergyDepositLabel'), //name of upstream art producer of depos "label:instance:processName" assn_art_tag: "", id_is_track: false, // Use this for "id-is-index" in the output }, @@ -170,21 +189,66 @@ local wcls_output = { //local deposio = io.numpy.depos(output); local overlay_drifter = std.extVar("overlay_drifter"); +local localeLiftime = [std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us,std.extVar('lifetime') * wc.us]; +local drifter_data = if overlay_drifter then sim.overlay_drifter_data else sim.drifter_data; + +local drifters = [{ + local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), + + type: if overlay_drifter then "wclsICARUSDrifter" else "Drifter", + name: "drifter%d" %n, //%std.floor(n/45), + data: params.lar + drifter_data { + lifetime: localeLiftime[std.floor(n/45)], + TPC: std.floor(n/90), + charge_scale: 1 //std.mod(n,15)+1 //needs to be 1 + }, + } + for n in std.range(0,359)]; + +local setdrifters = [g.pnode({ + type: 'DepoSetDrifter', + name: 'setdrifters%d' %n, + data: { + drifter: wc.tn(drifters[n]) + } + }, nin=1, nout=1, + uses=[drifters[n]]) + #uses=[drifter]) + for n in std.range(0,359)]; + +local scalers = [{ + + type: "Scaler", + name: "scaler%d" %n, //%std.floor(n/45), + data: params.lar { + yzmap_scale_filename: 'yzmap_gain_icarus_v3_run2.json', + bin_width: 10*wc.cm, + tpc_width: 1500*wc.mm, + bin_height: 10*wc.cm, + anode: wc.tn(tools.anodes[std.floor(n/45)]), + plane: std.mod(std.floor(n/15),3) + }, + } + for n in std.range(0,359)]; + +local setscaler = [g.pnode({ + type: 'DepoSetScaler', + name: 'setscaler%d' %n, + data: { + scaler: wc.tn(scalers[n]) + } + }, nin=1, nout=1, + uses=[scalers[n]]) + for n in std.range(0,359)]; + -local drifter = if overlay_drifter then sim.overlay_drifter else sim.drifter; -local setdrifter = g.pnode({ - type: 'DepoSetDrifter', - data: { - drifter: if overlay_drifter then "wclsICARUSDrifter" else "Drifter" - } - }, nin=1, nout=1, - uses=[drifter]); local bagger = sim.make_bagger(); + // signal plus noise pipelines //local sn_pipes = sim.signal_pipelines; // local sn_pipes = sim.splusn_pipelines; -local analog_pipes = sim.analog_pipelines; +local analog_pipes = sim.analog_pipelinesyz; local perfect = import 'pgrapher/experiment/icarus/chndb-base.jsonnet'; local chndb = [{ @@ -239,9 +303,9 @@ local wcls_simchannel_sink_old = },nin=1, nout=1, uses=tools.anodes); local wcls_simchannel_sink = - g.pnode({ + [ g.pnode({ type: 'wclsDepoFluxWriter', - name: 'postdrift', + name: 'postdrift%d' %n, data: { anodes: [wc.tn(anode) for anode in tools.anodes], field_response: wc.tn(tools.field), @@ -260,13 +324,16 @@ local wcls_simchannel_sink = time_offsets: [std.extVar('time_offset_u') * wc.us, std.extVar('time_offset_v') * wc.us, std.extVar('time_offset_y') * wc.us], + process_planes: [std.mod(std.floor(n/15),3)], + // input from art::Event - sed_label: 'largeant:TPCActive', + sed_label: std.extVar('SimEnergyDepositLabel'), // output to art::Event - simchan_label: 'simpleSC', + simchan_label: 'simpleSC%d' %n, }, - }, nin=1, nout=1, uses=tools.anodes+[tools.field]); + }, nin=1, nout=1, uses=tools.anodes+[tools.field]) + for n in std.range(0,359)]; local nicks = ["incoTPCEE","incoTPCEW","incoTPCWE","incoTPCWW", "coheTPCEE","coheTPCEW","coheTPCWE","coheTPCWW"]; local scale_int = std.extVar('int_noise_scale'); @@ -302,6 +369,20 @@ local digitizers = [ sim.digitizer(mega_anode, name="digitizer%d-" %n + mega_anode.name, tag="TPC%s"%volname[n]) for n in std.range(0,3)]; +local reframer = [ + g.pnode({ + type: 'Reframer', + name: 'reframer-%d-'%n+mega_anode.name, + data: { + anode: wc.tn(mega_anode), + tags: "TPC%s"%volname[n], // ?? what do? + fill: 0.0, + tbin: params.sim.reframer.tbin, + toffset: 0, + nticks: params.sim.reframer.nticks, + }, + }, nin=1, nout=1) for n in std.range(0, 3)]; + local retaggers = [ g.pnode({ type: 'Retagger', @@ -324,28 +405,40 @@ for n in std.range(0, 3)]; local frame_summers = [ g.pnode({ - type: 'FrameSummer', + type: 'FrameSummerYZ', name: 'framesummer%d' %n, data: { - align: true, - offset: 0.0*wc.s, + multiplicity: 90 }, - }, nin=2, nout=1) for n in std.range(0, 3)]; + }, nin=90, nout=1) for n in std.range(0, 3)]; -local actpipes = [g.pipeline([noises[n], coh_noises[n], digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; -local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; - -// local actpipes = [g.pipeline([noises[n], coh_noises[n], digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; - -local include_noise = std.extVar("include_noise"); - -local actpipes = if include_noise then - [g.pipeline([noises[n], coh_noises[n], digitizers[n], wcls_output.h5io[n], wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)] - else - [g.pipeline([digitizers[n], wcls_output.h5io[n], wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; +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', + bin_width: 10*wc.cm, + tpc_width: 1500*wc.mm, + bin_height: 10*wc.cm, + yoffset: 180*wc.cm, + zoffset: 900*wc.cm, + nbinsy: 31, + nbinsz: 180, + resp: std.mod(r,15), + anode: wc.tn(tools.anodes[std.floor(r/45)]), + plane: std.mod(std.floor(r/15),3) + } + }, nin=1, nout=1, + uses=tools.anodes) + for r in std.range(0,359)]; +local util = import 'pgrapher/experiment/icarus/funcs.jsonnet'; local outtags = ['orig%d' % n for n in std.range(0, 3)]; -local pipe_reducer = util.fansummer('DepoSetFanout', analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fansummer', outtags); + +local actpipes = [g.pipeline([reframer[n], noises[n], coh_noises[n], digitizers[n], /*retaggers[n],*/ wcls_output.sim_digits[n]], name="noise-digitizer%d" %n) for n in std.range(0,3)]; +local driftpipes = [g.pipeline([deposetfilteryz[n], setdrifters[n], setscaler[n], wcls_simchannel_sink[n]], name="depo-set-drifter%d" %n) for n in std.range(0,359)]; +local pipe_drift = util.fandrifter('DepoSetFanout', driftpipes, analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fandrifter', outtags); +local pipe_reducer = util.fansummeryz('DepoSetFanout', analog_pipes, frame_summers, actpipes, 'FrameFanin', 'fansummer', outtags); // local retagger = g.pnode({ // type: 'Retagger', @@ -367,9 +460,13 @@ local pipe_reducer = util.fansummer('DepoSetFanout', analog_pipes, frame_summers //local frameio = io.numpy.frames(output); local sink = sim.frame_sink; + + // local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink.simchannels, bagger, pipe_reducer, retagger, wcls_output.sim_digits, sink]); //local graph = g.pipeline([wcls_input.depos, drifter, wcls_simchannel_sink, bagger, pipe_reducer, sink]); -local graph = g.pipeline([wcls_input.deposet, setdrifter, wcls_simchannel_sink_old, wcls_simchannel_sink, pipe_reducer, sink]); +//local graph = g.pipeline([wcls_input.deposet, setdrifter, wcls_simchannel_sink_old, wcls_simchannel_sink, pipe_reducer, sink]); + +local graph = g.pipeline([wcls_input.deposet,pipe_drift, sink]); local app = { type: 'Pgrapher', diff --git a/icaruscode/TPC/ICARUSWireCell/wcls-decode-to-sig-base.fcl b/icaruscode/TPC/ICARUSWireCell/wcls-decode-to-sig-base.fcl index 0c8cfaa85..c97b8fa12 100644 --- a/icaruscode/TPC/ICARUSWireCell/wcls-decode-to-sig-base.fcl +++ b/icaruscode/TPC/ICARUSWireCell/wcls-decode-to-sig-base.fcl @@ -54,6 +54,10 @@ standard_wirecell_sigproc: signal_output_form: "sparse" file_rcresp: "icarus_fnal_rc_tail.json" + + // ROI threshold, defined as factor times RMS noise. Per ind/col. + col_threshold_factor: 3.0 + ind_threshold_factor: 3.0 } } } diff --git a/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel-omit-noise.fcl b/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel-omit-noise.fcl deleted file mode 100644 index c8cddf30c..000000000 --- a/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel-omit-noise.fcl +++ /dev/null @@ -1,91 +0,0 @@ -#include "services_common_icarus.fcl" -#include "simulationservices_icarus.fcl" - -services: -{ - TFileService: { } - @table::icarus_common_services -} - -process_name: wclssim -physics :{ - producers: { - plopper : { - module_type : BlipMaker - } - simmer : { - module_type : WireCellToolkit - wcls_main: { - tool_type: WCLS - apps: ["Pgrapher"] - - // logsinks: ["stdout"] - // loglevels: ["magnify:debug"] - - plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft"] - - // needs to be found via your WIRECELL_PATH - configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel-omit-noise.jsonnet"] - - - // Contract note: these exact "type:name" must be used to identify - // the configuration data structures for these components in the Jsonnet. - - inputers: ["wclsSimDepoSource:electron"] - outputers: [ - "wclsSimChannelSink:postdrift", - "wclsFrameSaver:simdigits0", - "wclsFrameSaver:simdigits1", - "wclsFrameSaver:simdigits2", - "wclsFrameSaver:simdigits3" - // ,"wclsFrameSaver:nfdigits", - // "wclsFrameSaver:spsignals", - // "wclsFrameSaver:spthresholds" - ] - - // Make available parameters via Jsonnet's std.extVar() - params: { - } - structs: { - # load values from simulationservices_icarus.fcl - # Longitudinal diffusion constant [cm2/ns] - DL: @local::icarus_largeantparameters.LongitudinalDiffusion - - # Transverse diffusion constant [cm2/ns] - DT: @local::icarus_largeantparameters.TransverseDiffusion - - # load values from services_common_icarus.fcl - # Electron lifetime [microseconds] - lifetime: @local::icarus_detproperties.Electronlifetime - - # Electron drift speed, assumes a certain applied E-field [mm/us] - # driftSpeed: 1.5756 - } - } - } - } - p1 : [ plopper, simmer ] - outputFiles : [ out ] - - trigger_paths : [ p1 ] - end_paths: [ outputFiles ] -} -outputs: { - out: { - module_type: RootOutput - fileName: "%ifb_wcsim.root" - // fileName: "wcsim.root" - - outputCommands : [ - // "drop *", "keep recob::Wires_*_*_*" - "keep *_*_*_*" - // "drop *_nfspl1_raw_*", - // "drop *_nfspl1_threshold_*", - // "drop *_nfspl1_wiener_*", - // "drop *_nfspl1_gauss_*", - // "drop *_wcNoiseFilter_*_*", - // "drop *_daq_*_*" - ] - - } -} diff --git a/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel.fcl b/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel.fcl deleted file mode 100644 index 88c29a056..000000000 --- a/icaruscode/TPC/ICARUSWireCell/wcls-multitpc-sim-drift-simchannel.fcl +++ /dev/null @@ -1,95 +0,0 @@ -#include "services_common_icarus.fcl" -#include "simulationservices_icarus.fcl" - -services: -{ - TFileService: { } - @table::icarus_common_services -} - -process_name: wclssim -physics :{ - producers: { - plopper : { - module_type : BlipMaker - } - simmer : { - module_type : WireCellToolkit - wcls_main: { - tool_type: WCLS - apps: ["Pgrapher"] - - // logsinks: ["stdout"] - // loglevels: ["magnify:debug"] - - plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft"] - - // needs to be found via your WIRECELL_PATH - configs: ["pgrapher/experiment/icarus/wcls-multitpc-sim-drift-simchannel.jsonnet"] - - - // Contract note: these exact "type:name" must be used to identify - // the configuration data structures for these components in the Jsonnet. - - inputers: ["wclsSimDepoSource:electron"] - outputers: [ - "wclsSimChannelSink:postdrift", - "wclsFrameSaver:simdigits0", - "wclsFrameSaver:simdigits1", - "wclsFrameSaver:simdigits2", - "wclsFrameSaver:simdigits3" - // ,"wclsFrameSaver:nfdigits", - // "wclsFrameSaver:spsignals", - // "wclsFrameSaver:spthresholds" - ] - - // Make available parameters via Jsonnet's std.extVar() - params: { - files_fields: "garfield-icarus-fnal-rev2.json.bz2" - } - structs: { - # load values from simulationservices_icarus.fcl - # Longitudinal diffusion constant [cm2/ns] - DL: @local::icarus_largeantparameters.LongitudinalDiffusion - - # Transverse diffusion constant [cm2/ns] - DT: @local::icarus_largeantparameters.TransverseDiffusion - - # load values from services_common_icarus.fcl - # Electron lifetime [microseconds] - lifetime: @local::icarus_detproperties.Electronlifetime - - # Electron drift speed, assumes a certain applied E-field [mm/us] - # driftSpeed: 1.5756 - int_noise_scale: 1.0 - coh_noise_scale: 1.09 - } - - } - } - } - p1 : [ plopper, simmer ] - outputFiles : [ out ] - - trigger_paths : [ p1 ] - end_paths: [ outputFiles ] -} -outputs: { - out: { - module_type: RootOutput - fileName: "%ifb_wcsim.root" - // fileName: "wcsim.root" - - outputCommands : [ - // "drop *", "keep recob::Wires_*_*_*" - "keep *_*_*_*" - // "drop *_nfspl1_raw_*", - // "drop *_nfspl1_threshold_*", - // "drop *_nfspl1_wiener_*", - // "drop *_nfspl1_gauss_*", - // "drop *_wcNoiseFilter_*_*", - // "drop *_daq_*_*" - ] - - } -} diff --git a/icaruscode/TPC/ICARUSWireCell/wcls-sim-drift-simchannel.fcl b/icaruscode/TPC/ICARUSWireCell/wcls-sim-drift-simchannel.fcl deleted file mode 100644 index 3424485ba..000000000 --- a/icaruscode/TPC/ICARUSWireCell/wcls-sim-drift-simchannel.fcl +++ /dev/null @@ -1,75 +0,0 @@ -#include "services_common_icarus.fcl" - -services: -{ - TFileService: { } - @table::icarus_common_services -} -# explicitly set the split wire geometry -services.Geometry: @local::icarus_geometry -services.WireReadout: @local::icarus_wire_readout - -process_name: wclssim -physics :{ - producers: { - plopper : { - module_type : BlipMaker - } - simmer : { - module_type : WireCellToolkit - wcls_main: { - tool_type: WCLS - apps: ["Pgrapher"] - - // logsinks: ["stdout"] - // loglevels: ["magnify:debug"] - - plugins: ["WireCellPgraph", "WireCellGen","WireCellSio","WireCellRoot","WireCellLarsoft"] - - // needs to be found via your WIRECELL_PATH - configs: ["pgrapher/experiment/icarus/wcls-sim-drift-simchannel.jsonnet"] - - - // Contract note: these exact "type:name" must be used to identify - // the configuration data structures for these components in the Jsonnet. - - inputers: ["wclsSimDepoSource:electron"] - outputers: [ - "wclsSimChannelSink:postdrift", - "wclsFrameSaver:simdigits" - // ,"wclsFrameSaver:nfdigits", - // "wclsFrameSaver:spsignals", - // "wclsFrameSaver:spthresholds" - ] - - // Make available parameters via Jsonnet's std.extVar() - params: { - } - } - } - } - p1 : [ plopper, simmer ] - outputFiles : [ out ] - - trigger_paths : [ p1 ] - end_paths: [ outputFiles ] -} -outputs: { - out: { - module_type: RootOutput - // fileName: "%ifb_wcsim.root" - fileName: "wcsim.root" - - outputCommands : [ - // "drop *", "keep recob::Wires_*_*_*" - "keep *_*_*_*" - // "drop *_nfspl1_raw_*", - // "drop *_nfspl1_threshold_*", - // "drop *_nfspl1_wiener_*", - // "drop *_nfspl1_gauss_*", - // "drop *_wcNoiseFilter_*_*", - // "drop *_daq_*_*" - ] - - } -} diff --git a/icaruscode/TPC/SPAna/CMakeLists.txt b/icaruscode/TPC/SPAna/CMakeLists.txt new file mode 100644 index 000000000..4bfa8badd --- /dev/null +++ b/icaruscode/TPC/SPAna/CMakeLists.txt @@ -0,0 +1,34 @@ +cet_build_plugin(SPAna art::module + LIBRARIES + art::Framework_Core + art::Framework_Services_Registry + art_root_io::TFileService_service + art::Framework_Principal + art::Persistency_Common + art::Utilities canvas::canvas + cetlib::cetlib cetlib_except::cetlib_except + ROOT::X3d + art_root_io::tfile_support + art_root_io::art_root_io + art_root_io::dict + lardataobj::AnalysisBase + lardataobj::RecoBase + larcorealg::Geometry + larcore::Geometry_Geometry_service + larcorealg::GeoAlgo + sbnobj::Common_Reco + larcorealg::GeoAlgo + lardata::DetectorInfoServices_DetectorPropertiesServiceStandard_service + lardataalg::DetectorInfo + ROOT::Minuit + sbnobj::Common_Calibration_dict + larevt::SpaceCharge + nug4::ParticleNavigation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + larsim::Simulation +) + +install_headers() +install_source() +install_fhicl() diff --git a/icaruscode/TPC/SPAna/SPAna_module.cc b/icaruscode/TPC/SPAna/SPAna_module.cc new file mode 100644 index 000000000..39dc2e25a --- /dev/null +++ b/icaruscode/TPC/SPAna/SPAna_module.cc @@ -0,0 +1,686 @@ +//////////////////////////////////////////////////////////////////////// +// Class: SPAna +// Plugin Type: analyzer (Unknown Unknown) +// File: SPAna_module.cc +// +// Generated at Sun Jun 23 05:48:04 2024 by Gray Putnam using cetskelgen +// from version . +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDAnalyzer.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 "TTree.h" +#include "art_root_io/TFileService.h" + +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindOne.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "canvas/Persistency/Common/PtrVector.h" + +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/Wire.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/AnalysisBase/T0.h" +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "sbnobj/Common/Calibration/TrackCaloSkimmerObj.h" + +#include "larevt/SpaceCharge/SpaceCharge.h" +#include "larevt/SpaceChargeServices/SpaceChargeService.h" +#include "lardataalg/DetectorInfo/DetectorPropertiesStandard.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "larcore/Geometry/Geometry.h" +#include "larcore/CoreUtils/ServiceUtil.h" +#include "larcore/Geometry/WireReadout.h" +#include "larcorealg/Geometry/GeometryCore.h" +#include "larsim/MCCheater/BackTrackerService.h" +#include "larsim/MCCheater/ParticleInventoryService.h" +#include "larcore/CoreUtils/ServiceUtil.h" + +class SPAna; + + +class SPAna : public art::EDAnalyzer { +public: + explicit SPAna(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. + SPAna(SPAna const&) = delete; + SPAna(SPAna&&) = delete; + SPAna& operator=(SPAna const&) = delete; + SPAna& operator=(SPAna&&) = delete; + + // Required functions. + void analyze(art::Event const& e) override; + + void Clear(); + void setBranches(); + void setMetaBranches(TTree *); + + sbn::HitInfo MakeHit(const recob::Hit &hit, + unsigned hkey, + const art::Ptr &sp, + const geo::WireReadoutGeom &wireReadout, + const detinfo::DetectorClocksData &dclock, + const cheat::BackTrackerService *bt_serv); + + std::pair, std::vector> ParticleTrueHits( + const simb::MCParticle &particle, + const std::map>> id_to_ide_map, + const detinfo::DetectorPropertiesData &dprop, + const geo::WireReadoutGeom &wireReadout); + + void BuildHitRanges(const std::vector> &hits); + void BuildWireRanges(const std::vector> &wires); + + bool FindHit(unsigned channel, unsigned tick); + bool FindWire(unsigned channel, unsigned tick); + + void respondToOpenInputFile(const art::FileBlock& fb) override { + (void) fb; + _fileno ++; + } + +private: + std::vector fHitProducers; + std::vector fWireProducers; + art::InputTag fG4Producer; + art::InputTag fSimChannelProducer; + + TTree *tRecoHits; + TTree *tRecoWire; + TTree *tTrueHits; + + int _fileno; + int _run; + int _subrun; + int _evt; + int _cryo; + + std::vector _reco_hits; + std::vector _true_hits; + + std::vector _true_hit_dir_x; + std::vector _true_hit_dir_y; + std::vector _true_hit_dir_z; + std::vector _true_hits_has_hit; + std::vector _true_hits_has_wire; + + std::vector _reco_wire_start; + std::vector _reco_wire_end; + std::vector _reco_wire_wire; + std::vector _reco_wire_plane; + std::vector _reco_wire_channel; + std::vector _reco_wire_charge; + std::vector _reco_wire_true_charge; + std::vector _reco_wire_true_energy; + + std::map>> fHitRanges; + std::map>> fWireRanges; +}; + + +SPAna::SPAna(fhicl::ParameterSet const& p) + : EDAnalyzer{p} // , + // More initializers here. +{ + // Call appropriate consumes<>() for any products to be retrieved by this module. + art::ServiceHandle tfs; + tRecoHits = tfs->make("RecoHits", "Reconstructed hits"); + tRecoWire = tfs->make("RecoWire", "Reconstructed wires"); + tTrueHits = tfs->make("TrueHits", "True hits"); + + setBranches(); + + _fileno = 0; + _cryo = p.get("Cryostat"); + + fHitProducers = p.get>("HitProducers"); + fWireProducers = p.get>("WireProducers"); + fG4Producer = p.get("G4Producer"); + fSimChannelProducer = p.get("SimChannelProducer"); +} + +void SPAna::BuildHitRanges(const std::vector> &hits) { + fHitRanges.clear(); + for (const art::Ptr &h: hits) fHitRanges[h->Channel()].push_back({h->StartTick(), h->EndTick()}); +} + +void SPAna::BuildWireRanges(const std::vector> &wires) { + fWireRanges.clear(); + for (const art::Ptr &w: wires) { + unsigned channel = w->Channel(); + for (auto const &range: w->SignalROI().get_ranges()) { + fWireRanges[channel].push_back({range.begin_index(), range.end_index()}); + } + } +} + +bool FindRange(const std::map>> &ranges, unsigned channel, unsigned tick) { + if (!ranges.count(channel)) return false; + + const std::vector> &thisrange = ranges.at(channel); + for (const std::pair &r: thisrange) { + if (tick >= r.first && tick <= r.second) return true; + } + + return false; +} + +bool SPAna::FindHit(unsigned channel, unsigned tick) { + return FindRange(fHitRanges, channel, tick); +} + +bool SPAna::FindWire(unsigned channel, unsigned tick) { + return FindRange(fWireRanges, channel, tick); +} + +void SPAna::setBranches() { + setMetaBranches(tRecoHits); + setMetaBranches(tRecoWire); + setMetaBranches(tTrueHits); + + tRecoHits->Branch("h", &_reco_hits); + + tTrueHits->Branch("t", &_true_hits); + tTrueHits->Branch("t.dir_x", &_true_hit_dir_x); + tTrueHits->Branch("t.dir_y", &_true_hit_dir_y); + tTrueHits->Branch("t.dir_z", &_true_hit_dir_z); + tTrueHits->Branch("t.has_hit", &_true_hits_has_hit); + tTrueHits->Branch("t.has_wire", &_true_hits_has_wire); + + tRecoWire->Branch("w.start", &_reco_wire_start); + tRecoWire->Branch("w.end", &_reco_wire_end); + tRecoWire->Branch("w.wire", &_reco_wire_wire); + tRecoWire->Branch("w.plane", &_reco_wire_plane); + tRecoWire->Branch("w.channel", &_reco_wire_channel); + tRecoWire->Branch("w.charge", &_reco_wire_charge); + tRecoWire->Branch("w.true_charge", &_reco_wire_true_charge); + tRecoWire->Branch("w.true_energy", &_reco_wire_true_energy); + +} + +void SPAna::setMetaBranches(TTree *t) { + t->Branch("fileno", &_fileno, "fileno/i"); + t->Branch("run", &_run, "run/i"); + t->Branch("sub", &_subrun, "sub/i"); + t->Branch("evt", &_evt, "evt/i"); + t->Branch("cryo", &_cryo, "cryo/i"); +} + +void SPAna::Clear() { + _reco_hits.clear(); + _true_hits.clear(); + + _true_hit_dir_x.clear(); + _true_hit_dir_y.clear(); + _true_hit_dir_z.clear(); + _true_hits_has_hit.clear(); + _true_hits_has_wire.clear(); + + _reco_wire_start.clear(); + _reco_wire_end.clear(); + _reco_wire_wire.clear(); + _reco_wire_plane.clear(); + _reco_wire_channel.clear(); + _reco_wire_charge.clear(); + _reco_wire_true_charge.clear(); + _reco_wire_true_energy.clear(); +} + +std::map>> PrepSimChannels(const std::vector> &simchannels, const geo::WireReadoutGeom &wireReadout) { + std::map>> ret; + + for (const art::Ptr sc : simchannels) { + // Lookup the wire of this channel + raw::ChannelID_t channel = sc->Channel(); + std::vector maybewire = wireReadout.ChannelToWire(channel); + geo::WireID thisWire; // Default constructor makes invalid wire + if (maybewire.size()) thisWire = maybewire[0]; + + for (const auto &item : sc->TDCIDEMap()) { + for (const sim::IDE &ide: item.second) { + // indexing initializes empty vector + ret[abs(ide.trackID)].push_back({thisWire, item.first, &ide}); + } + } + } + return ret; +} + +// Turn a particle position to a space-charge induced position +geo::Point_t TrajectoryToWirePosition(const geo::Point_t &loc, const geo::TPCID &tpc) { + auto const* sce = lar::providerFrom(); + art::ServiceHandle geom; + + geo::Point_t ret = loc; + + // Returned X is the drift -- multiply by the drift direction to undo this + int corr = geom->TPC(tpc).DriftDir().X(); + + if (sce && sce->EnableSimSpatialSCE()) { + geo::Vector_t offset = sce->GetPosOffsets(ret); + + ret.SetX(ret.X() + corr * offset.X()); + ret.SetY(ret.Y() + offset.Y()); + ret.SetZ(ret.Z() + offset.Z()); + } + + return ret; +} + +// Turn a space-charge induced position to a trajectory Position +geo::Point_t WireToTrajectoryPosition(const geo::Point_t &loc, const geo::TPCID &tpc) { + auto const* sce = lar::providerFrom(); + + geo::Point_t ret = loc; + + if (sce && sce->EnableSimSpatialSCE()) { + geo::Vector_t offset = sce->GetCalPosOffsets(ret, tpc.TPC); + + ret.SetX(ret.X() + offset.X()); + ret.SetY(ret.Y() + offset.Y()); + ret.SetZ(ret.Z() + offset.Z()); + } + + return ret; + +} + +std::pair, std::vector> SPAna::ParticleTrueHits( + const simb::MCParticle &particle, + const std::map>> id_to_ide_map, + const detinfo::DetectorPropertiesData &dprop, + const geo::WireReadoutGeom &wireReadout) { + + // Organize deposition info into per-wire true "Hits" -- key is the Channel Number + std::map truehits; + + const std::vector> empty; + const std::vector> &particle_ides = id_to_ide_map.count(particle.TrackId()) ? id_to_ide_map.at(particle.TrackId()) : empty; + + for (auto const &ide_tup: particle_ides) { + const geo::WireID &w = std::get<0>(ide_tup); + short tick = std::get<1>(ide_tup); + + // cut on cryostat + if ((int)w.Cryostat != _cryo) continue; + + unsigned c = wireReadout.PlaneWireToChannel(w); + const sim::IDE *ide = std::get<2>(ide_tup); + + // Set stuff + truehits[c].cryo = w.Cryostat; + truehits[c].tpc = w.TPC; + truehits[c].plane = w.Plane; + truehits[c].wire = w.Wire; + truehits[c].channel = c; + + // Average stuff using charge-weighting + float old_elec = truehits[c].nelec; + float new_elec = old_elec + ide->numElectrons; + truehits[c].p.x = (truehits[c].p.x*old_elec + ide->x*ide->numElectrons) / new_elec; + truehits[c].p.y = (truehits[c].p.y*old_elec + ide->y*ide->numElectrons) / new_elec; + truehits[c].p.z = (truehits[c].p.z*old_elec + ide->z*ide->numElectrons) / new_elec; + truehits[c].time = (truehits[c].time*old_elec + tick*ide->numElectrons) / new_elec; + + // Also get the position with space charge un-done + geo::Point_t ide_p(ide->x, ide->y, ide->z); + geo::Point_t ide_p_scecorr = WireToTrajectoryPosition(ide_p, w); + + truehits[c].p_scecorr.x = (truehits[c].p_scecorr.x*old_elec + ide_p_scecorr.x()*ide->numElectrons) / new_elec; + truehits[c].p_scecorr.y = (truehits[c].p_scecorr.y*old_elec + ide_p_scecorr.y()*ide->numElectrons) / new_elec; + truehits[c].p_scecorr.z = (truehits[c].p_scecorr.z*old_elec + ide_p_scecorr.z()*ide->numElectrons) / new_elec; + + // Sum stuff + truehits[c].nelec += ide->numElectrons; + truehits[c].e += ide->energy; + truehits[c].ndep += 1; + } + + // Compute widths + for (auto const &ide_tup: particle_ides) { + const geo::WireID &w = std::get<0>(ide_tup); + + // cut on cryostat + if ((int)w.Cryostat != _cryo) continue; + + unsigned c = wireReadout.PlaneWireToChannel(w); + const sim::IDE *ide = std::get<2>(ide_tup); + + geo::Point_t ide_p(ide->x, ide->y, ide->z); + geo::Point_t ide_p_scecorr = WireToTrajectoryPosition(ide_p, w); + + // Average stuff using charge-weighting + float this_elec = ide->numElectrons; + + truehits[c].p_width.x += (ide_p.x() - truehits[c].p.x) * (ide_p.x() - truehits[c].p.x) * this_elec / truehits[c].nelec; + truehits[c].p_width.y += (ide_p.y() - truehits[c].p.y) * (ide_p.y() - truehits[c].p.y) * this_elec / truehits[c].nelec; + truehits[c].p_width.z += (ide_p.z() - truehits[c].p.z) * (ide_p.z() - truehits[c].p.z) * this_elec / truehits[c].nelec; + + truehits[c].p_scecorr_width.x += (ide_p_scecorr.x() - truehits[c].p_scecorr.x) * (ide_p_scecorr.x() - truehits[c].p_scecorr.x) * this_elec / truehits[c].nelec; + truehits[c].p_scecorr_width.y += (ide_p_scecorr.y() - truehits[c].p_scecorr.y) * (ide_p_scecorr.y() - truehits[c].p_scecorr.y) * this_elec / truehits[c].nelec; + truehits[c].p_scecorr_width.z += (ide_p_scecorr.z() - truehits[c].p_scecorr.z) * (ide_p_scecorr.z() - truehits[c].p_scecorr.z) * this_elec / truehits[c].nelec; + } + + // Convert to vector + std::vector truehits_v; + for (auto const &p: truehits) { + truehits_v.push_back(p.second); + } + + // Save true directions + std::vector truehitdirs; + + // Compute the time of each hit + for (sbn::TrueHit &h: truehits_v) { + // TODO: fix magic number + h.time -= 2900; // == (G4RefTime - TriggerOffsetTPC)/TickPeriod = (1500 - 340)/0.4 + double xdrift = abs(h.p.x - wireReadout.Plane(geo::PlaneID(h.cryo, h.tpc, 0)).GetCenter().X()); + h.tdrift = xdrift / dprop.DriftVelocity(); + } + + // Compute the pitch of each hit and order it in the trajectory + for (sbn::TrueHit &h: truehits_v) { + // Use the SCE-undone hit since this matches to the Trajectory + TVector3 h_p(h.p_scecorr.x, h.p_scecorr.y, h.p_scecorr.z); + + TVector3 direction; + float closest_dist = -1.; + int traj_index = -1; + for (unsigned i_traj = 0; i_traj < particle.NumberTrajectoryPoints(); i_traj++) { + if (closest_dist < 0. || (particle.Position(i_traj).Vect() - h_p).Mag() < closest_dist) { + direction = particle.Momentum(i_traj).Vect().Unit(); + closest_dist = (particle.Position(i_traj).Vect() - h_p).Mag(); + traj_index = i_traj; + } + } + + sbn::Vector3D dir_v; + dir_v.x = direction.x(); + dir_v.y = direction.y(); + dir_v.z = direction.z(); + truehitdirs.push_back(dir_v); + + // If we got a direction, get the pitch + if (closest_dist >= 0. && direction.Mag() > 1e-4) { + geo::PlaneID planeid(h.cryo, h.tpc, h.plane); + geo::PlaneGeo const& plane = wireReadout.Plane(planeid); + float angletovert = wireReadout.WireAngleToVertical(plane.View(), planeid) - 0.5*::util::pi<>(); + float cosgamma = abs(cos(angletovert) * direction.Z() + sin(angletovert) * direction.Y()); + float pitch = plane.WirePitch() / cosgamma; + h.pitch = pitch; + } + else { + h.pitch = -1.; + } + // And the pitch induced by SCE + if (closest_dist >= 0. && direction.Mag() > 1e-4) { + geo::PlaneID planeid(h.cryo, h.tpc, h.plane); + geo::PlaneGeo const& plane = wireReadout.Plane(planeid); + float angletovert = wireReadout.WireAngleToVertical(plane.View(), planeid) - 0.5*::util::pi<>(); + + TVector3 loc_mdx_v = h_p - direction * (plane.WirePitch() / 2.); + TVector3 loc_pdx_v = h_p + direction * (plane.WirePitch() / 2.); + + // Convert types for helper functions + geo::Point_t loc_mdx(loc_mdx_v.X(), loc_mdx_v.Y(), loc_mdx_v.Z()); + geo::Point_t loc_pdx(loc_pdx_v.X(), loc_pdx_v.Y(), loc_pdx_v.Z()); + geo::Point_t h_p_point(h_p.X(), h_p.Y(), h_p.Z()); + + loc_mdx = TrajectoryToWirePosition(loc_mdx, planeid); + loc_pdx = TrajectoryToWirePosition(loc_pdx, planeid); + + // Direction at wires + geo::Vector_t dir = (loc_pdx - loc_mdx) / (loc_mdx - loc_pdx).r(); + + // Pitch at wires + double cosgamma = std::abs(std::sin(angletovert)*dir.Y() + std::cos(angletovert)*dir.Z()); + double pitch; + if (cosgamma) { + pitch = plane.WirePitch()/cosgamma; + } + else { + pitch = 0.; + } + + // Now bring that back to the particle trajectory + geo::Point_t loc_w = TrajectoryToWirePosition(h_p_point, planeid); + + geo::Point_t locw_pdx_traj = WireToTrajectoryPosition(loc_w + pitch*dir, planeid); + geo::Point_t loc = WireToTrajectoryPosition(loc_w, planeid); + + h.pitch_sce = (locw_pdx_traj - loc).R(); + } + else { + h.pitch_sce = -1.; + } + + // And the trajectory location + h.itraj = traj_index; + + // And the residual range of the hit + h.rr = 0.; + if (traj_index >= 0) { + for (int i_traj = traj_index+1; i_traj < (int)particle.NumberTrajectoryPoints(); i_traj++) { + h.rr += (particle.Position(i_traj).Vect() - particle.Position(i_traj-1).Vect()).Mag(); + } + + // Also account for the distance from the Hit point to the matched trajectory point + double hit_distance_along_particle = (h_p - particle.Position(traj_index).Vect()).Dot(particle.Momentum(traj_index).Vect().Unit()); + h.rr += -hit_distance_along_particle; + } + } + + return {truehits_v, truehitdirs}; + +} + +sbn::HitInfo SPAna::MakeHit(const recob::Hit &hit, + unsigned hkey, + const art::Ptr &sp, + const geo::WireReadoutGeom &wireReadout, + const detinfo::DetectorClocksData &dclock, + const cheat::BackTrackerService *bt_serv) { + + // TrackHitInfo to save + sbn::HitInfo h; + + // information from the hit object + h.integral = hit.Integral(); + h.sumadc = hit.ROISummedADC(); + h.width = hit.RMS(); + h.time = hit.PeakTime(); + h.mult = hit.Multiplicity(); + h.wire = hit.WireID().Wire; + h.plane = hit.WireID().Plane; + h.channel = wireReadout.PlaneWireToChannel(hit.WireID()); + h.tpc = hit.WireID().TPC; + h.end = hit.EndTick(); + h.start = hit.StartTick(); + h.id = (int)hkey; + + // Do back-tracking on each hit + if (bt_serv) { + // The default BackTracking function goes from (peak - width, peak + width). + // + // This time range does not match well hits with a non-Gaussian shape where + // the Gaussian-fit-width does not replicate the width of the pulse. + // + // Instead, we use the Hit (start, end) time range. This is also more relevant + // for (e.g.) the SummedADC charge extraction method. + // + // Don't use this: + // std::vector ides = bt_serv->HitToTrackIDEs(dclock, hit); + // + // Use this: + std::vector ides = bt_serv->ChannelToTrackIDEs(dclock, hit.Channel(), hit.StartTick(), hit.EndTick()); + + h.truth.e = 0.; + h.truth.nelec = 0.; + + for (const sim::TrackIDE &ide: ides) { + h.truth.e += ide.energy; + h.truth.nelec += ide.numElectrons; + } + } + else { + h.truth.e = -1.; + h.truth.nelec = -1.; + } + + + // Save SpacePoint information + if (sp) { + h.sp.x = sp->position().x(); + h.sp.y = sp->position().y(); + h.sp.z = sp->position().z(); + + h.hasSP = true; + } + else { + h.hasSP = false; + } + + return h; +} + +void SPAna::analyze(art::Event const& e) +{ + unsigned evt = e.event(); + unsigned sub = e.subRun(); + unsigned run = e.run(); + _evt = evt; + _subrun = sub; + _run = run; + + std::cout << "[SPAna::analyze] Run: " << run << ", SubRun: " << sub << ", Event: "<< evt << ", Is Data: " << e.isRealData() << std::endl; + + Clear(); + + // Load services + const geo::WireReadoutGeom &wireReadout = + art::ServiceHandle()->Get(); + auto const clock_data = art::ServiceHandle()->DataFor(e); + auto const dprop = + art::ServiceHandle()->DataFor(e, clock_data); + + art::ServiceHandle bt_serv; + + + // Collect products + + // Hits + std::vector> hitList; + for (const art::InputTag &t: fHitProducers) { + art::ValidHandle> hitHandle = e.getValidHandle>(t); + art::fill_ptr_vector(hitList, hitHandle); + } + // Add spacepoints later? + // art::FindManyP allHitSPs(hitList, e, fPFPproducer); + + // Wires + std::vector> wireList; + for (const art::InputTag &t: fWireProducers) { + art::ValidHandle> wireHandle = e.getValidHandle>(t); + art::fill_ptr_vector(wireList, wireHandle); + } + + // Truth + std::vector> mcparticles; + art::ValidHandle> mcparticle_handle = e.getValidHandle>(fG4Producer); + art::fill_ptr_vector(mcparticles, mcparticle_handle); + + std::vector> simchannels; + art::ValidHandle> simchannel_handle = e.getValidHandle>(fSimChannelProducer); + art::fill_ptr_vector(simchannels, simchannel_handle); + + // Prep matching info + std::map>> id_to_ide_map = PrepSimChannels(simchannels, wireReadout); + BuildHitRanges(hitList); + BuildWireRanges(wireList); + + // Save hits + for (unsigned i = 0; i < hitList.size(); i++) { + _reco_hits.push_back(MakeHit(*hitList[i], hitList[i].key(), {} /*allHitSps.at(hitList[i].key())*/, wireReadout, clock_data, bt_serv.get())); + } + + // Save wires + for (unsigned i = 0; i < wireList.size(); i++) { + art::Ptr wire = wireList[i]; + + unsigned channel = wire->Channel(); + unsigned plane_id = wireReadout.ChannelToWire(wire->Channel()).at(0).Plane; + unsigned wire_id = wireReadout.ChannelToWire(wire->Channel()).at(0).Wire; + for (auto const &range: wire->SignalROI().get_ranges()) { + + _reco_wire_start.push_back(range.begin_index()); + _reco_wire_end.push_back(range.end_index()); + _reco_wire_wire.push_back(wire_id); + _reco_wire_plane.push_back(plane_id); + _reco_wire_channel.push_back(channel); + + float charge = 0; + for (float val: range) charge += val; + _reco_wire_charge.push_back(charge); + + float true_charge = -1; + float true_energy = -1; + // Do back-tracking on each wire + if (bt_serv.get()) { + std::vector ides = bt_serv->ChannelToTrackIDEs(clock_data, channel, range.begin_index(), range.end_index()); + + true_charge = 0; + true_energy = 0; + + for (const sim::TrackIDE &ide: ides) { + true_energy += ide.energy; + true_charge += ide.numElectrons; + } + } + _reco_wire_true_charge.push_back(true_charge); + _reco_wire_true_energy.push_back(true_energy); + } + } + + // Save truth info + for (unsigned i = 0; i < mcparticles.size(); i++) { + const simb::MCParticle &p = *mcparticles[i]; + auto ret = ParticleTrueHits(p, id_to_ide_map, dprop, wireReadout); + + for (const sbn::TrueHit &th: ret.first) _true_hits.push_back(th); + for (const sbn::Vector3D &d: ret.second) { + _true_hit_dir_x.push_back(d.x); + _true_hit_dir_y.push_back(d.y); + _true_hit_dir_z.push_back(d.z); + } + } + + // true to reco matching + for (const sbn::TrueHit &th: _true_hits) { + _true_hits_has_hit.push_back((int)FindHit(th.channel, th.time)); + _true_hits_has_wire.push_back((int)FindWire(th.channel, th.time)); + } + + tRecoHits->Fill(); + tTrueHits->Fill(); + tRecoWire->Fill(); + +} + +DEFINE_ART_MODULE(SPAna) diff --git a/icaruscode/TPC/SPAna/run_spana_icarus.fcl b/icaruscode/TPC/SPAna/run_spana_icarus.fcl new file mode 100644 index 000000000..9224fe419 --- /dev/null +++ b/icaruscode/TPC/SPAna/run_spana_icarus.fcl @@ -0,0 +1,67 @@ +#include "services_common_icarus.fcl" +#include "simulationservices_icarus.fcl" + +#include "larproperties.fcl" +#include "backtrackerservice.fcl" +#include "particleinventoryservice.fcl" +#include "detectorproperties_icarus.fcl" +#include "spacecharge.fcl" + +#include "spana_icarus.fcl" + +process_name: SPAna + +services: +{ + @table::icarus_basic_services + @table::icarus_wirecalibration_services + @table::icarus_backtracking_services # from `simulationservices_icarus.fcl` + SpaceChargeService: @local::icarus_spacecharge +} +services.SpaceChargeService: { + EnableCalEfieldSCE: false + EnableCalSpatialSCE: false + EnableCorrSCE: false + EnableSimEfieldSCE: false + EnableSimSpatialSCE: false + InputFilename: "SCEoffsets/SCEoffsets_ICARUS_E500_voxelTH3.root" + RepresentationType: "Voxelized_TH3" + service_provider: "SpaceChargeServiceICARUS" +} + +services.TFileService.fileName: "SPAna.root" + +#Start each new event with an empty event. +source: +{ + module_type: RootInput + maxEvents: -1 # Number of events to create +} + +outputs: +{ +} + + +# 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:{} + + filters: {} + + # evtfilter: [filter] + + analyzers: + { + spanaE: @local::spana2d_east + spanaW: @local::spana2d_west + } + + runprod: [] + stream1: [spanaE, spanaW] + trigger_paths: [] + end_paths: [ stream1 ] +} diff --git a/icaruscode/TPC/SPAna/spana_icarus.fcl b/icaruscode/TPC/SPAna/spana_icarus.fcl new file mode 100644 index 000000000..cebb35042 --- /dev/null +++ b/icaruscode/TPC/SPAna/spana_icarus.fcl @@ -0,0 +1,39 @@ +BEGIN_PROLOG + +spana1d_east: { + module_type: SPAna + Cryostat: 0 + HitProducers: ["gaushit1dTPCEE", "gaushit1dTPCEW"] + WireProducers: ["roifinder1d:PHYSCRATEDATATPCEE", "roifinder1d:PHYSCRATEDATATPCEW"] + G4Producer: "largeant" + SimChannelProducer: "daq:simpleSC" +} + +spana1d_west: { + module_type: SPAna + Cryostat: 1 + HitProducers: ["gaushit1dTPCWE", "gaushit1dTPCWW"] + WireProducers: ["roifinder1d:PHYSCRATEDATATPCWE", "roifinder1d:PHYSCRATEDATATPCWW"] + G4Producer: "largeant" + SimChannelProducer: "daq:simpleSC" +} + +spana2d_east: { + module_type: SPAna + Cryostat: 0 + HitProducers: ["gaushit2dTPCEE", "gaushit2dTPCEW"] + WireProducers: ["decon2droiEE:gauss", "decon2droiEW:gauss"] + G4Producer: "largeant" + SimChannelProducer: "daq:simpleSC" +} + +spana2d_west: { + module_type: SPAna + Cryostat: 1 + HitProducers: ["gaushit2dTPCWE", "gaushit2dTPCWW"] + WireProducers: ["decon2droiWE:gauss", "decon2droiWW:gauss"] + G4Producer: "largeant" + SimChannelProducer: "daq:simpleSC" +} + +END_PROLOG diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/CMakeLists.txt b/icaruscode/TPC/SignalProcessing/HitFinder/CMakeLists.txt index 17d747916..06e6714aa 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/CMakeLists.txt +++ b/icaruscode/TPC/SignalProcessing/HitFinder/CMakeLists.txt @@ -46,12 +46,6 @@ cet_build_plugin(HitMerger art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(HitSelector art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(ICARUSHitFinder art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(HitConverter art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(GaussHitFinderICARUS art::module - LIBRARIES ${MODULE_LIBRARIES} - larreco::HitFinder - larreco::CandidateHitFinderTool - larreco::PeakFitterTool - ) install_headers() diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/GaussHitFinderICARUS_module.cc b/icaruscode/TPC/SignalProcessing/HitFinder/GaussHitFinderICARUS_module.cc deleted file mode 100644 index 240041172..000000000 --- a/icaruscode/TPC/SignalProcessing/HitFinder/GaussHitFinderICARUS_module.cc +++ /dev/null @@ -1,628 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// -// GaussHitFinderICARUS class -// -// jaasaadi@syr.edu -// -// This algorithm is designed to find hits on wires after deconvolution. -// ----------------------------------- -// This algorithm is based on the FFTHitFinder written by Brian Page, -// Michigan State University, for the ArgoNeuT experiment. -// -// -// The algorithm walks along the wire and looks for pulses above threshold -// The algorithm then attempts to fit n-gaussians to these pulses where n -// is set by the number of peaks found in the pulse -// If the Chi2/NDF returned is "bad" it attempts to fit n+1 gaussians to -// the pulse. If this is a better fit it then uses the parameters of the -// Gaussian fit to characterize the "hit" object -// -// To use this simply include the following in your producers: -// gaushit: @local::microboone_GaussHitFinder -// gaushit: @local::argoneut_GaussHitFinder -//////////////////////////////////////////////////////////////////////// - -// C/C++ standard library -#include // std::accumulate() -#include -#include // std::unique_ptr() -#include -#include // std::move() - -// Framework includes -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/SharedProducer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Utilities/Globals.h" -#include "art/Utilities/make_tool.h" -#include "art_root_io/TFileService.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "fhiclcpp/ParameterSet.h" - -// LArSoft Includes -#include "larcore/Geometry/WireReadout.h" -#include "larcoreobj/SimpleTypesAndConstants/RawTypes.h" // raw::ChannelID_t -#include "lardataobj/RecoBase/Hit.h" -#include "larreco/HitFinder/HitFilterAlg.h" -#include "icaruscode/TPC/Utilities/HitCreator.h" - -#include "sbnobj/ICARUS/TPC/ChannelROI.h" - -#include "larreco/HitFinder/HitFinderTools/ICandidateHitFinder.h" -#include "larreco/HitFinder/HitFinderTools/IPeakFitter.h" - -// ROOT Includes -#include "TH1F.h" -#include "TMath.h" - -#include "tbb/concurrent_vector.h" -#include "tbb/parallel_for.h" - -namespace hit { - class GaussHitFinderICARUS : public art::SharedProducer { - public: - explicit GaussHitFinderICARUS(fhicl::ParameterSet const& pset, art::ProcessingFrame const&); - - private: - void produce(art::Event& evt, art::ProcessingFrame const&) override; - void beginJob(art::ProcessingFrame const&) override; - - std::vector FillOutHitParameterVector(const std::vector& input); - - const bool fFilterHits; - const bool fFillHists; - - const std::string fCalDataModuleLabel; - const std::string fAllHitsInstanceName; - - const std::vector fLongMaxHitsVec; /// fLongPulseWidthVec; /// - fAreaNormsVec; /// fPulseHeightCuts; - const std::vector fPulseWidthCuts; - const std::vector fPulseRatioCuts; - - std::atomic fEventCount{0}; - - //only Standard and Morphological implementation is threadsafe. - std::vector> - fHitFinderToolVec; ///< For finding candidate hits - // only Marqdt implementation is threadsafe. - std::unique_ptr fPeakFitterTool; ///< Perform fit to candidate peaks - //HitFilterAlg implementation is threadsafe. - std::unique_ptr fHitFilterAlg; ///< algorithm used to filter out noise hits - - //only used when fFillHists is true and in single threaded mode. - TH1F* fFirstChi2; - TH1F* fChi2; - - }; // class GaussHitFinderICARUS - - //------------------------------------------------- - //------------------------------------------------- - GaussHitFinderICARUS::GaussHitFinderICARUS(fhicl::ParameterSet const& pset, art::ProcessingFrame const&) - : SharedProducer{pset} - , fFilterHits(pset.get("FilterHits", false)) - , fFillHists(pset.get("FillHists", false)) - , fCalDataModuleLabel(pset.get("CalDataModuleLabel")) - , fAllHitsInstanceName(pset.get("AllHitsInstanceName", "")) - , fLongMaxHitsVec(pset.get>("LongMaxHits", std::vector() = {25, 25, 25})) - , fLongPulseWidthVec( - pset.get>("LongPulseWidth", std::vector() = {16, 16, 16})) - , fMaxMultiHit(pset.get("MaxMultiHit")) - , fAreaMethod(pset.get("AreaMethod")) - , fAreaNormsVec(FillOutHitParameterVector(pset.get>("AreaNorms"))) - , fChi2NDF(pset.get("Chi2NDF")) - , fPulseHeightCuts( - pset.get>("PulseHeightCuts", std::vector() = {3.0, 3.0, 3.0})) - , fPulseWidthCuts( - pset.get>("PulseWidthCuts", std::vector() = {2.0, 1.5, 1.0})) - , fPulseRatioCuts( - pset.get>("PulseRatioCuts", std::vector() = {0.35, 0.40, 0.20})) - { - if (fFillHists && art::Globals::instance()->nthreads() > 1u) { - throw art::Exception(art::errors::Configuration) - << "Cannot fill histograms when multiple threads configured, please set fFillHists to " - "false or change number of threads to 1\n"; - } - async(); - if (fFilterHits) { - fHitFilterAlg = std::make_unique(pset.get("HitFilterAlg")); - } - - // recover the tool to do the candidate hit finding - // Recover the vector of fhicl parameters for the ROI tools - const fhicl::ParameterSet& hitFinderTools = pset.get("HitFinderToolVec"); - - fHitFinderToolVec.resize(hitFinderTools.get_pset_names().size()); - - for (const std::string& hitFinderTool : hitFinderTools.get_pset_names()) { - const fhicl::ParameterSet& hitFinderToolParamSet = - hitFinderTools.get(hitFinderTool); - size_t planeIdx = hitFinderToolParamSet.get("Plane"); - - fHitFinderToolVec.at(planeIdx) = - art::make_tool(hitFinderToolParamSet); - } - - // Recover the peak fitting tool - fPeakFitterTool = - art::make_tool(pset.get("PeakFitter")); - - // let HitCollectionCreator declare that we are going to produce - // hits and associations with wires and raw digits - // We want the option to output two hit collections, one filtered - // and one with all hits. The key to doing this will be a non-null - // instance name for the second collection - // (with no particular product label) - icarus::HitCollectionCreator::declare_products( - producesCollector(), fAllHitsInstanceName, true, false); //fMakeRawDigitAssns); - - // and now the filtered hits... - if (fAllHitsInstanceName != "") - icarus::HitCollectionCreator::declare_products( - producesCollector(), "", true, false); //fMakeRawDigitAssns); - - return; - } // GaussHitFinderICARUS::GaussHitFinderICARUS() - - //------------------------------------------------- - //------------------------------------------------- - std::vector GaussHitFinderICARUS::FillOutHitParameterVector(const std::vector& input) - { - if (input.size() == 0) - throw std::runtime_error( - "GaussHitFinderICARUS::FillOutHitParameterVector ERROR! Input config vector has zero size."); - - std::vector output; - const unsigned int N_PLANES = art::ServiceHandle()->Get().Nplanes(); - - if (input.size() == 1) - output.resize(N_PLANES, input[0]); - else if (input.size() == N_PLANES) - output = input; - else - throw std::runtime_error("GaussHitFinderICARUS::FillOutHitParameterVector ERROR! Input config " - "vector size !=1 and !=N_PLANES."); - return output; - } - - //------------------------------------------------- - //------------------------------------------------- - void GaussHitFinderICARUS::beginJob(art::ProcessingFrame const&) - { - // get access to the TFile service - art::ServiceHandle tfs; - - // ====================================== - // === Hit Information for Histograms === - if (fFillHists) { - fFirstChi2 = tfs->make("fFirstChi2", "#chi^{2}", 10000, 0, 5000); - fChi2 = tfs->make("fChi2", "#chi^{2}", 10000, 0, 5000); - } - } - - // This algorithm uses the fact that deconvolved signals are very smooth - // and looks for hits as areas between local minima that have signal above - // threshold. - //------------------------------------------------- - void GaussHitFinderICARUS::produce(art::Event& evt, art::ProcessingFrame const&) - { - unsigned int count = fEventCount.fetch_add(1); - //================================================================================================== - - TH1::AddDirectory(kFALSE); - - // Instantiate and Reset a stop watch - //TStopwatch StopWatch; - //StopWatch.Reset(); - - // ################################ - // ### Calling Geometry service ### - // ################################ - auto const& wireReadout = art::ServiceHandle()->Get(); - - // ############################################### - // ### Making a ptr vector to put on the event ### - // ############################################### - // this contains the hit collection - // and its associations to wires and raw digits - icarus::HitCollectionCreator allHitCol(evt, fAllHitsInstanceName, true, false); - - // Handle the filtered hits collection... - icarus::HitCollectionCreator hcol(evt, "", true, false); - icarus::HitCollectionCreator* filteredHitCol = 0; - - if (fFilterHits) filteredHitCol = &hcol; - - //store in a thread safe way - struct hitstruct { - icarus::Hit hit_tbb; - art::Ptr wire_tbb; - }; - - tbb::concurrent_vector hitstruct_vec; - tbb::concurrent_vector filthitstruct_vec; - - // if (fAllHitsInstanceName != "") filteredHitCol = &hcol; - - // ########################################## - // ### Reading in the Wire List object(s) ### - // ########################################## - art::Handle> wireVecHandle; - evt.getByLabel(fCalDataModuleLabel, wireVecHandle); - - //################################################# - //### Set the charge determination method ### - //### Default is to compute the normalized area ### - //################################################# - std::function chargeFunc = - [](double peakMean, double peakAmp, double peakWidth, double areaNorm, int low, int hi) { - return std::sqrt(2 * TMath::Pi()) * peakAmp * peakWidth / areaNorm; - }; - - //############################################## - //### Alternative is to integrate over pulse ### - //############################################## - if (fAreaMethod == 0) - chargeFunc = - [](double peakMean, double peakAmp, double peakWidth, double areaNorm, int low, int hi) { - double charge(0); - for (int sigPos = low; sigPos < hi; sigPos++) - charge += peakAmp * TMath::Gaus(sigPos, peakMean, peakWidth); - return charge; - }; - - - std::cout << " " << std::endl; - std::cout << "************************** In gauss hit finder ***************************" << std::endl; - - //############################## - //### Looping over the wires ### - //############################## - //for(size_t wireIter = 0; wireIter < wireVecHandle->size(); wireIter++) - //{ - tbb::parallel_for( - static_cast(0), - wireVecHandle->size(), - [&](size_t& wireIter) { - // #################################### - // ### Getting this particular wire ### - // #################################### - art::Ptr wire(wireVecHandle, wireIter); - - // --- Setting Channel Number and Signal type --- - - raw::ChannelID_t channel = wire->Channel(); - - // get the WireID for this hit - std::vector wids = wireReadout.ChannelToWire(channel); - // for now, just take the first option returned from ChannelToWire - geo::WireID wid = wids[0]; - // We need to know the plane to look up parameters - geo::PlaneID::PlaneID_t plane = wid.Plane; - - // ---------------------------------------------------------- - // -- Setting the appropriate signal widths and thresholds -- - // -- for the right plane. -- - // ---------------------------------------------------------- - - // ################################################# - // ### Set up to loop over ROI's for this wire ### - // ################################################# - const recob::ChannelROI::RegionsOfInterest_t& signalROI = wire->SignalROI(); - - // This will be a handy definition - using SparseVectorFloat_t = lar::sparse_vector; - - // for (const auto& range : signalROI.get_ranges()) { - tbb::parallel_for( - static_cast(0), - signalROI.n_ranges(), - [&](size_t& rangeIter) { - const auto& rangeShort = signalROI.range(rangeIter); - // ROI start time - raw::TDCtick_t roiFirstBinTick = rangeShort.begin_index(); - - // For testing we are just going to copy to a float sparse vector and go from there - std::vector floatADCvec(rangeShort.data().size()); - - std::transform(rangeShort.data().begin(),rangeShort.data().end(),floatADCvec.begin(),[](short adc){return static_cast(adc);}); - - SparseVectorFloat_t tempSparseVector; - - tempSparseVector.add_range(rangeShort.begin_index(),floatADCvec); - - const auto& range = tempSparseVector.get_ranges().front(); - - // ########################################################### - // ### Scan the waveform and find candidate peaks + merge ### - // ########################################################### - - reco_tool::ICandidateHitFinder::HitCandidateVec hitCandidateVec; - reco_tool::ICandidateHitFinder::MergeHitCandidateVec mergedCandidateHitVec; - - fHitFinderToolVec.at(plane)->findHitCandidates( - range, 0, channel, count, hitCandidateVec); - - fHitFinderToolVec.at(plane)->MergeHitCandidates( - range, hitCandidateVec, mergedCandidateHitVec); - - // ####################################################### - // ### Lets loop over the pulses we found on this wire ### - // ####################################################### - - for (auto& mergedCands : mergedCandidateHitVec) { - int startT = mergedCands.front().startTick; - int endT = mergedCands.back().stopTick; - - // ### Putting in a protection in case things went wrong ### - // ### In the end, this primarily catches the case where ### - // ### a fake pulse is at the start of the ROI ### - if (endT - startT < 5) continue; - - // ####################################################### - // ### Clearing the parameter vector for the new pulse ### - // ####################################################### - - // === Setting the number of Gaussians to try === - int nGausForFit = mergedCands.size(); - - // ################################################## - // ### Calling the function for fitting Gaussians ### - // ################################################## - double chi2PerNDF(0.); - int NDF(1); - /*stand alone - reco_tool::IPeakFitter::PeakParamsVec peakParamsVec(nGausForFit); - */ - reco_tool::IPeakFitter::PeakParamsVec peakParamsVec; - - // ####################################################### - // ### If # requested Gaussians is too large then punt ### - // ####################################################### - if (mergedCands.size() <= fMaxMultiHit) { - fPeakFitterTool->findPeakParameters( - range.data(), mergedCands, peakParamsVec, chi2PerNDF, NDF); - - // If the chi2 is infinite then there is a real problem so we bail - if (!(chi2PerNDF < std::numeric_limits::infinity())) { - chi2PerNDF = 2. * fChi2NDF; - NDF = 2; - } - - if (fFillHists) fFirstChi2->Fill(chi2PerNDF); - } - - // ####################################################### - // ### If too large then force alternate solution ### - // ### - Make n hits from pulse train where n will ### - // ### depend on the fhicl parameter fLongPulseWidth ### - // ### Also do this if chi^2 is too large ### - // ####################################################### - if (mergedCands.size() > fMaxMultiHit || nGausForFit * chi2PerNDF > fChi2NDF) { - int longPulseWidth = fLongPulseWidthVec.at(plane); - int nHitsThisPulse = (endT - startT) / longPulseWidth; - - if (nHitsThisPulse > fLongMaxHitsVec.at(plane)) { - nHitsThisPulse = fLongMaxHitsVec.at(plane); - longPulseWidth = (endT - startT) / nHitsThisPulse; - } - - if (nHitsThisPulse * longPulseWidth < endT - startT) nHitsThisPulse++; - - int firstTick = startT; - int lastTick = std::min(firstTick + longPulseWidth, endT); - - peakParamsVec.clear(); - nGausForFit = nHitsThisPulse; - NDF = 1.; - chi2PerNDF = chi2PerNDF > fChi2NDF ? chi2PerNDF : -1.; - - for (int hitIdx = 0; hitIdx < nHitsThisPulse; hitIdx++) { - // This hit parameters - double sumADC = - std::accumulate(range.begin() + firstTick, range.begin() + lastTick, 0.); - double peakSigma = (lastTick - firstTick) / 3.; // Set the width... - double peakAmp = 0.3989 * sumADC / peakSigma; // Use gaussian formulation - double peakMean = (firstTick + lastTick) / 2.; - - // Store hit params - reco_tool::IPeakFitter::PeakFitParams_t peakParams; - - peakParams.peakCenter = peakMean; - peakParams.peakCenterError = 0.1 * peakMean; - peakParams.peakSigma = peakSigma; - peakParams.peakSigmaError = 0.1 * peakSigma; - peakParams.peakAmplitude = peakAmp; - peakParams.peakAmplitudeError = 0.1 * peakAmp; - - peakParamsVec.push_back(peakParams); - - // set for next loop - firstTick = lastTick; - lastTick = std::min(lastTick + longPulseWidth, endT); - } - } - - // ####################################################### - // ### Loop through returned peaks and make recob hits ### - // ####################################################### - - int numHits(0); - - // Make a container for what will be the filtered collection - std::vector filteredHitVec; - - for (const auto& peakParams : peakParamsVec) { - // Extract values for this hit - float peakAmp = peakParams.peakAmplitude; - float peakMean = peakParams.peakCenter; - float peakWidth = peakParams.peakSigma; - - // Place one bit of protection here - if (std::isnan(peakAmp)) { - std::cout << "**** hit peak amplitude is a nan! Channel: " << channel - << ", start tick: " << startT << std::endl; - continue; - } - - // Extract errors - float peakAmpErr = peakParams.peakAmplitudeError; - float peakMeanErr = peakParams.peakCenterError; - float peakWidthErr = peakParams.peakSigmaError; - - // ### Charge ### - float charge = - chargeFunc(peakMean, peakAmp, peakWidth, fAreaNormsVec[plane], startT, endT); - ; - float chargeErr = - std::sqrt(TMath::Pi()) * (peakAmpErr * peakWidthErr + peakWidthErr * peakAmpErr); - - // ### limits for getting sums - std::vector::const_iterator sumStartItr = range.begin() + startT; - std::vector::const_iterator sumEndItr = range.begin() + endT; - - // ### Sum of ADC counts - double sumADC = std::accumulate(sumStartItr, sumEndItr, 0.); - - // ok, now create the hit - icarus::HitCreator hitcreator( - *wire, // wire reference - wid, // wire ID - startT + roiFirstBinTick, // start_tick TODO check - endT + roiFirstBinTick, // end_tick TODO check - peakWidth, // rms - peakMean + roiFirstBinTick, // peak_time - peakMeanErr, // sigma_peak_time - peakAmp, // peak_amplitude - peakAmpErr, // sigma_peak_amplitude - charge, // hit_integral - chargeErr, // hit_sigma_integral - sumADC, // summedADC FIXME - nGausForFit, // multiplicity - numHits, // local_index TODO check that the order is correct - chi2PerNDF, // goodness_of_fit - NDF // dof - ); - - if (filteredHitCol) filteredHitVec.push_back(hitcreator.copy()); - - const icarus::Hit hit(hitcreator.move()); - - // This loop will store ALL hits - hitstruct tmp{std::move(hit), wire}; - hitstruct_vec.push_back(std::move(tmp)); - - numHits++; - } // <---End loop over gaussians - - // Should we filter hits? - if (filteredHitCol && !filteredHitVec.empty()) { - // ####################################################################### - // Is all this sorting really necessary? Would it be faster to just loop - // through the hits and perform simple cuts on amplitude and width on a - // hit-by-hit basis, either here in the module (using fPulseHeightCuts and - // fPulseWidthCuts) or in HitFilterAlg? - // ####################################################################### - - // Sort in ascending peak height - std::sort(filteredHitVec.begin(), - filteredHitVec.end(), - [](const auto& left, const auto& right) { - return left.PeakAmplitude() > right.PeakAmplitude(); - }); - - // Reject if the first hit fails the PH/wid cuts - if (filteredHitVec.front().PeakAmplitude() < fPulseHeightCuts.at(plane) || - filteredHitVec.front().RMS() < fPulseWidthCuts.at(plane)) - filteredHitVec.clear(); - - // Now check other hits in the snippet - if (filteredHitVec.size() > 1) { - // The largest pulse height will now be at the front... - float largestPH = filteredHitVec.front().PeakAmplitude(); - - // Find where the pulse heights drop below threshold - float threshold(fPulseRatioCuts.at(plane)); - - std::vector::iterator smallHitItr = - std::find_if(filteredHitVec.begin(), - filteredHitVec.end(), - [largestPH, threshold](const auto& hit) { - return hit.PeakAmplitude() < 8. && - hit.PeakAmplitude() / largestPH < threshold; - }); - - // Shrink to fit - if (smallHitItr != filteredHitVec.end()) - filteredHitVec.resize(std::distance(filteredHitVec.begin(), smallHitItr)); - - // Resort in time order - std::sort(filteredHitVec.begin(), - filteredHitVec.end(), - [](const auto& left, const auto& right) { - return left.PeakTime() < right.PeakTime(); - }); - } - - // Copy the hits we want to keep to the filtered hit collection -// for (const auto& filteredHit : filteredHitVec) -// if (!fHitFilterAlg || fHitFilterAlg->IsGoodHit(filteredHit)) { -// hitstruct tmp{std::move(filteredHit), wire}; -// filthitstruct_vec.push_back(std::move(tmp)); -// } - - if (fFillHists) fChi2->Fill(chi2PerNDF); - } - } //<---End loop over merged candidate hits - } //<---End looping over ROI's - ); //end tbb parallel for - } //<---End looping over all the wires - ); //end tbb parallel for - - for (size_t i = 0; i < hitstruct_vec.size(); i++) { - allHitCol.emplace_back(hitstruct_vec[i].hit_tbb, hitstruct_vec[i].wire_tbb); - } - - for (size_t j = 0; j < filthitstruct_vec.size(); j++) { - filteredHitCol->emplace_back(filthitstruct_vec[j].hit_tbb, filthitstruct_vec[j].wire_tbb); - } - - //================================================================================================== - // End of the event -- move the hit collection and the associations into the event - - if (filteredHitCol) { - - // If we filtered hits but no instance name was - // specified for the "all hits" collection, then - // only save the filtered hits to the event - if (fAllHitsInstanceName == "") { - filteredHitCol->put_into(evt); - - // otherwise, save both - } - else { - filteredHitCol->put_into(evt); - allHitCol.put_into(evt); - } - } - else { - allHitCol.put_into(evt); - } - - // Keep track of events processed - //fEventCount++; - - } // End of produce() - - DEFINE_ART_MODULE(GaussHitFinderICARUS) - -} // end of hit namespace diff --git a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl index 722f6355c..5df56b46b 100644 --- a/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl +++ b/icaruscode/TPC/SignalProcessing/HitFinder/hitfindermodules_icarus.fcl @@ -2,6 +2,7 @@ #include "hitalgorithms.fcl" #include "HitFinderTools_ICARUS.fcl" #include "hitfindermodules.fcl" +#include "hitfindermodules_sbn.fcl" BEGIN_PROLOG @@ -100,31 +101,19 @@ gaus_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane2: gaus_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane2.Plane: 2 gaus_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 9. - -# Define icarus version of test version gausshit finder -gauss_hitfinder_icarus: @local::gaus_hitfinder - -gauss_hitfinder_icarus.module_type: GaussHitFinderICARUS -gauss_hitfinder_icarus.CalDataModuleLabel: "decon1droi" -gauss_hitfinder_icarus.AreaNorms: [ 1.0, 1.0, 1.0 ] -gauss_hitfinder_icarus.MaxMultiHit: 5 -gauss_hitfinder_icarus.TryNplus1Fits: false -gauss_hitfinder_icarus.Chi2NDF: 500. -gauss_hitfinder_icarus.PeakFitter.MinWidth: 1 -gauss_hitfinder_icarus.PeakFitter.FloatBaseline: false -gauss_hitfinder_icarus.PeakFitter.tool_type: "PeakFitterMrqdt" -gauss_hitfinder_icarus.LongMaxHits: [25, 25, 25] -gauss_hitfinder_icarus.LongPulseWidth: [10, 10, 10] -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane0: @local::candhitfinder_standard -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane0.Plane: 0 -gauss_hitfinder_icarus.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 9. -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane1: @local::candhitfinder_standard -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane1.Plane: 1 -gauss_hitfinder_icarus.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 9.5 -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane2: @local::candhitfinder_standard -gauss_hitfinder_icarus.HitFinderToolVec.CandidateHitsPlane2.Plane: 2 -gauss_hitfinder_icarus.gaushit2dTPCWW.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 9. - +# Now set parameters for the GaussHitFinderSBN +# Note these are "default" for ICARUS and will move to a fcl file in icaruscode +gausshit_sbn.PeakFitter.MinWidth: 1 +gausshit_sbn.PeakFitter.FloatBaseline: false +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane0: @local::candhitfinder_standard +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane0.Plane: 0 +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane0.RoiThreshold: 9. +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane1: @local::candhitfinder_standard +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane1.Plane: 1 +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane1.RoiThreshold: 9.5 +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2: @local::candhitfinder_standard +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.Plane: 2 +gausshit_sbn.HitFinderToolVec.CandidateHitsPlane2.RoiThreshold: 9. icarus_hitconverter: { diff --git a/icaruscode/TPC/SignalProcessing/RecoWire/CMakeLists.txt b/icaruscode/TPC/SignalProcessing/RecoWire/CMakeLists.txt index f97590cf6..3454125fb 100644 --- a/icaruscode/TPC/SignalProcessing/RecoWire/CMakeLists.txt +++ b/icaruscode/TPC/SignalProcessing/RecoWire/CMakeLists.txt @@ -50,7 +50,6 @@ set( MODULE_LIBRARIES FFTW3::FFTW3 ) cet_build_plugin(Decon1DROI art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(ROIConverter art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(ROIFinder art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(SimChannelROI art::module LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(RecoWireICARUSRaw art::module LIBRARIES ${MODULE_LIBRARIES}) diff --git a/icaruscode/TPC/SignalProcessing/RecoWire/ROIConverter_module.cc b/icaruscode/TPC/SignalProcessing/RecoWire/ROIConverter_module.cc deleted file mode 100644 index c53c17e8a..000000000 --- a/icaruscode/TPC/SignalProcessing/RecoWire/ROIConverter_module.cc +++ /dev/null @@ -1,165 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// -// ROIConvert class - An ROI finding module for complete deconvolved waveforms -// -// usher@slac.stanford.edu -// -//////////////////////////////////////////////////////////////////////// - -// C/C++ standard libraries -#include -#include -#include // std::pair<> -#include // std::unique_ptr<> - -// framework libraries -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" -#include "art/Framework/Core/ModuleMacros.h" -#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 "canvas/Utilities/Exception.h" -#include "canvas/Utilities/InputTag.h" - -// LArSoft libraries -#include "larcoreobj/SimpleTypesAndConstants/RawTypes.h" // raw::ChannelID_t -#include "larcore/Geometry/WireReadout.h" -#include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom() -#include "larcorealg/CoreUtils/zip.h" -#include "lardataobj/RecoBase/Wire.h" -#include "lardata/ArtDataHelper/WireCreator.h" - -#include "sbnobj/ICARUS/TPC/ChannelROI.h" - -///creation of calibrated signals on wires -namespace caldata { - -class ROIConvert : public art::EDProducer -{ -public: -// create calibrated signals on wires. this class runs -// an fft to remove the electronics shaping. - explicit ROIConvert(fhicl::ParameterSet const& pset); - void produce(art::Event& evt); - void beginJob(); - void endJob(); - void reconfigure(fhicl::ParameterSet const& p); -private: - - std::vector fWireModuleLabelVec; ///< vector of modules that made digits - std::vector fOutInstanceLabelVec; ///< The output instance labels to apply - bool fDiagnosticOutput; ///< secret diagnostics flag - size_t fEventCount; ///< count of event processed - - const geo::WireReadoutGeom* fChannelMapAlg = &art::ServiceHandle()->Get(); - -}; // class ROIConvert - -DEFINE_ART_MODULE(ROIConvert) - -//------------------------------------------------- -ROIConvert::ROIConvert(fhicl::ParameterSet const& pset) : EDProducer{pset} -{ - this->reconfigure(pset); - - for(const auto& wireLabel : fOutInstanceLabelVec) - { - produces>(wireLabel); - } -} - -////////////////////////////////////////////////////// -void ROIConvert::reconfigure(fhicl::ParameterSet const& pset) -{ - // Recover the parameters - fWireModuleLabelVec = pset.get>("WireModuleLabelVec", std::vector()={"decon1droi"}); - fOutInstanceLabelVec = pset.get> ("OutInstanceLabelVec", {"PHYSCRATEDATA"}); - fDiagnosticOutput = pset.get< bool >("DaignosticOutput", false); - - if (fWireModuleLabelVec.size() != fWireModuleLabelVec.size()) - { - throw art::Exception(art::errors::Configuration) << " Configured " << fOutInstanceLabelVec.size() - << " instance names (`OutInstanceLabelVec`) for " << fWireModuleLabelVec.size() - << " input products (`WireModuleLabelVec`)\n"; - } - - return; -} - -//------------------------------------------------- -void ROIConvert::beginJob() -{ - fEventCount = 0; -} // beginJob - -////////////////////////////////////////////////////// -void ROIConvert::endJob() -{ -} - -////////////////////////////////////////////////////// -void ROIConvert::produce(art::Event& evt) -{ - // We need to loop through the list of Wire data we have been given - // This construct from Gianluca Petrillo who invented it and should be given all credit for it! - for(auto const& [channelLabel, instanceName] : util::zip(fWireModuleLabelVec, fOutInstanceLabelVec)) - { - // make a collection of Wires - std::unique_ptr> wireCol = std::make_unique>(); - - mf::LogInfo("ROIConvert") << "ROIConvert, looking for ChannelROI data at " << channelLabel.encode(); - - // Read in the collection of full length deconvolved waveforms - const std::vector& channelVec = evt.getProduct>(channelLabel); - - mf::LogInfo("ROIConvert") << "--> Recovered ChannelROI data, size: " << channelVec.size(); - - if (!channelVec.empty()) - { - // Reserve the room for the output - wireCol->reserve(channelVec.size()); - - // Loop through the input ChannelROI collection - for(const auto& channelROI : channelVec) - { - // Recover the channel and the view - raw::ChannelID_t channel = channelROI.Channel(); - geo::View_t view = fChannelMapAlg->View(channel); - - // Create an ROI vector for output - recob::Wire::RegionsOfInterest_t ROIVec; - - // Loop through the ROIs for this channel - const recob::ChannelROI::RegionsOfInterest_t& channelROIs = channelROI.SignalROI(); - - for(const auto& range : channelROIs.get_ranges()) - { - size_t startTick = range.begin_index(); - - std::vector dataVec(range.data().size()); - - for(size_t binIdx = 0; binIdx < range.data().size(); binIdx++) dataVec[binIdx] = range.data()[binIdx]; - - ROIVec.add_range(startTick, std::move(dataVec)); - } - - wireCol->push_back(recob::WireCreator(std::move(ROIVec),channel,view).move()); - } - - mf::LogInfo("ROIConvert") << "--> Outputting Wire data, size: " << wireCol->size() << " with instance name: " << instanceName; - - // Time to stroe everything - if(wireCol->empty()) mf::LogWarning("ROIConvert") << "No wires made for this event."; - } - - evt.put(std::move(wireCol), instanceName); - } - - fEventCount++; - - return; -} // produce - -} // end namespace caldata diff --git a/icaruscode/Timing/PMTTimingCorrectionsProvider.cxx b/icaruscode/Timing/PMTTimingCorrectionsProvider.cxx index cdf968863..c2be07204 100644 --- a/icaruscode/Timing/PMTTimingCorrectionsProvider.cxx +++ b/icaruscode/Timing/PMTTimingCorrectionsProvider.cxx @@ -223,11 +223,11 @@ void icarusDB::PMTTimingCorrectionsProvider::readTimeCorrectionDatabase(const ar mf::LogVerbatim(fLogCategory) << "channel, trigger cable delay, reset cable delay, laser corrections, muons corrections" << std::endl; for( auto const & [key, value] : fDatabaseTimingCorrections ){ mf::LogVerbatim(fLogCategory) - << key << " " - << value.triggerCableDelay << "," + << key << ": " + << value.triggerCableDelay << ", " << value.resetCableDelay << ", " << value.laserCableDelay << ", " - << value.cosmicsCorrections << "," + << value.cosmicsCorrections << std::endl; } } 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 9719bdae5..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 "intime_g4_icarus_sce.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 cc9f45363..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_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 cc9f45363..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_g4_icarus.fcl" +#include "larg4_icarus.fcl"