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

#include <JetEnergyRoI.h>

Collaboration diagram for ROIB::JetEnergyRoI:

Public Member Functions

 JetEnergyRoI (uint32_t)
 
 JetEnergyRoI ()
 
 ~JetEnergyRoI ()=default
 
void update ()
 
uint32_t roIWord () const
 Method returning the RoI word. More...
 
unsigned int roIType () const
 Method returning the RoI type (jet, energy, jet-Et) More...
 
unsigned int electronicsID () const
 Method returning electronics address. More...
 
std::vector< unsigned int > thresholds () const
 Method returning the list of passed thresholds. More...
 
unsigned int jetEt () const
 
unsigned int etLarge () const
 Methods returning the jet ET cluster values for Run 2 RoIs. More...
 
unsigned int etSmall () const
 
unsigned int energyX () const
 Method returning Ex, Ey, and Esum. More...
 
unsigned int energyY () const
 
unsigned int energySum () const
 
unsigned int etSumType () const
 Eta range for MET/SumET RoIs (0 = full, 1 = restricted) More...
 
std::vector< unsigned int > etSumThresholds () const
 Method returning patterns for passed etsum and etmiss threhsolds. More...
 
std::vector< unsigned int > etMissThresholds () const
 
std::vector< unsigned int > metSigThresholds () const
 
unsigned int jetRoIVersion () const
 Jet RoI version (Run 1 or Run 2) More...
 

Private Attributes

uint32_t m_roIWord
 

Detailed Description

Definition at line 20 of file JetEnergyRoI.h.

Constructor & Destructor Documentation

◆ JetEnergyRoI() [1/2]

ROIB::JetEnergyRoI::JetEnergyRoI ( uint32_t  RoIWord)

Definition at line 16 of file JetEnergyRoI.cxx.

17  : m_roIWord( RoIWord )
18  {
19  }

◆ JetEnergyRoI() [2/2]

ROIB::JetEnergyRoI::JetEnergyRoI ( )

Definition at line 21 of file JetEnergyRoI.cxx.

22  : m_roIWord( 0 )
23  {
24  }

◆ ~JetEnergyRoI()

ROIB::JetEnergyRoI::~JetEnergyRoI ( )
default

Member Function Documentation

◆ electronicsID()

unsigned int ROIB::JetEnergyRoI::electronicsID ( ) const

Method returning electronics address.

Definition at line 65 of file JetEnergyRoI.cxx.

65  {
66  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::JetRoIWordType )
67  return 9999;
68  else {
69  return BitOp::getValue( &m_roIWord, 0x1ff10000 );
70  }
71  }

◆ energySum()

unsigned int ROIB::JetEnergyRoI::energySum ( ) const

Definition at line 119 of file JetEnergyRoI.cxx.

119  {
120  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType2 )
121  return 9999;
122  else {
123  return BitOp::getValue( &m_roIWord, 0x0000ffff );
124  }
125  }

◆ energyX()

unsigned int ROIB::JetEnergyRoI::energyX ( ) const

Method returning Ex, Ey, and Esum.

Definition at line 103 of file JetEnergyRoI.cxx.

103  {
104  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType0 )
105  return 9999;
106  else {
107  return BitOp::getValue( &m_roIWord, 0x0000ffff );
108  }
109  }

◆ energyY()

unsigned int ROIB::JetEnergyRoI::energyY ( ) const

Definition at line 111 of file JetEnergyRoI.cxx.

111  {
112  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType1 )
113  return 9999;
114  else {
115  return BitOp::getValue( &m_roIWord, 0x0000ffff );
116  }
117  }

◆ etLarge()

unsigned int ROIB::JetEnergyRoI::etLarge ( ) const

Methods returning the jet ET cluster values for Run 2 RoIs.

Definition at line 85 of file JetEnergyRoI.cxx.

85  {
86  if (jetRoIVersion() < 2) return 0;
87  else return BitOp::getValue( &m_roIWord, 0x3ff );
88  }

◆ etMissThresholds()

vector< unsigned int > ROIB::JetEnergyRoI::etMissThresholds ( ) const

Definition at line 149 of file JetEnergyRoI.cxx.

149  {
150  vector< unsigned int > returnVec;
151 
152  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType2 )
153  returnVec.push_back( 9999 );
154  else {
155  const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
156  for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfMissingEtThresholds;i++ )
157  returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
158  }
159  return returnVec;
160  }

◆ etSmall()

unsigned int ROIB::JetEnergyRoI::etSmall ( ) const

Definition at line 90 of file JetEnergyRoI.cxx.

90  {
91  if (jetRoIVersion() < 2) return 0;
92  else return BitOp::getValue( &m_roIWord, 0x7fc00 );
93  }

◆ etSumThresholds()

vector< unsigned int > ROIB::JetEnergyRoI::etSumThresholds ( ) const

Method returning patterns for passed etsum and etmiss threhsolds.

Definition at line 137 of file JetEnergyRoI.cxx.

137  {
138  vector< unsigned int > returnVec;
139  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType1 )
140  returnVec.push_back( 9999 );
141  else {
142  const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
143  for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfSumEtThresholds;i++ )
144  returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
145  }
146  return returnVec;
147  }

◆ etSumType()

unsigned int ROIB::JetEnergyRoI::etSumType ( ) const

Eta range for MET/SumET RoIs (0 = full, 1 = restricted)

Definition at line 127 of file JetEnergyRoI.cxx.

