Skip to content
Snippets Groups Projects
Commit 5a703ae9 authored by Edward Moyse's avatar Edward Moyse
Browse files

Remove MuonCombiTrackBuilder which is no longer used, and other misc cleanup to this package.

I have removed MuonCombiTrackBuilder because it is not called by any python fragment, and the tool it requires seems to be missing. Also moved the remaining .h file to the src/ directory and added the thread safety file.
parent 4ec44bdc
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUPATTRACKBUILDER_H
#define MUPATTRACKBUILDER_H
#include <string>
#include "AthenaBaseComps/AthAlgorithm.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/ToolHandle.h"
#include "TrkSegment/SegmentCollection.h"
#include "TrkTrack/TrackCollection.h"
#include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
namespace Muon {
class IMuonTrackFinder;
}
//class IMuonboyToParticleTool;
//namespace Muon {
// class IMuonBackTracker;
//}
class MuPatTrackBuilder : public AthAlgorithm
{
public:
MuPatTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator);
public:
virtual ~MuPatTrackBuilder();
virtual StatusCode initialize();
virtual StatusCode execute();
virtual StatusCode finalize();
private:
SG::ReadHandleKey<Trk::SegmentCollection> m_segmentKey; //!< Key of input MuonSegmentCombination collection
SG::WriteHandleKey<TrackCollection> m_spectroTrackKey; //!< Track output Key for tracks strictly in MS
SG::WriteHandleKey<TrackCollection> m_spectroPartiKey; //!< Track output Key for track particles (strictly in MS)
SG::WriteHandleKey<TrackCollection> m_extrapTrackKey; //!< Output Key for back-extrapolated tracks
SG::WriteHandleKey<TrackCollection> m_extrapPartiKey; //!< Output Key for back-extrapolated particles
ToolHandle<Muon::IMuonTrackFinder> m_trackMaker; //!< Actual tool to do the track finding
// ToolHandle<IMuonboyToParticleTool> m_convTool; //!< Tool for converting from tracks to track particles (acts as a flag)
// ToolHandle<Muon::IMuonBackTracker> p_IMuonBackTracker; //!< Tool for extrapolating tracks
ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface" }; //!< helper Tool
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCOMBITRACKBUILDER_H
#define MUONCOMBITRACKBUILDER_H
#include <string>
#include "AthenaBaseComps/AthAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
#include "MuonSegment/MuonSegmentCombinationCollection.h"
#include "TrkTrack/TrackCollection.h"
namespace Muon {
class IMuonCombiTrackMaker;
}
class MuonCombiTrackBuilder : public AthAlgorithm
{
public:
MuonCombiTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator);
public:
virtual ~MuonCombiTrackBuilder();
virtual StatusCode initialize();
virtual StatusCode execute();
virtual StatusCode finalize();
private:
SG::ReadHandle<MuonSegmentCombinationCollection> m_segmentCombiLocation; //!< Location of input MuonSegmentCombination collection
SG::WriteHandle<TrackCollection> m_trackLocation; //!< Location of the track output location
// member set by Joboptions
ToolHandle<Muon::IMuonCombiTrackMaker> m_trackMaker;
};
#endif
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/ */
#include "MuonSegmentTrackMaker/MuPatTrackBuilder.h" #include "MuPatTrackBuilder.h"
#include "MuonRecHelperTools/IMuonEDMHelperSvc.h" #include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
#include "MuonRecToolInterfaces/IMuonTrackFinder.h"
#include "StoreGate/DataHandle.h" #include "StoreGate/DataHandle.h"
#include "TrkSegment/SegmentCollection.h" #include "TrkSegment/SegmentCollection.h"
#include "TrkTrack/Track.h" #include "TrkTrack/Track.h"
...@@ -19,24 +18,10 @@ ...@@ -19,24 +18,10 @@
using namespace Muon; using namespace Muon;
MuPatTrackBuilder::MuPatTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator) MuPatTrackBuilder::MuPatTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator)
: AthAlgorithm(name,pSvcLocator), : AthAlgorithm(name,pSvcLocator)
m_segmentKey("MooreSegments"),
m_spectroTrackKey("MuonSpectrometerTracks"),
m_spectroPartiKey("MuonSpectrometerParticles"),
m_extrapPartiKey("ExtrapolatedMuonSpectrometerParticles"),
m_trackMaker("Muon::MuonTrackFinder/MuonTrackSteering")
{ {
// MoMu Key segments (per chamber)
declareProperty("TrackSteering",m_trackMaker);
declareProperty("MuonSegmentCollection", m_segmentKey);
declareProperty("SpectrometerTrackOutputLocation", m_spectroTrackKey);
declareProperty("SpectrometerParticleOutputLocation", m_spectroPartiKey);
declareProperty("ExtrapolatedParticleOutputLocation", m_extrapPartiKey);
} }
MuPatTrackBuilder::~MuPatTrackBuilder()
{;}
StatusCode MuPatTrackBuilder::initialize() StatusCode MuPatTrackBuilder::initialize()
{ {
if (m_trackMaker.retrieve().isFailure()){ if (m_trackMaker.retrieve().isFailure()){
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonSegmentTrackMaker/MuonCombiTrackBuilder.h"
#include "MuonRecToolInterfaces/IMuonCombiTrackMaker.h"
#include "StoreGate/DataHandle.h"
#include <memory>
using namespace Muon;
MuonCombiTrackBuilder::MuonCombiTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator):
AthAlgorithm(name,pSvcLocator),
m_segmentCombiLocation("MooreSegmentCombinations"),
m_trackLocation("MooreTracks"),
m_trackMaker("Muon::MuonCombiTrackMaker/MuonCombiTrackMaker")
{
// MoMu location segments (per chamner)
declareProperty("MuonSegmentCombinationInputLocation",m_segmentCombiLocation );
declareProperty("TrackOutputLocation",m_trackLocation );
declareProperty("TrackSteering",m_trackMaker);
}
MuonCombiTrackBuilder::~MuonCombiTrackBuilder()
{
}
StatusCode MuonCombiTrackBuilder::initialize()
{
if (m_trackMaker.retrieve().isFailure()){
msg(MSG::FATAL) <<"Could not get " << m_trackMaker <<endmsg;
return StatusCode::FAILURE;
}
msg(MSG::INFO) << "Retrieved " << m_trackMaker << endmsg;
ATH_CHECK( m_segmentCombiLocation.initialize() );
ATH_CHECK( m_trackLocation.initialize() );
return StatusCode::SUCCESS;
}
StatusCode MuonCombiTrackBuilder::execute()
{
if (!m_segmentCombiLocation.isValid() ) {
msg(MSG::WARNING) << " Could not find MuonSegmentCombinationCollection at " << m_segmentCombiLocation.name() <<endmsg;
return StatusCode::RECOVERABLE;
}
if( !m_segmentCombiLocation.cptr() ) {
msg(MSG::WARNING) << " Obtained zero pointer for MuonSegmentCombinationCollection at " << m_segmentCombiLocation <<endmsg;
return StatusCode::RECOVERABLE;
}
if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << " Retrieved MuonSegmentCombinationCollection " << m_segmentCombiLocation->size() << endmsg;
TrackCollection* newtracks = m_trackMaker->find(*m_segmentCombiLocation);
// create dummy track collection
if( !newtracks ) newtracks = new TrackCollection();
if (m_trackLocation.record(std::unique_ptr<TrackCollection>(newtracks)).isFailure()){
msg(MSG::WARNING) << "New Track Container could not be recorded in StoreGate !" << endmsg;
delete newtracks;
return StatusCode::RECOVERABLE;
}
if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Track Container '" << m_trackLocation << "' recorded in storegate, ntracks: " << newtracks->size() << endmsg;
return StatusCode::SUCCESS;
} // execute
StatusCode MuonCombiTrackBuilder::finalize()
{
return StatusCode::SUCCESS;
}
#include "MuonSegmentTrackMaker/MuonCombiTrackBuilder.h" #include "../MuPatTrackBuilder.h"
#include "MuonSegmentTrackMaker/MuPatTrackBuilder.h"
DECLARE_COMPONENT( MuonCombiTrackBuilder )
DECLARE_COMPONENT( MuPatTrackBuilder ) DECLARE_COMPONENT( MuPatTrackBuilder )
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