32 <<
" Trk::Tracks with key (electrons) "
37 <<
" Trk::Tracks with key (photons) "
47 return StatusCode::FAILURE;
55 ATH_MSG_DEBUG(
"==> done with initialize " << name() <<
"...");
56 return StatusCode::SUCCESS;
69 return StatusCode::SUCCESS;
77 std::vector<bool> keptTracks;
80 if (keptTracks.size() < trackPC->size()) {
81 keptTracks.resize(trackPC->size(),
false);
91 for (
const auto *el : *electrons) {
95 size_t nel = el->nTrackParticles();
99 for (
size_t i = 0; i < nel; i++) {
105 keptTracks[
index] =
true;
116 for (
const auto *ph : *photons) {
120 size_t nvx = ph->nVertices();
124 for (
size_t i = 0; i < nvx; i++) {
128 for (
size_t j = 0; j < ntp; j++) {
134 keptTracks[
index] =
true;
142 ATH_MSG_DEBUG(
"keep " << kept <<
" out of " << keptTracks.size());
144 trackPC.
keep(keptTracks);
145 return StatusCode::SUCCESS;
153 std::vector<bool> keptTracks;
157 if (keptTracks.size() < trackPC->size()) {
158 keptTracks.resize(trackPC->size(),
false);
166 for (
const auto *mu : *muons) {
170 const static SG::AuxElement::Accessor<
172 acc(
"combinedTrackParticleLink");
173 if (!acc.isAvailable(*mu)) {
177 if (!link.isValid()) {
185 keptTracks[
index] =
true;
189 ATH_MSG_DEBUG(
"keep " << kept <<
" out of " << keptTracks.size());
191 trackPC.
keep(keptTracks);
192 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Handle for requesting thinning for a data object.
ElementLink implementation for ROOT usage.
index_type index() const
Get the index of the element inside of its container.
bool isValid() const
Check if the element can be found.
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.
Gaudi::Property< bool > m_doMuons
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonsKey
Gaudi::Property< double > m_minptMuons
Gaudi::Property< bool > m_bestonlyPhotons
SG::ThinningHandleKey< TrackCollection > m_GSFTracksKey
StatusCode doEGamma(const EventContext &ctx) const
Inline method.
Gaudi::Property< bool > m_bestonlyElectrons
virtual StatusCode initialize() override final
Athena algorithm's initalize hook.
StringProperty m_streamName
StatusCode doMuons(const EventContext &ctx) const
Gaudi::Property< double > m_minptPhotons
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
Should the thinning run?
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's execute hook.
Gaudi::Property< double > m_minptElectrons
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
Gaudi::Property< bool > m_doElectrons
Gaudi::Property< bool > m_doPhotons
SG::ThinningHandleKey< TrackCollection > m_CombinedMuonsTracksKey
Containers to thin.
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
::StatusCode StatusCode
StatusCode definition for legacy code.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.