Commit 5af6f174 authored by Bertrand Martin's avatar Bertrand Martin
Browse files

tauRecTools: remove deprecated functionality in TauTrackFinder

Hello,

This MR is removing a deprecated feature in the tau-track association.
In the old days (non-MT R22 trigger), the track particle container was retrieved elsewhere (TrigTauRec) and passed as an argument to the TauTrackFinder execute method to build the tau tracks.
Now, the track particle container is retrieved from within TauTrackFinder, and we no longer need to pass it as an argument.

The reconstruction output is unchanged.

Cheers,
Bertrand
parent 9120668a
......@@ -159,7 +159,7 @@ StatusCode TauRecToolBase::executeVertexFinder(xAOD::TauJet&, const xAOD::Vertex
return StatusCode::FAILURE;
}
StatusCode TauRecToolBase::executeTrackFinder(xAOD::TauJet&, xAOD::TauTrackContainer&, const xAOD::TrackParticleContainer*) const {
StatusCode TauRecToolBase::executeTrackFinder(xAOD::TauJet&, xAOD::TauTrackContainer&) const {
ATH_MSG_ERROR("function not implemented");
return StatusCode::FAILURE;
}
......
......@@ -32,8 +32,7 @@ StatusCode TauTrackFinder::initialize() {
ATH_CHECK( m_trackToVertexIPEstimator.retrieve() );
// initialize ReadHandleKey
// allow empty for trigger
ATH_CHECK( m_trackPartInputContainer.initialize(SG::AllowEmpty) );
ATH_CHECK( m_trackPartInputContainer.initialize() );
// use CaloExtensionTool when key is empty
ATH_CHECK( m_ParticleCacheKey.initialize(SG::AllowEmpty) );
// allow empty for LRT
......@@ -57,32 +56,21 @@ StatusCode TauTrackFinder::initialize() {
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon, const xAOD::TrackParticleContainer* trackContainer) const {
StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon) const {
std::vector<const xAOD::TrackParticle*> tauTracks;
std::vector<const xAOD::TrackParticle*> wideTracks;
std::vector<const xAOD::TrackParticle*> otherTracks;
//Retrieve standard tracking for offline
//Retrieve standard track container
const xAOD::TrackParticleContainer* trackParticleCont = nullptr;
if (! m_trackPartInputContainer.empty()) { // MT version of trigger or offline
SG::ReadHandle<xAOD::TrackParticleContainer> trackPartInHandle( m_trackPartInputContainer );
if (!trackPartInHandle.isValid()) {
ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
return StatusCode::FAILURE;
}
trackParticleCont = trackPartInHandle.cptr();
}
else { // could be possible in trigger
if (trackContainer != nullptr) {
trackParticleCont = trackContainer;
}
else {
ATH_MSG_WARNING("No track container found");
return StatusCode::FAILURE;
}
SG::ReadHandle<xAOD::TrackParticleContainer> trackPartInHandle( m_trackPartInputContainer );
if (!trackPartInHandle.isValid()) {
ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
return StatusCode::FAILURE;
}
trackParticleCont = trackPartInHandle.cptr();
//Retrieve LRT container
const xAOD::TrackParticleContainer* largeD0TracksParticleCont = nullptr;
......
......@@ -60,7 +60,7 @@ public:
//! Algorithm functions
//-------------------------------------------------------------
virtual StatusCode initialize() override;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon, const xAOD::TrackParticleContainer* trackContainer = nullptr) const override;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackCon) const override;
private:
//-------------------------------------------------------------
......
......@@ -51,7 +51,7 @@ class ITauToolBase : virtual public asg::IAsgTool
virtual StatusCode executeVertexFinder(xAOD::TauJet& pTau,
const xAOD::VertexContainer* vertexContainer = nullptr,
const xAOD::TrackParticleContainer* trackContainer = nullptr) const = 0;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer, const xAOD::TrackParticleContainer* trackContainer = nullptr) const = 0;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const = 0;
virtual StatusCode executeTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const = 0;
virtual StatusCode executeShotFinder(xAOD::TauJet& pTau, xAOD::CaloClusterContainer& shotClusterContainer, xAOD::PFOContainer& PFOContainer ) const = 0;
virtual StatusCode executePi0ClusterCreator(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer,
......
......@@ -48,7 +48,7 @@ class TauRecToolBase : public asg::AsgTool, virtual public ITauToolBase {
virtual StatusCode executeVertexFinder(xAOD::TauJet& pTau,
const xAOD::VertexContainer* vertexContainer = nullptr,
const xAOD::TrackParticleContainer* trackContainer = nullptr) const override;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer, const xAOD::TrackParticleContainer* trackContainer = nullptr) const override;
virtual StatusCode executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const override;
virtual StatusCode executeTrackClassifier(xAOD::TauJet& pTau, xAOD::TauTrackContainer& tauTrackContainer) const override;
virtual StatusCode executeShotFinder(xAOD::TauJet& pTau, xAOD::CaloClusterContainer& shotClusterContainer, xAOD::PFOContainer& PFOContainer ) const override;
virtual StatusCode executePi0ClusterCreator(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment