ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaTrackParticleThinning.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// EgammaTrackParticleThinning.h, (c) ATLAS Detector software
8
9#ifndef DERIVATIONFRAMEWORK_EGAMMATRACKPARTICLETHINNING_H
10#define DERIVATIONFRAMEWORK_EGAMMATRACKPARTICLETHINNING_H
11
12#include <atomic>
13#include <string>
14#include <vector>
15
19#include "GaudiKernel/ToolHandle.h"
24
26
27
28namespace DerivationFramework {
29
31 : public extends<ExpressionParserUser<AthAlgTool>, IThinningTool>
32{
33public:
34 EgammaTrackParticleThinning(const std::string& t,
35 const std::string& n,
36 const IInterface* p);
38 virtual StatusCode initialize() override;
39 virtual StatusCode finalize() override;
40 virtual StatusCode doThinning(const EventContext& ctx) const override;
41
42private:
43 mutable std::atomic<unsigned long int> m_ntot = 0;
44 mutable std::atomic<unsigned long int> m_ntotGSF = 0;
45 mutable std::atomic<unsigned long int> m_ntotGSFVtx = 0;
46 mutable std::atomic<unsigned long int> m_npass = 0;
47 mutable std::atomic<unsigned long int> m_nGSFPass = 0;
48 mutable std::atomic<unsigned long int> m_nGSFVtxPass = 0;
49 mutable std::atomic<unsigned long int> m_nEgammas = 0;
50 mutable std::atomic<unsigned long int> m_nSelEgammas = 0;
51
52 StringProperty
53 m_streamName{ this, "StreamName", "", "Name of the stream being thinned" };
54
56
58 m_inDetSGKey{ this, "InDetTrackParticlesKey", "InDetTrackParticles", "" };
59
61 m_gsfSGKey{ this, "GSFTrackParticlesKey", "GSFTrackParticles", "" };
62
64 m_gsfVtxSGKey{ this, "GSFConversionVerticesKey", "", "" };
65
66 StringProperty m_selectionString{ this, "SelectionString", "", "" };
67
68 BooleanProperty m_bestMatchOnly{ this, "BestMatchOnly", true, "" };
69 BooleanProperty m_bestVtxMatchOnly{ this, "BestVtxMatchOnly", false, "" };
70 FloatProperty m_coneSize{ this, "ConeSize", -1.0, "" };
71
72 void setPhotonMasks(const EventContext& ctx,
73 std::vector<bool>&,
74 std::vector<bool>&,
77 const xAOD::TrackParticleContainer*) const;
78 void setElectronMasks(std::vector<bool>&,
79 std::vector<bool>&,
82 const xAOD::TrackParticleContainer*) const;
83 void clearGSFVtx(const EventContext& ctx) const;
84};
85}
86
87#endif // DERIVATIONFRAMEWORK_EGAMMATRACKPARTICLETHINNING_H
HandleKey object for adding thinning to an object.
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_gsfSGKey
EgammaTrackParticleThinning(const std::string &t, const std::string &n, const IInterface *p)
SG::ThinningHandleKey< xAOD::VertexContainer > m_gsfVtxSGKey
virtual StatusCode doThinning(const EventContext &ctx) const override
void setPhotonMasks(const EventContext &ctx, std::vector< bool > &, std::vector< bool > &, const xAOD::EgammaContainer *, const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *) const
void setElectronMasks(std::vector< bool > &, std::vector< bool > &, const xAOD::EgammaContainer *, const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *) const
SG::ReadHandleKey< xAOD::EgammaContainer > m_egammaKey
Property holding a SG store/key/clid from which a ReadHandle is made.
HandleKey object for adding thinning to an object.
THE reconstruction tool.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".