![]() |
ATLAS Offline Software
|
The JetEnergyModuleKey object provides the key for each trigger tower depending on its eta-phi coords. More...
#include <JetEnergyModuleKey.h>
Public Types | |
enum | JEMRegion { MidJEM =0, LeftEndJEM =1, RightEndJEM =2, JEMRegionERROR =999 } |
Public Member Functions | |
JetEnergyModuleKey () | |
constructs a JetEnergyModuleKey object More... | |
virtual | ~JetEnergyModuleKey () |
unsigned int | jemKey (const xAOD::JetElement *jetElement) |
returns the key of the passed Coordinate More... | |
unsigned int | jemKey (unsigned int crate, unsigned int module) |
calculates key from crate and module index More... | |
std::vector< unsigned int > | jeKeys (unsigned int crate, unsigned int module) |
calculates keys of all JetElements in given crate and module More... | |
std::vector< Coordinate > | jeCoords (unsigned int crate, unsigned int module) |
returns coordinates of all JetElements in given crate and module More... | |
unsigned int | row (const Coordinate &coord) const |
returns the phi row of a coord within the JEM that contains it. More... | |
unsigned int | row (const xAOD::JetElement *jetElement) const |
returns the phi row of a coord within the JEM that contains it. More... | |
double | rowPhiCoord (unsigned int row, const Coordinate &jemCoord) |
returns the phi coord of the row of the JEM at the coordinates passed More... | |
double | dPhi (const Coordinate &coord) const |
height More... | |
double | dEta (const Coordinate &coord) const |
width More... | |
JEMRegion | region (const Coordinate &coord) const |
region More... | |
unsigned int | col (const Coordinate &coord) |
return row of passed coordinate More... | |
unsigned int | jem (const Coordinate &coord) const |
returns ID of JEP module (i.e. More... | |
virtual double | eta () const |
returns the centre of the TT at eta_coord: More... | |
virtual double | phi () const |
returns phi coordinate of centre of relevant trigger tower. More... | |
unsigned int | key (double phi, double eta) |
calculates a map key from passed phi, eta coordinates More... | |
unsigned int | key (const Coordinate &coord) |
returns the key of the passed Coordinate More... | |
Coordinate | coord () const |
return central coords of current key value. More... | |
Protected Member Functions | |
ICoordinate * | convertCoordsToIntegers (double phi, double eta) |
converts the coordinates and corrects for overflows etc. More... | |
virtual int | sign (int temp) const |
returns -1 if temp is -ve and +1 if it is +ve. More... | |
virtual int | sign (double temp) const |
returns -1 if temp is -ve and +1 if it is +ve. More... | |
int | round (double a) const |
rounds number to nearest whole number More... | |
int | sharpRound (double a) const |
rounds number as follows (-1.0 to 0.0) -> -1, (0.0 to 1.0) -> 0, (1.0 to 2.0)->1 etc. More... | |
int | sharpRound2 (int a, int b) const |
divides a/b and returns a number as follows (where +b means +ve b): if 0<a<+b, then n=1, if +b<a<+2b, n=2, if -b<a<0, n=-1, if -2b<a<-b, n=-2 More... | |
void | setupThisKeyValues () |
Protected Attributes | |
int | m_iphi |
integer phi coord More... | |
int | m_ieta |
integer eta coord More... | |
double | m_eta |
eta coordinate of key More... | |
double | m_phi |
phi coordinate of key More... | |
int | m_phiBin |
phi bin More... | |
int | m_etaBin |
eta bin More... | |
double | m_centralPhi |
this is the coordinate of the centre of the relevant trigger tower. More... | |
double | m_centralEta |
this is the coordinate of the centre of the relevant trigger tower. More... | |
bool | m_debug |
turns DEBUG code on and off More... | |
Private Member Functions | |
BinAndCoord * | calculateTriggerBin (ICoordinate *iCoord) |
converts integer phi, eta coordinates to phi, eta trigger bins, and central coords More... | |
void | setBins (ICoordinate *iCoord, unsigned int &phiBin, int &etaBin) |
sets the eta and phi bins More... | |
unsigned int | midJEMEtaCol (const Coordinate &coord) const |
No descriptions. More... | |
unsigned int | leftEndJEMEtaCol (const Coordinate &coord) const |
returns eta row of JEMs 0, or 8 More... | |
unsigned int | rightEndJEMEtaCol (const Coordinate &coord) const |
returns eta row of JEMs 7 or 15 More... | |
unsigned int | phiQuadrant (const double phi) const |
returns the quadrant number associated with the phi coordinate, 0 - 90 = 0 90 - 180 = 1 180-270 = 2 270-360 = 3 More... | |
Private Attributes | |
bool | m_debugModuleKey |
set to true to turn debugging info on More... | |
The JetEnergyModuleKey object provides the key for each trigger tower depending on its eta-phi coords.
The key is an integer number that uniquely identifies each tower, and is needed by the STL map container: the map holds trigger towers and we retrieve them using their keys.
Definition at line 40 of file JetEnergyModuleKey.h.
Enumerator | |
---|---|
MidJEM | |
LeftEndJEM | |
RightEndJEM | |
JEMRegionERROR |
Definition at line 48 of file JetEnergyModuleKey.h.
LVL1::JetEnergyModuleKey::JetEnergyModuleKey | ( | ) |
constructs a JetEnergyModuleKey object
Definition at line 41 of file JetEnergyModuleKey.cxx.
|
virtual |
Definition at line 45 of file JetEnergyModuleKey.cxx.
|
privatevirtual |
converts integer phi, eta coordinates to phi, eta trigger bins, and central coords
converts integer phi, eta coordinates to phi, eta trigger bins.
Returns coordinates of centre of JEs
Implements LVL1::KeyUtilities.
Definition at line 246 of file JetEnergyModuleKey.cxx.
unsigned int LVL1::JetEnergyModuleKey::col | ( | const Coordinate & | coord | ) |
|
protectedinherited |
converts the coordinates and corrects for overflows etc.
For instance, if phi is negative this routine converts to the equivalent positive position.
For instance, if phi is negative this routine converts to the equivalent positive position. *todo tidy up a bit.
Definition at line 110 of file KeyUtilities.cxx.
|
inherited |
return central coords of current key value.
Definition at line 199 of file KeyUtilities.cxx.
|
virtual |
width
return width of JE
Implements LVL1::KeyUtilities.
Definition at line 180 of file JetEnergyModuleKey.cxx.
|
virtual |
height
return height of JEM
Implements LVL1::KeyUtilities.
Definition at line 175 of file JetEnergyModuleKey.cxx.
|
virtualinherited |
returns the centre of the TT at eta_coord:
returns the eta coord of the centre of the relevent trigger tower
Definition at line 150 of file KeyUtilities.cxx.
std::vector< Coordinate > LVL1::JetEnergyModuleKey::jeCoords | ( | unsigned int | crate, |
unsigned int | module | ||
) |
returns coordinates of all JetElements in given crate and module
returns coordinates of all JetElements in passed crate+module
Get keys for core JetElement locations in this module
Algorithm: start from bottom-left JetElement coordinate in JEM
Then step up by 8 elements in phi (4 in FCAL)
Increment eta and repeat
Do so for all 4 eta bins in JEM
Definition at line 84 of file JetEnergyModuleKey.cxx.
std::vector< unsigned int > LVL1::JetEnergyModuleKey::jeKeys | ( | unsigned int | crate, |
unsigned int | module | ||
) |
calculates keys of all JetElements in given crate and module
returns JetElementKeys of all JetElements in passed crate+module
Definition at line 64 of file JetEnergyModuleKey.cxx.
unsigned int LVL1::JetEnergyModuleKey::jem | ( | const Coordinate & | coord | ) | const |
returns ID of JEP module (i.e.
Returns JEM number for coordinate.
JEM) There are 16 JEMS per crate, and 8 JEMS per quadrant. The central 6 JEMS cover the barrel, JEMs 0,7,8 & 15 extend over the FCAL as well. (each crate contains JEMS for opposite quadrants, so one crate might have JEMs 0-7 in quadrant 0 and JEMs 8-15 in quadrant 2)
Definition at line 229 of file JetEnergyModuleKey.cxx.
unsigned int LVL1::JetEnergyModuleKey::jemKey | ( | const xAOD::JetElement * | jetElement | ) |
returns the key of the passed Coordinate
returns trigger tower key of passed Coordinate
Definition at line 49 of file JetEnergyModuleKey.cxx.
unsigned int LVL1::JetEnergyModuleKey::jemKey | ( | unsigned int | crate, |
unsigned int | module | ||
) |
calculates key from crate and module index
returns trigger tower key of passed crate+module
Definition at line 56 of file JetEnergyModuleKey.cxx.
|
inherited |
returns the key of the passed Coordinate
returns trigger tower key of passed Coordinate
Definition at line 101 of file KeyUtilities.cxx.
|
inherited |
calculates a map key from passed phi, eta coordinates
returns key
calculates a map key from passed phi, eta coordinates
Definition at line 82 of file KeyUtilities.cxx.
|
private |
returns eta row of JEMs 0, or 8
returns eta row of JEMs 0,7,8 or 15
Definition at line 294 of file JetEnergyModuleKey.cxx.
|
private |
|
virtualinherited |
returns phi coordinate of centre of relevant trigger tower.
returns phi coordinate of the centre of the relevent trigger tower.
Definition at line 159 of file KeyUtilities.cxx.
|
private |
returns the quadrant number associated with the phi coordinate, 0 - 90 = 0 90 - 180 = 1 180-270 = 2 270-360 = 3
Definition at line 354 of file JetEnergyModuleKey.cxx.
LVL1::JetEnergyModuleKey::JEMRegion LVL1::JetEnergyModuleKey::region | ( | const Coordinate & | coord | ) | const |
|
private |
returns eta row of JEMs 7 or 15
returns eta row of JEMs 0,7,8 or 15
Definition at line 321 of file JetEnergyModuleKey.cxx.
|
protectedinherited |
unsigned int LVL1::JetEnergyModuleKey::row | ( | const Coordinate & | coord | ) | const |
returns the phi row of a coord within the JEM that contains it.
Used in energy trigger (JEM)
Definition at line 129 of file JetEnergyModuleKey.cxx.
unsigned int LVL1::JetEnergyModuleKey::row | ( | const xAOD::JetElement * | JE | ) | const |
returns the phi row of a coord within the JEM that contains it.
Used in energy trigger (JEM)
Definition at line 141 of file JetEnergyModuleKey.cxx.
double LVL1::JetEnergyModuleKey::rowPhiCoord | ( | unsigned int | row, |
const Coordinate & | jemCoord | ||
) |
returns the phi coord of the row of the JEM at the coordinates passed
Definition at line 148 of file JetEnergyModuleKey.cxx.
|
private |
|
protectedinherited |
|
protectedinherited |
rounds number as follows (-1.0 to 0.0) -> -1, (0.0 to 1.0) -> 0, (1.0 to 2.0)->1 etc.
Definition at line 190 of file KeyUtilities.cxx.
|
protectedinherited |
divides a/b and returns a number as follows (where +b means +ve b): if 0<a<+b, then n=1, if +b<a<+2b, n=2, if -b<a<0, n=-1, if -2b<a<-b, n=-2
Definition at line 194 of file KeyUtilities.cxx.
|
protectedvirtualinherited |
returns -1 if temp is -ve and +1 if it is +ve.
returns 0 if temp =0
Definition at line 169 of file KeyUtilities.cxx.
|
protectedvirtualinherited |
returns -1 if temp is -ve and +1 if it is +ve.
returns 0 if temp =0
Definition at line 164 of file KeyUtilities.cxx.
|
protectedinherited |
this is the coordinate of the centre of the relevant trigger tower.
Definition at line 122 of file KeyUtilities.h.
|
protectedinherited |
this is the coordinate of the centre of the relevant trigger tower.
Definition at line 119 of file KeyUtilities.h.
|
protectedinherited |
turns DEBUG code on and off
Definition at line 124 of file KeyUtilities.h.
|
private |
set to true to turn debugging info on
Definition at line 110 of file JetEnergyModuleKey.h.
|
protectedinherited |
eta coordinate of key
Definition at line 110 of file KeyUtilities.h.
|
protectedinherited |
eta bin
Definition at line 116 of file KeyUtilities.h.
|
protectedinherited |
integer eta coord
Definition at line 108 of file KeyUtilities.h.
|
protectedinherited |
integer phi coord
Definition at line 106 of file KeyUtilities.h.
|
protectedinherited |
phi coordinate of key
Definition at line 112 of file KeyUtilities.h.
|
protectedinherited |
phi bin
Definition at line 114 of file KeyUtilities.h.