Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
3cab2e9
fix sim label for PDFastSim
mvicenzi May 22, 2025
b6c5c1a
detsim_opdetonly_icarus.fcl: simulate only optical detector digitization
PetrilloAtWork Feb 8, 2025
ae195e1
Changed determination of the end of single photoelectron response tem…
PetrilloAtWork Feb 8, 2025
b129249
Updated `FastGaussianNoiseGeneratorAlg` documentation
PetrilloAtWork Apr 12, 2025
3f467fb
SelectCathodeCrossingGenParticles: selects generated events with part…
PetrilloAtWork Jun 17, 2025
0dc5ec4
Merge branch 'mvicenzi/quick_fix' into feature/mvicenzi_repro_step1
mvicenzi Oct 28, 2025
0d3e9ff
make MC2-var4 tune standard
mvicenzi Oct 29, 2025
1428556
simulate pmt timing delays in mc
mvicenzi Oct 29, 2025
9d43105
disable pmt mc noise for overlays
mvicenzi Oct 29, 2025
d655888
add ophituncorrected + ophit flow for mc
mvicenzi Oct 30, 2025
6f0342b
update stage0 flow for overlays
mvicenzi Oct 30, 2025
7e655c6
small fix
mvicenzi Nov 3, 2025
8726590
prelimanary reco gain tuning
mvicenzi Nov 4, 2025
0fe2b8e
add SPRRun3, make SPRRun2 default
mvicenzi Nov 10, 2025
a138d80
nullify flash calibration
mvicenzi Nov 10, 2025
e9a9bea
add run3 opdet tune, make run2 default
mvicenzi Nov 10, 2025
e918fe8
change run3->run4, update gain
mvicenzi Nov 12, 2025
677563f
Merge branch 'release/SBN2025A' into feature/mvicenzi_repro_step1
mvicenzi Nov 12, 2025
99f4413
add run4 detsim fhicls
mvicenzi Nov 13, 2025
b90cfb5
first attempt at detsim reprocessing fhicl
mvicenzi Nov 18, 2025
468cb3f
fix typo
mvicenzi Nov 18, 2025
9667657
Tell CMake of sbnalg dependency
PetrilloAtWork Nov 18, 2025
8c1e40b
Trigger simulation modules: support input tag with process name
PetrilloAtWork Nov 18, 2025
937b4b6
Apply suggestions from GIT Copilot code review
PetrilloAtWork Nov 19, 2025
ab9ecf2
Merge pull request #870 from PetrilloAtWork/feature/gp_LVDSgatesFix
mvicenzi Nov 19, 2025
a80e88b
fix to detsim reprocessing
mvicenzi Nov 19, 2025
fe5e072
reprocessing opdetonly overlay fhicl
mvicenzi Nov 19, 2025
2142449
leave default tags
mvicenzi Nov 19, 2025
0c07aeb
add initial recalibrator module
mvicenzi Dec 3, 2025
16be497
fix compilation for recalibrator
mvicenzi Dec 3, 2025
8dfa2db
link online corrections service to recalibrator
mvicenzi Dec 4, 2025
d96f212
link locally-provided old timing corrections
mvicenzi Dec 4, 2025
76c5cd0
fix timing recalibration
mvicenzi Dec 4, 2025
46942ec
remove custom config, fixed indentation
mvicenzi Dec 4, 2025
8d29faa
chop off flat waveform tail in overlays
mvicenzi Dec 4, 2025
23005d1
restore legacy defaults for backward compatibility
mvicenzi Dec 4, 2025
2f8cf32
fixed documentation
mvicenzi Dec 4, 2025
d18c784
add opdetonly MCstage0 fhicls for reprocessing
mvicenzi Dec 5, 2025
28f94e0
fix stage0 reprocessing fhicls
mvicenzi Dec 8, 2025
86cb353
adjust stage1 compatibility
mvicenzi Dec 8, 2025
09ea82e
add data reprocessing fhicl(s)
mvicenzi Dec 8, 2025
5af5235
update file names
mvicenzi Dec 8, 2025
f574863
first commit, compiles and does nothing
Dec 12, 2025
57e45ba
changed namespaces
Dec 12, 2025
eb6bdb1
basic struct/map for holding spe areas
Dec 12, 2025
0bd1735
working version getting area from database and initial database file
Dec 12, 2025
6987683
updated tags in db file
Dec 12, 2025
667d576
add fcl file for debugging spe area service
Dec 12, 2025
d7b1c3a
ICARUSFlashFinder: added Doxygen-style header
PetrilloAtWork Dec 18, 2025
d91e636
ICARUSFlashFinder: turned into shared module
PetrilloAtWork Dec 18, 2025
4a92ddf
ICARUSFlashFinder: FHiCL configuration validation
PetrilloAtWork Dec 18, 2025
e433639
ICARUSFlashFinder: code updates
PetrilloAtWork Dec 18, 2025
93fcc2c
ICARUSFlashFinder: removed hit recalibration (PECalib)
PetrilloAtWork Dec 18, 2025
4d8d9f4
dump_opflashes_icarus.fcl: dump reconstructed flashes on text file
PetrilloAtWork Dec 18, 2025
15541a4
Adopting corrections from GitHub Copilot
PetrilloAtWork Dec 18, 2025
a019654
Removed obsolete icarus_flashcalib.fcl
PetrilloAtWork Dec 18, 2025
6c188f2
PMT calibration service code review
PetrilloAtWork Dec 20, 2025
f4545fe
tentative debug tree
mvicenzi Jan 13, 2026
64a3304
tweaks for success build
mvicenzi Jan 13, 2026
2dda045
move to other loop
mvicenzi Jan 13, 2026
0bd7e74
save debug only with photons
mvicenzi Jan 13, 2026
fc5e966
store photon start position in debug
mvicenzi Jan 13, 2026
69c8e17
remove old variables
mvicenzi Jan 13, 2026
e490f27
remove forgotten variable
mvicenzi Jan 13, 2026
4db5efb
update pmt calibration service provider
Jan 14, 2026
ba917d5
Merge branch 'release/SBN2025A' into feature/mvicenzi_repro_step1
mvicenzi Jan 15, 2026
74b471e
Merge pull request #880 from carriganm95/carriganm95/speAreaTool
mvicenzi Jan 15, 2026
a4b8813
removed db file + copilot suggestions
mvicenzi Jan 15, 2026
7efe1eb
interface SPEArea DB with ophit recalibrator
mvicenzi Jan 19, 2026
5ad6287
fix cout of current areatag
mvicenzi Jan 19, 2026
c2df7b8
rework stage0 optical workflow for data, mc, overlay
mvicenzi Jan 19, 2026
d7c5c93
simulate pmt timing delays only for overlay flow
mvicenzi Jan 19, 2026
2a7f75e
remove ophituncurrected from legacy mc flow
mvicenzi Jan 19, 2026
c435bf2
tune mcophit
mvicenzi Jan 19, 2026
d5024e9
make applytimingdelays explicit
mvicenzi Jan 20, 2026
3139d6f
add run3/4 stage0 overlay light tunes
mvicenzi Feb 10, 2026
5f8d28b
remove useless while loop
mvicenzi Mar 5, 2026
6dffd27
fix-up comment
mvicenzi Mar 5, 2026
538e32a
use microseconds, pass service as pointer not reference
mvicenzi Mar 5, 2026
68f3899
fixes + indentation
mvicenzi Mar 5, 2026
cc3cabc
minor fixes
mvicenzi Mar 5, 2026
fe2674a
add documentation in fhicls
mvicenzi Mar 5, 2026
8a52d19
use mf:errorlog
mvicenzi Mar 5, 2026
cbf8f42
improve documentation
mvicenzi Mar 5, 2026
72d4241
more documentation please
mvicenzi Mar 5, 2026
f2ddbc9
augment gain db service
mvicenzi Mar 12, 2026
a7bb214
add gain service provider interface
mvicenzi Mar 12, 2026
60fc035
fix linking for db interface
mvicenzi Mar 12, 2026
384a5ef
update speareas database tag
mvicenzi Mar 16, 2026
213b9e0
add pmt channel status service
mvicenzi Mar 16, 2026
ee0f6af
tie up the service
mvicenzi Mar 16, 2026
be29f41
fix linking
mvicenzi Mar 16, 2026
a47faad
change kOn to kGood
mvicenzi Mar 16, 2026
27c3dea
use channel status service in pmtsim
mvicenzi Mar 16, 2026
4245aa2
update fcls for legacy vs overlay flow
mvicenzi Mar 16, 2026
8203c27
switch reco to local entry point
mvicenzi Mar 17, 2026
ca85cc3
fix sharing factory with ped algos
mvicenzi Mar 17, 2026
f457297
fix standard calibrator + add channel status service
mvicenzi Mar 17, 2026
617b74c
remove conflicting defaults
mvicenzi Mar 17, 2026
66fda19
remove mcophit from mc-overlays
mvicenzi Mar 17, 2026
a6a4bcf
never hold service pointers, you fool
mvicenzi Mar 18, 2026
bd7dd28
expose integral and bias from sampled waveform tool
mvicenzi Mar 18, 2026
2192b3b
plug in db gain and spread in simulation
mvicenzi Mar 18, 2026
46f9ef6
fix variable name
mvicenzi Mar 18, 2026
206283c
keep database use false for default non-overlay MC
mvicenzi Mar 18, 2026
09cb33c
add forgotten service
mvicenzi Mar 18, 2026
cb07257
improve prints
mvicenzi Mar 18, 2026
37ffe21
better printing
mvicenzi Mar 18, 2026
def9fd7
apply integral definition bias
mvicenzi Mar 18, 2026
b4298cf
update db tag
mvicenzi Mar 18, 2026
450f905
merge in debug tree
mvicenzi Mar 23, 2026
72f6fe6
update variable names
mvicenzi Mar 23, 2026
bda7024
TailNSigmaThreshold is wrong, should be TailNSigma
mvicenzi Mar 25, 2026
cec91e5
re-tune flash algo for new SPEAreas to match past performance
mvicenzi Mar 25, 2026
7f04d5b
add ophit integral to flashana tree
mvicenzi Mar 25, 2026
c67dc77
add run number ovverides to PMT db services
mvicenzi Apr 6, 2026
cf439a5
introducing vertical track flash/wf module
mvicenzi Apr 15, 2026
9bae573
TriggerSimulationOnGates: added fixed configurable trigger delay
PetrilloAtWork May 29, 2024
a7c6058
Update after TimeIntervalConfig breaking change
PetrilloAtWork Apr 16, 2026
e2abd1e
SimPMTIcarus: reworked internals
PetrilloAtWork Apr 16, 2026
e6e991f
SimPMTIcarus: produce baseline data products and associations
PetrilloAtWork Apr 16, 2026
2c130c3
PMTsimulationAlg: changed waveform superposition rounding, and defaul…
PetrilloAtWork Apr 16, 2026
c4f9564
Maintenance commit
PetrilloAtWork Apr 16, 2026
9f0d129
OverlayPMTwaveforms: dedicated PMT waveform overlay module
PetrilloAtWork Apr 16, 2026
c615077
Simulation timescale changed to the "shifted" time
PetrilloAtWork Apr 20, 2026
2fc396c
Trigger configuration maintenance
PetrilloAtWork Apr 20, 2026
26f162d
MC trigger simulation baselines now read from a data product.
PetrilloAtWork Apr 20, 2026
1687c57
Trigger simulation gate now refers to simulation time instead of beam…
PetrilloAtWork Apr 20, 2026
b882b59
TriggerSimulationOnGates: fix beam gate output
PetrilloAtWork Apr 22, 2026
161a00f
Added trigger time delay to the trigger simulation
PetrilloAtWork Apr 20, 2026
3405d4c
Filtering disables in Stage0 MC to allow for fast cloning
PetrilloAtWork Apr 21, 2026
a91c039
make waveforms optional, add total PE per pmt
mvicenzi Apr 22, 2026
9d1126b
update transit time
mvicenzi May 4, 2026
69fd9da
Retuned trigger-flash delay in TPC-PMT matching
PetrilloAtWork May 4, 2026
5ed9b80
Tuned beam gates to Run2 data
PetrilloAtWork May 7, 2026
5d252df
Using SBN (shared) GENIE configuration for BNB and NuMI
PetrilloAtWork Dec 5, 2024
561a35c
Tuned BNB gate again (after enabling neutrino propagation time)
PetrilloAtWork May 8, 2026
9bf5b41
manageDataRunDefinitions.py version 1.1
PetrilloAtWork May 13, 2026
bb9475e
Merge remote-tracking branch 'upstream/feature/pmtsim_gain' into feat…
PetrilloAtWork May 14, 2026
1d5e3e9
Removed configuration override used in development
PetrilloAtWork May 14, 2026
efe9ffa
Indentation fix
PetrilloAtWork May 14, 2026
b821df9
Merge pull request #901 from PetrilloAtWork/feature/gp_overlayFix
mvicenzi May 18, 2026
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ find_package(ifdhc REQUIRED )
find_package(ifdh_art REQUIRED )
find_package(Range-v3 REQUIRED )
find_package(sbnobj REQUIRED )
find_package(sbnalg REQUIRED )
find_package(icarus_signal_processing REQUIRED )
find_package(icarusalg REQUIRED )
find_package(icarusutil REQUIRED )
Expand Down
2 changes: 2 additions & 0 deletions fcl/SkipTesting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services_compat_no_overburden_icarus_v3.fcl
services_compat_overburden_icarus_v3.fcl
set_caf_calconst.fcl

