ATLAS Offline Software
Loading...
Searching...
No Matches
JetSelectorAttribute.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8
10 : asg::AsgTool(t)
11 , m_var(this)
12{
13 declareProperty("CutMin", m_min );
14 declareProperty("CutMax", m_max );
15 declareProperty("Var", m_var);
16}
17
19
21
22 for (unsigned int it = 0; it < m_var.size(); it++) {
23 ATH_CHECK(m_var[it].retrieve());
24 ATH_MSG_INFO( "Selecting on var ("<< m_var[it]->describe() << ") in ["<< m_min.at(it) << " , "<< m_max.at(it)<< "]");
25 }
26 return StatusCode::SUCCESS;
27}
28
30
31 for (unsigned int it = 0; it < m_var.size(); it++) {
32 float v = m_var[it]->value(jet);
33 if ((m_min.at(it) > v) || (m_max.at(it) < v)) return false;
34 }
35 return true;
36}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
std::vector< float > m_min
int keep(const xAOD::Jet &jet) const
Method to select.
std::vector< float > m_max
JetSelectorAttribute(const std::string &t)
virtual ~JetSelectorAttribute()
ToolHandleArray< IJetHistoVarTool > m_var
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Jet_v1 Jet
Definition of the current "jet version".