12 ValueRetriever(
const std::string &n) : acc(
n) {}
13 virtual float value(
const xAOD::Jet& j)
const override {
return acc(j);}
19 VecValueRetriever(
const std::string &n,
int ind) : acc(
n), index(ind) {}
20 virtual float value(
const xAOD::Jet& j)
const override {
return acc(j)[index];}
53 if(
type==
"float") retriever = new ::ValueRetriever<float>(name);
54 else if(
type==
"int") retriever = new ::ValueRetriever<int>(name);
55 else if(
type==
"vector<float>") retriever = new ::VecValueRetriever<float>(name,
index);
56 else if(
type==
"vector<int>") retriever = new ::VecValueRetriever<int>(name,
index);
68 return StatusCode::FAILURE;
74 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
111 return StatusCode::FAILURE;
115 return StatusCode::SUCCESS;
122 if( v2 == 0.)
return false;
#define ATH_CHECK
Evaluate an expression and check for errors.
define simple IJetSelector based on jet attributes
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual int keep(const xAOD::Jet &jet) const
Method to select.
JetAbsAttributeSelector(const std::string &t)
JetAttributeRatioSelector(const std::string &t)
SelValueRetriever * m_vretriever2
if the attribute is a vector we'll use the value at this index. else it is ignored.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
virtual int keep(const xAOD::Jet &jet) const
Method to select.
virtual ~JetAttributeSelector()
virtual int keep(const xAOD::Jet &jet) const
Method to select.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
JetAttributeSelector(const std::string &t)
SelValueRetriever * m_vretriever
if the attribute is a vector we'll use the value at this index. else it is ignored.
SelValueRetriever * buildValueRetriever(const std::string &type, const std::string &name, int index)
SG::Accessor< T, ALLOC > Accessor
Jet_v1 Jet
Definition of the current "jet version".
value on which this tool select jets.