ATLAS Offline Software
JetEtRoIDecoder.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  JetEtRoIDecoder.cxx - description
6  -------------------
7  begin : Fri Apr 19 2002
8  email : moyse@ph.qmw.ac.uk
9 ***************************************************************************/
10 
11 
12 #include <cmath>
13 #include <iostream>
14 
16 
17 namespace LVL1 {
18 
20 
21  }
22 
24 
25  }
26 
28  unsigned int JetEtRoIDecoder::energy( unsigned int roiWord ) const {
29  return roiWord & 0xF;
30  }
31 
33  unsigned int JetEtRoIDecoder::extractBits( unsigned int word, const unsigned int start, const unsigned int length ) const {
34 
35  // this works as follows. Imagine start=3, bits=4 and word=11011100
36  // so this routine should return 0111
37  // now:
38  // word>>(first-1) = 110111
39  // (1<<length) = 010000
40  // (1<<length)-1 = 001111
41  word = ( word >> ( start - 1 ) );
42 
43  unsigned int bitmask = ( 1 << length ) - 1;
44  // and finally:
45  // 110111&001111 = 0111
46  return ( word & bitmask ); // return only bits in bitmask
47  }
48 
49 } // namespace LVL1
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::JetEtRoIDecoder::~JetEtRoIDecoder
virtual ~JetEtRoIDecoder()
Definition: JetEtRoIDecoder.cxx:28
LVL1::JetEtRoIDecoder::JetEtRoIDecoder
JetEtRoIDecoder()
Definition: JetEtRoIDecoder.cxx:24
LVL1::JetEtRoIDecoder::extractBits
unsigned int extractBits(unsigned int word, const unsigned int start, const unsigned int length) const
returns the value of bits in word between bit "start" and bit "start" + "length"
Definition: JetEtRoIDecoder.cxx:38
LVL1::JetEtRoIDecoder::energy
unsigned int energy(unsigned int roiWord) const
returns a 4b number which represents the Jet Et energy in GeV
Definition: JetEtRoIDecoder.cxx:33
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
JetEtRoIDecoder.h