16#include "Gaudi/Property.h"
20#include "GaudiKernel/ThreadLocalContext.h"
42 return StatusCode::SUCCESS;
50 return StatusCode::SUCCESS;
58 if (alltracks->empty()){
60 return StatusCode::SUCCESS;
63 std::vector<bool> mask_t;
64 mask_t.resize(alltracks->size(),
false);
71 return StatusCode::FAILURE;
80 for(
const auto* muon : *muons ) {
85 muon_tp = muon->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
88 muon_tp = muon->trackParticle(xAOD::Muon::CombinedTrackParticle);
91 muon_tp = muon->trackParticle(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle);
94 muon_tp = muon->trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
106 ATH_MSG_DEBUG(
"------------- Elementlink from trackparticle to trk::track not valid");
110 int trIndex = muontr_link.
index();
111 if (trIndex <
int(mask_t.size())){
112 mask_t[trIndex] =
true;
118 alltracks.
keep (mask_t);
120 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
defines an "iterator" over instances of a given type in StoreGateSvc
Handle for requesting thinning for a data object.
An algorithm that can be simultaneously executed in multiple threads.
size_type size() const noexcept
Returns the number of elements in the collection.
index_type index() const
Get the index of the element inside of its container.
bool isValid() const
Test to see if the link can be dereferenced.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Handle for requesting thinning for a data object.
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".