ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::jFexMETRoI_v1 Class Reference

Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format. More...

#include <jFexMETRoI_v1.h>

Inheritance diagram for xAOD::jFexMETRoI_v1:
Collaboration diagram for xAOD::jFexMETRoI_v1:

Public Member Functions

 jFexMETRoI_v1 ()
 Default constructor.
void initialize (uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, int resolution)
 In future initialze the xTOB as well, word1.
uint32_t tobWord () const
 The "raw" 32-bit word describing the object candidate.
uint8_t jFexNumber () const
uint8_t fpgaNumber () const
int tobEx () const
int tobEy () const
uint8_t tobRes () const
uint8_t tobSat () const
int tobEtScale () const
void setTobWord (uint32_t tobWord)
 Set the "raw" 32-bit words describing the object candidate.
void setjFexNumber (uint8_t jFexNumber)
void setfpgaNumber (uint8_t fpgaNumber)
int unpackEx () const
 Raw data words.
void setTobEx (int value)
int Ex () const
 Methods that require combining results or applying scales.
int unpackEy () const
void setTobEy (int value)
int Ey () const
 Met Ey in 1 MeV scale (all signs considered).
unsigned int unpackRes () const
void setTobRes (uint8_t value)
unsigned int unpackSat () const
void setTobSat (uint8_t value)
void setResolution (int value)

Static Private Attributes

static const float s_tobEtScale
static const int s_ResBit = 31
static const int s_Ey_Bit = 16
static const int s_Ex_Bit = 1
static const int s_SatBit = 0
static const int s_signed_E = 14
static const int s_E_xMask = 0x7fff
static const int s_E_yMask = 0x7fff
static const int s_ResMask = 0x1
static const int s_SatMask = 0x1

Detailed Description

Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.

Definition at line 22 of file jFexMETRoI_v1.h.

Constructor & Destructor Documentation

◆ jFexMETRoI_v1()

xAOD::jFexMETRoI_v1::jFexMETRoI_v1 ( )

Default constructor.

Definition at line 17 of file jFexMETRoI_v1.cxx.

18 : SG::AuxElement() {
19 }
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.

Member Function Documentation

◆ Ex()

int xAOD::jFexMETRoI_v1::Ex ( ) const

Methods that require combining results or applying scales.

Met Ex in 1 MeV scale (all signs considered)

Definition at line 105 of file jFexMETRoI_v1.cxx.

105 {
106 //Since the firmware uses phi values of one hemisphere we need to apply a minus to the other hemisphere
107 int hemisphere = fpgaNumber() == 0 ? 1 : -1;
108
109 //We need to apply a global minus to return the "missing" vectorial Et instead of the "visible" vectorial Et
110 return -1*hemisphere*tobEx()*tobEtScale();
111 }
int tobEtScale() const
uint8_t fpgaNumber() const

◆ Ey()

int xAOD::jFexMETRoI_v1::Ey ( ) const

Met Ey in 1 MeV scale (all signs considered).

Definition at line 114 of file jFexMETRoI_v1.cxx.

114 {
115 //Since the firmware uses phi values of one hemisphere we need to apply a minus to the other hemisphere
116 int hemisphere = fpgaNumber() == 0 ? 1 : -1;
117
118 //We need to apply a global minus to return the "missing" vectorial Et instead of the "visible" vectorial Et
119 return -1*hemisphere*tobEy()*tobEtScale();
120 }

◆ fpgaNumber()

uint8_t xAOD::jFexMETRoI_v1::fpgaNumber ( ) const

◆ initialize()

void xAOD::jFexMETRoI_v1::initialize ( uint8_t jFexNumber,
uint8_t fpgaNumber,
uint32_t tobWord,
int resolution )

In future initialze the xTOB as well, word1.

Definition at line 20 of file jFexMETRoI_v1.cxx.

20 {
21
25 setTobEx ( unpackEx() );
26 setTobEy ( unpackEy() );
27 setTobRes ( unpackRes() );
28 setTobSat ( unpackSat() );
29 setResolution( resolution );
30
31 //include in future when xTOB in jFEX has been implemented.
32
33 // If the object is a TOB then the isTOB should be true.
34 // For xTOB default is false, but should be set if a matching TOB is found
35 // if (type() == TOB) setIsTOB(1);
36 // else setIsTOB(0);
37
38 return;
39 }
int unpackEx() const
Raw data words.
unsigned int unpackRes() const
unsigned int unpackSat() const
void setTobEy(int value)
uint8_t jFexNumber() const
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
void setTobEx(int value)
void setTobRes(uint8_t value)
void setjFexNumber(uint8_t jFexNumber)
void setTobSat(uint8_t value)
void setResolution(int value)
void setTobWord(uint32_t tobWord)
Set the "raw" 32-bit words describing the object candidate.
void setfpgaNumber(uint8_t fpgaNumber)

◆ jFexNumber()

uint8_t xAOD::jFexMETRoI_v1::jFexNumber ( ) const

◆ setfpgaNumber()

void xAOD::jFexMETRoI_v1::setfpgaNumber ( uint8_t fpgaNumber)

◆ setjFexNumber()

void xAOD::jFexMETRoI_v1::setjFexNumber ( uint8_t jFexNumber)

◆ setResolution()

void xAOD::jFexMETRoI_v1::setResolution ( int value)

