2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5// $Id: VariableDependency.icc 689837 2015-08-17 17:22:12Z wsfreund $
6#ifndef RINGERSELECTORTOOLS_TOOLS_VARIABLEDEPENDENCY_ICC
7#define RINGERSELECTORTOOLS_TOOLS_VARIABLEDEPENDENCY_ICC
10#include "RingerSelectorTools/tools/VariableDependency.h"
14// =============================================================================
16bool VariableDependency::isWithinRange(const DepVarStruct &depVar) const
18 return isWithinEtaRange(depVar.eta) && isWithinEtRange(depVar.et);
21// =============================================================================
23bool VariableDependency::isWithinEtaRange(const float eta) const
25 if ( static_cast<bool>(m_etaDependency) ){
26 const float eta_abs = std::abs(eta);
27 return ( (eta_abs >= m_etaMin) && (eta_abs < m_etaMax) );
33// =============================================================================
35EtaDependency VariableDependency::etaDep() const {
36 return m_etaDependency;
39// =============================================================================
41float VariableDependency::etaMin() const
46// =============================================================================
48float VariableDependency::etaMax() const
53// =============================================================================
55void VariableDependency::setEtaDep(const float etaMin, const float etaMax)
57 m_etaDependency = EtaDependency::EtaDependent;
62// =============================================================================
64bool VariableDependency::isWithinEtRange(const float et) const
66 if ( static_cast<bool>(m_etDependency) ) {
67 return ( (et >= m_etMin) && (et < m_etMax) );
73// =============================================================================
75EtDependency VariableDependency::etDep() const {
76 return m_etDependency;
79// =============================================================================
81float VariableDependency::etMin() const
86// =============================================================================
88float VariableDependency::etMax() const
93// =============================================================================
95void VariableDependency::setEtDep(const float etMin, const float etMax)
97 m_etDependency = EtDependency::EtDependent;
102// =============================================================================
104void VariableDependency::setEtaEtDep(const float etaMin, const float etaMax,
105 const float etMin, const float etMax)
107 setEtaDep(etaMin,etaMax);
108 setEtDep(etMin,etMax);
113#endif // RINGERSELECTORTOOLS_TOOLS_VARIABLEDEPENDENCY_ICC