Repository navigation
Add optional TS5 face intersection to KinKal upstream extrapolation - #2152
Conversation
Add a TS5_Face SurfaceId and a KinKalGeom disk filling the TSDA hole, 1 mm downstream of the TSDA back face. With ExtrapolationSettings.ToTS5 (default false, requires Upstream) the upstream sweep records crossings of it before the TSDA ends the sweep. Tracks reaching the TS this way are highly cosmic-like. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirror the KKExtrap ToTS5 targets (record-only TS5 disk 1 mm downstream of the terminal TSDA plane) and check, for a line and a LoopHelix in both time directions, that a track through the TSDA hole records TS5_Face just before the TSDA, while one hitting the TSDA body or passing outside it records only the TSDA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @michaelmackenzie,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for 69765ec: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 69765ec.
N.B. These results were obtained from a build of this Pull Request at 69765ec after being merged into the base branch at 7024300. For more information, please check the job page here. |
Make the TS5_Face disk cover the whole TS5 face out to the DS inner radius instead of only the TSDA hole, so tracks reaching the TS end of the DS are recorded whether they then pass the TSDA hole, body or outside it. Update the ExtrapolateSweepTest case to match, with a track beyond the DS inner radius recording only the TSDA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #2152
Reviewed at head 7cf7d7792a467c3fe80489b1588a34204935e5f6. First pass.
Decision
- 🟡 comment only. With the flag off (the default) the output is byte-identical to
main, so nothing changes at merge. But the record does not do what the comments say: for the fits an analysis keeps, about one CE track in five has it (finding 1).
Scope understood
- The PR adds
SurfaceIdTS5_Face = 97and a KinKal disk 1 mm downstream of the KinKal TSDA plane. The disk reaches out to the DS inner radius (950 mm). - A new flag,
ExtrapolationSettings.ToTS5, turns on a record-only target for this disk in the upstream sweep. The flag is off by default and needsUpstream. A crossing is saved as a normalKalIntersection. - The stated purpose is to tag cosmic-like tracks that reach the TS end of the DS.
- I also built and ran the previous head, 69765ec, where the disk only filled the TSDA hole. Everything below is about 7cf7d77.
Findings
-
🟠 [S1] For downstream fits, the record is not "highly cosmic-like": about one CE track in five has it
- Evidence: I ran
Production/JobConfig/recoMC/OnSpill.fcl(Sim_best v1_5) withToTS5 : truefor KKDe, KKUe, KKDmu and KKUmu. The input was 4000 events ofdig.mu2e.CosmicSignalOnSpill.MDC2025au_best_v1_5and 2000 events ofdig.mu2e.CeMLeadingLogOnSpill.MDC2025au_best_v1_5. I took KKDe fits with 95 < p < 110 MeV/c atTT_Front, with no fit-quality cut. ATS5_Facecrossing is on 322 of 1718 CE fits (18.7%) and on 148 of 309 cosmic fits (47.9%). For KKDe and KKDmu the upstream sweep runs backwards in time, so every one of their records has pz > 0. These records come from the backwards sweep, which for a CE electron continues upstream past the stopping target where it was made. - The code comments say the opposite.
KKExtrap.hh:203says "A crossing inside its bounds means the track reaches the TS end of the DS, which is highly cosmic-like".DetectorSolenoid.hh:75,KinKalGeomMaker.cc:377,KKFitSettings.hh:132andprolog.fcl:392say the same. - Impact: The flag's only stated use is a cosmic tag. A veto that trusts these comments would remove about 19% of CE in this sample. The PR's validation used only the cosmic sample.
- Suggested fix: Describe the record as what it is: the extrapolated helix reaches the TSDA plane inside the DS bore. Say that for downstream fits the crossing comes from the backwards extrapolation, which for CE runs past the target. Show the separation on a CE sample for the fit direction an analysis keeps. If only upstream-moving tracks are wanted, add the target only in the forwards-in-time sweep.
- Evidence: I ran
-
🟡 [S2]
TS5_Facerepeats the TSDA intersection one for one- Evidence: The TSDA sweep target (
KKExtrap.hh:210-217,inbounds_ = false) already records every crossing of the TSDA plane at any radius. WithToTS5 : falsemy sample has 8889 TSDA crossings, at radii up to 879 mm. - With the option on, every TSDA crossing gets a
TS5_Facecrossing 1 mm before it: 7561 of 7561 in the cosmic sample and 1328 of 1328 in the CE sample. There are only 2 extraTS5_Facerecords. Both come from tracks that turn around between the two planes (|pz| ≈ 1 MeV/c). The PR body reports the same result: 366 crossings for 366. - EventNtuple main already saves the TSDA crossing, both as
TrkInfo::tsdainter(InfoStructHelper.cc:101-108) and as atrksegsentry withsid96. Its radius andinBounds()flag already separate the hole from the body. Of the 1986 crossings at r < 235 mm, 1985 are out of bounds; the other one is within 0.1 mm of the edge. All 6428 crossings at 235–525 mm are in bounds. - Cost: The PR adds an enum value, which becomes permanent once files carry it. It also adds a geometry surface, a configuration flag and a unit test. With the option on, 82–89% of TSDA crossings move, by up to 10.8 µm. That shift is harmless:
inBounds()does not change, and the momentum changes by at most 0.006 MeV/c. - Suggested fix: Use the TSDA intersection (or
tsdainter) for the tag and drop the new surface. Otherwise, say whatTS5_Facerecords that the TSDA intersection does not. This is a simplification point and does not gate.
- Evidence: The TSDA sweep target (
-
⚪ [S3] The face is inside the TSDA, not downstream of it. In the default geometry (
TSdA_v02.txt: z0 = 4204.6 mm, half-length 25.4 mm, detector origin at 10171 mm), the TSDA spans z = −5991.8 to −5941.0 mm. So the KinKal TSDA plane at −5967 mm is its mid-plane. The// back surfacecomment atKinKalGeomMaker.cc:375was already wrong before this PR. The face at −5966 mm is 25 mm inside the absorber. If the surface stays, fix "just downstream of the TSDA" in the new comments and reconsider the name.
Validation check
- Build/tests run: yes.
- FNALbuild passed at 69765ec, merged on 7024300 (16:56 UTC). At 7cf7d77,
mu2e/buildtestreads "This test has not been triggered yet" (17:31 UTC), so I am requesting a build. - I built DataProducts, KinKalGeom, GeometryService and Mu2eKinKal at the base and at 7cf7d77, on CI backing
main/70243009_b2ef90eb_afc847f9. The build gave no warnings. ExtrapolateSweepTestpasses. I made two changes to the newts5Facecase: moving the face upstream of the TSDA, and dropping the in-bounds requirement. The test fails for both, as it should.
- FNALbuild passed at 69765ec, merged on 7024300 (16:56 UTC). At 7cf7d77,
- 🟢 With the flag off (the default), nothing changes. Base and 7cf7d77 give byte-identical products for all 6000 events: 36000 of 36000 KalSeed (KKDe/KKDmu/KKUe/KKUmu), KalSeedMC and Assns collections.
- 🟢 With the flag on, only the new records and the TSDA crossings change.
- All 21425 KalSeeds are identical once their intersections are removed, and all other intersections are identical.
- Every
TS5_Facerecord is in bounds and lies within 0.1 mm of z = −5966 mm. Where the track also crosses the TSDA, the face comes first in sweep order. - The identical seeds show that the target adds no material. With
drives_ = false, it does not drive the extension. - CPU time is the same within noise.
- 🟢 SurfaceId: the enum, the name table and
nSurfaceIds = 77agree, and thestatic_assertatSurfaceId.cc:100enforces this. Existing values are unchanged (TSDAis still 96), so files already written read the same. OnlyValKalSeed.cc:71andValTrkCrvSectorAxis.hh:17loop over the names, and both keep CRV ids only. EventNtuple writessidas an int and needs no change. - 🟢 Config contract check: pass.
- The
fhicl-dumpofrecoMC/OnSpill.fcldiffers from base only byToTS5: falsein KKDe, KKDmu, KKUe, KKUmu and RegrowLH. digitize/OnSpill.fcl, which includes the trigger menu, dumps identically. mu2e-trig-config sets noExtrapolationSettings.ToTS5 : truewithUpstream : falsestops the job when the module is built, with the message "mu2e::KKExtrap: ToTS5 requires Upstream extrapolation". A misspelt key fails fhicl validation.
- The
- Cross-repo consistency: pass. No companion change is needed.
Residual risk
- The CE and cosmic numbers come from one file of each sample, with no fit-quality or best-direction selection.
- Not checked: a Run 1B geometry job.
- A note for anyone testing this on a partial muse build: the backing
libmu2e_DbTables.soloads the backinglibmu2e_DataProducts.so, so withToTS5 : truethe job stops with "SurfaceIdEnum invalid enum name : TS5_Face". Building DbTables in the work area, or preloading the work-area libraries, avoids it.
Author follow-ups
- Correct the comments and the PR description about what a
TS5_Facecrossing means for downstream fits, and show its separation on a CE sample (finding 1). - Say what
TS5_Faceadds over the TSDA intersection andtsdainter, or use those instead (finding 2).
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 7cf7d77: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 7cf7d77.
N.B. These results were obtained from a build of this Pull Request at 7cf7d77 after being merged into the base branch at 7024300. For more information, please check the job page here. |
Describe the TS5_Face record as what it is: the extrapolated helix reaching the TSDA plane inside the DS bore. For downstream fits it comes from the backwards extrapolation, which for CE continues past the stopping target, so it is not by itself a cosmic tag. The KinKal TSDA plane is the absorber mid-plane, not its back surface, so the disk sits inside the absorber; fix that comment and stop calling the disk "downstream of the TSDA". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
For finding 2: this extrapolation should cover the cosmic events that extrapolate to the hole in the TSDA, which may be rare in general but is relevant to the most signal-like cosmic background events. So I don't think this surface is redundant with the TSDA surface in that regard. |
Turn on the TS5_Face record in the LoopHelix drift extrapolation settings, so the default LoopHelix fits and the Production regrows that use LHDRIFTXTRAP record it. The fhicl default stays false, so LHSEEDXTRAP, KLXTRAP and CHXTRAP (Upstream false) are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I turned this on by default as it's need for all field-on loop helices in analysis. |
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 6c0ab8a: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 6c0ab8a.
N.B. These results were obtained from a build of this Pull Request at 6c0ab8a after being merged into the base branch at 70c66d1. For more information, please check the job page here. |
KKFit::sampleFit carried the search start time from one sample surface to the next, so a surface crossed earlier than the previous surface's last crossing was never sampled (e.g. TS5_Face and ST_Front on downstream fits). Start each surface from the beginning of the range, as CentralHelixFit and KinematicLineFit already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks Dave, both are done. SampleSurfaces instead of a new KKExtrap target. The Adding the surface turned up a bug in Geometry from GeometryService.
This changes the existing TSDA surface slightly:
Test. I ran Production
All Companion Production PR, Mu2e/Production#606: |
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 6259129: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 6259129.
N.B. These results were obtained from a build of this Pull Request at 6259129 after being merged into the base branch at 554ef9f. For more information, please check the job page here. |
|
@FNALbuild run build test with Mu2e/Production#606 |
|
⌛ The following tests have been triggered for 6259129: build (Build queue - API unavailable) |
brownd1978
left a comment
There was a problem hiding this comment.
Thanks for following my suggestion and for upgrading the TSDA construction!
|
☀️ The build tests passed at 6259129.
N.B. These results were obtained from a build of this Pull Request at 6259129 after being merged into the base branch at 554ef9f. For more information, please check the job page here. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #2152
Reviewed at head 62591297a48828d9290b32d2fc1e5b6ba04460d6. Re-review of 6c0ab8a.
Decision
- 🟢 approve. The rework follows both of Dave's points, and the new design is simpler than the one I approved. The Geant4 geometry is unchanged. Fit results (status, chi-squared, hits, momentum and t0) are unchanged. The only reco changes are the new and moved intersection records and a small change in
avggap, all explained below. I have one minor finding about the extracted geometry and one set of optional cleanups. Neither blocks.
Scope understood
- The
ToTS5extrapolation option is gone.TS5_Faceis now a sample surface, added toSampleSurfacesforLHDriftFit(Mu2eKinKal/fcl/prolog.fcl:508) andRegrowLH(:671). - The KinKal TSDA annulus and the
TS5_Facedisk are now built fromGeomHandle<TSdA>(GeometryService/src/KinKalGeomMaker.cc:376-406).TSdAgainsrIn(), andconstructTSdAnow reads it instead of working out the radius itself. KKFit::sampleFitnow restarts the search at the start of the time range for each surface (Mu2eKinKal/inc/KKFit.hh:1047).- The net diff (
gh pr diff) touches 11 files. It no longer touchesKKExtrap.hh,KKFitSettings.hh, the KinKalGeomDetectorSolenoid.hhorExtrapolateSweepTest.
Prior findings (from my review at 6c0ab8a)
- 🟢 [was S1] The "highly cosmic-like" wording. FIXED, and still fixed at this head. The new comments at
prolog.fcl:506-507andKinKalGeomMaker.cc:391-394, and the PR body, all say the record is not by itself a cosmic tag. - 🟢 [was S2]
TS5_Facerepeats the TSDA crossing. CLOSED. You took the second option I offered: the PR body now says that inside the DS bore it repeats the TSDA crossing. The data at this head agree. In every drift fit, 0 tracks have a TSDA record without aTS5_Facerecord. - 🟢 [was S3] The KinKal TSDA plane is the mid-plane. FIXED, and now exactly true. For
TSdA_v02the plane is at the absorber center, z = −5966.4 mm.
- OBSOLETE: the TSDA shift of up to 11 µm that I reported at 6c0ab8a came from the old sweep target, which no longer exists. It is replaced by the 0.6 mm geometry move described below.
Findings
- 🟡 [S2] The extracted geometry has a TSdA, so its KinKal TSDA plane moves.
- Evidence: your 16:04 UTC comment says geometries with no TSdA, "extracted", keep the old nominal plane. But
geom_common_extracted.txtincludesgeom_common(throughgeom_common_extracted_v06.txtand_v04.txt), which usesTSdA_v02, sohasElement<TSdA>()is true. I printed the KinKal surfaces for that geometry. The TSDA plane moves from z = −5967.0 to −18730.4 mm in detector coordinates, andTS5_Faceis at −18705.0 mm. The code comment atKinKalGeomMaker.cc:377is accurate. - Impact: none for Production today.
reco/Extracted.fclruns only the field-offKKLinefit, with the upstream extrapolation off. The old value was not at the absorber either, so following the geometry is arguably more correct. - Suggested fix: correct the statement in the thread or the PR body, so that whoever next runs a LoopHelix fit on the extracted geometry knows the plane moved.
- Evidence: your 16:04 UTC comment says geometries with no TSdA, "extracted", keep the old nominal plane. But
- ⚪ [S3] Optional cleanups on lines this PR touches.
Mu2eG4/src/constructTSdA.cc:22-23still includesBeamline.hhandStraightSection.hh. Nothing in the file uses them now.KinKalGeomMaker.cc:384repeats the version-1 placement fromconstructTSdA(ATSD4Offset). The two agree today. No version-1 geometry loads at base or at head (geom_2019_PhaseIfails on a missingcalorimeter_CsI.txt), so this branch cannot be tested. ATSdAaccessor for the placed z would keep the two in one place.- The fallback numbers at
KinKalGeomMaker.cc:378could be named constants. clang-tidy flags them.
Validation check
- Build: I rebuilt the six affected packages at base (
main554ef9f) and at head (this PR merged onto 554ef9f), on the CI backingmain/554ef9f9_7672e815_57e663ce. Both builds had no warnings. - 🟢 Geant4 geometry. I wrote GDML at base and at head for
geom_common(Run 1A, the default),geom_run1_a,geom_run2,geom_run1_b_v40andgeom_run1_b_v01. After removing pointer suffixes, 0 lines differ in all five.constructTSdAprints the same inner radius and center at both (235 mm and z = 4204.6 mm for v02; 135 mm and 4195 mm for v40). - 🟢 KinKal surfaces, printed from the KinKal geometry at base and head:
- Default, Run 1A and Run 2: TSDA moves from z = −5967.0 to −5966.4 mm, r = 235-525 mm.
TS5_Faceis at −5941.0 mm, r ≤ 950 mm. This matches the PR body. - Run 1B (
geom_run1_b_v40andds_on_v40): TSDA is at −5976.0 mm with r = 135-600 mm, andTS5_Faceat −5967.25 mm. The radii match the PR body. The plane also moves 9 mm upstream, which the body does not say. geom_run1_b_v01(no TSdA): the fallback plane at −5967.0 mm, withTS5_Faceat −5941.6 mm.
- Default, Run 1A and Run 2: TSDA moves from z = −5967.0 to −5966.4 mm, r = 235-525 mm.
- 🟢 The
sampleFitfix is correct. It now matchesCentralHelixFit_module.cc:429-434andKinematicLineFit_module.cc:378-386, which already restart for each surface. Each search stays inside the fit range. In about 27,000 reco fits and 938 regrow fits there are 0 duplicate records (same surface within 1e-6 ns). Every record that base wrote for a sampled surface is still there at head, bit-identical, except in the two turn-around fits described below.ST_Outercomes first in the list, so the fix cannot change it. - 🟢 Reco, base against head. I ran Production
recoMC/OnSpill.fclas committed (Sim_best v1_5) on 2000 CE and 2000 cosmic events.- Every product other than the four drift-fit KalSeed collections is identical (414,000 CE and 420,000 cosmic product instances).
- Fit status, chi-squared, ndof, fit consistency, maxgap, hits, straws, segments and domain bounds are identical for every drift fit. Only
_avggapchanges, on 145 of 7366 CE fits and 233 of 6981 cosmic fits, by a median of 0.16% and at most 55%. It is computed over the whole trajectory, including the extrapolation (KKFit.hh:788-791), so it moves when the TSDA plane moves. EventNtuple stores it astrk.avggap. A code search of the Mu2e organization finds no selection that uses it. - Added records: CE
TS5_Face+1362,ST_Front+726,ST_Back+540. CosmicTS5_Face+3750,ST_Front+56,ST_Back+46. AllTS5_Facerecords are in bounds at z = −5941.0 mm. - Every TSDA record moves by 0.50-0.70 mm in z, with no change in momentum magnitude (below 1e-12 MeV/c). The
inBounds()flag changes for 5 CE and 10 cosmic crossings, all within 4 mm of the 235 mm or 525 mm edges. - Two fits (CE 1430:1270:3700 KKDe, cosmic 1430:4988:458374 KKUmu) turn around (pz near 0) between the old and new plane. At head their extrapolation stops at the TSDA instead of turning back. They lose 3 and 2
ST_Foilsrecords and 2ST_Outerrecords, and gain TSDA andTS5_Face. - Your 300-event table: for CE I get exactly your numbers (KKDe 278 tracks, 60 with TSDA, 60 with
TS5_Face,ST_Front0 to 32,ST_Back22 to 38; KKUe 273/55/57). For cosmics I get KKDe 284/132/132 and KKUe 308/146/147, against your 281/130/130 and 302/143/144. My build is on a newermain. - CPU of the four drift fits rises by 1-5% in all 8 chunks, about 0.4-0.8 ms per fit per event. Output size rises by 350 bytes per CE event (+0.13%) and 533 bytes per cosmic event (+0.21%).
- 🟢 Regrow. I ran Production
reco/regrowLH.fcl(OfflineMu2eKinKal.RegrowLH) on 500 CE and 500 cosmic reco events. Only theRegrowLHcollection changes. Every regrow fit with a TSDA record also getsTS5_Face(92 CE, 230 cosmic). ThesampleFitfix also adds 1054ST_Innerrecords on CE. - 🟢 EventNtuple. I ran EventNtuple
main(7b4fe514) on the base and head reco output, 16 jobs, all with exit code 0.trksegsgains 1362 CE and 3750 cosmic entries withsid97, all in bounds. Every basetrksegsentry other than the moved TSDA entries is still there, bit-identical and in the same order, except in the two turn-around tracks above. Of the 3.0 million other ntuple values I compared, onlytrk.avggapchanges, plustsdainter,nstup/nstdownandtrkmcvd.iinteron those two tracks. Theiriintervalues still point at the same surfaces. Nothing in EventNtuple refers toToTS5. - 🟢 Config contract. I ran
fhicl-dumpon 1133 files from Offline, Production, EventNtuple and mu2e-trig-config, including the generated trigger menus, at base and head. 969 dump in both and 164 fail in both. 102 differ, and only inSampleSurfaces. The changed modules are KKDe, KKDmu, KKUe, KKUmu, RegrowKKe, RegrowKKmu and RegrowLH. No Offline, digitize or trigger config changes. - 🟢 Leftovers. A GitHub code search of the Mu2e organization finds
ToTS5only in a prodtools wiki page, as part of the dataset namesTS1ToTS5s100andTS1ToTS5s30.TSdAMaker::makehas one caller (GeometryService.cc:304), and the beamline is built before it (:222). - 🟢 Dave's two points are addressed. The net diff no longer touches
KKExtrap. The surfaces come fromGeomHandle<TSdA>inKinKalGeomMaker.cc. He approved at this head at 17:18 UTC. - FNALbuild at 6259129:
- Build 3637 (16:43 UTC): every test passed except
trigger, which failed with return code 2.apr_TC_calopassed 2078 events against a reference of 1947. Its TrigReport is identical to build 3635's, and builds 3634 and 3635 show the same counts, so the change comes frommain. mu2e-trig-config#196 updated that reference at 16:56 UTC. - Build 3638 (17:36 UTC), with Production#606: every test passed, including
trigger("No problems detected"). Its TrigReport is identical to build 3637's. - clang-tidy reports 3 errors, all in the external
cetlib/LibraryManager.h. The warnings on lines this PR touches are style only.
- Build 3637 (16:43 UTC): every test passed except
- Cross-repo: Production#606 is needed for the reco
RegrowLHto sampleTS5_Face. That module is not on any path today, so the two PRs can merge in either order. Details are in my #606 review.
Residual risk
- I did not run reco with the Run 1B geometry. There the TSDA plane moves 9 mm upstream and widens to r = 135-600 mm, so
inBounds()will change for crossings at 135-235 mm and 525-600 mm. - Each sample is one input file, with no fit-quality selection.
- I did not run
KKTruthSeed, which the PR body says also gainsST_FrontandST_Backsamples. - EventNtuple ran without the three MVA modules from ArtAnalysis, which the CI backing does not provide. So I did not check the MVA outputs. The intersection branches do not depend on them.
Author follow-ups
- Correct the statement that the extracted geometry keeps the old plane (finding 1).
- Optional: the cleanups in finding 2.
Per review: drop the override instead of editing it. The inherited KKDe list is the same, so RegrowLH follows the Offline default (TS5_Face with Mu2e/Offline#2152) and the merge order no longer matters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks Yuri. Finding 1 (extracted geometry): you're right, my comment above was wrong. I also added your other results to the PR body's behaviour changes:
Production#606: done as you suggested. The override is removed and I'm leaving the optional cleanups in finding 2 for a follow-up PR: the unused includes in |
|
📝 The HEAD of |
RegrowLH overrides SampleSurfaces, so add TS5_Face to match the Offline LHDriftFit default (Mu2e/Offline#2152). Requires that Offline PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Adds a record-only surface,
TS5_Face, that records where the extrapolated helix reaches the TSDA inside the DS bore. The crossing is saved as a regularKalIntersectionwith the newSurfaceIdTS5_Face. The surface is sampled throughSampleSurfacesafter the upstream extrapolation, which ends on the TSDA plane.It is on by default for the drift fits (KKDe/KKDmu/KKUe/KKUmu, via
LHDriftFit) and forMu2eKinKal.RegrowLH. The latter also covers the ProductionRefRegrowandRefExtrapSelectconfigs. Mu2e/Production#606 removes the recoRegrowLH'sSampleSurfacesoverride so it inherits the same list; the two PRs can merge in either order. Trigger configurations are unchanged.This is not by itself a cosmic tag. For downstream fits (KKDe/KKDmu), the upstream sweep runs backwards in time, so the record comes from the backwards extrapolation. For a conversion electron, that extrapolation continues upstream past the stopping target. In a 300-event test,
TS5_Faceis on 22% of CE KKDe tracks and 46% of cosmic KKDe tracks. Inside the DS bore it repeats the TSDA crossing; the reviewer's sample has oneTS5_Facerecord per TSDA crossing.Changes
DataProducts: newSurfaceIdTS5_Face = 97, next toTSDA. No existing enum values change.nSurfaceIdsgoes from 76 to 77.GeometryService/BeamlineGeom/Mu2eG4:TS5_Faceare built fromGeomHandle<TSdA>instead of hard-coded numbers.TS5_Faceis a disk out to the DS inner radius on the absorber's downstream face.TSdAgainsrIn().TSdAMakerfills it fromtsda.rin, or from the TS5 inner cryostat radius if that is not set.constructTSdAnow uses it.geom_run1_b_v01) keep the previous nominal plane. The extracted geometry does have a TSdA, so its plane now follows it (see below).Mu2eKinKal:TS5_Faceis added toSampleSurfacesforLHDriftFitandRegrowLH.KKFit::sampleFitnow starts each surface's search at the beginning of the time range, asCentralHelixFitandKinematicLineFitalready do. Before, the search start time carried over from one surface to the next. So a surface crossed earlier than the previous surface's last crossing was never sampled, which affectedTS5_FaceandST_Front/ST_Backon downstream fits.Behaviour changes
TS5_Faceintersections on drift-fit KalSeeds. The validationNInterhistogram and EventNtupletrksegsgain entries.ST_Front/ST_Backsamples on LoopHelix drift fits, regrow fits andKKTruthSeed. On 300 CE events, KKDe goes from 0 to 32ST_Frontsamples and from 22 to 38ST_Backsamples. Trigger fits sample no surfaces (or onlyTT_Mid), so they don't change.TSdA_v02): the plane moves from z = −5967 to −5966.4 mm. Radii are unchanged.geom_run1_b_v40,geom_run1_b_ds_on_v40): it now follows the 17.5 mm Al plate. The plane moves 9 mm upstream, from z = −5967 to −5976.0 mm, andTS5_Faceis at −5967.25 mm. The radii become 135–600 mm, where the previous surface used 235–525 mm, soinBounds()changes for crossings at 135–235 mm and 525–600 mm.geom_common_extracted): it includesTSdA_v02, so the plane moves from z = −5967.0 to −18730.4 mm in detector coordinates, at the absorber.TS5_Faceis at −18705.0 mm. No Production job is affected today:reco/Extracted.fclruns only the field-offKKLinefit, without the upstream extrapolation. A LoopHelix fit on the extracted geometry would see the new plane.avggapis computed over the whole trajectory, including the extrapolation, so it changes slightly when the TSDA plane moves. In the reviewer's 2000-event samples it changed on 2–3% of drift fits, with a median change of 0.16%. Fit status, chi-squared, hits and momentum are unchanged.regrowKL(KinematicLine) does not recordTS5_Face.Validation
recoMC/OnSpill.fcl(Sim_best v1_5) on 300CeMLeadingLogOnSpilland 300CosmicSignalOnSpillMDC2025au events.TS5_Face, for both fit directions.TS5_Facerecords are in bounds, at z = −5941.0 mm.🤖 Generated with Claude Code