Skip to content
Snippets Groups Projects
Commit 32e88b30 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'EMOnlyTrack' into 'master'

Reject poor quality EM-only tracks

See merge request atlas/athena!34859
parents 096c155b c380cd46
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
// (c) ATLAS Combined Muon software
//////////////////////////////////////////////////////////////////////////////
#include "TrkTrackSummary/MuonTrackSummary.h"
#include "MuonCandidateTool.h"
namespace MuonCombined {
......@@ -40,6 +41,7 @@ namespace MuonCombined {
if( !m_trackExtrapolationTool.empty() ) ATH_CHECK(m_trackExtrapolationTool.retrieve());
else m_trackExtrapolationTool.disable();
ATH_CHECK(m_ambiguityProcessor.retrieve());
ATH_CHECK(m_idHelperSvc.retrieve());
ATH_CHECK(m_beamSpotKey.initialize());
return StatusCode::SUCCESS;
}
......@@ -89,11 +91,25 @@ namespace MuonCombined {
else if( !standaloneTrack->perigeeParameters()->covariance() ) ATH_MSG_WARNING(" Track with perigee without covariance " << standaloneTrack);
trackLinks[ standaloneTrack ] = std::make_pair(trackLink,standaloneTrack);
}else{
standaloneTrack=new Trk::Track(msTrack);
trackLinks[ standaloneTrack ] = std::make_pair(trackLink,nullptr);
}
extrapTracks->push_back( standaloneTrack );
tracksToBeDeleted.insert( standaloneTrack ); // insert track for deletion
//We can create tracks from EM segments+TGC hits
//If these are not successfully extrapolated, they are too low quality to be useful
//So only make candidates from un-extrapolated tracks if they are not EM-only
bool skipTrack=true;
for(auto& chs : msTrack.trackSummary()->muonTrackSummary()->chamberHitSummary()){
if(chs.isMdt() && m_idHelperSvc->stationIndex(chs.chamberId())!=Muon::MuonStationIndex::EM){
skipTrack=false;
break;
}
}
if(!skipTrack){
standaloneTrack=new Trk::Track(msTrack);
trackLinks[ standaloneTrack ] = std::make_pair(trackLink,nullptr);
}
}
if(standaloneTrack){
extrapTracks->push_back( standaloneTrack );
tracksToBeDeleted.insert( standaloneTrack ); // insert track for deletion
}
}
ATH_MSG_DEBUG("Finished back-tracking, total number of successfull fits " << ntracks);
......
......@@ -16,6 +16,7 @@
#include "MuidInterfaces/ICombinedMuonTrackBuilder.h"
#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
namespace MuonCombined {
......@@ -37,6 +38,7 @@ namespace MuonCombined {
ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackBuilder;
ToolHandle<Muon::IMuonTrackExtrapolationTool> m_trackExtrapolationTool;
ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor;
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
unsigned int m_extrapolationStrategy;
......
......@@ -9,7 +9,7 @@
284500 87473063 62 76 5 2 6 2 4 6 4 2
284500 87473068 26 35 1 1 0 0 0 0 0 0
284500 87473075 72 84 6 0 5 0 5 5 4 1
284500 87473084 83 85 7 3 14 1 13 10 5 5
284500 87473084 83 85 7 2 14 1 13 10 5 5
284500 87473091 43 49 3 0 2 1 1 5 2 3
284500 87473096 72 75 3 2 2 0 2 3 2 1
284500 87473104 61 63 6 0 6 1 5 5 4 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment