MuonCombinedReco - Refactor algorithm dependencies
This MR is a keen attempt to reduce the CPU footprint of the combined muon reconstruction. As outlined in ATLASMCP-107, the combined reconstruction schedules independently, segmnet-tagging, calo-tagging, STACO, MuidCo and MuGirl of each other. In the vast majority of the cases, preference is given to tracks reconstructed by MuidCo
.
Given that MuGirl
and SegmentTagging
are quite CPU exhaustive, the idea is to split the creation of the MuonCandidates into two steps
- Select the ID tracks and augment them with a calo extension. Pipe this collection to MuonCaloTag and MuonCombined
- Evaluate which inner detector candidates are succesfully combined and exclude them from the candidate list. Equip the remaining ones with the muonSystemExtension used by
MuGirl
to find the combined tracks. Pipe the new collection to the SegmentTagging & MuGirl
To perform step two, the MuonInDetToMuonSystemExensionAlg
is added. The constraint to perform the extrapolation into sectors only, which was added in !48130 (merged), is moved from the MuonInDetCanidateAlg
to the MuonInDetToMuonSystemExensionAlg
. However, without removing the hits already used up by MuidCo
. Tagging @iliadis, to implement these in a following MR.
To ilustrate the gain in CPU footprint, a reconstruction test is performed on data18_13TeV.00357750.physics_Main.daq.RAW._lb0105._SFO-4._0002.data
using the bare 2021-12-03
nightly
15:44:58 PMonSD n cpu max@evt vmem max@evt malloc max@evt component
15:44:58 PMonSD [evt] 99 302 700@66 0 0@0 357 859@86 MuonCombinedInDetCandidateAlg
15:44:58 PMonSD [evt] 99 140 1020@66 0 0@0 127 901@66 MuonInsideOutRecoAlg
15:44:58 PMonSD [evt] 99 88 660@66 0 0@0 1 6@40 MuonSegmentTagAlg
15:44:58 PMonSD [evt] 99 100 1430@69 0 0@0 84 499@69 MuonCombinedAlg
15:44:58 PMonSD [evt] 99 196 990@93 0 0@0 221 1082@93 MuonCombinedInDetCandidateAlg_LRT
15:44:58 PMonSD [evt] 99 43 390@93 0 0@0 58 474@1 MuGirlAlg_LRT
15:44:58 PMonSD [evt] 99 48 240@27 0 0@0 0 2@72 MuonSegmentTagAlg_LRT
15:44:58 PMonSD [evt] 99 32 600@32 0 0@0 11 211@32 MuonCombinedAlg_LRT
and the modifications introduced in this MR:
13:58:55 PMonSD [evt] 99 21 60@86 0 0@0 290 728@86 MuonCombinedInDetCandidateAlg
13:58:55 PMonSD [evt] 99 275 650@57 0 0@0 68 185@8 MuonInDetToMuonSystemExtensionAlg
13:58:55 PMonSD [evt] 99 72 670@66 0 0@0 62 554@66 MuonInsideOutRecoAlg
13:58:55 PMonSD [evt] 99 80 610@66 0 0@0 0 3@66 MuonSegmentTagAlg
13:58:55 PMonSD [evt] 99 100 1440@69 0 0@0 85 500@69 MuonCombinedAlg
13:58:55 PMonSD [evt] 99 12 40@27 0 0@0 177 856@93 MuonCombinedInDetCandidateAlg_LRT
13:58:55 PMonSD [evt] 99 183 940@93 0 0@0 48 234@93 MuonInDetToMuonSystemExtensionAlg_LRT
13:58:55 PMonSD [evt] 99 42 390@93 0 0@0 57 474@1 MuGirlAlg_LRT
13:58:55 PMonSD [evt] 99 46 230@27 0 0@0 0 2@72 MuonSegmentTagAlg_LRT
13:58:55 PMonSD [evt] 99 31 590@32 0 0@0 12 211@32 MuonCombinedAlg_LRT
The MuGirl
alg takes about 50% less CPU time and SegmentTagging
about 10%. Relatively small gains are achieved for the LRT
chain and for the construction of the full InDetCandidates
. This will be further optimized by @iliadis.
It is super crucial to note that this approach will defeat basic assumptions in the strategy to measure the reconstruction efficiency on Jpsi
candidates. Segment tag probes will only include the muons rejected by the bulk of the combined reconstruction. Tagging @dcieri, @gabarone, @mvanadia for information.
Also tagging @wleight, @rosati, @stavrop for a review-pending-expert
Addresses as well ATLASRECTS-6726, ATLASRECTS-6734