Skip to content

auto-hunt: FCAL_TimingOffsets builds again and uses the real target z (GH-1246 S4) - #1267

Open
DraTeots wants to merge 1 commit into
masterfrom
auto-hunt/fcal-timingoffsets
Open

DraTeots wants to merge 1 commit into
masterfrom
auto-hunt/fcal-timingoffsets

Conversation

@DraTeots

@DraTeots DraTeots commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

FCAL_TimingOffsets: build again and use the real target z

Fixes #1246

The campaign card (JLab login): https://pages.jlab.org/halld/auto-hunt/cards/gh-1246-fcal-timingoffsets-compile-target-z/ . Same finding as R1-P11g of the campaign table.

Change

src/plugins/Calibration/FCAL_TimingOffsets/JEventProcessor_FCAL_TimingOffsets.cc:

  • line 133: call locGeometry->GetTargetZ(locTargetZCenter); without assigning the returned bool to the target z (z was 1 cm instead of 65 cm).
  • lines 182 and 226: DEvent::GetLockService(event)->RootFillLock(this) and RootFillUnLock(this), as every other calibration plugin calls them.

Tested

  • The plugin builds with the patch (g++ against the master tree); without it the build stops at locEvent.
  • 5000 events of run 132404, calibtime 2025-12-24-00-00-01, three runs: offsets of the fixed plugin are higher than with the bool kept by +2.119 ns on average (median +2.125 ns, 0.125 ns bins) over 920 channels (1356 entries), expected +2.09 to +2.14 ns; two fixed runs differ by 0.000 ns.

Not tested

  • A full scons build of the optional directory.
  • The block-to-block part of the shift (under the 0.125 ns histogram bin).

Side effects

Offsets from this plugin rise by about 2.1 ns in every channel. No other plugin or production job changes: none builds it.


Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

🤖 Generated with Claude Code

…m GetTargetZ as the target z

The plugin calls GetTargetZ and assigns its returned bool to the target z, so z is 1 cm instead of 65 cm and
every FCAL timing offset comes out about 2.1 ns low. It also does not compile on master: locEvent is undeclared
at the two fill-lock calls, which now take `this` as in every other calibration plugin.

Measured on 5000 events of run 132404 (calibtime 2025-12-24-00-00-01): offsets rise by +2.119 ns on average
over 920 channels, as expected from the 64 cm vertex shift; two identical fixed runs differ by 0.000 ns.
Card: https://pages.jlab.org/halld/auto-hunt/cards/gh-1246-fcal-timingoffsets-compile-target-z/

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gluex

gluex commented Dec 2, 2026

Copy link
Copy Markdown

Test status for this pull request: SUCCESS

Summary: summary.txt
Logs: results/log

Build log: make_auto-hunt_fcal-timingoffsets.log
Build report: report_auto-hunt_fcal-timingoffsets.txt

@DraTeots

DraTeots commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

The FCAL timing-offsets plugin does not compile, and once it does, every offset is 2.1 ns low

What is wrong. An optional calibration plugin that derives FCAL timing offsets cannot be built: two lines use a
name that does not exist. Once that is repaired, a third line stores a true/false answer as the target position, so the
flight path of every shower starts at z = 1 cm instead of the target centre at 65 cm.

The code. The real lines, shortened (on GitHub):

double locTargetZCenter = 0.0;
locTargetZCenter = locGeometry->GetTargetZ(locTargetZCenter);  // stores the bool "true" = 1 cm
...
DEvent::GetLockService(locEvent)->RootFillLock();              // locEvent does not exist; lock needs "this"

Fixed:

locGeometry->GetTargetZ(locTargetZCenter);                     // the z is written into the argument
...
DEvent::GetLockService(event)->RootFillLock(this);

What it does (5000 events of run 132404, plugin built with and without the fix):

quantity wrong target z fixed
builds no yes
target z used 1 cm 65 cm
offset of every channel 2.12 ns lower (mean +2.119 ns, 920 channels; 0.125 ns bins) reference

Fixed minus wrong offsets: median +2.125 ns, expected +2.09 to +2.14 ns, noise 0.000 ns

Summary of the per-channel offset shifts (mean, median, percentiles), fixed minus wrong, and the noise run. The shift matches the 64 cm path difference (64 cm / 29.98 cm/ns = 2.13 ns).

Who is affected.

  • Anyone who builds this optional plugin to derive FCAL timing offsets: the build fails, and once it compiles the offsets carry a common 2.1 ns error.

Who is not. All production and calibration jobs: none builds this plugin. Standard reconstruction and the physics benchmarks.

The fix. Use event and RootFillLock(this) in the lock lines, and call GetTargetZ without assigning its bool.

Grade S4: an option the program does not use. A common 2.1 ns shift is what a global time alignment can absorb; the block-to-block part is below the 0.125 ns histogram bin.

Full card (JLab login): https://pages.jlab.org/halld/auto-hunt/cards/gh-1246-fcal-timingoffsets-compile-target-z/


Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

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.

R1-P11g S4 FCAL_TimingOffsets target z assigned a bool; plugin does not compile

2 participants