ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Analysis::TauPID Class Reference

Class containing discriminants produced by identification algorithms. More...

#include <TauPID.h>

Collaboration diagram for Analysis::TauPID:

Public Member Functions

 TauPID ()
 Constructor. More...
 
virtual ~TauPID ()
 Destructor. More...
 
 TauPID (std::vector< std::pair< TauJetParameters::TauID, double > > &&params, const std::bitset< 32 > &isTauFlags, const std::bitset< 32 > &vetoFlags)
 
 TauPID (const TauPID &rhs)
 Copy constructor. More...
 
TauPIDoperator= (const TauPID &rhs)
 assignment operator More...
 
TauPIDoperator= (TauPID &&rhs)
 
bool operator== (const TauPID &rhs) const
 Equality operator. More...
 
bool operator!= (const TauPID &rhs) const
 Inequality operator. More...
 
bool hasDiscriminant (TauJetParameters::TauID discID) const
 Check if class contains requested discriminant. More...
 
double discriminant (TauJetParameters::TauID discID) const
 Get value of discriminant. More...
 
void setDiscriminant (TauJetParameters::TauID discID, double disc)
 Set value of discriminant. More...
 
bool isTau (TauJetParameters::IsTauFlag flag) const
 Get Flag for tau acceptance based on predefined arbitrary criteria. More...
 
void setIsTau (TauJetParameters::IsTauFlag flag, bool value)
 Set Flag for tau acceptance based on predefined arbitrary criteria. More...
 
void setFlag (TauJetParameters::VetoFlags flag, bool value)
 Set veto flag. More...
 
bool flag (TauJetParameters::VetoFlags flag) const
 Get veto flag. More...
 
const std::vector< std::pair< TauJetParameters::TauID, double > > & params () const
 
const std::bitset< 32 > & isTauFlags () const
 
const std::bitset< 32 > & vetoFlags () const
 

Private Attributes

std::vector< std::pair< TauJetParameters::TauID, double > > m_params
 
std::bitset< 32 > m_isTauFlags
 
std::bitset< 32 > m_vetoFlags
 

Detailed Description

Class containing discriminants produced by identification algorithms.

Definition at line 31 of file TauPID.h.

Constructor & Destructor Documentation

◆ TauPID() [1/3]

Analysis::TauPID::TauPID ( )

Constructor.

◆ ~TauPID()

virtual Analysis::TauPID::~TauPID ( )
virtual

Destructor.

◆ TauPID() [2/3]

Analysis::TauPID::TauPID ( std::vector< std::pair< TauJetParameters::TauID, double > > &&  params,
const std::bitset< 32 > &  isTauFlags,
const std::bitset< 32 > &  vetoFlags 
)

Definition at line 28 of file TauPID.cxx.

31  : m_params( std::move (params) ),
34  {
35 
36  }

◆ TauPID() [3/3]

Analysis::TauPID::TauPID ( const TauPID rhs)

Copy constructor.

Definition at line 38 of file TauPID.cxx.

38  :
39  m_params( rhs.m_params ),
40  m_isTauFlags( rhs.m_isTauFlags ),
41  m_vetoFlags( rhs.m_vetoFlags )
42  {
43 
44  }

Member Function Documentation

◆ discriminant()

double Analysis::TauPID::discriminant ( TauJetParameters::TauID  discID) const

Get value of discriminant.

Parameters
discIDdiscriminant id requested

◆ flag()

bool Analysis::TauPID::flag ( TauJetParameters::VetoFlags  flag) const

Get veto flag.

Parameters
flagflag to check

◆ hasDiscriminant()

bool Analysis::TauPID::hasDiscriminant ( TauJetParameters::TauID  discID) const

Check if class contains requested discriminant.

Parameters
discIDdiscriminant id requested

◆ isTau()

bool Analysis::TauPID::isTau ( TauJetParameters::IsTauFlag  flag) const

Get Flag for tau acceptance based on predefined arbitrary criteria.

Parameters
flagflag to check

◆ isTauFlags()

const std::bitset< 32 > & Analysis::TauPID::isTauFlags ( ) const

Definition at line 90 of file TauPID.cxx.

91  {
92  return m_isTauFlags;
93  }

◆ operator!=()

bool Analysis::TauPID::operator!= ( const TauPID rhs) const

Inequality operator.

Parameters
rhsTauPID instance to compare to
Returns
!operator==

◆ operator=() [1/2]

TauPID & Analysis::TauPID::operator= ( const TauPID rhs)

