ATLAS Offline Software
JetAttributeSelector.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef JETSELECTORTOOLS_JETSELECTORATTRIBUTE_H
8 #define JETSELECTORTOOLS_JETSELECTORATTRIBUTE_H
9 
11 #include "AsgTools/AsgTool.h"
38 
39 class JetAttributeSelector : public asg::AsgTool , virtual public IJetSelector
40  {
42  public:
43 
47  virtual float value(const xAOD::Jet& j) const = 0;
48  virtual ~SelValueRetriever(){};
49  };
50 
51  JetAttributeSelector(const std::string &t);
52  virtual ~JetAttributeSelector();
53 
54  virtual StatusCode initialize() ;
55 
56  virtual int keep(const xAOD::Jet& jet) const;
57 
58  protected:
59  SelValueRetriever * buildValueRetriever(const std::string& type, const std::string& name, int index);
60 
61  float m_min;
62  float m_max;
63 
64  std::string m_attName;
65  std::string m_attType;
66 
69 
70 };
71 
72 
74 
76 public:
77  JetAbsAttributeSelector(const std::string &t);
78  virtual int keep(const xAOD::Jet& jet) const;
79 
80 };
81 
83 
85 public:
86  JetAttributeRatioSelector(const std::string &t);
87 
88  virtual StatusCode initialize() ;
89 
90  virtual int keep(const xAOD::Jet& jet) const;
91  protected:
92 
93  std::string m_attName2;
94  std::string m_attType2;
95 
98 
99 };
100 
101 
102 
103 
104 #endif
JetAttributeSelector::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: JetAttributeSelector.cxx:65
JetAbsAttributeSelector
Definition: JetAttributeSelector.h:73
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
JetAttributeSelector::m_attName
std::string m_attName
Definition: JetAttributeSelector.h:64
index
Definition: index.py:1
JetAttributeSelector::SelValueRetriever::~SelValueRetriever
virtual ~SelValueRetriever()
Definition: JetAttributeSelector.h:48
JetAttributeRatioSelector::JetAttributeRatioSelector
JetAttributeRatioSelector(const std::string &t)
Definition: JetAttributeSelector.cxx:93
JetAttributeSelector::m_vretriever
SelValueRetriever * m_vretriever
if the attribute is a vector we'll use the value at this index. else it is ignored.
Definition: JetAttributeSelector.h:68
JetAttributeSelector::m_max
float m_max
Definition: JetAttributeSelector.h:62
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IJetSelector.h
JetAttributeRatioSelector::m_vectorAttIndex2
int m_vectorAttIndex2
Definition: JetAttributeSelector.h:96
JetAttributeSelector::~JetAttributeSelector
virtual ~JetAttributeSelector()
Definition: JetAttributeSelector.cxx:46
JetAttributeSelector::SelValueRetriever::value
virtual float value(const xAOD::Jet &j) const =0
JetAttributeSelector::m_vectorAttIndex
int m_vectorAttIndex
Definition: JetAttributeSelector.h:67
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
JetAttributeRatioSelector::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: JetAttributeSelector.cxx:105
JetAbsAttributeSelector::keep
virtual int keep(const xAOD::Jet &jet) const
Method to select.
Definition: JetAttributeSelector.cxx:88
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
JetAbsAttributeSelector::JetAbsAttributeSelector
JetAbsAttributeSelector(const std::string &t)
Definition: JetAttributeSelector.cxx:86
JetAttributeSelector::JetAttributeSelector
JetAttributeSelector(const std::string &t)
Definition: JetAttributeSelector.cxx:28
JetAttributeSelector::m_attType
std::string m_attType
Definition: JetAttributeSelector.h:65
JetAttributeRatioSelector::m_attType2
std::string m_attType2
Definition: JetAttributeSelector.h:94
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IJetSelector
IJetSelector is a dual-use tool interface for a tool that selects a jet.
Definition: IJetSelector.h:19
JetAttributeSelector
a IJetSelector implementation which select according to an attribute
Definition: JetAttributeSelector.h:40
JetAttributeSelector::SelValueRetriever
Definition: JetAttributeSelector.h:46
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
JetAttributeRatioSelector::m_attName2
std::string m_attName2
Definition: JetAttributeSelector.h:93
JetAttributeRatioSelector::m_vretriever2
SelValueRetriever * m_vretriever2
if the attribute is a vector we'll use the value at this index. else it is ignored.
Definition: JetAttributeSelector.h:97
JetAttributeSelector::buildValueRetriever
SelValueRetriever * buildValueRetriever(const std::string &type, const std::string &name, int index)
Definition: JetAttributeSelector.cxx:51
JetAttributeSelector::m_min
float m_min
Definition: JetAttributeSelector.h:61
AsgTool.h
JetAttributeRatioSelector
a IJetSelector implementation which select according to ratio of attributes
Definition: JetAttributeSelector.h:82
JetAttributeSelector::keep
virtual int keep(const xAOD::Jet &jet) const
Method to select.
Definition: JetAttributeSelector.cxx:80
JetAttributeRatioSelector::keep
virtual int keep(const xAOD::Jet &jet) const
Method to select.
Definition: JetAttributeSelector.cxx:119