|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/ThreadLocalContext.h"
33 <<
" Trk::Tracks with key (electrons) "
38 <<
" Trk::Tracks with key (photons) "
48 return StatusCode::FAILURE;
57 return StatusCode::SUCCESS;
70 return StatusCode::SUCCESS;
78 std::vector<bool> keptTracks;
81 if (keptTracks.size() < trackPC->size()) {
82 keptTracks.resize(trackPC->size(),
false);
96 size_t nel =
el->nTrackParticles();
100 for (
size_t i = 0;
i < nel;
i++) {
102 if (!
tp || !
tp->trackLink().isValid()) {
105 size_t index =
tp->trackLink().index();
106 keptTracks[
index] =
true;
117 for (
const auto *ph : *photons) {
121 size_t nvx = ph->nVertices();
125 for (
size_t i = 0;
i < nvx;
i++) {
129 for (
size_t j = 0; j < ntp; j++) {
131 if (!
tp || !
tp->trackLink().isValid()) {
134 size_t index =
tp->trackLink().index();
135 keptTracks[
index] =
true;
143 ATH_MSG_DEBUG(
"keep " << kept <<
" out of " << keptTracks.size());
145 trackPC.
keep(keptTracks);
146 return StatusCode::SUCCESS;
154 std::vector<bool> keptTracks;
158 if (keptTracks.size() < trackPC->size()) {
159 keptTracks.resize(trackPC->size(),
false);
167 for (
const auto *
mu : *muons) {
173 acc(
"combinedTrackParticleLink");
174 if (!
acc.isAvailable(*
mu)) {
182 if (!
tp || !
tp->trackLink().isValid()) {
185 size_t index =
tp->trackLink().index();
186 keptTracks[
index] =
true;
190 ATH_MSG_DEBUG(
"keep " << kept <<
" out of " << keptTracks.size());
192 trackPC.
keep(keptTracks);
193 return StatusCode::SUCCESS;
SG::ThinningHandleKey< TrackCollection > m_GSFTracksKey
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Helper class to provide type-safe access to aux data.
Handle for requesting thinning for a data object.
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonsKey
StatusCode doEGamma(const EventContext &ctx) const
Inline method.
Gaudi::Property< double > m_minptMuons
SG::ThinningHandleKey< TrackCollection > m_CombinedMuonsTracksKey
Containers to thin.
StatusCode doMuons(const EventContext &ctx) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
Gaudi::Property< bool > m_bestonlyElectrons
bool isValid() const
Test to see if the link can be dereferenced.
Gaudi::Property< double > m_minptElectrons
Handle for requesting thinning for a data object.
Gaudi::Property< bool > m_bestonlyPhotons
Gaudi::Property< bool > m_doPhotons
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Gaudi::Property< bool > m_doMuons
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
Should the thinning run? The containers of Objects of interest Electron/Muon.
Gaudi::Property< bool > m_doElectrons
virtual StatusCode initialize() override final
Athena algorithm's initalize hook.
Class describing a Vertex.
Gaudi::Property< double > m_minptPhotons
Class describing a TrackParticle.
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's execute hook.
StringProperty m_streamName