assignment operator

Parameters
rhsTauPID to copy

Definition at line 46 of file TauPID.cxx.

47  {
48  if(this != &rhs)
49  {
50  m_params=rhs.m_params;
51  m_isTauFlags=rhs.m_isTauFlags;
52  m_vetoFlags=rhs.m_vetoFlags;
53  }
54  return *this;
55  }

◆ operator=() [2/2]

TauPID & Analysis::TauPID::operator= ( TauPID &&  rhs)

Definition at line 57 of file TauPID.cxx.

58  {
59  if(this != &rhs)
60  {
61  m_params=std::move(rhs.m_params);
62  m_isTauFlags=std::move(rhs.m_isTauFlags);
63  m_vetoFlags=std::move(rhs.m_vetoFlags);
64  }
65  return *this;
66  }

◆ operator==()

bool Analysis::TauPID::operator== ( const TauPID rhs) const

Equality operator.

Parameters
rhsright hand side TauPID instance to compare
Returns
true if equal, false otherwise

Definition at line 68 of file TauPID.cxx.

69  {
70  //Loop over both params and make sure every entry is equal
71  if ( !TauCmp::vcmp(m_params,rhs.m_params) ) return false;
72  // std::vector<std::pair<TauJetParameters::TauID,
73  // double> >::const_iterator iparam, iparamrhs;
74  // for (iparam = m_params.begin(), iparamrhs=rhs.m_params.begin();
75  // (iparam!=m_params.end()) && (iparamrhs!=rhs.m_params.end());
76  // ++iparam,++iparamrhs)
77  // if (cmp((*iparam).second,(*iparamrhs).second))
78  // return false;
79  if ( m_isTauFlags != rhs.m_isTauFlags )
80  return false;
81  if ( m_vetoFlags != rhs.m_vetoFlags )
82  return false;
83  return true;
84  }

◆ params()

const std::vector< std::pair< TauJetParameters::TauID, double > > & Analysis::TauPID::params ( ) const

Definition at line 86 of file TauPID.cxx.

87  {
88  return m_params;
89  }

◆ setDiscriminant()

void Analysis::TauPID::setDiscriminant ( TauJetParameters::TauID  discID,
double  disc 
)

Set value of discriminant.

Parameters
discIDdiscriminant id requested
discdiscriminant value

◆ setFlag()

void Analysis::TauPID::setFlag ( TauJetParameters::VetoFlags  flag,
bool  value 
)

Set veto flag.

Parameters
flagflag to set
valuevalue to set

◆ setIsTau()

void Analysis::TauPID::setIsTau ( TauJetParameters::IsTauFlag  flag,
bool  value 
)

Set Flag for tau acceptance based on predefined arbitrary criteria.

Parameters
flagflag to set
valuevalue to set

◆ vetoFlags()

const std::bitset< 32 > & Analysis::TauPID::vetoFlags ( ) const

Definition at line 94 of file TauPID.cxx.

95  {
96  return m_vetoFlags;
97  }

Member Data Documentation

◆ m_isTauFlags

std::bitset<32> Analysis::TauPID::m_isTauFlags
private

Definition at line 111 of file TauPID.h.

◆ m_params

std::vector<std::pair<TauJetParameters::TauID, double> > Analysis::TauPID::m_params
private

Definition at line 110 of file TauPID.h.

◆ m_vetoFlags

std::bitset<32> Analysis::TauPID::m_vetoFlags
private

Definition at line 112 of file TauPID.h.


The documentation for this class was generated from the following files:
Analysis::TauPID::m_vetoFlags
std::bitset< 32 > m_vetoFlags
Definition: TauPID.h:112
Analysis::TauPID::isTauFlags
const std::bitset< 32 > & isTauFlags() const
Definition: TauPID.cxx:90
Analysis::TauPID::m_params
std::vector< std::pair< TauJetParameters::TauID, double > > m_params
Definition: TauPID.h:110
Analysis::TauPID::vetoFlags
const std::bitset< 32 > & vetoFlags() const
Definition: TauPID.cxx:94
Analysis::TauCmp::vcmp
bool vcmp(const std::vector< T > &a, const std::vector< T > &b)
Compare vectors using cmp predicate.
Definition: TauCmp.h:36
Analysis::TauPID::m_isTauFlags
std::bitset< 32 > m_isTauFlags
Definition: TauPID.h:111
Analysis::TauPID::params
const std::vector< std::pair< TauJetParameters::TauID, double > > & params() const
Definition: TauPID.cxx:86