5#include "GaudiKernel/ServiceHandle.h"
33 return StatusCode::SUCCESS;
41 auto selectedTracks = std::make_unique<ConstDataVector<xAOD::TrackParticleContainer> >(
SG::VIEW_ELEMENTS );
45 const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco = track->patternRecoInfo();
46 bool passFilter =
false;
49 if(patternReco.test(49)) {
58 selectedTracks->push_back( track );
65 std::unique_ptr<const xAOD::TrackParticleContainer> outTracks(selectedTracks.release()->asDataVector());
68 ATH_MSG_DEBUG(
"Initial number of tracks: " << inTracks->size() );
69 ATH_MSG_DEBUG(
"Selected number of tracks: " << outTracks->size() );
71 if(not outTrackHandle.
put(std::move(outTracks))){
73 return StatusCode::FAILURE;
78 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
Class to wrap a set of SystematicVariations.
StatusCode initialize() override
TrackSystematicsAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outTrackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inTrackKey
StatusCode execute(const EventContext &ctx) const override
ToolHandle< InDet::InclusiveTrackFilterTool > m_trackFilterToolLRT
SG::ShallowCopyDecorDeps< xAOD::TrackParticleContainer > m_decorDeps
ToolHandle< InDet::InDetTrackTruthFilterTool > m_trackFilterToolSTD
const_pointer_type put(std::unique_ptr< T > data, bool returnExisting=false) const
Record an object to the store.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
TrackParticle_v1 TrackParticle
Reference the current persistent version: