ATLAS Offline Software
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 
21 namespace 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 
48  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
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
IParticle.h
CP::AsgFlagSelectionTool::m_selFlags
Gaudi::Property< std::vector< std::string > > m_selFlags
tool properties
Definition: AsgFlagSelectionTool.h:77
CP::AsgFlagSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override
The main accept method: the actual cuts are applied here.
Definition: AsgFlagSelectionTool.cxx:69
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
IAsgSelectionTool.h
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
asg::AcceptInfo
Definition: AcceptInfo.h:28
CP::AsgFlagSelectionTool::m_invertFlags
Gaudi::Property< std::vector< bool > > m_invertFlags
Definition: AsgFlagSelectionTool.h:78
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::AsgFlagSelectionTool::m_accept
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
Definition: AsgFlagSelectionTool.h:86
CP::AsgFlagSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition: AsgFlagSelectionTool.cxx:61
CP::AsgFlagSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: AsgFlagSelectionTool.cxx:25
CP::AsgFlagSelectionTool::m_acc_selFlags
std::vector< std::unique_ptr< ISelectionReadAccessor > > m_acc_selFlags
Definition: AsgFlagSelectionTool.h:79
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ISelectionReadAccessor.h
CP::AsgFlagSelectionTool
an IAsgSelectionTool that cuts on char decorations
Definition: AsgFlagSelectionTool.h:38
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30