ATLAS Offline Software
PhysicsAnalysis
Columnar
ColumnarExampleTools
ColumnarExampleTools
ModularExampleTool.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_MODULAR_EXAMPLE_TOOL_H
9
#define COLUMNAR_EXAMPLE_TOOLS_MODULAR_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/ObjectColumn.h
>
16
#include <
ColumnarCore/ParticleDef.h
>
17
18
namespace
columnar
19
{
33
34
class
ModularExampleTool
final
35
:
public
asg::AsgTool
,
36
public
ColumnarTool
<>
37
{
38
public
:
39
40
// Create a proper constructor for Athena
41
ASG_TOOL_CLASS
(
ModularExampleTool
,
asg::IAsgTool
)
42
43
ModularExampleTool
(
const
std::string&
name
);
44
45
virtual
StatusCode
initialize
()
override
;
46
47
virtual
void
callEvents
(
EventContextRange
events
)
const override
;
48
49
51
Gaudi::Property<float>
m_ptCut
{
this
,
"ptCut"
, 10
e3
,
"pt cut (in MeV)"
};
52
54
Gaudi::Property<float>
m_etaCut
{
this
,
"etaCut"
, 2.47,
"max eta cut"
};
55
56
62
ParticleAccessor<ObjectColumn>
particlesHandle
{*
this
,
"Particles"
};
63
64
73
ParticleDecorator<char>
selectionDec
{*
this
,
"selection"
};
74
75
80
struct
SubtoolPt
:
public
ColumnarTool
<>
81
{
82
SubtoolPt
(
float
val_cutValue);
83
bool
select
(
ParticleId
particle
)
const
;
84
85
ParticleAccessor<float>
ptAcc
{*
this
,
"pt"
};
86
float
m_cutValue
= 0;
87
};
88
std::unique_ptr<SubtoolPt>
m_subtoolPt
;
89
90
91
92
101
struct
SubtoolEta
:
public
ColumnarTool
<>
102
{
103
SubtoolEta
(
ColumnarTool<>
*
parent
,
float
val_cutValue);
104
bool
select
(
ParticleId
particle
)
const
;
105
106
ParticleAccessor<float>
etaAcc
{*
this
,
"eta"
};
107
float
m_cutValue
= 0;
108
};
109
std::unique_ptr<SubtoolEta>
m_subtoolEta
;
110
};
111
}
112
113
#endif
columnar::ModularExampleTool::callEvents
virtual void callEvents(EventContextRange events) const override
Definition:
ModularExampleTool.cxx:48
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition:
AsgTool.h:47
PropertyWrapper.h
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:79
columnar::ModularExampleTool
an example of a columnar tool with a modular structure
Definition:
ModularExampleTool.h:37
columnar::ModularExampleTool::SubtoolPt::ptAcc
ParticleAccessor< float > ptAcc
Definition:
ModularExampleTool.h:85
columnar::ModularExampleTool::SubtoolEta
a simple subobject that does a selection on eta
Definition:
ModularExampleTool.h:102
columnar::ModularExampleTool::particlesHandle
ParticleAccessor< ObjectColumn > particlesHandle
the object accessor for the particles
Definition:
ModularExampleTool.h:62
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition:
IAsgTool.h:41
columnar::ModularExampleTool::ModularExampleTool
ModularExampleTool(const std::string &name)
Definition:
ModularExampleTool.cxx:20
columnar::ModularExampleTool::SubtoolPt::select
bool select(ParticleId particle) const
Definition:
ModularExampleTool.cxx:75
columnar::ModularExampleTool::SubtoolPt::m_cutValue
float m_cutValue
Definition:
ModularExampleTool.h:86
columnar::ObjectRange
a class representing a continuous sequence of objects (a.k.a. a container)
Definition:
ContainerId.h:177
python.DataFormatRates.events
events
Definition:
DataFormatRates.py:105
columnar::ModularExampleTool::SubtoolEta::SubtoolEta
SubtoolEta(ColumnarTool<> *parent, float val_cutValue)
Definition:
ModularExampleTool.cxx:83
columnar::ModularExampleTool::selectionDec
ParticleDecorator< char > selectionDec
the selection decorator for the particles
Definition:
ModularExampleTool.h:73
columnar::ModularExampleTool::SubtoolEta::select
bool select(ParticleId particle) const
Definition:
ModularExampleTool.cxx:90
CheckAppliedSFs.e3
e3
Definition:
CheckAppliedSFs.py:264
columnar::ModularExampleTool::m_etaCut
Gaudi::Property< float > m_etaCut
the eta cut to apply
Definition:
ModularExampleTool.h:54
columnar::ModularExampleTool::m_subtoolPt
std::unique_ptr< SubtoolPt > m_subtoolPt
Definition:
ModularExampleTool.h:88
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
columnar::ModularExampleTool::SubtoolPt
a simple subobject that does a selection on the pt
Definition:
ModularExampleTool.h:81
ColumnAccessor.h
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
ObjectColumn.h
ColumnarTool.h
columnar::final
CM final
Definition:
ColumnAccessor.h:106
columnar::ModularExampleTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition:
ModularExampleTool.cxx:27
columnar::ModularExampleTool::m_ptCut
Gaudi::Property< float > m_ptCut
the pt cut to apply
Definition:
ModularExampleTool.h:51
columnar::ObjectId
a class representing a single object (electron, muons, etc.)
Definition:
ContainerId.h:178
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:240
columnar::ModularExampleTool::m_subtoolEta
std::unique_ptr< SubtoolEta > m_subtoolEta
Definition:
ModularExampleTool.h:109
columnar
Definition:
ClusterDef.h:16
columnar::ModularExampleTool::SubtoolEta::m_cutValue
float m_cutValue
Definition:
ModularExampleTool.h:107
columnar::ModularExampleTool::SubtoolEta::etaAcc
ParticleAccessor< float > etaAcc
Definition:
ModularExampleTool.h:106
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition:
AsgToolMacros.h:68
columnar::ModularExampleTool::SubtoolPt::SubtoolPt
SubtoolPt(float val_cutValue)
Definition:
ModularExampleTool.cxx:68
columnar::ColumnarTool
the base class for all columnar components
Definition:
ColumnAccessorDataArray.h:17
columnar::AccessorTemplate
the raw column accessor template class
Definition:
ColumnAccessor.h:81
AsgTool.h
ParticleDef.h
Generated on Fri Nov 7 2025 21:15:27 for ATLAS Offline Software by
1.8.18