diff --git a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl index 005c164a6..11c7f0aba 100644 --- a/fcl/caf/cafmaker_add_detsim2d_icarus.fcl +++ b/fcl/caf/cafmaker_add_detsim2d_icarus.fcl @@ -4,12 +4,6 @@ physics.producers.cafmaker.SimChannelLabel: "merge" # 2D, YZ sim # SimChannel's get re-made by 2D drift simulation -- use these to backtrack services.BackTrackerService.BackTracker.SimChannelModuleLabel: "merge" -# MCReco also needs correct SimChannels -# need to use new config names to make MCParticle/SimChannel labels different -physics.producers.mcreco.G4ModName: @erase -physics.producers.mcreco.MCParticleLabel: "largeant" -physics.producers.mcreco.SimChannelLabel: "merge" - # Mini production, pre signal shape tuning # this_cal_constants: [1.343e-2, 1.338e-2, 0.01227] # Post signal shape tuning, post gain fixing diff --git a/fcl/caf/cafmaker_defs.fcl b/fcl/caf/cafmaker_defs.fcl index 50de910f3..feadf4f0d 100644 --- a/fcl/caf/cafmaker_defs.fcl +++ b/fcl/caf/cafmaker_defs.fcl @@ -14,7 +14,6 @@ #include "eventweight_genie_sbn.fcl" #include "eventweight_genie_systtools.fcl" #include "eventweight_flux_sbn.fcl" -#include "mcreco.fcl" #include "mcsproducer.fcl" #include "rangeproducer.fcl" #include "flashmatch_simple_icarus.fcl" @@ -87,8 +86,6 @@ recoana_datacalo_producers.vertexStubCryoW.NormTools: @local::icarus_calonormtoo # Producers for making analysis level products recoana_caf_preprocess_producers: { - mcreco: @local::standard_mcreco - pandoraTrackMCSCryoE: @local::mcs_sbn pandoraTrackMCSCryoW: @local::mcs_sbn @@ -228,7 +225,7 @@ caf_preprocess_sce_producers: { } # Sequences -caf_preprocess_sequence: [ mcreco, +caf_preprocess_sequence: [ # Calorimetry pandoraCaloGausCryoE, pandoraCaloGausCryoW, pandoraPidGausCryoE, pandoraPidGausCryoW, @@ -258,7 +255,7 @@ caf_preprocess_data_sequence: [ caf_preprocess_evtw_sequence: [@sequence::caf_preprocess_sequence, rns, genieweight, fluxweight] -caf_preprocess_sce_sequence: [ mcreco, +caf_preprocess_sce_sequence: [ # Run the SCE correction pandoraGausSCECryoE, pandoraGausSCECryoW, # Then remake tracks diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl new file mode 100644 index 000000000..fe75e0903 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl @@ -0,0 +1,4 @@ +#include "cafmakerjob_icarus_detsim2d_overlay.fcl" + +physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl b/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl new file mode 100644 index 000000000..1c8b09582 --- /dev/null +++ b/fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl @@ -0,0 +1,4 @@ +#include "cafmakerjob_icarus_detsim2d.fcl" + +physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl index bbc6c92c6..828e8d8a3 100644 --- a/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl +++ b/fcl/configurations/calibration_database_TPC_TagSets_icarus.fcl @@ -19,7 +19,7 @@ TPC_CalibrationTags_Oct2023: { ## - Files decoded with release >=v09_66_02 should use v3r2 TPC_CalibrationTags_Feb2024: { - tpc_channelstatus_data: "v3r4" + tpc_channelstatus_data: "v3r2" tpc_elifetime_data: "v2r1" tpc_dqdxcalibration_data: "v2r1" tpc_yz_correction_data: "v2r1" @@ -27,9 +27,10 @@ TPC_CalibrationTags_Feb2024: { } ## TPC_CalibrationTags_Feb2024 but updating tpc_yz_correction_data to tpc_yz_correction_allplanes_data +## Update to mask out additional bad noisy channels TPC_CalibrationTags_Jan2025: { - tpc_channelstatus_data: "v3r2" + tpc_channelstatus_data: "v3r4" tpc_elifetime_data: "v2r1" tpc_dqdxcalibration_data: "v2r1" tpc_yz_correction_allplanes_data: "v1r0" diff --git a/fcl/detsim/detsim_2d_icarus_refactored.fcl b/fcl/detsim/detsim_2d_icarus_refactored.fcl index 993ce8586..799170d15 100644 --- a/fcl/detsim/detsim_2d_icarus_refactored.fcl +++ b/fcl/detsim/detsim_2d_icarus_refactored.fcl @@ -19,7 +19,7 @@ physics: { crtdaq: @local::icarus_crtsim opdaq: @local::icarus_simpmt - daq: @local::icarus_simwire_wirecell_filtersed + daq: @local::icarus_simwire_wirecell_shifted rns: { module_type: "RandomNumberSaver" } } # producers diff --git a/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl b/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl new file mode 100644 index 000000000..bf9754683 --- /dev/null +++ b/fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl @@ -0,0 +1,3 @@ +#include "detsim_2d_icarus_refactored.fcl" + +physics.producers.daq: @local::icarus_simwire_wirecell_shifted_overlay diff --git a/fcl/reco/CMakeLists.txt b/fcl/reco/CMakeLists.txt index de9682fc7..565e07219 100644 --- a/fcl/reco/CMakeLists.txt +++ b/fcl/reco/CMakeLists.txt @@ -13,6 +13,7 @@ add_subdirectory(ForCITests) #add_subdirectory(archive) add_subdirectory(Definitions) add_subdirectory(larcv) +add_subdirectory(wires) add_subdirectory(ntuple) add_subdirectory(Stage0) add_subdirectory(Stage1) diff --git a/fcl/reco/Stage0/data/CMakeLists.txt b/fcl/reco/Stage0/data/CMakeLists.txt index 2bda0f610..9b8e98380 100644 --- a/fcl/reco/Stage0/data/CMakeLists.txt +++ b/fcl/reco/Stage0/data/CMakeLists.txt @@ -1,3 +1,5 @@ +add_subdirectory(partial) + cet_enable_asserts() install_fhicl() diff --git a/fcl/reco/Stage0/data/partial/CMakeLists.txt b/fcl/reco/Stage0/data/partial/CMakeLists.txt new file mode 100644 index 000000000..13355789a --- /dev/null +++ b/fcl/reco/Stage0/data/partial/CMakeLists.txt @@ -0,0 +1 @@ +install_fhicl() diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl new file mode 100644 index 000000000..d22be3e79 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl @@ -0,0 +1,145 @@ +# +# File: decodePMT_icarus.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: May 12, 2021 +# +# +# PMT waveform decoding is performed, extensive debugging messages are +# included in the `debug.log` log file, and ROOT trees are produced for studies. +# This configuration, as is, is not meant for production. +# +# +# Input +# ------ +# +# * artDAQ fragments from all 24 PMT readout boards, named +# `daq:ContainerCAENV1730` +# * trigger fragment `daq:ICARUSTriggerUDP` (will be decoded as well) +# * DAQ configuration as FHiCL in the art/ROOT input file +# +# This configuration requires a data fragment for each PMT readout board +# which is mentioned in `physics.producers.daqPMT.DecoderTool.BoardSetup`, +# which by default is all 24. If the input run misses some PMT readout boards, +# use `decodePMT_icarus_incomplete.fcl` instead. +# +# +# Output +# ------- +# +# Only new data products are written in the art/ROOT output file, including: +# +# * `daqPMT` (std::vector): decoded waveforms, +# with our best reconstruction for their time stamps in LArSoft reference +# +# +# The `Trees-*.root` file (from `TFileService`) includes ROOT tree +# `PMTfragments`. +# +# +# +# Service configuration +# ---------------------- +# +# * `DetectorClocksService` is essential to assign a correct waveform timestamp +# * `Geometry` service bundle is required by `DetectorClocksService` +# * `IICARUSChannelMap` to relate PMT fragment IDs to channels +# * `TFileService` used to write trees (not needed if all trees are disabled) +# +# + + +# ------------------------------------------------------------------------------ +#include "services_common_icarus.fcl" +#include "channelmapping_icarus.fcl" +#include "timing_icarus.fcl" + +#include "rootoutput_icarus.fcl" +#include "decoderdefs_icarus.fcl" + +# ------------------------------------------------------------------------------ +process_name: DecodePMT + + +# ------------------------------------------------------------------------------ +services: { + + @table::icarus_art_services + message: @local::icarus_message_services_interactive_debug + + @table::icarus_geometry_services + DetectorClocksService: @local::icarus_detectorclocks + IICARUSChannelMap: @local::icarus_channelmappinggservice + IPMTTimingCorrectionService: @local::icarus_pmttimingservice + + TFileService: { fileName: "Trees-%ifb_%tc-%p.root" } +} + + +# ------------------------------------------------------------------------------ +physics: { + + producers: { + + triggerconfig: @local::extractTriggerConfig + pmtconfig: @local::extractPMTconfig + + daqTrigger: @local::decodeTriggerAutodetect + + daqPMT: @local::decodePMT + + } + + decoding: [ triggerconfig, pmtconfig, daqTrigger, daqPMT ] + streams: [ rootoutput ] +} + + +# ------------------------------------------------------------------------------ +outputs: { + rootoutput: { + @table::icarus_rootoutput + dataTier: "decoded" + fileProperties: { maxInputFiles: 1 } + checkFileName: false + compressionLevel: 501 + + outputCommands: [ "drop *_*_*_*", "keep *_*_*_DecodePMT" ] + } # rootoutput +} # outputs + + +# ------------------------------------------------------------------------------ + +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.TrigConfigLabel: triggerconfig +physics.producers.daqPMT.PMTconfigTag: pmtconfig # required +physics.producers.daqPMT.TriggerTag: daqTrigger # required + +# services.Geometry.Name: icarus_splitwires # for runs < 548x + +# +# customization of PMT decoding +# + +physics.producers.daqPMT.SurviveExceptions: false +physics.producers.daqPMT.DiagnosticOutput: true +physics.producers.daqPMT.PacketDump: false +physics.producers.daqPMT.RequireKnownBoards: true +physics.producers.daqPMT.RequireBoardConfig: true +physics.producers.daqPMT.DataTrees: [ "PMTfragments" ] + +# +# customization of trigger decoding +# + +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.Debug: false +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.Debug: false +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.Debug: false + + +# ------------------------------------------------------------------------------ diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl new file mode 100644 index 000000000..038a09480 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl @@ -0,0 +1,15 @@ +# +# File: decodePMT_icarus_incomplete.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: May 12, 2021 +# +# This is a version of `decodePMT_icarus.fcl` which will ignore missing PMT +# readout fragments. +# +# See the documentation on `decodePMT_icarus.fcl` for everything else. +# + +#include "decodePMT_icarus.fcl" + +physics.producers.daqPMT.RequireBoardConfig: false diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl new file mode 100644 index 000000000..fa70378a8 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl @@ -0,0 +1,69 @@ +# +# File: decodePMT_icarus_standalone.fcl +# Purpose: PMT readout fragment decoding for studies in ICARUS. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: June 10, 2021 +# +# This configuration expects only PMT fragments, and not even all of them: +# as a consequence many timestamp corrections will be skipped. +# PMT waveform decoding is performed, extensive debugging messages are +# included in the `debug.log` log file, and ROOT trees are produced for studies. +# This configuration, as is, is not meant for production. +# +# +# Input +# ------ +# +# * artDAQ fragments from PMT readout boards, named +# `daq:ContainerCAENV1730` or `daq:CAENV1730` (not both!) +# +# +# Output +# ------- +# +# Only new data products are written in the art/ROOT output file, including: +# +# * `daqPMT` (std::vector): decoded waveforms, +# with our best reconstruction for their time stamps in LArSoft reference +# +# +# The `Trees-*.root` file (from `TFileService`) includes ROOT tree +# `PMTfragments`. +# +# +# +# Service configuration +# ---------------------- +# +# * `DetectorClocksService` is essential to assign a correct waveform timestamp +# * `Geometry` service bundle is required by `DetectorClocksService` +# * `IICARUSChannelMap` to relate PMT fragment IDs to channels +# * `TFileService` used to write trees (not needed if all trees are disabled) +# +# + + +# ------------------------------------------------------------------------------ +#include "decodePMT_icarus.fcl" + + +# ------------------------------------------------------------------------------ +physics.decoding: [ daqPMT ] + + +# ------------------------------------------------------------------------------ + +physics.producers.daqPMT.PMTconfigTag: @erase # required +physics.producers.daqPMT.TriggerTag: @erase # required + +# +# customization of PMT decoding +# + +physics.producers.daqPMT.SurviveExceptions: false +physics.producers.daqPMT.DiagnosticOutput: true +physics.producers.daqPMT.PacketDump: true +physics.producers.daqPMT.RequireKnownBoards: false +physics.producers.daqPMT.RequireBoardConfig: false + +# ------------------------------------------------------------------------------ diff --git a/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl b/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl new file mode 100644 index 000000000..5e34eefad --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodePMT_icarus_treeonly.fcl @@ -0,0 +1,68 @@ +# +# File: decodePMT_icarus_treeonly.fcl +# Purpose: Runs PMT decoding to build a PMT diagnostic tree. +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: September 25, 2022 +# +# It does not save any waveform. +# +# Input +# ------ +# +# * artDAQ fragments from all 24 PMT readout boards, named +# `daq:ContainerCAENV1730` (or any standard ICARUS name) +# * trigger fragment (autodetected among ICARUS standard names) +# * DAQ configuration as FHiCL in the art/ROOT input file +# +# This configuration requires a data fragment for each PMT readout board +# which is mentioned in `physics.producers.daqPMT.DecoderTool.BoardSetup`, +# which by default is all 24. +# +# +# Output +# ------- +# +# In the plain ROOT output file (names `Tree-....root`) a diagnostic tree +# is stored with one entry per PMT data fragment (see `decodePMT_icarus.fcl` +# and the decoder module `DaqDecodeICARUSPMT`), as `daqPMT/PMTfragments`. +# +# All standard trigger and PMT decoding data products are produced with the +# standard names (`daqTrigger` and `daqPMT` respectively). +# The noticeable exception is PMT raw waveforms not the corrections: +# neither are saved. +# +# The log file also dump the trigger information. +# +# + + +# ------------------------------------------------------------------------------ +#include "decodePMT_icarus.fcl" + +# add a trigger dumper to the output on console +physics.analyzers.dumptrigger: { + module_type: DumpTrigger + TriggerTag: "daqTrigger" +} + +physics.dumpers: [ dumptrigger ] +physics.end_paths: [ streams, dumpers ] + +outputs.rootoutput.fileProperties: @erase # don't go one output file per input file +outputs.rootoutput.outputCommands: [ + @sequence::outputs.rootoutput.outputCommands + , "drop raw::OpDetWaveforms_daqPMT_*_DecodePMT" +] + +# disable abundant output on console and the optical waveforms +physics.producers.daqPMT.SaveCorrectionsFrom: [] +physics.producers.daqPMT.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: false +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: false + +services.message.destinations.LogDebugFile: @erase +services.message.destinations.LogSeeds: @erase +services.TimeTracker: {} # no DB file +services.MemoryTracker: @erase + diff --git a/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl b/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl new file mode 100644 index 000000000..d041c0023 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/decodeTrigger_icarus.fcl @@ -0,0 +1,56 @@ +#include "services_common_icarus.fcl" +#include "channelmapping_icarus.fcl" +#include "rootoutput_icarus.fcl" +#include "decoderdefs_icarus.fcl" + +process_name: DecodeTrg + +services: { + + @table::icarus_art_services + message: @local::icarus_message_services_interactive_debug + + @table::icarus_geometry_services + DetectorClocksService: @local::icarus_detectorclocks + IICARUSChannelMap: @local::icarus_channelmappinggservice # from channelmapping_icarus.fcl +} + + +physics: { + + producers: { + +// pmtconfig: @local::extractPMTconfig + triggerconfig: @local::extractTriggerConfig + + daqTrigger: @local::decodeTriggerAutodetect + +// daqPMT: @local::decodePMT + + } + +// decoding: [ PMTconfig, triggerconfig, daqTrigger, daqPMT ] + decoding: [ triggerconfig, daqTrigger ] + streams: [ rootoutput ] +} + +outputs: { + rootoutput: { + @table::icarus_rootoutput + dataTier: "decoded" + fileProperties: { maxInputFiles: 1 } + checkFileName: false + compressionLevel: 501 + + outputCommands: [ "drop *_*_*_*", "keep *_*_*_DecodeTrg" ] + } # rootoutput +} # outputs + + +physics.producers.daqTrigger.DecoderTool.TrigConfigLabel: triggerconfig +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[0].ToolConfig.Debug: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[1].ToolConfig.Debug: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.DiagnosticOutput: true +physics.producers.daqTrigger.DecoderTool.Decoders[2].ToolConfig.Debug: true diff --git a/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl b/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl new file mode 100644 index 000000000..a7abf2d87 --- /dev/null +++ b/fcl/reco/Stage0/data/partial/stage0_run2_icarus_opdetonly.fcl @@ -0,0 +1,19 @@ +# +# File: stage0_run2_icarus_opdetonly.fcl +# Purpose: Runs the optical detector and trigger reconstruction parts of Stage0 +# Author: Gianluca Petrillo (petrillo@slac.stanford.edu) +# Date: August 29, 2023 +# +# Written for icaruscode v09_72_00_05p1. +# + +#include "stage0_run2_icarus.fcl" + +source.maxEvents: @erase + +physics.path: [ @sequence::icarus_stage0_PMT ] + +physics.end_paths: [ streamROOT ] + +# be unstoppable +physics.producers.daqPMT.SurviveExceptions: true diff --git a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl index 3456eee69..cc45acfaa 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_icarus_mc.fcl @@ -16,7 +16,6 @@ physics.producers: { @table::icarus_stage0_producers physics.path: [ @sequence::icarus_stage0_mc_PMT, MCDecodeTPCROI, @sequence::icarus_stage0_multiTPC, - simChannelROI, @sequence::icarus_stage0_mc_crthit, @sequence::icarus_stage0_mc_crtreco ] @@ -64,3 +63,7 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" + +# avoid huge log files +services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } +services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } diff --git a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl index ed15d7f0d..93e2ef003 100644 --- a/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl +++ b/fcl/reco/Stage0/mc/stage0_run2_wc_icarus_mc.fcl @@ -55,3 +55,7 @@ physics.producers.purityana1.RawModuleLabel: ["MCDecodeTPCROI:PHYSCRATEDATATPC # restore legacy G4 labels physics.producers.mcophit.SimPhotonsProducer: "shifted" + +# avoid huge log files +services.message.destinations.LogErrorFile.categories.SimDriftElectrons: { limit: 0 } +services.message.destinations.LogStandardOut.categories.SimDriftElectrons: { limit: 0 } diff --git a/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl new file mode 100644 index 000000000..788f343ed --- /dev/null +++ b/fcl/reco/Stage1/mc/stage1_run2_icarus_MC_simpledet.fcl @@ -0,0 +1,6 @@ +#include "stage1_run2_icarus_MC.fcl" + +physics.producers.mcreco.SimChannelLabel: "shifted" +physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl new file mode 100644 index 000000000..4a8aafe51 --- /dev/null +++ b/fcl/reco/Stage1/overlay/stage1_run2_icarus_overlay_simpledet.fcl @@ -0,0 +1,6 @@ +#include "stage1_run2_icarus_overlay.fcl" + +physics.producers.mcreco.SimChannelLabel: "sedlite" +physics.analyzers.caloskimE.SimChannelproducer: "daq:simpleSC" +physics.analyzers.caloskimW.SimChannelproducer: "daq:simpleSC" +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC" diff --git a/fcl/reco/wires/CMakeLists.txt b/fcl/reco/wires/CMakeLists.txt new file mode 100644 index 000000000..2bda0f610 --- /dev/null +++ b/fcl/reco/wires/CMakeLists.txt @@ -0,0 +1,3 @@ +cet_enable_asserts() + +install_fhicl() diff --git a/fcl/reco/wires/restorewires_icarus.fcl b/fcl/reco/wires/restorewires_icarus.fcl new file mode 100644 index 000000000..723c92e43 --- /dev/null +++ b/fcl/reco/wires/restorewires_icarus.fcl @@ -0,0 +1,60 @@ +# Configuration for running the Calibration NTupler +# on a stage-1 reco file +# +#include "services_common_icarus.fcl" +#include "wirechannelroiconverters_sbn.fcl" + +process_name: ntuple + +services: +{ + @table::icarus_wirecalibration_services +} + +#source is a root file +source: +{ + module_type: RootInput + maxEvents: 10 # Number of events to create + saveMemoryObjectThreshold: 0 +} + +# only do analysis +physics: +{ + + producers: { + channel2wire: @local::channelroitowire + } + + filters: {} + + analyzers: + { + } + + out: [rootOutput] + reco: [channel2wire] + trigger_paths: [reco] + end_paths: [out] +} + +physics.producers.channel2wire.WireModuleLabelVec: ["wire2channelroi2d:PHYSCRATEDATATPCEE", "wire2channelroi2d:PHYSCRATEDATATPCEW", "wire2channelroi2d:PHYSCRATEDATATPCWE", "wire2channelroi2d:PHYSCRATEDATATPCWW"] +physics.producers.channel2wire.OutInstanceLabelVec: ["PHYSCRATEDATATPCWW","PHYSCRATEDATATPCWE","PHYSCRATEDATATPCEW","PHYSCRATEDATATPCEE"] + +physics.analyzers.caloskimE.SelectEvents: [ ] +physics.analyzers.caloskimW.SelectEvents: [ ] +physics.analyzers.simpleLightAna.SelectEvents: [ ] +physics.analyzers.supera.SelectEvents: [ ] + +outputs: +{ + rootOutput: + { + module_type: RootOutput + dataTier: "reconstructed" + compressionLevel: 1 + saveMemoryObjectThreshold: 0 + fileName: "%ifb_%tc-%p.root" + } +} diff --git a/fcl/standard/CMakeLists.txt b/fcl/standard/CMakeLists.txt index 9714229ee..178294463 100644 --- a/fcl/standard/CMakeLists.txt +++ b/fcl/standard/CMakeLists.txt @@ -1,8 +1,5 @@ -# Install fcl files +cet_enable_asserts() -install_fhicl() - -# Also put a copy in the source tree. - -FILE(GLOB fcl_files *.fcl) -install_source( EXTRAS ${fcl_files} ) +add_subdirectory(mc) +add_subdirectory(data) +add_subdirectory(overlay) diff --git a/fcl/standard/data/CMakeLists.txt b/fcl/standard/data/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/data/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/standard_data_caf_icarus.fcl b/fcl/standard/data/standard_data_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_caf_icarus.fcl rename to fcl/standard/data/standard_data_caf_icarus.fcl diff --git a/fcl/standard/standard_data_larcv_icarus.fcl b/fcl/standard/data/standard_data_larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_larcv_icarus.fcl rename to fcl/standard/data/standard_data_larcv_icarus.fcl diff --git a/fcl/standard/standard_data_stage0_icarus.fcl b/fcl/standard/data/standard_data_stage0_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage0_icarus.fcl rename to fcl/standard/data/standard_data_stage0_icarus.fcl diff --git a/fcl/standard/standard_data_stage1_icarus.fcl b/fcl/standard/data/standard_data_stage1_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage1_icarus.fcl rename to fcl/standard/data/standard_data_stage1_icarus.fcl diff --git a/fcl/standard/standard_data_stage1larcv_icarus.fcl b/fcl/standard/data/standard_data_stage1larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_data_stage1larcv_icarus.fcl rename to fcl/standard/data/standard_data_stage1larcv_icarus.fcl diff --git a/fcl/standard/mc/CMakeLists.txt b/fcl/standard/mc/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/mc/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/mc/standard_mc_all_detsim_icarus.fcl b/fcl/standard/mc/standard_mc_all_detsim_icarus.fcl new file mode 100644 index 000000000..4b81669ba --- /dev/null +++ b/fcl/standard/mc/standard_mc_all_detsim_icarus.fcl @@ -0,0 +1 @@ +#include "detsim_2d_icarus_refactored_yzsim.fcl" diff --git a/fcl/standard/standard_mc_all_larcv_icarus.fcl b/fcl/standard/mc/standard_mc_all_larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_all_larcv_icarus.fcl rename to fcl/standard/mc/standard_mc_all_larcv_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl b/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl new file mode 100644 index 000000000..c90fdc3b2 --- /dev/null +++ b/fcl/standard/mc/standard_mc_all_stage0_icarus.fcl @@ -0,0 +1 @@ +#include "stage0_run2_wcdnn_icarus_mc.fcl" diff --git a/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl b/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl new file mode 100644 index 000000000..7f5fe82b0 --- /dev/null +++ b/fcl/standard/mc/standard_mc_all_stage1_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl b/fcl/standard/mc/standard_mc_beamcosmics_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_beamcosmics_caf_icarus.fcl rename to fcl/standard/mc/standard_mc_beamcosmics_caf_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl b/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl new file mode 100644 index 000000000..a42168087 --- /dev/null +++ b/fcl/standard/mc/standard_mc_beamcosmics_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_cosmics_sce.fcl" diff --git a/fcl/standard/standard_mc_intime_caf_icarus.fcl b/fcl/standard/mc/standard_mc_intime_caf_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_intime_caf_icarus.fcl rename to fcl/standard/mc/standard_mc_intime_caf_icarus.fcl diff --git a/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl b/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl new file mode 100644 index 000000000..e3695ae4b --- /dev/null +++ b/fcl/standard/mc/standard_mc_intime_g4_icarus.fcl @@ -0,0 +1 @@ +#include "larg4_icarus_intime_sce.fcl" diff --git a/fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl b/fcl/standard/mc/standard_mc_mpvmpr_stage1larcv_icarus.fcl similarity index 100% rename from fcl/standard/standard_mc_mpvmpr_stage1larcv_icarus.fcl rename to fcl/standard/mc/standard_mc_mpvmpr_stage1larcv_icarus.fcl diff --git a/fcl/standard/overlay/CMakeLists.txt b/fcl/standard/overlay/CMakeLists.txt new file mode 100644 index 000000000..9714229ee --- /dev/null +++ b/fcl/standard/overlay/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/standard/overlay/standard_overlay_caf_iarus.fcl b/fcl/standard/overlay/standard_overlay_caf_iarus.fcl new file mode 100644 index 000000000..ff0de4039 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_caf_iarus.fcl @@ -0,0 +1 @@ +#include "cafmakerjob_icarus_detsim2d_systtools_and_fluxwgt_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl b/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl new file mode 100644 index 000000000..d5a62b5cc --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_detsim_icarus.fcl @@ -0,0 +1 @@ +#include "detsim_2d_icarus_refactored_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl b/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl new file mode 100644 index 000000000..6d70a1ace --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_overlay_icarus.fcl @@ -0,0 +1 @@ +#include "overlay_waveforms.fcl" diff --git a/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl new file mode 100644 index 000000000..d91fab811 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_stage0_icarus.fcl @@ -0,0 +1 @@ +#include "stage0_run2_wc_icarus_overlay.fcl" diff --git a/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl b/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl new file mode 100644 index 000000000..2ec9c1f23 --- /dev/null +++ b/fcl/standard/overlay/standard_overlay_stage1_icarus.fcl @@ -0,0 +1 @@ +#include "stage1_run2_icarus_overlay.fcl" diff --git a/fcl/standard/standard_mc_all_detsim_icarus.fcl b/fcl/standard/standard_mc_all_detsim_icarus.fcl deleted file mode 100644 index 13685eafc..000000000 --- a/fcl/standard/standard_mc_all_detsim_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "detsim_2d_icarus_refactored.fcl" diff --git a/fcl/standard/standard_mc_all_stage0_icarus.fcl b/fcl/standard/standard_mc_all_stage0_icarus.fcl deleted file mode 100644 index feb8aca63..000000000 --- a/fcl/standard/standard_mc_all_stage0_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage0_run2_icarus_mc.fcl" diff --git a/fcl/standard/standard_mc_all_stage1_icarus.fcl b/fcl/standard/standard_mc_all_stage1_icarus.fcl deleted file mode 100644 index 86d4b0eba..000000000 --- a/fcl/standard/standard_mc_all_stage1_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage1_run2_1d_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl b/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl deleted file mode 100644 index caf161ca4..000000000 --- a/fcl/standard/standard_mc_all_stage1larcv_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "stage1_run2_1d_larcv_icarus_MC.fcl" diff --git a/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl b/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl deleted file mode 100644 index 687f1fe35..000000000 --- a/fcl/standard/standard_mc_beamcosmics_g4_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "larg4_icarus_cosmics_sce_2d_drift.fcl" diff --git a/fcl/standard/standard_mc_intime_g4_icarus.fcl b/fcl/standard/standard_mc_intime_g4_icarus.fcl deleted file mode 100644 index 05c30a5c9..000000000 --- a/fcl/standard/standard_mc_intime_g4_icarus.fcl +++ /dev/null @@ -1 +0,0 @@ -#include "larg4_icarus_intime_sce_2d_drift.fcl" diff --git a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl index 6bc7c326f..5da3c8673 100644 --- a/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl +++ b/icaruscode/TPC/ICARUSWireCell/detsimmodules_wirecell_ICARUS.fcl @@ -62,11 +62,10 @@ icarus_simwire_wirecell: shaping1: 1.45 # us shaping2: 1.3 # us - # Time offsets for truth matching - time_offset_u: 0.0 # us - time_offset_v: 0.0 # us - time_offset_y: 0.0 # us - + # Time offsets for truth matching -- tuned to 2D deconvolution output + time_offset_u: 1.81 # us + time_offset_v: 2.08 # us + time_offset_y: 1.82 # us } } } @@ -81,6 +80,14 @@ icarus_simwire_wirecell_SConly.wcls_main.outputers:[ icarus_simwire_wirecell_shifted: @local::icarus_simwire_wirecell icarus_simwire_wirecell_shifted.wcls_main.params.SimEnergyDepositLabel: "shifted" +icarus_simwire_wirecell_shifted_overlay: @local::icarus_simwire_wirecell_shifted +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.coh_noise_scale: 0.0 # disable noise +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.int_noise_scale: 0.0 # ditto +icarus_simwire_wirecell_shifted_overlay.wcls_main.structs.overlay_drifter: true +icarus_simwire_wirecell_shifted_overlay.wcls_main.plugins: [@sequence::icarus_simwire_wirecell_shifted_overlay.wcls_main.plugins, "WireCellICARUSDrifter"] +icarus_simwire_wirecell_shifted_overlay.wcls_main.inputers: ["wclsSimDepoSetSource:electron", "wclsICARUSDrifter:drifter"] +icarus_simwire_wirecell_shifted_overlay.wcls_main.params.cathode_input_format: "scalar" + icarus_simwire_wirecell_filtersed: @local::icarus_simwire_wirecell icarus_simwire_wirecell_filtersed.wcls_main.params.SimEnergyDepositLabel: "filtersed" diff --git a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet index e5a0210df..84e574bcb 100644 --- a/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet +++ b/icaruscode/TPC/ICARUSWireCell/icarus/wcls-multitpc-sim-drift-simchannel-refactored.jsonnet @@ -166,12 +166,21 @@ local wcls_output = { sp_thresholds: wcls.output.thresholds(name='spthresholds', tags=['threshold']), }; -//local deposio = io.numpy.depos(output); -local drifter = sim.drifter; +local overlay_drifter = std.extVar("overlay_drifter"); + +local drifter = if overlay_drifter then { + local xregions = wc.unique_list(std.flattenArrays([v.faces for v in params.det.volumes])), + type: "wclsICARUSDrifter", + data: params.lar + sim.overlay_drifter_data { + TPC: 0, + charge_scale: 1 + }, + } else sim.drifter; + local setdrifter = g.pnode({ type: 'DepoSetDrifter', data: { - drifter: "Drifter" + drifter: if overlay_drifter then "wclsICARUSDrifter" else "Drifter" } }, nin=1, nout=1, uses=[drifter]);