MuonReconstruction - Refactor the treatment of writing segments to disk
Hello everybody,
this MR cleans up the usage of the MuonSegments in the reconstruction:
- Thus far, the
Trk::Segments
from the Moore chain were converted toxAOD::MuonSegment
. The reconstruction algorithm downstream retrieving these segments link back to theTrk::Segment
again which makes this conversion quite pointless, as we have to consider that this container won't be dumped to disk as the segments have to be merged later with the ones from the MuGirl chain. The algorithms relying on thexaodMuonSegments
are switched to retrieve theTrk::Segment
container (closes ATLASRECTS-6445) directly. - Until now, the final
MuonSegmentContainer
was created by theMuonCreatorAlg
, which copied by default the Moore segment container and then added to it the MuGirl segments here and there. However, there is more than oneMuonCreatorAlg
chain active, such that we duplicate these segments written to disk, in principle, if they were scheduled for write-out. TheMuonSegMergerAlg
is introduced to take over the job. Segments from all muon authors and chains are copied to a common segment container, which will become later the MuonSegmentContainer. These are referred to as persistent segments. To avoid that we have to recreate allMuonCandidates
&TagBase
maps, theMuonTagToSegMap
auxiliary class is added providing a link between the transient and persistent version of associated muon segments. It should be noted that theMuonSegmentContainer
now only contains segments that are somehow used in the reconstruction chain. There might be duplicates originating from theMuGirl
<->MuTagIMO
orMuGril
<->STACO
ambiguities, which are not considered by the algorithm. - To not cut the possibilities of analyses exploiting segments that did not grow to a full muon candidate, all remaining segments are dumped into the
UnAssocMuonSegments
container. Ambiguities between different segment candidates are optionally resolved. - For one reason or another, the segment container from the Low-beta reconstruction chain has not been written to the AOD thus far. This container is now added
A quick comparison of the q442 outputs:
165.396 kb 15.371 kb 0.031 kb 10.760 500 StauSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]
317.167 kb 103.154 kb 0.206 kb 3.075 500 MuonSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]
2264.361 kb 927.048 kb 1.854 kb 2.443 500 UnAssocMuonSegments (DataVector<xAOD::MuonSegment_v1>) [*Unknown*]
vs. current master
2904.281 kb 1153.210 kb 2.306 kb 2.518 500 MuonSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]
Note to the L1 shifter: The last commit is the unleash of the clang-formater, a.k.a the kraken.
Merge request reports
Activity
added 2 commits
This merge request affects 10 packages:
- MuonSpectrometer/MuonConfig
- MuonSpectrometer/MuonReconstruction/MuonRecExample
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool
- Reconstruction/MuonIdentification/MuonCombinedAlgs
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Reconstruction/MuonIdentification/MuonCombinedConfig
- Reconstruction/MuonIdentification/MuonCombinedEvent
- Reconstruction/MuonIdentification/MuonCombinedRecExample
- Reconstruction/MuonIdentification/MuonCombinedToolInterfaces
- Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools
Affected files list will not be printed in this case
Adding @goetz ,@rosati ,@wleight ,@stavrop ,@jojungge ,@egodden as watchers
added MuonSpectrometer Reconstruction master review-pending-level-1 labels
CI Result FAILURE (hash a1194c59)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make required tests optional tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 1, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 51678]Multiple compilation errors:
In file included from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h:11, from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx:5: /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonTrackToSegmentAssociationTool.h:32:52: error: 'Track' in namespace 'Trk' does not name a type 32 | virtual bool associatedSegments(const Trk::Track& track, const Trk::SegmentCollection* segments, | ^~~~~ In file included from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx:5: /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h:31:14: error: 'bool MuonCombined::TrackSegmentAssociationTool::associatedSegments(const Trk::Track&, const SegmentCollection*, std::vector<const Muon::MuonSegment*>&) const' marked 'override', but does not override 31 | bool associatedSegments(const Trk::Track& muon, const Trk::SegmentCollection* segments, | ^~~~~~~~~~~~~~~~~~ In file included from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h:11, from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx:5: /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonTrackToSegmentAssociationTool.h:32:22: warning: 'virtual bool MuonCombined::IMuonTrackToSegmentAssociationTool::associatedSegments(const int&, const SegmentCollection*, std::vector<const Muon::MuonSegment*>&) const' was hidden [-Woverloaded-virtual] 32 | virtual bool associatedSegments(const Trk::Track& track, const Trk::SegmentCollection* segments, | ^~~~~~~~~~~~~~~~~~ In file included from /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx:5: /var/lib/jenkins/workspace/CI-MERGE-REQUEST-CC7/master/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h:31:14: note: by 'bool MuonCombined::TrackSegmentAssociationTool::associatedSegments(const Trk::Track&, const SegmentCollection*, std::vector<const Muon::MuonSegment*>&) const' 31 | bool associatedSegments(const Trk::Track& muon, const Trk::SegmentCollection* segments, | ^~~~~~~~~~~~~~~~~~
Setting review-user-action-required -L1
added review-user-action-required label and removed review-pending-level-1 label
This merge request affects 10 packages:
- MuonSpectrometer/MuonConfig
- MuonSpectrometer/MuonReconstruction/MuonRecExample
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool
- Reconstruction/MuonIdentification/MuonCombinedAlgs
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Reconstruction/MuonIdentification/MuonCombinedConfig
- Reconstruction/MuonIdentification/MuonCombinedEvent
- Reconstruction/MuonIdentification/MuonCombinedRecExample
- Reconstruction/MuonIdentification/MuonCombinedToolInterfaces
- Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools
Affected files list will not be printed in this case
Adding @goetz ,@rosati ,@wleight ,@stavrop ,@jojungge ,@egodden as watchers
added review-pending-level-1 label and removed review-user-action-required label
added Run2-DataReco-output-changed Run2-MCReco-output-changed labels
CI Result FAILURE (hash 7110f558)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make required tests optional tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 51699]This merge request affects 10 packages:
- MuonSpectrometer/MuonConfig
- MuonSpectrometer/MuonReconstruction/MuonRecExample
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool
- Reconstruction/MuonIdentification/MuonCombinedAlgs
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Reconstruction/MuonIdentification/MuonCombinedConfig
- Reconstruction/MuonIdentification/MuonCombinedEvent
- Reconstruction/MuonIdentification/MuonCombinedRecExample
- Reconstruction/MuonIdentification/MuonCombinedToolInterfaces
- Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools
Affected files list will not be printed in this case
Adding @goetz ,@rosati ,@wleight ,@stavrop ,@jojungge ,@egodden as watchers
CI Result FAILURE (hash 327cfd75)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make required tests optional tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 51751]