ATLAS Offline Software
TruthParticlesInConeTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef PARTICLESINCONETOOLS_TRUTHPARTICLESINCONETOOL_H
6 #define PARTICLESINCONETOOLS_TRUTHPARTICLESINCONETOOL_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
11 
12 #include "IParticlesLookUpTable.h"
16 
17 namespace xAOD {
18 
20  : public AthAlgTool
21  , virtual public ITruthParticlesInConeTool
22 {
23 public:
25  TruthParticlesInConeTool(const std::string& type,
26  const std::string& name,
27  const IInterface* parent);
28 
30  virtual ~TruthParticlesInConeTool() = default;
31 
33  virtual StatusCode initialize() override final;
34 
36  virtual bool particlesInCone(
37  const EventContext& ctx,
38  float eta,
39  float phi,
40  float dr,
41  std::vector<const TruthParticle*>& output) const override final;
42 
44 
45 private:
46  // init look-up table
47  const LookUpTable* getTable(const EventContext& ctx) const;
48 
51  this,
52  "TruthParticleLocation",
53  "TruthParticles"
54  };
55 
58 };
59 } // end of namespace
60 
62 #endif
63 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
xAOD::TruthParticlesInConeTool
Definition: TruthParticlesInConeTool.h:22
xAOD::TruthParticlesInConeTool::getTable
const LookUpTable * getTable(const EventContext &ctx) const
Definition: TruthParticlesInConeTool.cxx:37
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::TruthParticlesInConeTool::particlesInCone
virtual bool particlesInCone(const EventContext &ctx, float eta, float phi, float dr, std::vector< const TruthParticle * > &output) const override final
ITruthParticlesInConeTool interface.
Definition: TruthParticlesInConeTool.cxx:57
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
TruthParticleContainer.h
xAOD::TruthParticlesInConeTool::TruthParticlesInConeTool
TruthParticlesInConeTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: TruthParticlesInConeTool.cxx:15
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::TruthParticlesInConeTool::m_truthParticleLocation
SG::ReadHandleKey< TruthParticleContainer > m_truthParticleLocation
Truth Particle collection name.
Definition: TruthParticlesInConeTool.h:50
xAOD::TruthParticlesInConeTool::m_LookUpTableCacheWrite
SG::WriteHandleKey< LookUpTable > m_LookUpTableCacheWrite
Definition: TruthParticlesInConeTool.h:57
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
xAOD::TruthParticlesInConeTool::m_LookUpTableCacheRead
SG::ReadHandleKey< LookUpTable > m_LookUpTableCacheRead
Definition: TruthParticlesInConeTool.h:56
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ITruthParticlesInConeTool.h
xAOD::TruthParticlesInConeTool::~TruthParticlesInConeTool
virtual ~TruthParticlesInConeTool()=default
destructor
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
merge.output
output
Definition: merge.py:17
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
xAOD::IParticlesLookUpTable
2D look up table for iParticles
Definition: IParticlesLookUpTable.h:17
AthAlgTool
Definition: AthAlgTool.h:26
TruthParticle.h
xAOD::TruthParticlesInConeTool::initialize
virtual StatusCode initialize() override final
initialize
Definition: TruthParticlesInConeTool.cxx:25
xAOD::ITruthParticlesInConeTool
interface for collecting truth particles inside a cone
Definition: ITruthParticlesInConeTool.h:26
IParticlesLookUpTable.h