127  {
128  if ( roIType() != TrigT1CaloDefs::EnergyRoIWordType0 &&
129  roIType() != TrigT1CaloDefs::EnergyRoIWordType1 &&
130  roIType() != TrigT1CaloDefs::EnergyRoIWordType2 )
131  return 0;
132  else {
133  return BitOp::getValue( &m_roIWord, 0x04000000 );
134  }
135  }

◆ jetEt()

unsigned int ROIB::JetEnergyRoI::jetEt ( ) const

Definition at line 95 of file JetEnergyRoI.cxx.

95  {
96  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::JetEtRoIWordType )
97  return 9999;
98  else {
99  return BitOp::getValue( &m_roIWord, 0x0000000f );
100  }
101  }

◆ jetRoIVersion()

unsigned int ROIB::JetEnergyRoI::jetRoIVersion ( ) const

Jet RoI version (Run 1 or Run 2)

Definition at line 36 of file JetEnergyRoI.cxx.

36  {
37  int type = BitOp::getValue( &m_roIWord, 0xe0000000 );
38 
39  if (type == TrigT1CaloDefs::Run1JetType) return 1;
40  else if (type == TrigT1CaloDefs::Run2JetType) return 2;
41 
42  return 999;
43  }

◆ metSigThresholds()

vector< unsigned int > ROIB::JetEnergyRoI::metSigThresholds ( ) const

Definition at line 162 of file JetEnergyRoI.cxx.

162  {
163  vector< unsigned int > returnVec;
164  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::EnergyRoIWordType0 )
165  returnVec.push_back( 9999 );
166  else {
167  const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
168  for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfMEtSigThresholds;i++ )
169  returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
170  }
171  return returnVec;
172  }

◆ roIType()

unsigned int ROIB::JetEnergyRoI::roIType ( ) const

Method returning the RoI type (jet, energy, jet-Et)

Definition at line 45 of file JetEnergyRoI.cxx.

45  {
46 
47  if ( m_roIWord != 0 ) {
48 
49  int type = BitOp::getValue( &m_roIWord, 0xe0000000 );
50 
51  if (type == TrigT1CaloDefs::Run1JetType || type == TrigT1CaloDefs::Run2JetType) return TrigT1CaloDefs::JetRoIWordType;
52  else if (type == TrigT1CaloDefs::JetEtType) return TrigT1CaloDefs::JetEtRoIWordType;
53  else {
54  int type2 = BitOp::getValue( &m_roIWord, 0xf0000000 );
55  if (type2 == TrigT1CaloDefs::energyRoIWord0) return TrigT1CaloDefs::EnergyRoIWordType0;
56  else if (type2 == TrigT1CaloDefs::energyRoIWord1) return TrigT1CaloDefs::EnergyRoIWordType1;
57  else if (type2 == TrigT1CaloDefs::energyRoIWord2) return TrigT1CaloDefs::EnergyRoIWordType2;
58  }
59 
60  }
61 
62  return TrigT1CaloDefs::RoIWordTypeError;
63  }

◆ roIWord()

uint32_t ROIB::JetEnergyRoI::roIWord ( ) const

Method returning the RoI word.

Definition at line 32 of file JetEnergyRoI.cxx.

32  {
33  return m_roIWord;
34  }

◆ thresholds()

vector< unsigned int > ROIB::JetEnergyRoI::thresholds ( ) const

Method returning the list of passed thresholds.

Definition at line 73 of file JetEnergyRoI.cxx.

73  {
74  vector< unsigned int > returnVec;
75  if ( m_roIWord == 0 || roIType() != TrigT1CaloDefs::JetRoIWordType )
76  returnVec.push_back( 9999 );
77  else if ( jetRoIVersion() > 1 ) returnVec.push_back( 0 );
78  else {
79  for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfJetThresholds+TrigT1CaloDefs::numOfFwdJetThresholds;i++ )
80  returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &m_roIWord, i ) ) );
81  }
82  return returnVec;
83  }

◆ update()

void ROIB::JetEnergyRoI::update ( )

This was obselete a long time ago

Definition at line 26 of file JetEnergyRoI.cxx.

26  {
28  m_roIWord = RoIFormatUpdater::UpdateJetEnergyRoI( m_roIWord );
29  return;
30  }

Member Data Documentation

◆ m_roIWord

uint32_t ROIB::JetEnergyRoI::m_roIWord
private

Definition at line 59 of file JetEnergyRoI.h.


The documentation for this class was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
ROIB::JetEnergyRoI::jetRoIVersion
unsigned int jetRoIVersion() const
Jet RoI version (Run 1 or Run 2)
Definition: JetEnergyRoI.cxx:36
ROIB::JetEnergyRoI::m_roIWord
uint32_t m_roIWord
Definition: JetEnergyRoI.h:59
lumiFormat.i
int i
Definition: lumiFormat.py:92
ROIB::JetEnergyRoI::roIType
unsigned int roIType() const
Method returning the RoI type (jet, energy, jet-Et)
Definition: JetEnergyRoI.cxx:45
BitOp::isSet
static bool isSet(const unsigned int *uintValue, int bit)
Check if a the given bit in the given unsigned int or int value is set.
Definition: BitOp.h:47
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
BitOp::getValue
static unsigned int getValue(const unsigned int *uintValue, const unsigned int mask)
get the value in the input word represented by a bit pattern given as a bitmask
Definition: BitOp.cxx:47