ATLAS Offline Software
egammaTruthAlg.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
13 #ifndef EGAMMAD3PDANALYSIS_EGAMMATRUTHALG_H
14 #define EGAMMAD3PDANALYSIS_EGAMMATRUTHALG_H
15 
16 
23 
24 #include "GaudiKernel/ToolHandle.h"
25 #include <string>
26 
27 
28 namespace D3PD {
29 
30 
35  : public AthReentrantAlgorithm
36 {
37 public:
43  egammaTruthAlg (const std::string& name,
44  ISvcLocator* svcloc);
45 
46 
48  virtual StatusCode initialize() override;
49 
50 
52  virtual StatusCode execute (const EventContext& ctx) const override;
53 
54 
55 private:
62  bool isAccepted (const xAOD::TruthParticle& tp,
63  const xAOD::TruthParticleContainer& cont,
64  float& iso) const;
65 
66 
72  float computeIso (const xAOD::TruthParticle& tp,
73  const xAOD::TruthParticleContainer& cont) const;
74 
75 
85  float& etaCalo,
86  float& phiCalo,
87  float& depthCalo) const;
88 
89 
91  std::string m_auxPrefix;
92 
95  { this, "InputKey", "", "SG key for the input container." };
96 
99  { this, "OutputKey", "", "SG key for the output container." };
100 
103 
106 
108  float m_etaMax;
109 
111  float m_isoCone;
112 
115 
117  ToolHandle<Trk::IParticleCaloExtensionTool> m_exten
118  { this, "ParticleCaloExtensionTool", "", "Extrapolator to calorimeter." };
119 };
120 
121 
122 } // namespace D3PD
123 
124 
125 #endif // not EGAMMAD3PDANALYSIS_EGAMMATRUTHALG_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
D3PD::egammaTruthAlg::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: egammaTruthAlg.cxx:64
D3PD::egammaTruthAlg::m_exten
ToolHandle< Trk::IParticleCaloExtensionTool > m_exten
Property: Extrapolation tool to calorimeter.
Definition: egammaTruthAlg.h:118
D3PD::egammaTruthAlg::m_auxPrefix
std::string m_auxPrefix
Property: Prefix to add to aux data items.
Definition: egammaTruthAlg.h:91
TruthParticleContainer.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
D3PD::egammaTruthAlg::isAccepted
bool isAccepted(const xAOD::TruthParticle &tp, const xAOD::TruthParticleContainer &cont, float &iso) const
Test to see if we accept a particle.
Definition: egammaTruthAlg.cxx:120
D3PD::egammaTruthAlg::m_etaMax
float m_etaMax
Property: Maximum eta.
Definition: egammaTruthAlg.h:108
SG::ReadHandleKey< xAOD::TruthParticleContainer >
D3PD::egammaTruthAlg::m_photonEtIsoMax
float m_photonEtIsoMax
Property: Maximum isolation cone energy allowed to keep a photon.
Definition: egammaTruthAlg.h:114
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
D3PD::egammaTruthAlg::m_outputKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outputKey
Property: Name of the output container.
Definition: egammaTruthAlg.h:99
D3PD::egammaTruthAlg
Select egtruth particles.
Definition: egammaTruthAlg.h:36
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
D3PD::egammaTruthAlg::m_photonPtMin
float m_photonPtMin
Property: Minimum pt for photons.
Definition: egammaTruthAlg.h:105
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
D3PD::egammaTruthAlg::egammaTruthAlg
egammaTruthAlg(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi algorithm constructor.
Definition: egammaTruthAlg.cxx:41
D3PD::egammaTruthAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Standard Gaudi execute method.
Definition: egammaTruthAlg.cxx:78
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
D3PD::egammaTruthAlg::m_isoCone
float m_isoCone
Property: Isolation cone width.
Definition: egammaTruthAlg.h:111
IParticleCaloExtensionTool.h
D3PD::egammaTruthAlg::m_inputKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputKey
Property: Name of the input container.
Definition: egammaTruthAlg.h:95
TruthParticle.h
D3PD::egammaTruthAlg::computeIso
float computeIso(const xAOD::TruthParticle &tp, const xAOD::TruthParticleContainer &cont) const
Compute isolation around a particle.
Definition: egammaTruthAlg.cxx:168
D3PD::egammaTruthAlg::m_electronPtMin
float m_electronPtMin
Property: Minimum pt for electrons.
Definition: egammaTruthAlg.h:102
D3PD::egammaTruthAlg::findImpact
StatusCode findImpact(const xAOD::TruthParticle &tp, float &etaCalo, float &phiCalo, float &depthCalo) const
Find the impact of a particle in the calorimeter.
Definition: egammaTruthAlg.cxx:191