ATLAS Offline Software
Loading...
Searching...
No Matches
IAthSelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETPHYSVALMONITORING_IATHSELECTIONTOOL_H
6#define INDETPHYSVALMONITORING_IATHSELECTIONTOOL_H
7
14
15
16
17//Gaudi
18#include "GaudiKernel/IAlgTool.h"
19#include "xAODBase/IParticle.h"
20#include <string>
21#include <vector>
22
23static const InterfaceID IID_IAthSelectionTool("IAthSelectionTool",1,0);
24
25
27class IAthSelectionTool:virtual public IAlgTool{
28public:
29
30 class CutResult {
31 public:
32 CutResult(unsigned int missing_cuts) : m_missingCuts(missing_cuts) {}
33
34 unsigned int missingCuts() const {
35 return m_missingCuts;
36 }
37
38 operator bool() const {
39 return m_missingCuts==0;
40 }
41
42 private:
43 unsigned int m_missingCuts = 0;
44 };
45
47 static const InterfaceID & interfaceID();
49 virtual ~IAthSelectionTool(){ }
50
56 testAllCuts(const xAOD::IParticle * p, std::vector<unsigned int> &counter) const = 0;
57
63
67 virtual unsigned int nCuts() const = 0;
68
70 virtual std::vector<std::string> names() const = 0;
71};
72
73inline const InterfaceID & IAthSelectionTool::interfaceID(){
75}
76
77#endif
static const InterfaceID IID_IAthSelectionTool("IAthSelectionTool", 1, 0)
CutResult(unsigned int missing_cuts)
unsigned int missingCuts() const
IAthSelectionTool is a virtual baseclass for selection methods.
virtual unsigned int nCuts() const =0
return the number of cuts.
virtual ~IAthSelectionTool()
virtual destructor, does nothing
virtual IAthSelectionTool::CutResult accept(const xAOD::IParticle *p) const =0
The most important method to determine whether the particle is accepted.
static const InterfaceID & interfaceID()
interfaceID reimplemented from base
virtual std::vector< std::string > names() const =0
return the names of the cuts as a vector<string>
virtual IAthSelectionTool::CutResult testAllCuts(const xAOD::IParticle *p, std::vector< unsigned int > &counter) const =0
The most important method to determine whether the particle is accepted.
Class providing the definition of the 4-vector interface.