2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 ///@file TauCommonDetails.icc
7 /// Inline function implementations for tau PID details class
9 ///Package: Reconstruction/TauEvent
11 ///@author Thomas Burgess
13 /// Created by Thomas Burgess on 2008-10-28.
15 /// $Id: TauPID.icc,v 1.2 2009-01-21 12:22:11 tburgess Exp $
20 inline TauPID::TauPID()
24 inline TauPID::~TauPID()
28 inline bool TauPID::operator!=( const TauPID& rhs ) const
30 return !((*this)==rhs);
33 //-------------------------------------------------------------------------
35 //-------------------------------------------------------------------------
36 inline bool TauPID::hasDiscriminant(
37 TauJetParameters::TauID discID ) const
40 vector<pair<TauJetParameters::TauID, double> >::const_iterator it =
42 for( ; it != m_params.end() && (*it).first != discID; ++it )
44 return it != m_params.end();
47 //-------------------------------------------------------------------------
49 //-------------------------------------------------------------------------
50 inline double TauPID::discriminant(
51 TauJetParameters::TauID discID ) const
54 vector<pair<TauJetParameters::TauID, double> >::const_iterator it =
56 for( ; it != m_params.end() && (*it).first != discID; ++it )
58 return (it != m_params.end()) ? (*it).second : TauDetails::DEFAULT;
61 //-------------------------------------------------------------------------
63 //-------------------------------------------------------------------------
64 inline void TauPID::setDiscriminant(
65 TauJetParameters::TauID discID,
69 vector<pair<TauJetParameters::TauID, double> >::iterator it =
71 for( ; it != m_params.end() && (*it).first != discID; ++it )
73 if( it != m_params.end() )
76 m_params.push_back( make_pair( discID, disc ) );
79 //-------------------------------------------------------------------------
81 //-------------------------------------------------------------------------
82 inline bool TauPID::isTau(
83 TauJetParameters::IsTauFlag flag ) const
85 return m_isTauFlags[flag];
88 inline void TauPID::setIsTau(
89 TauJetParameters::IsTauFlag flag, bool value )
91 m_isTauFlags[flag] = value;
94 //-------------------------------------------------------------------------
95 // Veto flags accessors
96 //-------------------------------------------------------------------------
97 inline void TauPID::setFlag(
98 TauJetParameters::VetoFlags flag, bool value )
100 m_vetoFlags[flag] = value;
103 inline bool TauPID::flag(
104 TauJetParameters::VetoFlags flag ) const
106 return m_vetoFlags[flag];