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

#include <EMTauRoI.h>

Collaboration diagram for ROIB::EMTauRoI:

Public Member Functions

 EMTauRoI (uint32_t)
 
 EMTauRoI ()
 
 ~EMTauRoI ()=default
 
void update ()
 
uint32_t roIWord () const
 
unsigned int roIType () const
 Return RoI type. More...
 
unsigned int electronicsID () const
 Return bitmask containing coordinate information (crate, module, chip, ocation) More...
 
std::vector< unsigned int > thresholds () const
 Return vector of thresholds passed for Run 1 RoI. More...
 
unsigned int et () const
 Return cluster ET for Run 2 RoI. More...
 
unsigned int isolation () const
 Return isolation flags for Run 2 RoI. More...
 

Private Attributes

uint32_t m_roIWord
 

Detailed Description

Definition at line 20 of file EMTauRoI.h.

Constructor & Destructor Documentation

◆ EMTauRoI() [1/2]

ROIB::EMTauRoI::EMTauRoI ( uint32_t  RoIWord)

Definition at line 16 of file EMTauRoI.cxx.

17  : m_roIWord( RoIWord )
18  {
19  }

◆ EMTauRoI() [2/2]

ROIB::EMTauRoI::EMTauRoI ( )

Definition at line 21 of file EMTauRoI.cxx.

22  : m_roIWord( 0 )
23  {
24  }

◆ ~EMTauRoI()

ROIB::EMTauRoI::~EMTauRoI ( )
default

Member Function Documentation

◆ electronicsID()

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

Return bitmask containing coordinate information (crate, module, chip, ocation)

Definition at line 58 of file EMTauRoI.cxx.

58  {
59  if ( roIType() == TrigT1CaloDefs::CpRoIWordType )
60  return BitOp::getValue( &m_roIWord, 0x3ffc0000 );
61  else if ( roIType() == TrigT1CaloDefs::EMRoIWordType || roIType() == TrigT1CaloDefs::TauRoIWordType )
62  return BitOp::getValue( &m_roIWord, 0x0fff0000 );
63  else
64  return 9999;
65  }

◆ et()

unsigned int ROIB::EMTauRoI::et ( ) const

Return cluster ET for Run 2 RoI.

Definition at line 81 of file EMTauRoI.cxx.

81  {
82 
83  if ( roIType() == TrigT1CaloDefs::EMRoIWordType || roIType() == TrigT1CaloDefs::TauRoIWordType )
84  return BitOp::getValue( &m_roIWord, 0x000000ff );
85 
86  return 0;
87  }

◆ isolation()

unsigned int ROIB::EMTauRoI::isolation ( ) const

Return isolation flags for Run 2 RoI.

Definition at line 90 of file EMTauRoI.cxx.

90  {
91 
92  if ( roIType() == TrigT1CaloDefs::EMRoIWordType || roIType() == TrigT1CaloDefs::TauRoIWordType )
93  return BitOp::getValue( &m_roIWord, 0x00001f00 );
94 
95  return 0;
96  }

◆ roIType()

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

Return RoI type.

Types defined in TrigT1Interfaces::RoIType. Run 1 = CpRoIWordType, Run 2 = EMRoIWordType or TauRoIWordType

Definition at line 38 of file EMTauRoI.cxx.

38  {
39  if ( m_roIWord != 0 ) {
40  unsigned int type = BitOp::getValue( &m_roIWord, 0xc0000000 );
41  if (type == TrigT1CaloDefs::EMTauRoIWord) {
42  return TrigT1CaloDefs::CpRoIWordType;
43  }
44  else {
45  unsigned int temp2 = BitOp::getValue( &m_roIWord, 0xf0000000 );
46  if (temp2 == TrigT1CaloDefs::EMRoIWord) {
47  return TrigT1CaloDefs::EMRoIWordType;
48  }
49  else if (temp2 == TrigT1CaloDefs::TauRoIWord) {
50  return TrigT1CaloDefs::TauRoIWordType;
51  }
52  }
53  }
54  return TrigT1CaloDefs::RoIWordTypeError;
55  }

◆ roIWord()

uint32_t ROIB::EMTauRoI::roIWord ( ) const

Definition at line 32 of file EMTauRoI.cxx.

32  {
33  return m_roIWord;
34  }

◆ thresholds()

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

Return vector of thresholds passed for Run 1 RoI.

Definition at line 68 of file EMTauRoI.cxx.

68  {
69 
70  std::vector<unsigned int> returnVec;
71  if ( roIType() != TrigT1CaloDefs::CpRoIWordType )
72  returnVec.push_back( 9999 );
73  else {
74  for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfCPThresholds;i++ )
75  returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &m_roIWord, i ) ) );
76  }
77  return returnVec;
78  }

◆ update()

void ROIB::EMTauRoI::update ( )

Definition at line 26 of file EMTauRoI.cxx.

26  {
27  // Obsolete a long time ago.
28  m_roIWord = RoIFormatUpdater::UpdateEMTauRoI(m_roIWord) ;
29  return;
30  }

Member Data Documentation

◆ m_roIWord

uint32_t ROIB::EMTauRoI::m_roIWord
private

Definition at line 48 of file EMTauRoI.h.


The documentation for this class was generated from the following files:
lumiFormat.i
int i
Definition: lumiFormat.py:85
ROIB::EMTauRoI::m_roIWord
uint32_t m_roIWord
Definition: EMTauRoI.h:48
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
ROIB::EMTauRoI::roIType
unsigned int roIType() const
Return RoI type.
Definition: EMTauRoI.cxx:38
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