ATLAS Offline Software
AsgMaskSelectionTool.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_MASK_SELECTION_TOOL_H
10 #define ASG_ANALYSIS_ALGORITHMS__ASG_MASK_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 {
27 
29  : public asg::AsgTool, virtual public IAsgSelectionTool
30  {
31  //
32  // public interface
33  //
34 
35  // Create a proper constructor for Athena
37 
38 
39 
40  public:
46 
47 
48 
49  //
50  // inherited interface
51  //
52 
53  virtual StatusCode initialize () override;
54 
55  virtual const asg::AcceptInfo& getAcceptInfo( ) const override;
56 
57  virtual asg::AcceptData accept( const xAOD::IParticle* part ) const override;
58 
59 
60 
61  //
62  // private interface
63  //
64 
67  private:
68  Gaudi::Property<std::vector<std::string>> m_selVars {this, "selectionVars", {}, "list of variables to use as selection criteria"};
69  Gaudi::Property<std::vector<unsigned int>> m_selMasks {this, "selectionMasks", {}, "list of masks, one per variable, for applying the selection"};
70  std::vector<std::unique_ptr<ISelectionReadAccessor> > m_acc_selVars;
71 
73 
74 
76  private:
78  };
79 }
80 
81 #endif
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
CP::AsgMaskSelectionTool::m_selMasks
Gaudi::Property< std::vector< unsigned int > > m_selMasks
Definition: AsgMaskSelectionTool.h:69
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
IParticle.h
CP::AsgMaskSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition: AsgMaskSelectionTool.cxx:52
CP::AsgMaskSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override
The main accept method: the actual cuts are applied here.
Definition: AsgMaskSelectionTool.cxx:58
CP::AsgMaskSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: AsgMaskSelectionTool.cxx:25
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
IAsgSelectionTool.h
CP::AsgMaskSelectionTool::m_acc_selVars
std::vector< std::unique_ptr< ISelectionReadAccessor > > m_acc_selVars
Definition: AsgMaskSelectionTool.h:70
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
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::AsgMaskSelectionTool
an IAsgSelectionTool that cuts on int decorations with mask
Definition: AsgMaskSelectionTool.h:30
CP::AsgMaskSelectionTool::m_accept
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
Definition: AsgMaskSelectionTool.h:77
CP::AsgMaskSelectionTool::m_selVars
Gaudi::Property< std::vector< std::string > > m_selVars
tool properties
Definition: AsgMaskSelectionTool.h:68
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ISelectionReadAccessor.h
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30