ATLAS Offline Software
Loading...
Searching...
No Matches
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>
19
20namespace columnar
21{
28
30 : public asg::AsgTool,
31 public ColumnarTool<>
32 {
33 public:
34
35 // Create a proper constructor for Athena
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
57
58
65
72 ObjectTypeAccessor<ContainerId::particle> 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<ContainerId::particle,ColumnarModeDefault>> momAcc {*this};
79
80
90 };
91}
92
93#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
the base class for all columnar components
virtual void callEvents(EventContextRange events) const override
MomentumAccessors< ContainerId::particle > momAcc
the momentum accessors for the particle container
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Gaudi::Property< float > m_energyCut
the energy cut to apply
void callSingleEvent(ParticleRange particles) const
ObjectTypeAccessor< ContainerId::particle > objectTypeAcc
the object type accessor for the particle container
ParticleAccessor< ObjectColumn > particlesHandle
the object accessor for the particles
ParticleDecorator< char > selectionDec
the selection decorator for the particles
a handle to hold a IMomentumAccessors object
a specialized accessor for retrieving the xAOD object type of objects
ObjectRange< ContainerId::particle > ParticleRange
Definition ParticleDef.h:35
ObjectRange< ContainerId::eventContext > EventContextRange
AccessorTemplate< ContainerId::particle, CT, ColumnAccessMode::input, CM > ParticleAccessor
Definition ParticleDef.h:38
AccessorTemplate< ContainerId::particle, CT, ColumnAccessMode::output, CM > ParticleDecorator
Definition ParticleDef.h:39