Repository navigation
material effects - #2081
material effects#2081sophiemiddleton wants to merge 2 commits into
Conversation
|
Hi @sophiemiddleton,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for f00cd50: build (Build queue - API unavailable) |
|
☀️ The build tests passed at f00cd50.
N.B. These results were obtained from a build of this Pull Request at f00cd50 after being merged into the base branch at a9ddd06. For more information, please check the job page here. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #2081
Reviewed at head f00cd50e59f3b7cb9a85a7c10a1713ff85694c1e. First pass.
Decision
- 🟡 comment. The geometry, the materials and the new extrapolation code check out. With the two new options turned off, the output is identical to
mainon all 16508 events of the nightlyreco_03input. But both options are on by default inLHDriftFit, which production on-spill reconstruction uses. With them on, about 1% of the LoopHelix fits are lost and almost every fit changes (finding 1). Please settle that before merging: either show it is an improvement, or turn the defaults off.
Scope understood
- What the PR adds:
KinKalGeomgets the calorimeter front panels as three layers each (carbon fiber, foam, carbon fiber), the cooling pipes as centerlines, and the crystal-case inner rings.- These get new surface IDs 320-323.
KKExtrap::extrapolateCaloMaterialadds them when a fit is extrapolated to the calorimeter (ToCaloMaterial).KKFit::addCaloMaterialadds the ones inside the fit range and refits (AddCaloMaterial).KKShellXing::updateReferencenow searches the neighbouring pieces when a crossing moves.MaterialsList.datagets six materials.
- Both options are set
trueinMu2eKinKal/fcl/prolog.fcl, at:395(LHDRIFTXTRAP) and:505(LHDriftFit).KKDe,KKUe,KKDmuandKKUmuinProduction/JobConfig/reco/prolog.fcl:57-84inherit them. SorecoMC/OnSpill.fcl, which runs in 18 prodtools campaign entries, picks them up.OffSpill(KKCHmu) andExtracted(KKLine) keep the C++ default offalse.- The description mentions neither the production defaults nor the
KKShellXingchange.
Findings
- 🟠 [S1] The new options are on in production on-spill reconstruction. With them, about 1% of the LoopHelix fits are lost and almost every fit changes, and the PR has no validation.
- Evidence: the nightly
reco_03input, all 16508 events, onmain(the nightly builda9ddd063) and on this PR merged onto it. The track counts are:
- Evidence: the nightly
| fit | main |
this PR |
|---|---|---|
KKDe |
16486 | 16362 |
KKUe |
16303 | 16146 |
KKDmu |
16316 | 16109 |
KKUmu |
16043 | 15934 |
- Of the 16252 matched
KKDetracks, 16134 change, and 2514 change their active hit count. - For conversion-like
KKDetracks (95-110 MeV atTT_Front, fit consistency above 1e-3, at least 20 hits; 10769 onmain), the change in momentum atTT_Frontis small: median 0.007 MeV, 99th percentile 0.34 MeV. 34 tracks move by more than 1 MeV, and 1 is lost. - Most of the lost tracks are poor fits: 101 of the 125 lost
KKDetracks have fewer than 20 hits. But good fits are lost too. - Example: event 1430:1065:1269, a 54 MeV
KKDetrack with 27 hits before extension.- On
main:After extending the fit : goodFit = 1, fitcon = 0.9054, nHits = 30, 1 calo-hits. - At this head: the three disk-0 front panel layers are added (at 766.2 to 766.5 ns), then
goodFit = 0, fitcon = 0.0000, and the track is not saved.
- On
- The refit is the cause.
KKTrack::addFitMaterialXingscallsextendwith the full fit configuration (KKTrack.hh:334), which replays the whole extension schedule. In the printout, meta-iterations 13 to 21 follow the original 12. That replay is where hits change state and fits fail. - The replay also costs CPU. The four LoopHelix fits take 112.8 ms per event against 81.5 ms on
main, andKKDealone goes from 20.6 to 31.6 ms. - Control: with
AddCaloMaterialandToCaloMaterialset tofalseon the four fits, everyKalSeedcollection, with all its intersections, is identical tomainin all 16508 events. So all of the change comes from these two options. - Suggested fix, any of these:
- Set both defaults to
falseuntil validated, with momentum resolution and efficiency against MC truth on conversion electrons and on a background sample. - Or add the panel material in the same extension step that adds the
CaloHit, rather than in a second full extension.
- Set both defaults to
- Either way, please say in the description that production output changes.
- ⚪ [S3] The pipe and ring layout is a second copy of the G4 construction.
KinKalGeomMaker::makeCaloPipesreproducescaloBuildFrontPlateinconstructDiskCalorimeter.cc, including its0.9975angle factor, the 2 mm shortening and the- 0.1manifold margin (KinKalGeomMaker.cc:199,:211,:215).- If the G4 layout changes, KinKal goes out of step without any error.
- A description of the pipes kept once, in
DiskCalorimeter, and used by both would avoid that. This does not gate.
- ⚪ [S3] Small items.
- The front panel material names come straight from the geometry file and must exist in
MaterialsList.data.geom_common_trackerVST.txt:373-374sets them to"G4_AIR", which is not there.MatDBInfo::findDetMaterialthen throwsCannot find requested material G4_AIRat the first crossing.- The only user,
Production/Processing/vstdata_epilog.fcl, runs line fits with the options off, so nothing fails today.
- Regrown fits do not get the in-fit material (the TODO at
KKFit.hh:418), while the regrow configurations useLHDRIFTXTRAPand so add it in the extrapolation.RefRegrow.fclis in no campaign. DiskCalorimeterMaker.cc:117givesinnerCFRingMateriala default of"CarbonFiber". G4 reads the same key with no default, and both calorimeter geometry files set it, so the default can go.
- The front panel material names come straight from the geometry file and must exist in
Checked, no action needed
- 🟢 The surface IDs are append-only.
- The new values are 320-323, after
EMC_Disk_1_Back(317), so no existing value moves. SurfaceIdis stored as the enum integer throughEnumToStringSparse, so older files read the same.nSurfaceIdsis used only in thestatic_assert(SurfaceId.cc:95).- EventNtuple stores
sidas an integer, with no calorimeter-specific list.
- The new values are 320-323, after
- 🟢 Every new
TimeRangeis built from a time inside the range.extrapolateCaloMaterial:tstartis clamped into the fit range (KKExtrap.hh:491) and later set from intersection times (:515).extrapolateCaloSupport(:572) does the same.caloSupportXings(CaloMaterialLayers.hh:64,:74) starts fromgood()intersections, andgood()requires the intersection to be in range.KKFit::addCaloMaterialorders its ends (KKFit.hh:440).KKShellXinguses ±1 ns (:90).- The calorimeter material is added after the DS and CRV material passes and before the material-free disk extension (
KKExtrap.hh:151). That is the order #2059 needed.
- 🟢 The materials match G4's own definitions (
ConstructMaterials.cc:1266-1295,:1372-1378):CarbonFiber_resin: C5H5O2 at 1.1 g/cm³.CarbonFiber: 46% fiber at 1.422 g/cm³. G4 computes the same weighted density.AluminumHoneycomb: 0.03 g/cm³.CaloPipeAlandCaloRingAl: G4_Al, ascalorimeter.pipeMaterialand the aluminium rings use.
- 🟢 The layer positions match G4.
- The case front is
frontFaceCenter - crystalCapZLength, because the crystal origin sits one cap length behind the case front (DiskCalorimeterMaker.cc:215). G4 places the front plate directly upstream of the case. - The 3 / 21.75 / 3 mm layers and the pipe plane, one pipe radius into the foam, follow
caloBuildFrontPlate(ZposPipe).
- The case front is
- 🟢 With the options off, the
KKShellXingchange and the new geometry leave every output unchanged (the control in finding 1). - 🟢 No crash. All 16508
reco_03events run at this head with its defaults, and so do 200ceSimRecoevents.
Validation check
- Build: Offline
maina9ddd063merged with this head, with Production94a4d81fand mu2e-trig-config2b90c646, p109. These are the same three commits as the nightly build. Production/Validation/nightly/reco_03.fclon its two dig inputs, read in place, all 16508 events, with everyKalSeedcollection printed per event (PrintModuleverbose 2: fit summary and all intersections). It was run three ways:main, this PR, and this PR with the two options off.Production/Validation/ceSimReco.fcl, 200 events (baseSeed8),mainagainst this PR:- 84 of 85
KKDetracks change. - The change in momentum at
TT_Fronthas a median of 0.012 MeV and a maximum of 1.29 MeV. - No track is lost.
- 84 of 85
- With
KKDeprintout on, over 100 events, front panel material was added about 290 times and inner-ring material 21 times. A second pass was needed 4 times. - Not checked:
- Momentum resolution against MC truth.
- The cooling-pipe wall depth (
wallDepth) against G4, beyond reading the code.
Author follow-ups
- Settle finding 1. Either turn the defaults off until validated, or show resolution and efficiency against MC truth, and avoid the second full extension that loses fits.
- Say in the description that production output changes, and mention the
KKShellXingchange.
This pull request introduces support for modeling and tracking the calorimeter disk front panel material and embedded cooling pipes in the Mu2e simulation and reconstruction. The changes add new surface IDs for the front panel layers and pipes, implement a detailed geometric and material model for these components, and update the extrapolation and configuration logic to include them in fits and track propagation. This enables more accurate modeling of material effects for tracks passing through the calorimeter front panels.
Calorimeter front panel and cooling pipes modeling:
EMC_Disk_0_FrontPanelandEMC_Disk_1_FrontPaneltoSurfaceIdEnum, updated the surface ID count, and registered their string names. [1] [2]CaloFrontPanelPipesclass to represent the geometry and material of cooling pipes embedded in the calorimeter front panels, including methods to compute the material depth crossed by a track. [1] [2]KinKalGeomandKinKalGeomMakerto construct and store the front panel material layers and cooling pipes for each calorimeter disk, including detailed geometric construction and material assignment. [1] [2] [3] [4] [5] [6] [7]Geometry and configuration enhancements:
Extrapolation and material handling:
CaloMaterialLayers) to access both fixed-thickness front panel layers and position-dependent cooling pipe material for use in extrapolation and fitting.