22 return StatusCode::SUCCESS;
36 if (!indetTrackPC.isValid()) {
38 return StatusCode::FAILURE;
40 ATH_MSG_DEBUG(
"Number of InDet TrackParticles " << indetTrackPC->size());
45 std::vector<bool> keptInDetTrackParticles;
46 keptInDetTrackParticles.resize(indetTrackPC->size(),
true);
47 for (
const auto* track : *indetTrackPC) {
49 keptInDetTrackParticles[track->index()] =
false;
57 if (!electrons.isValid()) {
59 return StatusCode::FAILURE;
64 auto trackParticleLinks = electron->trackParticleLinks();
65 for (
const auto& link : trackParticleLinks) {
66 if (!link.isValid()) {
70 "Electons : Keeping InDet Track Particle with index : "
73 keptInDetTrackParticles
86 return StatusCode::FAILURE;
91 auto vertexLinks = photon->vertexLinks();
92 for (
const auto& vxlink : vertexLinks) {
93 if (!vxlink.isValid()) {
101 for (
const auto& link : trackParticleLinks) {
102 if (!link.isValid()) {
106 "Photons : Keeping InDet Track Particle with index : "
109 keptInDetTrackParticles
120 if (!
taus.isValid()) {
122 return StatusCode::FAILURE;
129 if (!acc_passThinning(*tau)) {
136 keptInDetTrackParticles[track->track()->index()] =
true;
147 return StatusCode::FAILURE;
154 if (!acc_passThinning(*elerm_tau)) {
159 if (!erm_track->flag(
161 keptInDetTrackParticles[erm_track->track()->index()] =
true;
171 return StatusCode::FAILURE;
175 muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
177 if (muon->muonType() != xAOD::Muon::SiliconAssociatedForwardMuon && trk)
178 keptInDetTrackParticles[trk->
index()] =
true;
183 indetTrackPC.
keep(keptInDetTrackParticles);
185 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle for requesting thinning for a data object.
SG::ConstAccessor< T, ALLOC > ConstAccessor
size_t index() const
Return the index of this element within its container.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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.
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_InDetTrackParticlesKey
Track Particle container to thin.
StringProperty m_streamName
Name of the stream being thinned.
SG::ReadHandleKey< xAOD::TauJetContainer > m_InputTauJet_EleRMContainerKey
TauJets_EleRM collection input name.
Gaudi::Property< bool > m_doPhoton
Thin photon tracks.
Gaudi::Property< bool > m_doElectron
Thin electron tracks.
Gaudi::Property< bool > m_doMuon
StatusCode initialize() override final
initialize method
SG::ReadHandleKey< xAOD::ElectronContainer > m_InputElectronContainerKey
electron collection input name
SG::ReadHandleKey< xAOD::PhotonContainer > m_InputPhotonContainerKey
photon collection input name
Gaudi::Property< bool > m_doTau
Thin tau tracks.
SG::ReadHandleKey< xAOD::TauJetContainer > m_InputTauJetContainerKey
TauJets collection input name.
Gaudi::Property< bool > m_doTauEleRM
Thin electron removal tau tracks.
StatusCode execute(const EventContext &ctx) const override final
execute method
SG::ReadHandleKey< xAOD::MuonContainer > m_inputMuonContainerKey
Muon collection input name.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauTrack_v1 TauTrack
Definition of the current version.
TauJet_v3 TauJet
Definition of the current "tau version".
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".
@ TRTStandalone
TRT Standalone.