ATLAS Offline Software
Loading...
Searching...
No Matches
EMTauRoI.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5
10
11using namespace LVL1;
12using namespace std;
13
14namespace ROIB {
15
16 EMTauRoI::EMTauRoI( uint32_t RoIWord )
17 : m_roIWord( RoIWord )
18 {
19 }
20
22 : m_roIWord( 0 )
23 {
24 }
25
27 // Obsolete a long time ago.
29 return;
30 }
31
32 uint32_t EMTauRoI::roIWord() const {
33 return m_roIWord;
34 }
35
38 unsigned int EMTauRoI::roIType() const {
39 if ( m_roIWord != 0 ) {
40 unsigned int type = BitOp::getValue( &m_roIWord, 0xc0000000 );
43 }
44 else {
45 unsigned int temp2 = BitOp::getValue( &m_roIWord, 0xf0000000 );
46 if (temp2 == TrigT1CaloDefs::EMRoIWord) {
48 }
49 else if (temp2 == TrigT1CaloDefs::TauRoIWord) {
51 }
52 }
53 }
55 }
56
58 unsigned int EMTauRoI::electronicsID() const {
60 return BitOp::getValue( &m_roIWord, 0x3ffc0000 );
62 return BitOp::getValue( &m_roIWord, 0x0fff0000 );
63 else
64 return 9999;
65 }
66
68 vector< unsigned int > EMTauRoI::thresholds() const {
69
70 std::vector<unsigned int> returnVec;
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 }
79
81 unsigned int EMTauRoI::et() const {
82
84 return BitOp::getValue( &m_roIWord, 0x000000ff );
85
86 return 0;
87 }
88
90 unsigned int EMTauRoI::isolation() const {
91
93 return BitOp::getValue( &m_roIWord, 0x00001f00 );
94
95 return 0;
96 }
97
98} // namespace ROIB
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
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
static unsigned int UpdateEMTauRoI(unsigned int RoIWord)
Method to update EM/Tau RoI word.
static const unsigned int numOfCPThresholds
unsigned int et() const
Return cluster ET for Run 2 RoI.
Definition EMTauRoI.cxx:81
unsigned int electronicsID() const
Return bitmask containing coordinate information (crate, module, chip, ocation)
Definition EMTauRoI.cxx:58
unsigned int isolation() const
Return isolation flags for Run 2 RoI.
Definition EMTauRoI.cxx:90
uint32_t m_roIWord
Definition EMTauRoI.h:48
uint32_t roIWord() const
Definition EMTauRoI.cxx:32
unsigned int roIType() const
Return RoI type.
Definition EMTauRoI.cxx:38
std::vector< unsigned int > thresholds() const
Return vector of thresholds passed for Run 1 RoI.
Definition EMTauRoI.cxx:68
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Namespace of the LVL1 RoIB simulation.
STL namespace.