ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::JetEtRoIDecoder Class Reference

A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word. More...

#include <JetEtRoIDecoder.h>

Collaboration diagram for LVL1::JetEtRoIDecoder:

Public Member Functions

 JetEtRoIDecoder ()
virtual ~JetEtRoIDecoder ()
unsigned int energy (unsigned int roiWord) const
 returns a 4b number which represents the Jet Et energy in GeV

Private Member Functions

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"

Detailed Description

A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.

Author
E.Moyse
Todo
this should probably be a static class.

Definition at line 23 of file JetEtRoIDecoder.h.

Constructor & Destructor Documentation

◆ JetEtRoIDecoder()

LVL1::JetEtRoIDecoder::JetEtRoIDecoder ( )

Definition at line 19 of file JetEtRoIDecoder.cxx.

19 {
20
21 }

◆ ~JetEtRoIDecoder()

LVL1::JetEtRoIDecoder::~JetEtRoIDecoder ( )
virtual

Definition at line 23 of file JetEtRoIDecoder.cxx.

23 {
24
25 }

Member Function Documentation

◆ energy()

unsigned int LVL1::JetEtRoIDecoder::energy ( unsigned int roiWord) const

returns a 4b number which represents the Jet Et energy in GeV

returns a 4b number which represents the thresholds passed

Definition at line 28 of file JetEtRoIDecoder.cxx.

28 {
29 return roiWord & 0xF;
30 }

◆ extractBits()

unsigned int LVL1::JetEtRoIDecoder::extractBits ( unsigned int word,
const unsigned int start,
const unsigned int length ) const
private

returns the value of bits in word between bit "start" and bit "start" + "length"

Definition at line 33 of file JetEtRoIDecoder.cxx.

33 {
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 }
double length(const pvec &v)

The documentation for this class was generated from the following files: