Skip to content

Updates to enable 2025A MC Production #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 22 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
aa0e95a
Reorganize standard fcls. Update to new MC path. Add in overlay path.
gputnam May 16, 2025
d45b9f5
Fhicl file to convert ChannelROIs back into Wires
gputnam May 16, 2025
cb50ecb
Fix input label for MC stage0.
gputnam May 16, 2025
1339362
Get non-YZ detsim configs working. Add in overlay option to non-YZ sim.
gputnam May 17, 2025
8d5d447
Tune sim-reco timing offsets to 2D deconv.
gputnam May 17, 2025
a75c82e
Fix ophit label.
gputnam May 20, 2025
5f4c23e
Add partial fcls back into icaruscode
gputnam May 21, 2025
e73e676
Reorganize standard fcls. Update to new MC path. Add in overlay path.
gputnam May 16, 2025
4729a40
Fhicl file to convert ChannelROIs back into Wires
gputnam May 16, 2025
b3946e9
Fix input label for MC stage0.
gputnam May 16, 2025
8d76950
Get non-YZ detsim configs working. Add in overlay option to non-YZ sim.
gputnam May 17, 2025
eb123e6
Tune sim-reco timing offsets to 2D deconv.
gputnam May 17, 2025
4cad74f
Fix ophit label.
gputnam May 20, 2025
1e245e8
Add partial fcls back into icaruscode
gputnam May 21, 2025
4f5f72c
Prune simChannelROI from 1D SP fcl.
gputnam May 30, 2025
f37a12f
Fix database tags.
gputnam May 30, 2025
5d3a59e
Merge branch 'release/Mar25Production-build' into release/MC25Production
gputnam May 30, 2025
41ff587
Simple detsim jsonnet bugfix.
gputnam May 30, 2025
59f69c4
Remove mcreco from CAF stage.
gputnam Jun 1, 2025
73cc510
Stage1+CAF configs for non-YZ detsim.
gputnam Jun 1, 2025
32c965f
Ignore mcreco logging.
gputnam Jun 1, 2025
fc72220
Merge branch 'develop' into release/MC25Production
gputnam Jun 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions fcl/caf/cafmaker_add_detsim2d_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions fcl/caf/cafmaker_defs.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -228,7 +225,7 @@ caf_preprocess_sce_producers: {
}

# Sequences
caf_preprocess_sequence: [ mcreco,
caf_preprocess_sequence: [
# Calorimetry
pandoraCaloGausCryoE, pandoraCaloGausCryoW,
pandoraPidGausCryoE, pandoraPidGausCryoW,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions fcl/caf/cafmakerjob_icarus_detsim2d_overlay_simpledet.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "cafmakerjob_icarus_detsim2d_overlay.fcl"

physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC"
services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC"
4 changes: 4 additions & 0 deletions fcl/caf/cafmakerjob_icarus_detsim2d_simpledet.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "cafmakerjob_icarus_detsim2d.fcl"

physics.producers.cafmaker.SimChannelLabel: "daq:simpleSC"
services.BackTrackerService.BackTracker.SimChannelModuleLabel: "daq:simpleSC"
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ 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"

}

## 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"
Expand Down
2 changes: 1 addition & 1 deletion fcl/detsim/detsim_2d_icarus_refactored.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "detsim_2d_icarus_refactored.fcl"

physics.producers.daq: @local::icarus_simwire_wirecell_shifted_overlay
1 change: 1 addition & 0 deletions fcl/reco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions fcl/reco/Stage0/data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory(partial)

cet_enable_asserts()

install_fhicl()
1 change: 1 addition & 0 deletions fcl/reco/Stage0/data/partial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install_fhicl()
145 changes: 145 additions & 0 deletions fcl/reco/Stage0/data/partial/decodePMT_icarus.fcl
Original file line number Diff line number Diff line change
@@ -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<raw::OpDetWaveform>): decoded waveforms,
# with our best reconstruction for their time stamps in LArSoft reference
#
#
# The `Trees-<InputFile>*.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


# ------------------------------------------------------------------------------
15 changes: 15 additions & 0 deletions fcl/reco/Stage0/data/partial/decodePMT_icarus_incomplete.fcl
Original file line number Diff line number Diff line change
@@ -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
69 changes: 69 additions & 0 deletions fcl/reco/Stage0/data/partial/decodePMT_icarus_standalone.fcl
Original file line number Diff line number Diff line change
@@ -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<raw::OpDetWaveform>): decoded waveforms,
# with our best reconstruction for their time stamps in LArSoft reference
#
#
# The `Trees-<InputFile>*.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

# ------------------------------------------------------------------------------
Loading