ATLAS Offline Software
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 
26 
27 
28 namespace DerivationFramework {
29 class EGammaGSFCalo : public AthAlgTool, public IAugmentationTool {
30  public:
32  EGammaGSFCalo(const std::string& t, const std::string& n,
33  const IInterface* p);
35  virtual ~EGammaGSFCalo();
37  virtual StatusCode initialize() override;
39  virtual StatusCode finalize() override;
41  virtual StatusCode addBranches( const EventContext& ctx ) const override;
42 
43  private:
45  this, "ElectronCollectionName", "Electrons", "Input electron collection"};
46 
48  this, "OutputTrkPartContainerName", "GSFCaloContainer",
49  "Output GSF+Calo container"};
50 
52  this, "GSFCaloTrackLinkKey", "Electrons.gsfCaloTrackParticleLink",
53  "Decoration linking electrons to refitted TrackParticles"};
55  ToolHandle<IegammaTrkRefitterTool> m_trkRefitTool{
56  this, "TrackRefitTool", "ElectronRefitterTool", "Track refitter tool"};
57 
59  ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreatorTool{
60  this, "TrackParticleCreatorTool", "TrackParticleCreatorTool",
61  "TrackParticle creator tool"};
62 
63  PublicToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{
64  this, "TrackSummaryTool", "Trk::TrackSummaryTool/AtlasTrackSummaryTool"};
65 
68  Gaudi::Property<int> m_minNSiHits{this, "minNSiHits", 4,
69  "Minimum number of silicon hits on track "
70  "before it is allowed to be refitted"};
71  Gaudi::Property<bool> m_doPix{this, "usePixel", true,
72  "Bool to use pixel hits"};
73  Gaudi::Property<bool> m_doSCT{this, "useSCT", true, "Bool to use SCT hits"};
74  Gaudi::Property<bool> m_doTRT{this, "useTRT", true, "Bool to use TRT hits"};
75 
76  Gaudi::Property<bool> m_doTruth{this, "useTruth", true,
77  "Bool to add truth decorations"};
78 
79  Gaudi::Property<bool> m_isAOD{this, "isAOD", true, "AOD flag"};
80 
82  mutable std::atomic<unsigned int> m_allElectrons = 0;
83  mutable std::atomic<unsigned int> m_noTP = 0;
84  mutable std::atomic<unsigned int> m_onlyTRT = 0;
85  mutable std::atomic<unsigned int> m_noTrk = 0;
86  mutable std::atomic<unsigned int> m_failedFits = 0;
87  mutable std::atomic<unsigned int> m_successfulFits = 0;
88  mutable std::atomic<unsigned int> m_successfulCopyInfos = 0;
89  mutable std::atomic<unsigned int> m_noRefTP = 0;
90  mutable std::atomic<unsigned int> m_allNewTP = 0;
91  mutable std::atomic<unsigned int> m_tsos = 0;
92 
94  void copyInfo(const xAOD::TrackParticle& original,
95  xAOD::TrackParticle& created, bool isRefitted) const;
96 
99  const xAOD::SummaryType& information) const {
100  uint8_t value = summaryValueInt(src, information, 0);
101  dest.setSummaryValue(value, information);
102  }
103 };
104 } // namespace DerivationFramework
105 
106 #endif // DERIVATIONFRAMEWORKEGAMMA_EGammaGSFCalo_H
DerivationFramework::EGammaGSFCalo::initialize
virtual StatusCode initialize() override
initialize method
Definition: EGammaGSFCalo.cxx:28
SG::WriteDecorHandleKey< xAOD::ElectronContainer >
DerivationFramework::EGammaGSFCalo::m_doSCT
Gaudi::Property< bool > m_doSCT
Definition: EGammaGSFCalo.h:73
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
DerivationFramework::EGammaGSFCalo::EGammaGSFCalo
EGammaGSFCalo(const std::string &t, const std::string &n, const IInterface *p)
Default constructor.
Definition: EGammaGSFCalo.cxx:14
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
IAugmentationTool.h
DerivationFramework::EGammaGSFCalo::m_tsos
std::atomic< unsigned int > m_tsos
Definition: EGammaGSFCalo.h:91
DerivationFramework::EGammaGSFCalo::m_trackSummaryTool
PublicToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: EGammaGSFCalo.h:63
ITrackParticleCreatorTool.h
athena.value
value
Definition: athena.py:124
DerivationFramework::EGammaGSFCalo::m_noTrk
std::atomic< unsigned int > m_noTrk
Definition: EGammaGSFCalo.h:85
DerivationFramework::EGammaGSFCalo::m_doTruth
Gaudi::Property< bool > m_doTruth
Definition: EGammaGSFCalo.h:76
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
DerivationFramework::EGammaGSFCalo::copySummaryValue
void copySummaryValue(const xAOD::TrackParticle &src, xAOD::TrackParticle &dest, const xAOD::SummaryType &information) const
Definition: EGammaGSFCalo.h:97
DerivationFramework::EGammaGSFCalo::m_trkRefitTool
ToolHandle< IegammaTrkRefitterTool > m_trkRefitTool
The track refitter.
Definition: EGammaGSFCalo.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::ElectronContainer >
DerivationFramework::EGammaGSFCalo::m_particleCreatorTool
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool
Tool to create track particle.
Definition: EGammaGSFCalo.h:59
DerivationFramework::IAugmentationTool
Definition: IAugmentationTool.h:20
DerivationFramework::EGammaGSFCalo::m_onlyTRT
std::atomic< unsigned int > m_onlyTRT
Definition: EGammaGSFCalo.h:84
DerivationFramework::EGammaGSFCalo::m_electronCollectionKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
Definition: EGammaGSFCalo.h:44
DerivationFramework::EGammaGSFCalo::m_allNewTP
std::atomic< unsigned int > m_allNewTP
Definition: EGammaGSFCalo.h:90
EgammaxAODHelpers.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
xAOD::SummaryType
SummaryType
Enumerates the different types of information stored in Summary.
Definition: TrackingPrimitives.h:229
SG::WriteHandleKey< xAOD::TrackParticleContainer >
DerivationFramework::EGammaGSFCalo::copyInfo
void copyInfo(const xAOD::TrackParticle &original, xAOD::TrackParticle &created, bool isRefitted) const
Copy TrackParticle info from the original TP.
Definition: EGammaGSFCalo.cxx:214
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
DerivationFramework::EGammaGSFCalo::m_doPix
Gaudi::Property< bool > m_doPix
Definition: EGammaGSFCalo.h:71
DerivationFramework::EGammaGSFCalo::m_noTP
std::atomic< unsigned int > m_noTP
Definition: EGammaGSFCalo.h:83
DerivationFramework::EGammaGSFCalo::m_minNSiHits
Gaudi::Property< int > m_minNSiHits
Minimum number of silicon hits on track before it is allowed to be refitted.
Definition: EGammaGSFCalo.h:68
IegammaTrkRefitterTool.h
DerivationFramework::EGammaGSFCalo::m_isAOD
Gaudi::Property< bool > m_isAOD
Definition: EGammaGSFCalo.h:79
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::EGammaGSFCalo::~EGammaGSFCalo
virtual ~EGammaGSFCalo()
Destructor.
Definition: EGammaGSFCalo.cxx:20
DerivationFramework::EGammaGSFCalo::m_successfulCopyInfos
std::atomic< unsigned int > m_successfulCopyInfos
Definition: EGammaGSFCalo.h:88
xAOD::EgammaHelpers::summaryValueInt
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...
Definition: EgammaxAODHelpers.cxx:161
DerivationFramework::EGammaGSFCalo::m_OutputTrkPartContainerKey
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_OutputTrkPartContainerKey
Definition: EGammaGSFCalo.h:47
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
DerivationFramework::EGammaGSFCalo::m_gsfCaloTrackLinkKey
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_gsfCaloTrackLinkKey
Definition: EGammaGSFCalo.h:51
DerivationFramework::EGammaGSFCalo::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override
addBranches method
Definition: EGammaGSFCalo.cxx:60
DerivationFramework::EGammaGSFCalo
Definition: EGammaGSFCalo.h:29
DerivationFramework::EGammaGSFCalo::m_failedFits
std::atomic< unsigned int > m_failedFits
Definition: EGammaGSFCalo.h:86
ElectronContainerFwd.h
IExtendedTrackSummaryTool.h
DerivationFramework::EGammaGSFCalo::m_successfulFits
std::atomic< unsigned int > m_successfulFits
Definition: EGammaGSFCalo.h:87
DerivationFramework::EGammaGSFCalo::finalize
virtual StatusCode finalize() override
finalize method
Definition: EGammaGSFCalo.cxx:41
DerivationFramework::EGammaGSFCalo::m_noRefTP
std::atomic< unsigned int > m_noRefTP
Definition: EGammaGSFCalo.h:89
DerivationFramework::EGammaGSFCalo::m_allElectrons
std::atomic< unsigned int > m_allElectrons
Counters.
Definition: EGammaGSFCalo.h:82
DerivationFramework::EGammaGSFCalo::m_doTRT
Gaudi::Property< bool > m_doTRT
Definition: EGammaGSFCalo.h:74
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26