ATLAS Offline Software
Loading...
Searching...
No Matches
EGammaGSFCalo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 Contact: Raphael Haberle <raphael.julien.haberle@cern.ch>
4*/
5
6#ifndef DERIVATIONFRAMEWORKEGAMMA_EGammaGSFCalo_H
7#define DERIVATIONFRAMEWORKEGAMMA_EGammaGSFCalo_H
8
9#include <atomic>
10
12
14
17
21
24
25
26namespace DerivationFramework {
27 class EGammaGSFCalo : public extends<AthAlgTool, IAugmentationTool> {
28 public:
29
30 using base_class::base_class;
31
33 virtual StatusCode initialize() override final;
35 virtual StatusCode finalize() override final;
37 virtual StatusCode addBranches( const EventContext& ctx ) const override final;
38
39 private:
41 this, "ElectronCollectionName", "Electrons", "Input electron collection"};
42
44 this, "OutputTrkPartContainerName", "GSFCaloContainer",
45 "Output GSF+Calo container"};
46
48 this, "GSFCaloTrackLinkKey", "Electrons.gsfCaloTrackParticleLink",
49 "Decoration linking electrons to refitted TrackParticles"};
50
51 ToolHandle<IegammaTrkRefitterTool> m_trkRefitTool{
52 this, "TrackRefitTool", "ElectronRefitterTool", "Track refitter tool"};
53
55 ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreatorTool{
56 this, "TrackParticleCreatorTool", "TrackParticleCreatorTool",
57 "TrackParticle creator tool"};
58
59 PublicToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{
60 this, "TrackSummaryTool", "Trk::TrackSummaryTool/AtlasTrackSummaryTool"};
61
64 Gaudi::Property<int> m_minNSiHits{this, "minNSiHits", 4,
65 "Minimum number of silicon hits on track "
66 "before it is allowed to be refitted"};
67 Gaudi::Property<bool> m_doPix{this, "usePixel", true,
68 "Bool to use pixel hits"};
69 Gaudi::Property<bool> m_doSCT{this, "useSCT", true, "Bool to use SCT hits"};
70 Gaudi::Property<bool> m_doTRT{this, "useTRT", true, "Bool to use TRT hits"};
71
72 Gaudi::Property<bool> m_doTruth{this, "useTruth", true,
73 "Bool to add truth decorations"};
74
75 Gaudi::Property<bool> m_isAOD{this, "isAOD", true, "AOD flag"};
76
78 mutable std::atomic<unsigned int> m_allElectrons = 0;
79 mutable std::atomic<unsigned int> m_noTP = 0;
80 mutable std::atomic<unsigned int> m_onlyTRT = 0;
81 mutable std::atomic<unsigned int> m_noTrk = 0;
82 mutable std::atomic<unsigned int> m_failedFits = 0;
83 mutable std::atomic<unsigned int> m_successfulFits = 0;
84 mutable std::atomic<unsigned int> m_successfulCopyInfos = 0;
85 mutable std::atomic<unsigned int> m_noRefTP = 0;
86 mutable std::atomic<unsigned int> m_allNewTP = 0;
87 mutable std::atomic<unsigned int> m_tsos = 0;
88
90 void copyInfo(const xAOD::TrackParticle& original,
91 xAOD::TrackParticle& created, bool isRefitted) const;
92
95 const xAOD::SummaryType& information) const {
96 uint8_t value = xAOD::EgammaHelpers::summaryValueInt(src, information, 0);
97 dest.setSummaryValue(value, information);
98 }
99 };
100} // namespace DerivationFramework
101
102#endif // DERIVATIONFRAMEWORKEGAMMA_EGammaGSFCalo_H
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool
Tool to create track particle.
void copySummaryValue(const xAOD::TrackParticle &src, xAOD::TrackParticle &dest, const xAOD::SummaryType &information) const
std::atomic< unsigned int > m_noTP
std::atomic< unsigned int > m_noRefTP
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_gsfCaloTrackLinkKey
std::atomic< unsigned int > m_allElectrons
Counters.
PublicToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Gaudi::Property< bool > m_doTRT
Gaudi::Property< bool > m_doTruth
std::atomic< unsigned int > m_successfulCopyInfos
std::atomic< unsigned int > m_successfulFits
virtual StatusCode finalize() override final
finalize method
virtual StatusCode initialize() override final
initialize method
Gaudi::Property< int > m_minNSiHits
Minimum number of silicon hits on track before it is allowed to be refitted.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_OutputTrkPartContainerKey
Gaudi::Property< bool > m_doSCT
std::atomic< unsigned int > m_allNewTP
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
std::atomic< unsigned int > m_failedFits
ToolHandle< IegammaTrkRefitterTool > m_trkRefitTool
The track refitter.
Gaudi::Property< bool > m_isAOD
std::atomic< unsigned int > m_onlyTRT
std::atomic< unsigned int > m_noTrk
Gaudi::Property< bool > m_doPix
std::atomic< unsigned int > m_tsos
void copyInfo(const xAOD::TrackParticle &original, xAOD::TrackParticle &created, bool isRefitted) const
Copy TrackParticle info from the original TP.
virtual StatusCode addBranches(const EventContext &ctx) const override final
addBranches method
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
THE reconstruction tool.
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
TrackParticle_v1 TrackParticle
Reference the current persistent version:
SummaryType
Enumerates the different types of information stored in Summary.