override_services_for_simulation.fcl


################################################################################
# broken, won't fix
Expand Down
2 changes: 2 additions & 0 deletions fcl/caf/cafmakerjob_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
SpaceChargeService: @local::icarus_spacecharge
}

#include "override_services_for_simulation.fcl"

outputs:
{
outpid:
Expand Down
1 change: 1 addition & 0 deletions fcl/detsim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# add underlying subfolders
add_subdirectory(SBNNoise)
add_subdirectory(partial)
add_subdirectory(commissioning)
add_subdirectory(archive)

Expand Down
4 changes: 2 additions & 2 deletions fcl/detsim/commissioning/run4642like_detsim_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#

#include "services_common_icarus.fcl"
#include "opdetsim_pmt_icarus.fcl"
#include "pmtsimulation_icarus.fcl"
#include "rootoutput_icarus.fcl"

process_name: DetSim4642
Expand All @@ -38,7 +38,7 @@ services: @local::icarus_common_services # from services_common_icarus.fcl
physics: {
producers: {
opdaq: {
@table::icarus_simpmt_noise # from opdetsim_pmt_icarus.fcl
@table::icarus_pmtsimulationalg_202202_noise # from pmtsimulation_icarus.fcl

#
# enabled readout window
Expand Down
4 changes: 2 additions & 2 deletions fcl/detsim/commissioning/run4759like_detsim_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#

#include "services_common_icarus.fcl"
#include "opdetsim_pmt_icarus.fcl"
#include "pmtsimulation_icarus.fcl"
#include "rootoutput_icarus.fcl"

process_name: DetSim4759
Expand All @@ -38,7 +38,7 @@ services: @local::icarus_common_services # from services_common_icarus.fcl
physics: {
producers: {
opdaq: {
@table::icarus_simpmt_noise # from opdetsim_pmt_icarus.fcl
@table::icarus_pmtsimulationalg_202202_noise # from pmtsimulation_icarus.fcl

#
# enabled readout window
Expand Down
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_1d_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ services.Geometry.GDML: "icarus_complete_20220518_overburden.gdml"
services.Geometry.ROOT: "icarus_complete_20220518_overburden.gdml"
physics.producers.crtdaq.G4ModuleLabel: "largeant"
physics.producers.opdaq.InputModule: "largeant"
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_2d_icarus.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ outputs: {
services.Geometry.GDML: "icarus_complete_20220518_overburden.gdml"
services.Geometry.ROOT: "icarus_complete_20220518_overburden.gdml"
physics.producers.crtdaq.G4ModuleLabel: "shifted"
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,8 @@ outputs: {

physics.producers.crtdaq.G4ModuleLabel: "shifted"
physics.producers.opdaq.InputModule: "pdfastsim"
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
physics.producers.shifted.InitAuxDetSimChannelLabel: "genericcrt"
physics.producers.shifted.InitSimPhotonsLabel: "pdfastsim"
7 changes: 7 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_Run4.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "detsim_2d_icarus_refactored.fcl"

# Run3/4 optical tune
physics.producers.opdaq: @local::icarus_simpmt_run4
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
7 changes: 7 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_overlay.fcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#include "detsim_2d_icarus_refactored.fcl"

physics.producers.daq: @local::icarus_simwire_wirecell_shifted_overlay

# turn off mc noise on pmt waveforms
physics.producers.opdaq: @local::icarus_simpmt_nonoise
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true

7 changes: 7 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_overlay_Run4.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "detsim_2d_icarus_refactored_overlay.fcl"

# Run3/4 optical tune (with no noise)
physics.producers.opdaq: @local::icarus_simpmt_run4_nonoise
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_yzsim.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ outputs: {

physics.producers.crtdaq.G4ModuleLabel: "shifted"
physics.producers.opdaq.InputModule: "pdfastsim"
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
physics.producers.shifted.InitAuxDetSimChannelLabel: "genericcrt"
physics.producers.shifted.InitSimPhotonsLabel: "pdfastsim"
physics.producers.filtersed.InitSimEnergyDepositLabel: "shifted"
Expand Down
6 changes: 6 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_yzsim_Run4.fcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include "detsim_2d_icarus_refactored_yzsim.fcl"

physics.producers.daq.wcls_main.params.YZScaleMapJson: "yzmap_gain_icarus_v4_run4.json"

# Run3/4 optical tune
physics.producers.opdaq: @local::icarus_simpmt_run4
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
3 changes: 3 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_yzsim_notrigger.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ outputs: {
}

physics.producers.opdaq.InputModule: "pdfastsim"
physics.producers.opdaq.ApplyTimingDelays: false # keep false for non-overlay MC
physics.producers.opdaq.UseGainDatabase: false # keep false for non-overlay MC
physics.producers.opdaq.UseChannelStatusDatabase: false # keep false for non-overlay MC
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include "detsim_2d_icarus_refactored_yzsim_notrigger.fcl"

physics.producers.daq: @local::icarus_simwire_wirecell_yz_overlay

# turn off mc noise on pmt waveforms
physics.producers.opdaq: @local::icarus_simpmt_nonoise
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true
6 changes: 6 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay.fcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include "detsim_2d_icarus_refactored_yzsim.fcl"

physics.producers.daq: @local::icarus_simwire_wirecell_yz_overlay

# turn off mc noise on pmt waveforms
physics.producers.opdaq: @local::icarus_simpmt_nonoise
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true
6 changes: 6 additions & 0 deletions fcl/detsim/detsim_2d_icarus_refactored_yzsim_overlay_Run4.fcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include "detsim_2d_icarus_refactored_yzsim_overlay.fcl"

physics.producers.daq.wcls_main.params.YZScaleMapJson: "yzmap_gain_icarus_v4_run4.json"

# Run3/4 optical tune (with no noise)
physics.producers.opdaq: @local::icarus_simpmt_run4_nonoise
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true
8 changes: 8 additions & 0 deletions fcl/detsim/partial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Install fcl files in /job subdirectory.
install_fhicl()

# Also put a copy in the source tree.

FILE(GLOB fcl_files *.fcl)
install_source( EXTRAS ${fcl_files} )

40 changes: 40 additions & 0 deletions fcl/detsim/partial/detsim_opdetonly_icarus.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# File: detsim_opdetonly_icarus.fcl
# Purpose: Simulation of the optical detector response.
# Date: January 27, 2025
# Author: Gianluca Petrillo (petrillo@slac.stanford.edu)
#
# This job configuration runs the standard detector simulation, like
# `detsim_1d_icarus.fcl` does, but only for the optical detector.
#
#
# Output
# -------
#
# * `std::vector<raw::OpDetWaveform>` (`opdaq`): raw PMT waveforms
#
#
#
#
# Changes
# --------
#
# 20250127 (petrillo@slac.stanford.edu) [v1.0]
# original version (from `detsim_1d_icarus.fcl`)
#

#include "detsim_1d_icarus.fcl"

process_name: OpDetSim

services.DetPedestalService: @erase
services.ChannelStatusService: @erase
services.IICARUSChannelMap: @erase
services.SignalShapingICARUSService: @erase

# run only the `opdaq` module:
physics.producers: {
opdaq: @local::physics.producers.opdaq # simplify configuration removing all other producers
}
physics.simulate: [ opdaq ]

Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
## File: stage0_run2_opdetonly_icarus_data_reprocessing.fcl
## Purpose: Reprocessing of the optical products for the 2025 SBN "spring" OVERLAY MC production

#include "detsim_2d_icarus_refactored.fcl"

## This job selectively re-runs only the PMT/CRT DetSim path on top of an existing file.
## This is has been put together only for the post-processing of the 2025 SBN MC OVERLAY
## productions, and assumes to be starting with its mcstage1 files.
## It is valid only for RUN-2 productions because it selects the Run2 DetSim tune.

process_name: OpDetSim

services.DetPedestalService: @erase
services.ChannelStatusService: @erase
services.SignalShapingICARUSService: @erase

source.inputCommands: [
"keep *",

# `stage0` comes from decoding data: should be kept!
# `MCstage0` comes running stage0 on the overlay products:
# so pmt/trigger/crt stuff should be thrown out!
# note: I would really like to drop these things as well:
# "drop raw::OpDetWaveform*_opdaq_*_*", # drop old MC waveforms (if any)
# "drop *_pmtfixedthrinit_*_*", # drop triggersim product
# "drop *_pmtlvdsgatesinit_*_*", # drop triggersim product
# "drop *_pmttriggerwindowsinit_*_*", # drop triggersim product
# "drop *_triggersimgatesinit_*_*", # drop triggersim product
# "drop *_emuTriggerUnshifted_*_*", # drop triggersim product
# but I can't: it triggers art genocidal insticts thus removing all
# downstream products in the dependency tree that we still need.

"drop raw::OpDetWaveform*_shifted_*_*", # drop old MC (shifted) waveforms (if any)
"drop *_overlayOpWaveforms_*_*", # drop old Overlay waveforms (if any)
"drop *_ophit*_*_*", # drop MCstage0 ophits
"drop *_mcophit_*_*", # drop MCstageo mcophit
"drop *_opflash*_*_*", # drop MCsstage0 east/west opflashes

"drop *_pmtfixedthr_*_*", # drop MCstage0 trigger product
"drop *_pmtlvdsgates_*_*", # drop MCstage0 trigger product
"drop *_pmtlvdsgates_*_*", # drop MCstage0 trigger product
"drop *_pmtbaselines_*_MCstage0", # drop MCstage0 baselines, not stage0!
"drop *_pmttriggerwindows_*_*", # drop MCstage0 trigger product
"drop *_emuTrigger_*_*", # drop MCstage0 trigger product

"drop *_crtdaq_*_*", # drop CRT detsim product
"drop *_mccrthit_*_*", # drop CRT mc hits
"drop *_overlayCRTHit_*_*", # drop CRT overlay hits
"drop *_crttrack_*_*", # drop CRT tracks (MCstage0)
"drop *_crtpmt_*_*" # drop CRTPMT matches (MCstage0)
]

# Running only the optical/trigger/crt modules
# Simplify configuration removing all other producers (tpc)

physics.producers: {

# opdaq Run-1/2 tune for overlays (no noise)
opdaq: @local::icarus_simpmt_run2_nonoise

# triggersim producers
@table::icarus_shifting_triggersim.producers

# crt hits
crtdaq: @local::icarus_crtsim

}

# since some "old" products need to be kept in the tree
# we have products with the same tag, and different process_name
# make sure to select exactly what you need!

# build waveforms from simPhotons (already shifted)
physics.producers.opdaq.InputModule: "shifted::DetSim"
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true

# make sure the triggersim chain used the "new" products
# instead of the "old" ones which I cannot drop on input
physics.producers.pmtfixedthrinit.OpticalWaveforms: "opdaq::OpDetSim" # this was re-generated with same tag
physics.producers.pmtlvdsgatesinit.TriggerGatesTag: "pmtfixedthrinit::OpDetSim" # this was re-generated with same tag
physics.producers.pmttriggerwindowsinit.TriggerGatesTag: "pmtlvdsgatesinit::OpDetSim" # this was re-generated with same tag
physics.producers.triggersimgatesinit.BeamGateTag: "beamgate" # keep using old Gen product
physics.producers.emuTriggerUnshifted.BeamGates: "triggersimgatesinit::OpDetSim" # this was re-generated with same tag
physics.producers.emuTriggerUnshifted.TriggerGatesTag: "pmttriggerwindowsinit::OpDetSim" # this was re-generated with same tag

# need to update the shifting module to pick up new labels
# some were regenerated (tag still good), others were previously shifted
# applying a second shift is okay: everything is consistent
# (eg. waveforms made from `shifted` photons)
# NOTE: still shifing energy deposits although tpc info not regenerated
# however forced to use `filtersed` as `shifted` has been consumed

physics.producers.shifted.InputTriggerLabel: "emuTriggerUnshifted::OpDetSim" # this was re-generated with same tag
physics.producers.shifted.InitAuxDetSimChannelLabel: "shifted::DetSim" # need to start from previously-shifted, not `genericcrt`
physics.producers.shifted.InitBeamGateInfoLabel: "triggersimgatesinit::OpDetSim" # this was re-generated with same tag
physics.producers.shifted.InitSimEnergyDepositLabel: "filtersed::DetSim" # need to start from previously-shifted, but `shifted` no longer available
physics.producers.shifted.InitSimEnergyDepositLiteLabel: "filtersed::DetSim" # need to start from previously-shifted, but `shifted` no longer available
physics.producers.shifted.InitSimPhotonsLabel: "shifted::DetSim" # need to start from previously-shifted, not `pdfastsim`
physics.producers.shifted.InitWaveformLabel: "opdaq::OpDetSim" # this was re-generated with same tag

# need to update shiting of priorSCE deposits:
# this is important if future reprocessings will need to regenerate SimPhotons

physics.producers.shiftedpriorSCE.InputTriggerLabel: "emuTriggerUnshifted::OpDetSim" # this was re-generated with same tag
physics.producers.shiftedpriorSCE.InitSimEnergyDepositLabel: "shiftedpriorSCE::DetSim" # need to start from previously-shifted, not `ionization:priorSCE`

# and finally make sure the crtsim also uses the newly shifted products
physics.producers.crtsim.G4ModuleLabel: "shifted::OpDetSim"

# The reprocessing flow is the following:
# - build new pmt waveforms from photons
# - simulate the trigger
# - shift all products to the trigger:
# -- we are shifting photons, pmt waveforms, energy depositis, aux sim channels
# -- note: since tpc is not re-simulated, no longer fully coherent with trigger time
# - build CRT data from aux sim channels

physics.simulate: [ opdaq, @sequence::icarus_shifting_triggersim.path, crtdaq ]


# drop duplicate produtcs in output
# this doesn't trigger art genocidal instincts

outputs.rootoutput.outputCommands: [
"keep *",

# drop `opdaq`, but keep `shifted` for overlaying
"drop *_opdaq_*_*",

# drop old trigger products now that new ones exist
# specify the old process name "DetSim"
"drop *_pmtfixedthrinit_*_DetSim",
"drop *_pmtlvdsgatesinit_*_DetSim",
"drop *_pmttriggerwindowsinit_*_DetSim",
"drop *_triggersimgatesinit_*_DetSim",
"drop *_emuTriggerUnshifted_*_DetSim",

# drop old "shifted" products since we shifted things again
"drop sim::SimEnergyDeposits_filtersed_*_DetSim", # this has been regenerated into `shifted`
# mcreco looks for `filtersed` in stage1: potentially can be changed to look for `shifted`?
# however since tpc reco products are not shifted, better to keep old deposits for that matching
# "drop sim::SimEnergyDepositLites_filtersed_*_DetSim", # this has been regenerated into `shifted`
"drop sim::SimEnergyDeposits_shiftedpriorSCE_*_DetSim", # this has been regenerated into the same tag
"drop sim::AuxDetSimChannel_shifted_*_DetSim", # this has been regenerated into the same tag
"drop sim::SimPhotons_shifted_*_DetSim", # this has been regenerated into the same tag
"drop sim::BeamGateInfo_shifted_*_DetSim" # this has been regenerated into the same tag

]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## File: stage0_run4_opdetonly_icarus_data_reprocessing.fcl
## Purpose: Reprocessing of the optical products for the 2025 SBN "spring" OVERLAY MC production

#include "detsim_opdetonly_icarus_overlay_reprocessing_run2.fcl"

## This job selectively re-runs only the PMT/CRT DetSim path on top of an existing file.
## This is has been put together only for the post-processing of the 2025 SBN MC OVERLAY
## productions, and assumes to be starting with its mcstage1 files.
## It is valid only for RUN-3/RUN-4 productions because it selects their common DetSim tune.

# switch to Run3/Run-4 tune
physics.producers.opdaq: @local::icarus_simpmt_run4_nonoise
physics.producers.opdaq.InputModule: "shifted::DetSim"
physics.producers.opdaq.ApplyTimingDelays: true
physics.producers.opdaq.UseGainDatabase: true
physics.producers.opdaq.UseChannelStatusDatabase: true
Loading