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

Merge branch 'ESDtoESDMuonCandidateToolFix' into 'master'

Fix for running ESDtoESD

See merge request atlas/athena!34954
parents 7145fdc8 ff5d579b
No related branches found
No related tags found
No related merge requests found
......@@ -41,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_trackSummaryTool.retrieve() );
ATH_CHECK(m_idHelperSvc.retrieve());
ATH_CHECK(m_beamSpotKey.initialize());
return StatusCode::SUCCESS;
......@@ -111,7 +112,14 @@ namespace MuonCombined {
//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()){
const Trk::MuonTrackSummary* msMuonTrackSummary=nullptr;
//If reading from an ESD, the track will not have a track summary yet
if(!msTrack.trackSummary()){
std::unique_ptr<Trk::TrackSummary> msTrackSummary=m_trackSummaryTool->summary(msTrack, nullptr);
msMuonTrackSummary=msTrackSummary->muonTrackSummary();
}
else msMuonTrackSummary=msTrack.trackSummary()->muonTrackSummary();
for(auto& chs : msMuonTrackSummary->chamberHitSummary()){
if(chs.isMdt() && m_idHelperSvc->stationIndex(chs.chamberId())!=Muon::MuonStationIndex::EM){
skipTrack=false;
break;
......
......@@ -17,6 +17,7 @@
#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "TrkToolInterfaces/IExtendedTrackSummaryTool.h"
namespace MuonCombined {
......@@ -38,6 +39,7 @@ namespace MuonCombined {
ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackBuilder;
ToolHandle<Muon::IMuonTrackExtrapolationTool> m_trackExtrapolationTool;
ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor;
ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
......
......@@ -256,6 +256,13 @@ def MuonCandidateToolCfg(flags, name="MuonCandidateTool",**kwargs):
kwargs.setdefault("AmbiguityProcessor", ambiguityprocessor )
result.merge(acc)
from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryToolCfg
acc = MuonTrackSummaryToolCfg(flags)
track_summary = acc.getPrimary()
result.merge(acc)
kwargs.setdefault("TrackSummaryTool", track_summary)
if flags.Beam.Type=="cosmics":
kwargs.setdefault("ExtrapolationStrategy", 1 )
tool = CompFactory.MuonCombined.MuonCandidateTool(name,**kwargs)
......
......@@ -389,8 +389,8 @@ TrigSignatureMoniMT INFO HLT_mu6_mu4_L12MU4 #1713
TrigSignatureMoniMT INFO -- #1713982776 Events 4 4 4 4 4 4 - - 4
TrigSignatureMoniMT INFO -- #1713982776 Features 8 8 12 18 - -
TrigSignatureMoniMT INFO HLT_mu6_mu6noL1_L1MU6 #451489897
TrigSignatureMoniMT INFO -- #451489897 Events 10 10 10 10 10 10 6 4 4
TrigSignatureMoniMT INFO -- #451489897 Features 14 13 16 21 9 7
TrigSignatureMoniMT INFO -- #451489897 Events 10 10 10 10 10 10 5 4 4
TrigSignatureMoniMT INFO -- #451489897 Features 14 13 16 21 8 7
TrigSignatureMoniMT INFO HLT_mu6fast_L1MU6 #3518031697
TrigSignatureMoniMT INFO -- #3518031697 Events 10 10 10 - - - - - 10
TrigSignatureMoniMT INFO -- #3518031697 Features 14 - - - - -
......
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