ATLAS Offline Software
Loading...
Searching...
No Matches
jFexTauRoI_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6// System include(s):
7#include <stdexcept>
8
9// xAOD include(s):
11
12// Local include(s):
14#include "getQuadrant.h"
15
16namespace xAOD {
17
41
42 //----------------
44 //----------------
45
46
49 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, uint8_t , jFexNumber , setjFexNumber )
50 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, uint8_t , fpgaNumber , setfpgaNumber )
51
52
54
55
56 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, uint8_t , tobLocalEta , setTobLocalEta )
57 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, uint8_t , tobLocalPhi , setTobLocalPhi )
61
62 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, int , globalEta, setGlobalEta )
64
65
68
69
71
72
73 //-----------------
75 //-----------------
76
77 //include in future when xTOB in jFEX has been implemented.
78
79
80 //jFexTauRoI_v1::ObjectType jFexTauRoI_v1::type() const {
81 //if (Word1() == 0) return TOB;
82 //else return xTOB;
83 //}
84
85 //Hardware coordinate elements
86
87 //Raw ET on TOB scale (200 MeV/count)
89 return (tobWord() >> s_etBit) & s_etMask;
90 }
91
92 //Return the isolation , scale (200 MeV/count)
93 unsigned int jFexTauRoI_v1::unpackIsoTOB() const{
94 return (tobWord() >> s_isoBit) & s_isoMask;
95 }
96
97 //Return an eta index
98 unsigned int jFexTauRoI_v1::unpackEtaIndex() const {
99 return (tobWord() >> s_etaBit) & s_etaMask;
100 }
101 //Return a phi index
102 unsigned int jFexTauRoI_v1::unpackPhiIndex() const {
103 return (tobWord() >> s_phiBit) & s_phiMask;
104 }
105
106 //Return sat flag
108 return (tobWord() >> s_satBit) & s_satMask;
109 }
110
112
114 unsigned int jFexTauRoI_v1::et() const {
115 //return TOB Et in a 1 MeV scale
116 return tobEt()*tobEtScale();
117 }
118
120 unsigned int jFexTauRoI_v1::iso() const {
121 //return TOB Isolation in a 1 MeV scale
122 return tobIso()*tobEtScale();
123 }
124
125 //global coords
126
129
130 int globalEta = 0;
131 if(jFexNumber()<3){
132 globalEta= 8*(jFexNumber()-2) - (tobLocalEta()+1);
133 }
134 else if(jFexNumber()<6){
135 globalEta= 8*(jFexNumber()-3) + (tobLocalEta());
136 }
137
138 return globalEta;
139 }
140
142 const unsigned int quadrant = ::getQuadrant(fpgaNumber());
143
144 uint globalPhi = tobLocalPhi() + (quadrant * 16);
145 return globalPhi;
146
147 }
148} // namespace xAOD
149
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
uint16_t tobEt(const T *tob)
unsigned int uint
AuxElement()
Default constructor.
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
void setTobEt(uint16_t value)
void setEta(float value)
void setIsTOB(char value)
Set the isTOB variable (TOB or xTOB)
static const int s_isoBit
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
static const int s_etMask
void setGlobalPhi(uint value)
int unpackGlobalEta() const
As the Trigger towers are 1x1 in Eta - Phi coords (x10)
unsigned int unpackIsoTOB() const
TOB Isolation (decoded from TOB, stored for convenience)
uint globalPhi() const
int globalEta() const
uint8_t tobLocalPhi() const
unsigned int unpackSaturationIndex() const
void setTobLocalEta(uint8_t value)
void setTobLocalPhi(uint8_t value)
unsigned int iso() const
Iso on TOB scale.
void setjFexNumber(uint8_t jFexNumber)
jFexTauRoI_v1()
Default constructor.
static const int s_phiMask
uint16_t tobIso() const
static const int s_etBit
static const int s_etaMask
float phi() const
unsigned int unpackEtaIndex() const
Eta coordinates.
int tobEtScale() const
void setTobIso(uint16_t value)
void setPhi(float value)
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi)
In future initialze the EDM.
static const int s_phiBit
uint8_t fpgaNumber() const
unsigned int unpackPhiIndex() const
Phi coordinates.
uint16_t tobEt() const
void setfpgaNumber(uint8_t fpgaNumber)
void setGlobalEta(int value)
float eta() const
void setTobSat(uint8_t value)
uint8_t jFexNumber() const
void setResolution(int value)
uint unpackGlobalPhi() const
static const int s_satBit
unsigned int et() const
Methods that require combining results or applying scales.
static const int s_satMask
void setTobWord(uint32_t tobWord)
Set the "raw" 32-bit words describing the object candidate.
unsigned int unpackEtTOB() const
TOB ET (decoded from TOB, stored for convenience)
uint8_t tobLocalEta() const
static const int s_etaBit
static const int s_isoMask
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t
setEventNumber uint32_t