![]() |
ATLAS Offline Software
|
The ClusterProcessorModuleKey object provides the key for each trigger tower depending on its eta-phi coords. More...
#include <ClusterProcessorModuleKey.h>
Public Member Functions | |
| ClusterProcessorModuleKey () | |
| constructs a ClusterProcessorModuleKey object | |
| virtual | ~ClusterProcessorModuleKey () |
| unsigned int | cpmKey (unsigned int crate, unsigned int module) |
| calculates key from crate and module index | |
| double | dPhi (const Coordinate &coord) const |
| height | |
| double | dEta (const Coordinate &coord) const |
| width | |
| unsigned int | cpm (const Coordinate &coord) const |
| returns CPM number within a crate for a TriggerTower or RoI coordinate | |
| virtual double | eta () const |
| returns the centre of the TT at eta_coord: | |
| virtual double | phi () const |
| returns phi coordinate of centre of relevant trigger tower. | |
| unsigned int | key (double phi, double eta) |
| calculates a map key from passed phi, eta coordinates | |
| unsigned int | key (const Coordinate &coord) |
| returns the key of the passed Coordinate | |
| Coordinate | coord () const |
| return central coords of current key value. | |
Protected Member Functions | |
| ICoordinate * | convertCoordsToIntegers (double phi, double eta) |
| converts the coordinates and corrects for overflows etc. | |
| virtual int | sign (int temp) const |
| returns -1 if temp is -ve and +1 if it is +ve. | |
| virtual int | sign (double temp) const |
| returns -1 if temp is -ve and +1 if it is +ve. | |
| int | round (double a) const |
| rounds number to nearest whole number | |
| 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. | |
| int | sharpRound2 (int a, int b) const |
| divides a/b and returns a number as follows (where +b means +ve b): if 0 | |
| void | setupThisKeyValues () |
Protected Attributes | |
| int | m_iphi |
| integer phi coord | |
| int | m_ieta |
| integer eta coord | |
| double | m_eta |
| eta coordinate of key | |
| double | m_phi |
| phi coordinate of key | |
| int | m_phiBin |
| phi bin | |
| int | m_etaBin |
| eta bin | |
| double | m_centralPhi |
| this is the coordinate of the centre of the relevant trigger tower. | |
| double | m_centralEta |
| this is the coordinate of the centre of the relevant trigger tower. | |
| bool | m_debug |
| turns DEBUG code on and off | |
Private Member Functions | |
| BinAndCoord * | calculateTriggerBin (ICoordinate *iCoord) |
| converts integer phi, eta coordinates to phi, eta trigger bins, and central coords | |
| void | setBins (ICoordinate *iCoord, unsigned int &phiBin, int &etaBin) |
| sets the eta and phi bins | |
| 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 | |
Private Attributes | |
| bool | m_debugModuleKey |
| set to true to turn debugging info on | |
The ClusterProcessorModuleKey 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 44 of file ClusterProcessorModuleKey.h.
| LVL1::ClusterProcessorModuleKey::ClusterProcessorModuleKey | ( | ) |
constructs a ClusterProcessorModuleKey object
Definition at line 34 of file ClusterProcessorModuleKey.cxx.
|
virtual |
Definition at line 38 of file ClusterProcessorModuleKey.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 87 of file ClusterProcessorModuleKey.cxx.
|
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 105 of file KeyUtilities.cxx.
|
inherited |
return central coords of current key value.
Definition at line 199 of file KeyUtilities.cxx.
| unsigned int LVL1::ClusterProcessorModuleKey::cpm | ( | const Coordinate & | coord | ) | const |
returns CPM number within a crate for a TriggerTower or RoI coordinate
Returns CPM number for TT coordinate.
TT and RoI coordinates are offset by 0.5*tower width. Shift by 0.25*tower width to allow common code without rounding errors
Definition at line 70 of file ClusterProcessorModuleKey.cxx.
| unsigned int LVL1::ClusterProcessorModuleKey::cpmKey | ( | unsigned int | crate, |
| unsigned int | module ) |
calculates key from crate and module index
returns trigger tower key of passed crate+module
Definition at line 42 of file ClusterProcessorModuleKey.cxx.
|
virtual |
width
return width of JE
Implements LVL1::KeyUtilities.
Definition at line 53 of file ClusterProcessorModuleKey.cxx.
|
virtual |
height
return height of CPM
Implements LVL1::KeyUtilities.
Definition at line 48 of file ClusterProcessorModuleKey.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 145 of file KeyUtilities.cxx.
|
inherited |
returns the key of the passed Coordinate
returns trigger tower key of passed Coordinate
Definition at line 96 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 77 of file KeyUtilities.cxx.
|
virtualinherited |
returns phi coordinate of centre of relevant trigger tower.
returns phi coordinate of the centre of the relevent trigger tower.
Definition at line 154 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 119 of file ClusterProcessorModuleKey.cxx.
|
protectedinherited |
rounds number to nearest whole number
Definition at line 180 of file KeyUtilities.cxx.
|
private |
sets the eta and phi bins
Definition at line 60 of file ClusterProcessorModuleKey.cxx.
|
protectedinherited |
Definition at line 168 of file KeyUtilities.cxx.
|
protectedinherited |
|
protectedinherited |
divides a/b and returns a number as follows (where +b means +ve b): if 0
Definition at line 189 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.
|
protectedvirtualinherited |
returns -1 if temp is -ve and +1 if it is +ve.
returns 0 if temp =0
Definition at line 159 of file KeyUtilities.cxx.
|
protectedinherited |
this is the coordinate of the centre of the relevant trigger tower.
Definition at line 112 of file KeyUtilities.h.
|
protectedinherited |
this is the coordinate of the centre of the relevant trigger tower.
Definition at line 109 of file KeyUtilities.h.
|
protectedinherited |
turns DEBUG code on and off
Definition at line 114 of file KeyUtilities.h.
|
private |
set to true to turn debugging info on
Definition at line 74 of file ClusterProcessorModuleKey.h.
|
protectedinherited |
eta coordinate of key
Definition at line 100 of file KeyUtilities.h.
|
protectedinherited |
eta bin
Definition at line 106 of file KeyUtilities.h.
|
protectedinherited |
integer eta coord
Definition at line 98 of file KeyUtilities.h.
|
protectedinherited |
integer phi coord
Definition at line 96 of file KeyUtilities.h.
|
protectedinherited |
phi coordinate of key
Definition at line 102 of file KeyUtilities.h.
|
protectedinherited |
phi bin
Definition at line 104 of file KeyUtilities.h.