Repository navigation
Conversation
…carry it through the random-trigger merge [rtj] In real data the FDC cathode strips are read out by fADC125s, and the reconstruction uses the pulse peak amplitude (DFDCHit::pulse_height, with q = a_scale * pulse_height). mcsmear wrote only the integrated charge q, so for MC the reconstruction fell back on q where the data use the peak. FDCSmearer now adds an fdcDigihit to every smeared strip hit, with peakAmp = q / FDC_ADC_ASCALE (/FDC/digi_scales), i.e. on the data scale. If FDC_ADC_ASCALE cannot be read from CCDB no fdcDigihit is written and the behaviour is as before. The FDC strip merge with random triggers (hddm_s_merger, the earliest-hit rule of PR #420) now applies the same rule to the peak amplitude as to q: the earliest random hit replaces the MC hit (time, q and peakAmp) if it is earlier, both are summed if they fall in the same 8 ns sample, and a later random hit is ignored. A hit without an fdcDigihit contributes q, which is what the reconstruction would use for it. The merge also returns immediately if the random strip has no hits, instead of dereferencing src.begin() of an empty list. Validated in the GlueX rho0 data/MC study of 2026-10/11: with this mcsmear (and the hdgeant4 FDC fixes of rjones30/HDGeant4 PR #37) the change of the rho0 yield between recon-2018_08 and recon-2019_11 on the same data is reproduced by the MC to 0.3% (70 chunks of 10k events, runs 51048-51052). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c362337)
|
Test status for this pull request: SUCCESS Summary: summary.txt Build log: make_fdc_strip_peakamp_merge_rtj.log |
nsjarvis
left a comment
There was a problem hiding this comment.
Following this PR, the code reads in /FDC/digiscales/a_scale from CCDB as FDC_ADC_ASCALE, calculates PeakAmp=q/FDC_ADC_ASCALE, propagates it through the merging stage and includes PeakAmp in the hddm output.
FDC_ADC_ASCALE is a calibration parameter used to remove run by run gain variation in real data. So far the calibration was not performed for the earlier run periods except 2017 v5, but it would be straightforward to do that, to provide a sensible value for use in mcsmear (it was not used in mcsmear versions up to & including the current master). FDC_ADC_ASCALE is needed in mcsmear (in a later PR) to scale the sim hits and compare with the threshold.
Please do not give FDC_ADC_ASCALE a default value of 0. If mcsmear cannot read values from ccdb then it would be better to quit. The default value in ccdb is 0.2.
PeakAmp should not be scaled / FDC_ADC_ASCALE. It should be set =q, or not written out. The (later) real data is calibrated to flatten out gain variations, as we don't calibrate the sim data, it should not show gain variations.
I don't believe that is necessary to include PeakAmp in the output, as recon uses q for PeakAmp if PeakAmp is not present.
Split out of #422, as Naomi requested.
In data the reconstruction uses the strip pulse peak (DFDCHit::pulse_height, with q = a_scale × pulse_height). mcsmear wrote only q, so for MC the reconstruction fell back on q in pC where the data use the peak.
This changes the default output: the MC strip pulse height is now on the data scale. Independent of #422 and #423; the strip-threshold PR builds on it.