36 return StatusCode::SUCCESS;
44 std::vector<bool>& promptMuonsSelectedToKeep,
45 std::vector<bool>& lrtMuonsSelectedToKeep )
const
49 promptMuonsSelectedToKeep.resize(promptMuonCol.
size(),
true);
50 lrtMuonsSelectedToKeep.resize(LRTMuonCol.
size(),
true);
51 std::fill(promptMuonsSelectedToKeep.begin(), promptMuonsSelectedToKeep.end(),
true);
52 std::fill(lrtMuonsSelectedToKeep.begin(), lrtMuonsSelectedToKeep.end(),
true);
55 std::vector<int> promptMuonsOverlapDecision, lrtMuonsOverlapDecision;
56 promptMuonsOverlapDecision.resize(promptMuonCol.
size(), 0);
57 lrtMuonsOverlapDecision.resize(LRTMuonCol.
size(), 0);
60 u_int promptMuonIndex = 0;
61 for (
const xAOD::Muon* promptMuon : promptMuonCol){
64 u_int lrtMuonIndex = 0;
67 std::pair<bool,bool> writeDecision = {
true,
true};
75 if ( (promptMuonsOverlapDecision.at(promptMuonIndex) == 0) && (lrtMuonsOverlapDecision.at(lrtMuonIndex) == 0) ) {
77 std::tie(promptMuonsOverlapDecision.at(promptMuonIndex), lrtMuonsOverlapDecision.at(lrtMuonIndex)) =
checkOverlapForDecor(promptMuon, lrtMuon);
81 ATH_MSG_FATAL(
"Unsupported overlap removal strategy type. Choose from 0 (`defaultStrategy`) or 1 (`passThroughAndDecorate`)");
85 if(!writeDecision.first){
86 promptMuonsSelectedToKeep.at(promptMuon->index()) =
false;
88 if(!writeDecision.second){
89 lrtMuonsSelectedToKeep.at(lrtMuon->index()) =
false;
100 u_int promptMuonIndex = 0;
101 for (
const xAOD::Muon* promptMuon : promptMuonCol){
102 MuonLRTOverlapDecision(*promptMuon) = promptMuonsOverlapDecision.at(promptMuonIndex);
106 u_int lrtMuonIndex = 0;
108 MuonLRTOverlapDecision(*lrtMuon) = lrtMuonsOverlapDecision.at(lrtMuonIndex);
123 if ( (!promptMsTrack && !lrtMsTrack) || (promptMsTrack != lrtMsTrack)){
129 ATH_MSG_DEBUG(
" Prompt muon has author "<< promptMuon->
author()<<
", type "<<promptMuon->
muonType()<<
", pT "<<promptMuon->
pt()<<
", eta "<<promptMuon->
eta()<<
", phi "<<promptMuon->
phi());
142 if (promptPassQuality && !lrtPassQuality) {
145 else if (!promptPassQuality && lrtPassQuality) {
153 if (promptIsCombined && !lrtIsCombined) {
156 else if (!promptIsCombined && lrtIsCombined) {
164 if (promptIDMEdEta <= lrtIDMEdEta) {
172 ATH_MSG_DEBUG(
"Resolution reached the fail-safe point. Why?");
181 return std::make_tuple(0, 0);
184 std::pair<bool, bool> overlapDecision =
resolveOverlap(promptMuon, lrtMuon);
185 if (overlapDecision.first && !overlapDecision.second) {
186 return std::make_tuple(2, 1);
189 return std::make_tuple(1, 2);
196 const xAOD::TrackParticle* ME_track =
muon->trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
197 if (!ID_track || !ME_track)
return FLT_MAX;
198 return ( std::abs( ID_track->
eta() - ME_track->
eta() ) );