◆ setTobEx()

void xAOD::jFexMETRoI_v1::setTobEx ( int value)

◆ setTobEy()

void xAOD::jFexMETRoI_v1::setTobEy ( int value)

◆ setTobRes()

void xAOD::jFexMETRoI_v1::setTobRes ( uint8_t value)

◆ setTobSat()

void xAOD::jFexMETRoI_v1::setTobSat ( uint8_t value)

◆ setTobWord()

void xAOD::jFexMETRoI_v1::setTobWord ( uint32_t tobWord)

Set the "raw" 32-bit words describing the object candidate.

◆ tobEtScale()

int xAOD::jFexMETRoI_v1::tobEtScale ( ) const

◆ tobEx()

int xAOD::jFexMETRoI_v1::tobEx ( ) const

◆ tobEy()

int xAOD::jFexMETRoI_v1::tobEy ( ) const

◆ tobRes()

uint8_t xAOD::jFexMETRoI_v1::tobRes ( ) const

◆ tobSat()

uint8_t xAOD::jFexMETRoI_v1::tobSat ( ) const

◆ tobWord()

uint32_t xAOD::jFexMETRoI_v1::tobWord ( ) const

The "raw" 32-bit word describing the object candidate.

◆ unpackEx()

int xAOD::jFexMETRoI_v1::unpackEx ( ) const

Raw data words.

Only calculable externally Extracted from data words, stored for convenience Setting the jFEX ET resolution Methods to decode data from the TOB/RoI and return to the user TOB or xTOB?

Definition at line 73 of file jFexMETRoI_v1.cxx.

73 {
74 int energy = (tobWord() >> s_Ex_Bit) & s_E_xMask; // masking from the TOB word the Ex
75 bool sign = (energy >> s_signed_E) == 1 ; //checks if the value is negative looking at the MSB within the 15 bits
76 if(sign) {
77 energy = -(~(energy-1) & s_E_xMask); // Energy is negative, then using the two's complement method we do absolute value, mask the 15 bits and assign a minus
78 }
79 return energy;
80 }
int sign(int a)
static const int s_Ex_Bit
static const int s_signed_E
static const int s_E_xMask

◆ unpackEy()

int xAOD::jFexMETRoI_v1::unpackEy ( ) const

Definition at line 83 of file jFexMETRoI_v1.cxx.

83 {
84 int energy = (tobWord() >> s_Ey_Bit) & s_E_yMask; // masking from the TOB word the Ey
85 bool sign = (energy >> s_signed_E) == 1 ;//checks if the value is negative looking at the MSB within the 15 bits
86 if(sign) {
87 energy = -(~(energy-1) & s_E_yMask); // Energy is negative, then using the two's complement method we do absolute value, mask the 15 bits and assign a minus
88 }
89 return energy;
90 }
static const int s_Ey_Bit
static const int s_E_yMask

◆ unpackRes()

unsigned int xAOD::jFexMETRoI_v1::unpackRes ( ) const

Definition at line 98 of file jFexMETRoI_v1.cxx.

98 {
99 return (tobWord() >> s_ResBit) & s_ResMask;
100 }
static const int s_ResBit
static const int s_ResMask

◆ unpackSat()

unsigned int xAOD::jFexMETRoI_v1::unpackSat ( ) const

Definition at line 93 of file jFexMETRoI_v1.cxx.

93 {
94 return (tobWord() >> s_SatBit) & s_SatMask;
95 }
static const int s_SatMask
static const int s_SatBit

Member Data Documentation

◆ s_E_xMask

const int xAOD::jFexMETRoI_v1::s_E_xMask = 0x7fff
staticprivate

Definition at line 81 of file jFexMETRoI_v1.h.

◆ s_E_yMask

const int xAOD::jFexMETRoI_v1::s_E_yMask = 0x7fff
staticprivate

Definition at line 82 of file jFexMETRoI_v1.h.

◆ s_Ex_Bit

const int xAOD::jFexMETRoI_v1::s_Ex_Bit = 1
staticprivate

Definition at line 74 of file jFexMETRoI_v1.h.

◆ s_Ey_Bit

const int xAOD::jFexMETRoI_v1::s_Ey_Bit = 16
staticprivate

Definition at line 73 of file jFexMETRoI_v1.h.

◆ s_ResBit

const int xAOD::jFexMETRoI_v1::s_ResBit = 31
staticprivate

Definition at line 72 of file jFexMETRoI_v1.h.

◆ s_ResMask

const int xAOD::jFexMETRoI_v1::s_ResMask = 0x1
staticprivate

Definition at line 83 of file jFexMETRoI_v1.h.

◆ s_SatBit

const int xAOD::jFexMETRoI_v1::s_SatBit = 0
staticprivate

Definition at line 75 of file jFexMETRoI_v1.h.

◆ s_SatMask

const int xAOD::jFexMETRoI_v1::s_SatMask = 0x1
staticprivate

Definition at line 84 of file jFexMETRoI_v1.h.

◆ s_signed_E

const int xAOD::jFexMETRoI_v1::s_signed_E = 14
staticprivate

Definition at line 78 of file jFexMETRoI_v1.h.

◆ s_tobEtScale

const float xAOD::jFexMETRoI_v1::s_tobEtScale
staticprivate

Definition at line 69 of file jFexMETRoI_v1.h.


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