ATLAS Offline Software
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):
13 #include "xAODTrigger/jFexTauRoI.h"
14 #include "getQuadrant.h"
15 
16 namespace xAOD {
17 
19  : SG::AuxElement() {
20  }
21  void jFexTauRoI_v1::initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi ) {
22 
33  setEta( eta );
34  setPhi( phi );
36  setIsTOB(istob);
37 
38 
39  return;
40  }
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 
53  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( jFexTauRoI_v1, char, isTOB, setIsTOB )
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)
88  unsigned int jFexTauRoI_v1::unpackEtTOB() const{
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 
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::jFexTauRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexTauRoI_v1.h:22
xAOD::jFexTauRoI_v1::setResolution
void setResolution(int value)
xAOD::jFexTauRoI_v1::setTobEt
void setTobEt(uint16_t value)
xAOD::jFexTauRoI_v1::setGlobalEta
void setGlobalEta(int value)
xAOD::jFexTauRoI_v1::unpackPhiIndex
unsigned int unpackPhiIndex() const
Phi coordinates.
Definition: jFexTauRoI_v1.cxx:102
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::jFexTauRoI_v1::eta
float eta() const
xAOD::jFexTauRoI_v1::jFexNumber
uint8_t jFexNumber() const
xAOD::jFexTauRoI_v1::tobLocalEta
uint8_t tobLocalEta() const
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::jFexTauRoI_v1::setTobWord
void setTobWord(uint32_t tobWord)
Set the "raw" 32-bit words describing the object candidate.
xAOD::jFexTauRoI_v1::unpackSaturationIndex
unsigned int unpackSaturationIndex() const
Definition: jFexTauRoI_v1.cxx:107
xAOD::jFexTauRoI_v1::setfpgaNumber
void setfpgaNumber(uint8_t fpgaNumber)
AuxStoreAccessorMacros.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::jFexTauRoI_v1::globalPhi
uint globalPhi() const
xAOD::jFexTauRoI_v1::tobIso
uint16_t tobIso() const
xAOD::jFexTauRoI_v1::s_isoBit
static const int s_isoBit
Definition: jFexTauRoI_v1.h:96
xAOD::jFexTauRoI_v1::s_etaMask
static const int s_etaMask
Definition: jFexTauRoI_v1.h:103
xAOD::jFexTauRoI_v1::globalEta
int globalEta() const
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::jFexTauRoI_v1::s_phiMask
static const int s_phiMask
Definition: jFexTauRoI_v1.h:104
xAOD::jFexTauRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexTauRoI_v1.cxx:114
xAOD::jFexTauRoI_v1::jFexTauRoI_v1
jFexTauRoI_v1()
Default constructor.
Definition: jFexTauRoI_v1.cxx:18
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
xAOD::jFexTauRoI_v1::unpackGlobalPhi
uint unpackGlobalPhi() const
Definition: jFexTauRoI_v1.cxx:141
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
xAOD::jFexTauRoI_v1::unpackIsoTOB
unsigned int unpackIsoTOB() const
TOB Isolation (decoded from TOB, stored for convenience)
Definition: jFexTauRoI_v1.cxx:93
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::jFexTauRoI_v1::s_isoMask
static const int s_isoMask
Definition: jFexTauRoI_v1.h:106
xAOD::jFexTauRoI_v1::initialize
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.
Definition: jFexTauRoI_v1.cxx:21
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
xAOD::jFexTauRoI_v1::setGlobalPhi
void setGlobalPhi(uint value)
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
xAOD::jFexTauRoI_v1::tobEt
uint16_t tobEt() const
xAOD::jFexTauRoI_v1::fpgaNumber
uint8_t fpgaNumber() const
xAOD::jFexTauRoI_v1::setTobLocalPhi
void setTobLocalPhi(uint8_t value)
xAOD::jFexTauRoI_v1::setIsTOB
void setIsTOB(char value)
Set the isTOB variable (TOB or xTOB)
xAOD::jFexTauRoI_v1::tobWord
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
xAOD::jFexTauRoI_v1::unpackGlobalEta
int unpackGlobalEta() const
As the Trigger towers are 1x1 in Eta - Phi coords (x10)
Definition: jFexTauRoI_v1.cxx:128
xAOD::jFexTauRoI_v1::phi
float phi() const
TRT::Hit::globalPhi
@ globalPhi
Definition: HitInfo.h:38
xAOD::jFexTauRoI_v1::tobEtScale
int tobEtScale() const
xAOD::jFexTauRoI_v1::setjFexNumber
void setjFexNumber(uint8_t jFexNumber)
xAOD::jFexTauRoI_v1::s_satMask
static const int s_satMask
Definition: jFexTauRoI_v1.h:107
xAOD::jFexTauRoI_v1::unpackEtaIndex
unsigned int unpackEtaIndex() const
Eta coordinates.
Definition: jFexTauRoI_v1.cxx:98
xAOD::jFexTauRoI_v1::setTobIso
void setTobIso(uint16_t value)
xAOD::jFexTauRoI_v1::iso
unsigned int iso() const
Iso on TOB scale.
Definition: jFexTauRoI_v1.cxx:120
xAOD::jFexTauRoI_v1::setTobSat
void setTobSat(uint8_t value)
xAOD::jFexTauRoI_v1::s_satBit
static const int s_satBit
Definition: jFexTauRoI_v1.h:100
xAOD::jFexTauRoI_v1::unpackEtTOB
unsigned int unpackEtTOB() const
TOB ET (decoded from TOB, stored for convenience)
Definition: jFexTauRoI_v1.cxx:88
xAOD::jFexTauRoI_v1::s_phiBit
static const int s_phiBit
Definition: jFexTauRoI_v1.h:99
jFexTauRoI.h
xAOD::jFexTauRoI_v1::setPhi
void setPhi(float value)
xAOD::tobEtScale
tobEtScale
Definition: gFexJetRoI_v1.cxx:61
xAOD::jFexTauRoI_v1::tobLocalPhi
uint8_t tobLocalPhi() const
xAOD::jFexTauRoI_v1::setEta
void setEta(float value)
xAOD::jFexTauRoI_v1::s_etaBit
static const int s_etaBit
Definition: jFexTauRoI_v1.h:98
getQuadrant.h
xAOD::jFexTauRoI_v1::setTobLocalEta
void setTobLocalEta(uint8_t value)