ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaTrackParticleThinning.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 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#include "GaudiKernel/ThreadLocalContext.h"
28
29namespace DerivationFramework {
30
32 : public extends<ExpressionParserUser<AthAlgTool>, IThinningTool>
33{
34public:
35 EgammaTrackParticleThinning(const std::string& t,
36 const std::string& n,
37 const IInterface* p);
39 virtual StatusCode initialize() override;
40 virtual StatusCode finalize() override;
41 virtual StatusCode doThinning() const override;
42
43private:
44 mutable std::atomic<unsigned long int> m_ntot = 0;
45 mutable std::atomic<unsigned long int> m_ntotGSF = 0;
46 mutable std::atomic<unsigned long int> m_ntotGSFVtx = 0;
47 mutable std::atomic<unsigned long int> m_npass = 0;
48 mutable std::atomic<unsigned long int> m_nGSFPass = 0;
49 mutable std::atomic<unsigned long int> m_nGSFVtxPass = 0;
50 mutable std::atomic<unsigned long int> m_nEgammas = 0;
51 mutable std::atomic<unsigned long int> m_nSelEgammas = 0;
52
53 StringProperty
54 m_streamName{ this, "StreamName", "", "Name of the stream being thinned" };
55
57
59 m_inDetSGKey{ this, "InDetTrackParticlesKey", "InDetTrackParticles", "" };
60
62 m_gsfSGKey{ this, "GSFTrackParticlesKey", "GSFTrackParticles", "" };
63
65 m_gsfVtxSGKey{ this, "GSFConversionVerticesKey", "", "" };
66
67 StringProperty m_selectionString{ this, "SelectionString", "", "" };
68
69 BooleanProperty m_bestMatchOnly{ this, "BestMatchOnly", true, "" };
70 BooleanProperty m_bestVtxMatchOnly{ this, "BestVtxMatchOnly", false, "" };
71 FloatProperty m_coneSize{ this, "ConeSize", -1.0, "" };
72
73 void setPhotonMasks(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
void setPhotonMasks(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".