Skip to content

Copilot/cvn icarus update - #931

Open
cerati wants to merge 5 commits into
developfrom
copilot/cvn-icarus-update
Open

cerati wants to merge 5 commits into
developfrom
copilot/cvn-icarus-update

Conversation

@cerati

@cerati cerati commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Cleanup of CVN code from PR #869 .

ICARUSCVN cleanup: use central larrecodnn TF graph/handler and remove local duplicates

Description
This PR reduces duplicated CVN/TensorFlow code in ICARUSCVN by switching to central implementations in LArSoft/larrecodnn, while keeping ICARUS-specific reconstruction/pixel-map/zlib logic unchanged.

What changed

  1. Removed local TF graph/tool/interface copies
    Deleted:

icaruscode/ICARUSCVN/tf/tf_graph.cc
icaruscode/ICARUSCVN/tf/tf_graph.h
icaruscode/ICARUSCVN/tf/CMakeLists.txt
icaruscode/ICARUSCVN/modules/ICARUSTFNetHandler_tool.cc
icaruscode/ICARUSCVN/module_helpers/ICARUSITFNetHandler.h
Updated CMake to remove local ICARUSCVN_tf and local TF tool wiring.

  1. Switched evaluator to central larrecodnn handler
    ICARUSCVNEvaluator now uses:

larrecodnn/CVN/interfaces/ITFNetHandler.h
central tool type TFNetHandler
and calls:

Predict(const PixelMap&)
instead of local extended signatures.

  1. Removed evaluator .gz path mode
    Removed evaluator code path and helpers that loaded .gz pixel-map files from disk. Evaluator now runs only on event/slice-based ROOT inputs (the standard module path).

  2. Removed personal/non-production artifacts
    Deleted:

icaruscode/ICARUSCVN/fcls/getTrueInfo.py

ICARUS-specific logic intentionally kept
No physics/geometry refactor in:

ICARUSPixelMapProducer.*
ICARUSICVNMapper.*
ICARUSICVNZlibMaker.*
ICARUSCVNZlibMaker_module.cc
These remain local and detector-specific.

Configuration note (important)
Central TFNetHandler expects LibPath to be the name of an environment variable.

For ICARUS data products, this PR config uses:

LibPath: "ICARUS_DATA_DIR"
TFProtoBuf: "icarus_data/CVN/icarus_cvn_flavor.pb"
So the resolved model file is:

$ICARUS_DATA_DIR/icarus_data/CVN/icarus_cvn_flavor.pb
Validation checklist
Build succeeds
run_ICARUSCVNEvaluator.fcl runs on a small stage1 ROOT sample

  1. Moved from icaruscode/ICARUSCVN to icaruscode/TPC/ICARUSCVN

Context
This is a maintenance-focused cleanup intended to reduce local code duplication after the original author’s departure, while preserving ICARUS-specific behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant