ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TRIGGERidentity Class Reference

#include <TRIGGERidentity.h>

Collaboration diagram for TRIGGERidentity:

Public Member Functions

 TRIGGERidentity ()
 
 TRIGGERidentity (TrigType, Threshold, bool)
 
 TRIGGERidentity (const TRIGGERidentity &)
 
TRIGGERidentityoperator= (const TRIGGERidentity &)
 
bool operator== (const TRIGGERidentity &) const
 
bool operator!= (const TRIGGERidentity &) const
 
bool operator< (const TRIGGERidentity &) const
 
 operator bool ()
 
bool operator! ()
 
TrigType type (void) const
 
Threshold threshold (void) const
 
bool overlap (void) const
 
float pt (void) const
 
bool searchForHigh (void) const
 
bool highest (TrigType) const
 
void Print (std::ostream &, bool) const
 

Private Attributes

TrigType m_type
 
Threshold m_threshold
 
bool m_overlap
 

Static Private Attributes

static const char s_type_tag [NTYPE][8] = {{"no"}, {"low Pt"}, {"high Pt"}}
 
static const char s_threshold_tag [NTHRESHOLD][7] = {{"first"}, {"second"}, {"third"}}
 
static const float s_pt_value [NTYPE][NTHRESHOLD] = {{0., 0., 0.}, {6., 8., 10.}, {11., 20., 40.}}
 

Detailed Description

Definition at line 20 of file TRIGGERidentity.h.

Constructor & Destructor Documentation

◆ TRIGGERidentity() [1/3]

TRIGGERidentity::TRIGGERidentity ( )

Definition at line 17 of file TRIGGERidentity.cxx.

17 : m_type(None), m_threshold(FirstTh), m_overlap(false) {}

◆ TRIGGERidentity() [2/3]

TRIGGERidentity::TRIGGERidentity ( TrigType  type,
Threshold  threshold,
bool  flag 
)

Definition at line 19 of file TRIGGERidentity.cxx.

◆ TRIGGERidentity() [3/3]

TRIGGERidentity::TRIGGERidentity ( const TRIGGERidentity id)

Definition at line 21 of file TRIGGERidentity.cxx.

21 : m_type(id.type()), m_threshold(id.threshold()), m_overlap(id.overlap()) {}

Member Function Documentation

◆ highest()

bool TRIGGERidentity::highest ( TrigType  type) const

Definition at line 61 of file TRIGGERidentity.cxx.

61  {
62  if (type == High) {
63  if (m_type == High && m_threshold == SecondTh) return true;
64  }
65  if (type == Low) {
66  if (m_type == Low && m_threshold == ThirdTh) return true;
67  }
68  return false;
69 }

◆ operator bool()

TRIGGERidentity::operator bool ( )

Definition at line 52 of file TRIGGERidentity.cxx.

52  {
53  if (m_type == None)
54  return false;
55  else
56  return true;
57 }

◆ operator!()

bool TRIGGERidentity::operator! ( )

Definition at line 59 of file TRIGGERidentity.cxx.

59 { return !(bool)*this; }

◆ operator!=()

Definition at line 39 of file TRIGGERidentity.cxx.

39 { return !(*this == id); }

◆ operator<()

bool TRIGGERidentity::operator< ( const TRIGGERidentity id) const

Definition at line 41 of file TRIGGERidentity.cxx.

41  {
42  if (m_type < id.type()) return true;
43  if (m_type == id.type()) {
44  if (m_threshold < id.threshold()) return true;
45  if (m_threshold == id.threshold()) {
46  if (m_overlap < id.overlap()) return true;
47  }
48  }
49  return false;
50 }

◆ operator=()

TRIGGERidentity & TRIGGERidentity::operator= ( const TRIGGERidentity id)

Definition at line 23 of file TRIGGERidentity.cxx.

23  {
24  if (this != &id) {
25  m_type = id.type();
26  m_threshold = id.threshold();
27  m_overlap = id.overlap();
28  }
29  return *this;
30 }

◆ operator==()

bool TRIGGERidentity::operator== ( const TRIGGERidentity id) const

Definition at line 32 of file TRIGGERidentity.cxx.

32  {
33  if (m_type == id.type() && m_threshold == id.threshold() && m_overlap == id.overlap())
34  return true;
35  else
36  return false;
37 }

◆ overlap()

bool TRIGGERidentity::overlap ( void  ) const
inline

Definition at line 46 of file TRIGGERidentity.h.

46 { return m_overlap; }

◆ Print()

void TRIGGERidentity::Print ( std::ostream &  stream,
bool  detail 
) const

Definition at line 79 of file TRIGGERidentity.cxx.

79  {
80  detail = true;
81  if (detail) {
82  stream << s_type_tag[type()] << " trigger, " << s_threshold_tag[threshold()] << " threshold fired (" << std::setw(4)
83  << s_pt_value[type()][threshold()] << " GeV), overlap flag ";
84  if (overlap())
85  stream << "ON";
86  else
87  stream << "OFF";
88  }
89 }

◆ pt()

float TRIGGERidentity::pt ( void  ) const
inline

Definition at line 47 of file TRIGGERidentity.h.

47 { return s_pt_value[m_type][m_threshold]; }

◆ searchForHigh()

bool TRIGGERidentity::searchForHigh ( void  ) const

Definition at line 71 of file TRIGGERidentity.cxx.

71  {
72  TRIGGERidentity maxLow(Low, ThirdTh, false);
73  if (*this < maxLow)
74  return false;
75  else
76  return true;
77 }

◆ threshold()

Threshold TRIGGERidentity::threshold ( void  ) const
inline

Definition at line 45 of file TRIGGERidentity.h.

45 { return m_threshold; }

◆ type()

TrigType TRIGGERidentity::type ( void  ) const
inline

Definition at line 44 of file TRIGGERidentity.h.

44 { return m_type; }

Member Data Documentation

◆ m_overlap

bool TRIGGERidentity::m_overlap
private

Definition at line 29 of file TRIGGERidentity.h.

◆ m_threshold

Threshold TRIGGERidentity::m_threshold
private

Definition at line 28 of file TRIGGERidentity.h.

◆ m_type

TrigType TRIGGERidentity::m_type
private

Definition at line 27 of file TRIGGERidentity.h.

◆ s_pt_value

const float TRIGGERidentity::s_pt_value = {{0., 0., 0.}, {6., 8., 10.}, {11., 20., 40.}}
staticprivate

Definition at line 24 of file TRIGGERidentity.h.

◆ s_threshold_tag

const char TRIGGERidentity::s_threshold_tag = {{"first"}, {"second"}, {"third"}}
staticprivate

Definition at line 23 of file TRIGGERidentity.h.

◆ s_type_tag

const char TRIGGERidentity::s_type_tag = {{"no"}, {"low Pt"}, {"high Pt"}}
staticprivate

Definition at line 22 of file TRIGGERidentity.h.


The documentation for this class was generated from the following files:
ThirdTh
@ ThirdTh
Definition: TRIGGERidentity.h:18
TRIGGERidentity::m_threshold
Threshold m_threshold
Definition: TRIGGERidentity.h:28
TRIGGERidentity
Definition: TRIGGERidentity.h:20
TRIGGERidentity::s_pt_value
static const float s_pt_value[NTYPE][NTHRESHOLD]
Definition: TRIGGERidentity.h:24
detail
Definition: extract_histogram_tag.cxx:14
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
SecondTh
@ SecondTh
Definition: TRIGGERidentity.h:18
master.flag
bool flag
Definition: master.py:29
TRIGGERidentity::m_type
TrigType m_type
Definition: TRIGGERidentity.h:27
TRIGGERidentity::m_overlap
bool m_overlap
Definition: TRIGGERidentity.h:29
TRIGGERidentity::overlap
bool overlap(void) const
Definition: TRIGGERidentity.h:46
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
TrackCorrType::None
@ None
threshold
Definition: chainparser.cxx:74
Low
@ Low
Definition: TRIGGERidentity.h:17
TRIGGERidentity::s_type_tag
static const char s_type_tag[NTYPE][8]
Definition: TRIGGERidentity.h:22
TRIGGERidentity::s_threshold_tag
static const char s_threshold_tag[NTHRESHOLD][7]
Definition: TRIGGERidentity.h:23
High
@ High
Definition: TRIGGERidentity.h:17
TRIGGERidentity::threshold
Threshold threshold(void) const
Definition: TRIGGERidentity.h:45
TRIGGERidentity::type
TrigType type(void) const
Definition: TRIGGERidentity.h:44
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
FirstTh
@ FirstTh
Definition: TRIGGERidentity.h:18