ATLAS Offline Software
Loading...
Searching...
No Matches
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>
17
18namespace columnar
19{
33
35 : public asg::AsgTool,
36 public ColumnarTool<>
37 {
38 public:
39
40 // Create a proper constructor for Athena
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", 10e3, "pt cut (in MeV)"};
52
54 Gaudi::Property<float> m_etaCut {this, "etaCut", 2.47, "max eta cut"};
55
56
63
64
74
75
80 struct SubtoolPt : public ColumnarTool<>
81 {
82 SubtoolPt (float val_cutValue);
83 bool select (ParticleId particle) const;
84
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
107 float m_cutValue = 0;
108 };
109 std::unique_ptr<SubtoolEta> m_subtoolEta;
110 };
111}
112
113#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
ModularExampleTool(const std::string &name)
std::unique_ptr< SubtoolEta > m_subtoolEta
std::unique_ptr< SubtoolPt > m_subtoolPt
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Gaudi::Property< float > m_etaCut
the eta cut to apply
ParticleDecorator< char > selectionDec
the selection decorator for the particles
ParticleAccessor< ObjectColumn > particlesHandle
the object accessor for the particles
Gaudi::Property< float > m_ptCut
the pt cut to apply
ObjectRange< ContainerId::eventContext > EventContextRange
ObjectId< ContainerId::particle > ParticleId
Definition ParticleDef.h:36
AccessorTemplate< ContainerId::particle, CT, ColumnAccessMode::input, CM > ParticleAccessor
Definition ParticleDef.h:38
AccessorTemplate< ContainerId::particle, CT, ColumnAccessMode::output, CM > ParticleDecorator
Definition ParticleDef.h:39
bool select(ParticleId particle) const
SubtoolEta(ColumnarTool<> *parent, float val_cutValue)
bool select(ParticleId particle) const