ATLAS Offline Software
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 
20 namespace 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 
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 
89  ParticleDecorator<char> selectionDec {*this, "selection"};
90  };
91 }
92 
93 #endif
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
columnar::MomentumAccessors
a handle to hold a IMomentumAccessors object
Definition: MomentumAccessors.h:290
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
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
columnar::MomentumAccessorExampleTool
an example of a columnar tool that uses momentum accessors
Definition: MomentumAccessorExampleTool.h:32
columnar::ObjectRange
a class representing a continuous sequence of objects (a.k.a. a container)
Definition: ContainerId.h:175
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
columnar::MomentumAccessorExampleTool::MomentumAccessorExampleTool
MomentumAccessorExampleTool(const std::string &name)
Definition: MomentumAccessorExampleTool.cxx:20
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ColumnAccessor.h
ObjectColumn.h
ColumnarTool.h
columnar::MomentumAccessorExampleTool::selectionDec
ParticleDecorator< char > selectionDec
the selection decorator for the particles
Definition: MomentumAccessorExampleTool.h:89
columnar::final
CM final
Definition: ColumnAccessor.h:106
ObjectTypeAccessor.h
columnar::MomentumAccessorExampleTool::callSingleEvent
void callSingleEvent(ParticleRange particles) const
Definition: MomentumAccessorExampleTool.cxx:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
columnar::MomentumAccessorExampleTool::momAcc
MomentumAccessors< ContainerId::particle > momAcc
the momentum accessors for the particle container
Definition: MomentumAccessorExampleTool.h:64
columnar::ObjectTypeAccessor
a specialized accessor for retrieving the xAOD object type of objects
Definition: ObjectTypeAccessor.h:30
columnar
Definition: ClusterDef.h:16
columnar::MomentumAccessorExampleTool::particlesHandle
ParticleAccessor< ObjectColumn > particlesHandle
the object accessor for the particles
Definition: MomentumAccessorExampleTool.h:56
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
columnar::ColumnarTool
the base class for all columnar components
Definition: ColumnAccessorDataArray.h:17
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
MomentumAccessors.h
columnar::AccessorTemplate
the raw column accessor template class
Definition: ColumnAccessor.h:81
AsgTool.h
ParticleDef.h
columnar::MomentumAccessorExampleTool::m_energyCut
Gaudi::Property< float > m_energyCut
the energy cut to apply
Definition: MomentumAccessorExampleTool.h:48
columnar::MomentumAccessorExampleTool::objectTypeAcc
ObjectTypeAccessor< ContainerId::particle > objectTypeAcc
the object type accessor for the particle container
Definition: MomentumAccessorExampleTool.h:72