ATLAS Offline Software
Loading...
Searching...
No Matches
AsgFlagSelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4
6
7
8
9#ifndef ASG_ANALYSIS_ALGORITHMS__ASG_FLAG_SELECTION_TOOL_H
10#define ASG_ANALYSIS_ALGORITHMS__ASG_FLAG_SELECTION_TOOL_H
11
12#include <AsgTools/AsgTool.h>
15#include <xAODBase/IParticle.h>
17#include <memory>
18#include <string>
19#include <vector>
20
21namespace CP
22{
35
37 : public asg::AsgTool, virtual public IAsgSelectionTool
38 {
39 //
40 // public interface
41 //
42
43 // Create a proper constructor for Athena
45
46
47
52 public:
54
55
56
57
58 //
59 // inherited interface
60 //
61
62 virtual StatusCode initialize () override;
63
64 virtual const asg::AcceptInfo& getAcceptInfo( ) const override;
65
66 virtual asg::AcceptData accept( const xAOD::IParticle* part ) const override;
67
68
69
70 //
71 // private interface
72 //
73
76 private:
77 Gaudi::Property<std::vector<std::string>> m_selFlags {this, "selectionFlags", {}, "list of flags to use as selection criteria"};
78 Gaudi::Property<std::vector<bool>> m_invertFlags {this, "invertFlags", {}, "toggles for inverting the selection (index-parallel to selectionFlags)"};
79 std::vector<std::unique_ptr<ISelectionReadAccessor> > m_acc_selFlags;
80
82
83
85 private:
87 };
88}
89
90#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
an IAsgSelectionTool that cuts on char decorations
Gaudi::Property< std::vector< bool > > m_invertFlags
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
Gaudi::Property< std::vector< std::string > > m_selFlags
tool properties
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override
The main accept method: the actual cuts are applied here.
std::vector< std::unique_ptr< ISelectionReadAccessor > > m_acc_selFlags
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.