ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Columnar
ColumnarExampleTools
ColumnarExampleTools
MomentumAccessorExampleTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
#ifndef COLUMNAR_EXAMPLE_TOOLS_MOMENTUM_ACCESSOR_EXAMPLE_TOOL_H
9
#define COLUMNAR_EXAMPLE_TOOLS_MOMENTUM_ACCESSOR_EXAMPLE_TOOL_H
10
11
#include <
AsgTools/AsgTool.h
>
12
#include <
AsgTools/PropertyWrapper.h
>
13
#include <
ColumnarCore/ColumnAccessor.h
>
14
#include <
ColumnarCore/ColumnarTool.h
>
15
#include <
ColumnarCore/MomentumAccessors.h
>
16
#include <
ColumnarCore/ObjectColumn.h
>
17
#include <
ColumnarCore/ObjectTypeAccessor.h
>
18
#include <
ColumnarCore/ParticleDef.h
>
19
20
namespace
columnar
21
{
28
29
class
MomentumAccessorExampleTool
final
30
:
public
asg::AsgTool
,
31
public
ColumnarTool
<>
32
{
33
public
:
34
35
// Create a proper constructor for Athena
36
ASG_TOOL_CLASS
(
MomentumAccessorExampleTool
,
asg::IAsgTool
)
37
38
MomentumAccessorExampleTool
(
const
std::string& name);
39
40
virtual
StatusCode
initialize
()
override
;
41
42
void
callSingleEvent
(
ParticleRange
particles)
const
;
43
44
virtual
void
callEvents
(
EventContextRange
events)
const override
;
45
46
48
Gaudi::Property<float>
m_energyCut
{
this
,
"energyCut"
, 10e3,
"energy cut (in MeV)"
};
49
50
56
ParticleAccessor<ObjectColumn>
particlesHandle
{*
this
,
"Particles"
};
57
58
64
MomentumAccessors<ParticleDef>
momAcc
;
65
72
ObjectTypeAccessor<ParticleDef>
objectTypeAcc
{*
this
,
"ObjectType"
,
"the object type of the particles"
};
73
74
// If you want to use a statically configured momentum accessor,
75
// this would be the basic way to do it. For now (24 Jul 25) I don't
76
// think this is worth the effort, as the dynamic momentum accessors
77
// seem to be working pretty well.
78
// Detail::FullMomentumAccessorsPtEtaPhiM<Detail::CoreMomentumAccessorsPtEtaPhiReadM<ParticleDef,ColumnarModeDefault>> momAcc {*this};
79
80
89
ParticleDecorator<char>
selectionDec
{*
this
,
"selection"
};
90
};
91
}
92
93
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
ColumnAccessor.h
ColumnarTool.h
MomentumAccessors.h
ObjectColumn.h
ObjectTypeAccessor.h
ParticleDef.h
PropertyWrapper.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition
IAsgTool.h:41
columnar::ColumnarTool
the base class for all columnar components
Definition
ColumnAccessorDataArray.h:17
columnar::MomentumAccessorExampleTool::callEvents
virtual void callEvents(EventContextRange events) const override
Definition
MomentumAccessorExampleTool.cxx:54
columnar::MomentumAccessorExampleTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
MomentumAccessorExampleTool.cxx:27
columnar::MomentumAccessorExampleTool::m_energyCut
Gaudi::Property< float > m_energyCut
the energy cut to apply
Definition
MomentumAccessorExampleTool.h:48
columnar::MomentumAccessorExampleTool::callSingleEvent
void callSingleEvent(ParticleRange particles) const
Definition
MomentumAccessorExampleTool.cxx:43
columnar::MomentumAccessorExampleTool::particlesHandle
ParticleAccessor< ObjectColumn > particlesHandle
the object accessor for the particles
Definition
MomentumAccessorExampleTool.h:56
columnar::MomentumAccessorExampleTool::selectionDec
ParticleDecorator< char > selectionDec
the selection decorator for the particles
Definition
MomentumAccessorExampleTool.h:89
columnar::MomentumAccessorExampleTool::objectTypeAcc
ObjectTypeAccessor< ParticleDef > objectTypeAcc
the object type accessor for the particle container
Definition
MomentumAccessorExampleTool.h:72
columnar::MomentumAccessorExampleTool::MomentumAccessorExampleTool
MomentumAccessorExampleTool(const std::string &name)
Definition
MomentumAccessorExampleTool.cxx:20
columnar::MomentumAccessorExampleTool::momAcc
MomentumAccessors< ParticleDef > momAcc
the momentum accessors for the particle container
Definition
MomentumAccessorExampleTool.h:64
columnar::MomentumAccessors
a handle to hold a IMomentumAccessors object
Definition
MomentumAccessors.h:290
columnar::ObjectTypeAccessor
a specialized accessor for retrieving the xAOD object type of objects
Definition
ObjectTypeAccessor.h:30
columnar
Definition
ClusterDef.h:16
columnar::EventContextRange
ObjectRange< EventContextDef > EventContextRange
Definition
ContainerId.h:211
columnar::ParticleAccessor
AccessorTemplate< ParticleDef, CT, ColumnAccessMode::input, CM > ParticleAccessor
Definition
ParticleDef.h:35
columnar::ParticleDecorator
AccessorTemplate< ParticleDef, CT, ColumnAccessMode::output, CM > ParticleDecorator
Definition
ParticleDef.h:36
columnar::ParticleRange
ObjectRange< ParticleDef > ParticleRange
Definition
ParticleDef.h:32
Generated on
for ATLAS Offline Software by
1.17.0