Repository navigation
recalibrate KinKal brehmsstralung cutoff - #2168
edcallaghan wants to merge 1 commit into
Conversation
|
Hi @edcallaghan,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for fa6b952: build (Build queue - API unavailable) |
|
☀️ The build tests passed at fa6b952.
N.B. These results were obtained from a build of this Pull Request at fa6b952 after being merged into the base branch at d29cb22. For more information, please check the job page here. |
brownd1978
left a comment
There was a problem hiding this comment.
Thanks Ed! Note this PR needs to wait for the KinKal PR to be merged and built.
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #2168
Reviewed at head fa6b952643a304083482cfd5497cc35cefe38035. First pass.
Decision
- 🔴 request changes, only to hold the merge. The new value is right: with KFTrack/KinKal#236's corrected formula it gives exactly the mean radiative loss that 0.03 gave before. But Offline cannot use #236 yet. Merged today, this line would triple the modelled loss for every electron and positron fit. brownd1978 already noted that this PR has to wait. I will approve once the envset on
main, or this PR, brings in a KinKal release that contains #236.
Scope understood
- One line:
ElectronBrehmsFractioninKinKalGeom/fcl/prolog.fcl:18goes from 0.03 to 0.09277414. This is the bremsstrahlung cutoffymaxthat KinKal'sDetMaterialuses for the mean and variance of the radiative energy loss.
Findings
- 🟠 [S1] With the KinKal that Offline builds against today, this triples the modelled mean radiative loss.
- Evidence:
- KinKal#236 divides the mean loss per radiation length by 3 (
MatEnv/DetMaterial.cc:83). It merged into KinKalmainat 23:38 UTC on 17 November as906c4ce4. It is in no tag yet:v3.9.2...906c4ce4is 3 commits ahead. - Offline
mainnow uses envsetp111(Offline#2111 merged at 21:48 UTC today). p111 setsKINKAL_VERSION="v03_09_02", so it does not have #236. No later envset exists yet; the Muse envset directory ends atp111. - With the old formula, the mean loss per radiation length is 4y − 2y² + y³. At y = 0.03 that is 0.1182 E. At y = 0.09277414 it is 0.3547 E, exactly 3.0 times more.
- KinKal#236 divides the mean loss per radiation length by 3 (
- Impact: every electron and positron fit, in reco and in extrapolation, would model 3 times the calibrated radiative loss. In my KinKal#236 review, a change of 0.0788 E per radiation length in this mean moved the tracker-front momentum by −46 keV/c and the tracker back by +44 keV/c. This change is +0.2365 E, three times larger in the other direction. Scaling from that, I estimate about +140 keV/c at the tracker front and −130 keV/c at the back. I did not run this case.
- Suggested fix: put the envset bump to a KinKal release with #236 into this PR, so that the formula and the cutoff change in one merge. Otherwise, hold this PR until such an envset is on
main. A line in the description would help whoever merges.
- Evidence:
Checked, no action needed
- 🟢 The value. With #236's formula, the mean loss is (4y − 2y² + y³)/3. Solving (4y − 2y² + y³)/3 = 0.118227, the old mean at y = 0.03, gives y = 0.0927741431. The PR's 0.09277414 matches it to 8 digits, and it reproduces the old mean to 3 parts in 10⁸. That is the "restore the effect of the previous calibration" the description promises, for the mean.
- 🟢 This is the only place the value is set. In Offline the parameter is read with no C++ default (
KinKalGeom/inc/KKMaterial.hh:42). A GitHub code search finds noElectronBrehmsFractionin Production, mu2e-trig-config or EventNtuple. - 🟢 FNALbuild passed at this head at 00:39 UTC on 18 November (merged on
d29cb22c). That run was on p110, before #2111 movedmainto p111.
Validation check
- Build/tests run: no new build. The arithmetic above, and the measured effect from my KinKal#236 review (Offline
8628ceb7with KinKal v3.9.1, with and without #236; recoMC on 4,000 CeMLeadingLog mix events). - Sourced numbers: the new cutoff, checked against #236's formula above. The old 0.03 comes from Offline#1900 ("retuned to center the reconstructed track momentum at the tracker front").
- Config contract check: pass. Same key, same type.
- Cross-repo consistency: needs follow-up (finding 1).
Residual risk
- The variance is not restored, and it is not meant to be. At y = 0.0928 the radiative variance is 9.2 times the old one, which is the fix #236 is after. No one has measured what that does to the fit: momentum centring at the tracker front, pulls and fit consistency. The mean is restored exactly, so the centring should come back close to today's. The larger variance changes how the fit weights each material crossing, though, so "close" is an expectation, not a measurement.
Author follow-ups
- Bring in the KinKal release with #236 in the same merge as this change, or hold the PR until it is on
main(finding 1). - Once that release is built, compare recoMC before and after on a CE sample: the TT_Front residual, the momentum pull and the fit consistency. The variance increase is the part no one has measured yet.
KinKal PR #236 fixed a typo in the calculation of the mean radiative energy loss of electrons via bremsstrahlung, which invalidates the calibrated cutoff to the photoemission spectrum used. The automated PR review suggested an updated cutoff to restore the effect of the previous calibration, which I checked and provide here with higher precision.