Repository navigation
Conversation
|
Build status for this pull request: FAILURE Build log: make_mcsmear_random_merge_rtj.log |
…random-trigger events in the merge [rtj] Random-trigger events with fewer tagger hits (hodoscope + microscope, all channels, any time) than MERGE:MIN_TAGGER_HITS were recorded with the beam off; they are skipped at read time and the next event in the file is used, so beam-off events are never merged, whatever the random-trigger file contains. The default is 5; -PMERGE:MIN_TAGGER_HITS=0 merges every event, as before this change. The numbers of random events read and skipped are printed at the end of the job. Beam-off events have 0 tagger hits (plus 1-4 noise hits in some 2023-01 events), beam-on events typically 40-100 (GlueX rho0 data/MC study, 2026-11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n, not once per thread [rtj] BeginRun runs in every processing thread, because the hits-merger configuration is thread_local, but the merge input streams are shared. Each call repositioned the streams to the start of the file plus the requested skip, and the skip was zeroed after the first call, so with N threads the streams were rewound to the start of the file up to N-1 times during start-up. Multithreaded jobs therefore took their random triggers from the start of the file whatever skip was requested, and merged the first events of the file several times over. Now the streams are positioned once per run, by the first thread to start that run. Single-threaded output is unchanged. Found in the GlueX rho0 data/MC study of 2026-11: with 16 threads and skip 1000, 12323 random events were read and 9323 beam-off events skipped, where a single thread reads 3000 and skips none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f5c36dc to
4d77929
Compare
|
Build status for this pull request: FAILURE Build log: make_mcsmear_random_merge_rtj.log |
|
Thanks for looking into these issues, Richard. Regarding the MERGE:MIN_TAGGER_HITS cut, I looked more closely at the random trigger files generated for one of the 2023-01 runs, and indeed there were events in these files that should have been excluded due to the electron beam fiducial cuts (but not consistently included!). This means we have to look into the process of how the random trigger files are created, but in the meantime I think this cut is a good idea - it should efficiently reject these events that should have been excluded. |
|
Test status for this pull request: SUCCESS Summary: summary.txt Build log: make_mcsmear_random_merge_rtj.log |
New command-line options for the FDC smearing. Every default leaves the
output unchanged.
FDC:GAIN_SCALE gas-gain factor on the strip charge q and on the
anode wire dE, applied before the thresholds (1)
FDC:GAIN_PKG1..4 extra gain factor per FDC package (modules 1-2,
3-4, 5-6, 7-8), times FDC:GAIN_SCALE (1)
FDC:GAIN_SIGMA s avalanche gain fluctuation: one log-normal factor
exp(s G - s^2/2) per chamber and track, shared by
the wire hit and the strips it induces (0)
FDC:DOCA_ATTEN a wire dE and the track's strip q in the chamber
scaled by max(0.05, 1 - a doca^2), doca in cm (0)
FDC:STRIP_THRESHOLD strip charge threshold in pC; < 0 keeps
FDC_THRESHOLD_FACTOR * FDC_PED_NOISE from CCDB (-1)
FDC:WIRE_THRESHOLD_KEV anode threshold on the gain-scaled wire dE in keV;
< 0 keeps FDC_THRESH_KEV from CCDB (-1)
Motivation: the FDC gas gain of the real detector changes with time and
differs between packages (e.g. a 40% drop of the strip signal between
2019-11 runs 71362 and 71483), which changes the FDC hit efficiency and
with it the tracking efficiency. With per-period gains fitted only to the
data's FDC plane-used fractions (not to any cross section), the rho(0)
photoproduction cross section of ten run segments (2018-01 to 2023-01)
agrees to about 2% (RMS, beyond statistics).
Builds on the FDC options and peakAmp of PR #422; independent of #423.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Branch
mcsmear_random_merge_rtj(2 commits on master be7b14e). Independent of #422: either can be merged first, without conflicts, and the combined result is the same.1. Multithreaded jobs lost the requested random-trigger offset (bug fix)
MyProcessor::BeginRunruns once in every processing thread, because the hits-merger configuration isthread_local. But the random-trigger input streams (files2merge) are shared by all threads, and eachBeginRuncall repositioned them to the start of the file plus the requested skip. The skip is zeroed after the first call, so with N threads the shared streams were rewound to the start of the file up to N>1 times while the threads started. Consequences for any multithreaded mcsmear job that merges random triggers:file:N+skipasked for, so jobs that use different skips on the same file all merge (nearly) the same random events;Where the start of a random-trigger file is not typical of the run (beam off, or the current ramping up after a trip), the merged background is biased, run by run. Single-threaded jobs are not affected.
Fix: position the shared streams once per run, by the first thread to begin that run. Single-threaded output is byte-identical to before.
2. New option MERGE:MIN_TAGGER_HITS (default 5 )
Random-trigger events with fewer tagger hits (hodoscope + microscope, all channels, any time) than
MERGE:MIN_TAGGER_HITSwere recorded with the beam off. With the option set, they are skipped at read time and the next event in the file is used, so beam-off events are never merged, whatever the random-trigger file contains. The numbers of random events read and skipped are printed at the end of the job.-PMERGE:MIN_TAGGER_HITS=5.Tests (run 71350, recon-2019_11-ver01.2 random triggers, which start with 591 beam-off events)
Found in the GlueX rho0 photoproduction data/MC study of 2026-11.