ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecoTools
ParticlesInConeTools
src
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
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "
StoreGate/ReadHandleKey.h
"
11
12
#include "
IParticlesLookUpTable.h
"
13
#include "
ParticlesInConeTools/ITruthParticlesInConeTool.h
"
14
#include "
xAODTruth/TruthParticle.h
"
15
#include "
xAODTruth/TruthParticleContainer.h
"
16
17
namespace
xAOD
{
18
19
class
TruthParticlesInConeTool
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
43
typedef
IParticlesLookUpTable
<
TruthParticle
>
LookUpTable
;
44
45
private
:
46
// init look-up table
47
const
LookUpTable
*
getTable
(
const
EventContext& ctx)
const
;
48
50
SG
::ReadHandleKey<
TruthParticleContainer
>
m_truthParticleLocation
{
51
this
,
52
"TruthParticleLocation"
,
53
"TruthParticles"
54
};
55
56
SG::ReadHandleKey<LookUpTable>
m_LookUpTableCacheRead
{
"LookUpTable"
};
57
SG::WriteHandleKey<LookUpTable>
m_LookUpTableCacheWrite
{
"LookUpTable"
};
58
};
59
}
// end of namespace
60
61
CLASS_DEF
(
xAOD::TruthParticlesInConeTool::LookUpTable
, 151156931, 0)
62
#endif
63
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
AthAlgTool.h
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:67
TruthParticleContainer.h
TruthParticle.h
IParticlesLookUpTable.h
ITruthParticlesInConeTool.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
vector
Definition
MultiHisto.h:13
xAOD::IParticlesLookUpTable
2D look up table for iParticles
Definition
IParticlesLookUpTable.h:17
xAOD::ITruthParticlesInConeTool
interface for collecting truth particles inside a cone
Definition
ITruthParticlesInConeTool.h:26
xAOD::TruthParticlesInConeTool::~TruthParticlesInConeTool
virtual ~TruthParticlesInConeTool()=default
destructor
xAOD::TruthParticlesInConeTool::m_LookUpTableCacheWrite
SG::WriteHandleKey< LookUpTable > m_LookUpTableCacheWrite
Definition
TruthParticlesInConeTool.h:57
xAOD::TruthParticlesInConeTool::TruthParticlesInConeTool
TruthParticlesInConeTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition
TruthParticlesInConeTool.cxx:15
xAOD::TruthParticlesInConeTool::getTable
const LookUpTable * getTable(const EventContext &ctx) const
Definition
TruthParticlesInConeTool.cxx:37
xAOD::TruthParticlesInConeTool::m_truthParticleLocation
SG::ReadHandleKey< TruthParticleContainer > m_truthParticleLocation
Truth Particle collection name.
Definition
TruthParticlesInConeTool.h:50
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
xAOD::TruthParticlesInConeTool::m_LookUpTableCacheRead
SG::ReadHandleKey< LookUpTable > m_LookUpTableCacheRead
Definition
TruthParticlesInConeTool.h:56
xAOD::TruthParticlesInConeTool::LookUpTable
IParticlesLookUpTable< TruthParticle > LookUpTable
Definition
TruthParticlesInConeTool.h:43
xAOD::TruthParticlesInConeTool::initialize
virtual StatusCode initialize() override final
initialize
Definition
TruthParticlesInConeTool.cxx:25
const
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
std
STL namespace.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
xAOD::phi
setEt phi
Definition
TrigEMCluster_v1.cxx:29
xAOD::TruthParticleContainer
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticleContainer.h:17
type
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0