ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
LVL1::JetEnergyModuleKey Class Reference

The JetEnergyModuleKey object provides the key for each trigger tower depending on its eta-phi coords. More...

#include <JetEnergyModuleKey.h>

Inheritance diagram for LVL1::JetEnergyModuleKey:
Collaboration diagram for LVL1::JetEnergyModuleKey:

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< CoordinatejeCoords (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

ICoordinateconvertCoordsToIntegers (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

BinAndCoordcalculateTriggerBin (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...
 

Detailed Description

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.

Author
Edward Moyse

Definition at line 40 of file JetEnergyModuleKey.h.

Member Enumeration Documentation

◆ JEMRegion

Enumerator
MidJEM 
LeftEndJEM 
RightEndJEM 
JEMRegionERROR 

Definition at line 48 of file JetEnergyModuleKey.h.

Constructor & Destructor Documentation

◆ JetEnergyModuleKey()

LVL1::JetEnergyModuleKey::JetEnergyModuleKey ( )

constructs a JetEnergyModuleKey object

Definition at line 41 of file JetEnergyModuleKey.cxx.

◆ ~JetEnergyModuleKey()

LVL1::JetEnergyModuleKey::~JetEnergyModuleKey ( )
virtual

Definition at line 45 of file JetEnergyModuleKey.cxx.

Member Function Documentation

◆ calculateTriggerBin()

LVL1::BinAndCoord * LVL1::JetEnergyModuleKey::calculateTriggerBin ( ICoordinate iCoord)
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.

246  {
247 // double phiBinWidth=((2*M_PI)/64.0);
248  int abs_ieta=abs(iCoord->eta() );
249  int sign=( iCoord->eta() )/abs_ieta;
250 
251  int etaBin=0; unsigned int phiBin=0;
252  setBins(iCoord,phiBin,etaBin);
253 
254  double centralPhi=( (static_cast<double>(phiBin))*TrigT1CaloDefs::jemPhiSize )
256  double centralEta=0.0;
257  if ((etaBin>-4)&&(etaBin<4)){
258  centralEta=(static_cast<double>(etaBin)*(TrigT1CaloDefs::jemEtaSize) )
260  }else{
261  centralEta=3.65*sign;//centre of end JEMs
262  }
263  if (m_debugModuleKey){
264  std::cout << "JetEnergyModuleKey: start calcTrigBin"<<std::endl;
265  std::cout << "phi, eta : ("<<m_phi<<", "<<m_eta<<")"<<std::endl;
266  std::cout << "iphi, ieta : ("<<( iCoord->phi() )<<", "<<( iCoord->eta() )<<")"<<std::endl;
267  std::cout << "abs_ieta : ("<<abs_ieta<<" and sign : "<<sign<<std::endl;
268  std::cout << "central : ("<<centralPhi<<", "<<centralEta<<")"
269  << "bin : ("<<phiBin<<","<<etaBin<<")"<<std::endl;
270  }
271 
272  Coordinate* centralCoords = new Coordinate(centralPhi, centralEta);
273  if (m_debugModuleKey) std::cout <<" JetEnergyModuleKey : created coord "<<(*centralCoords)<<std::endl;
274  return new BinAndCoord(phiBin,etaBin,centralCoords);
275 }

◆ col()

unsigned int LVL1::JetEnergyModuleKey::col ( const Coordinate coord)

return row of passed coordinate

Definition at line 214 of file JetEnergyModuleKey.cxx.

214  {
215  switch (region(coord)){
216  case MidJEM :
217  return midJEMEtaCol(coord);
218  case LeftEndJEM :
219  return leftEndJEMEtaCol(coord);
220  case RightEndJEM :
221  return rightEndJEMEtaCol(coord);
222  default:
223  std::cerr << "JetEnergyModuleKey::etaColumn UNKNOWN REGION"<<std::endl;
224  }
225  return static_cast<unsigned int>(JEMRegionERROR);
226 }

◆ convertCoordsToIntegers()

ICoordinate * LVL1::KeyUtilities::convertCoordsToIntegers ( double  phi,
double  eta 
)
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.

110  : (phi, eta) ("<<phi<<","<<eta<<")"<<std::endl;
111  int iphi=sharpRound(phi/phiBinWidth);
112  int ieta=0;
113 
114  // Now check that m_iphi is between 0 and 64.
115  iphi = iphi%64;
116  if (iphi<0) iphi = 64+iphi;
117 
118  // Make m_ieta symmetrical:
119  // o no cell at m_ieta=0
120  // o first cells at +-1
121  // o last cells at about +- 50
122  // this gives us a more useful numerical symmetry.
123 
124  // So to get integer value we do:
125  int temp_sign=sign(eta);
126  double temp_abs=eta*temp_sign;
127 
128  double temp_double=(temp_abs*10.0+1.0)*temp_sign;
129  if (m_debug) std::cout << "KU : temp_abs, temp_sign, temp_double : "<<temp_abs<<","<<temp_sign<<","<<temp_double<<std::endl;
130 // if (m_eta>=0.0){
131 // temp_double=m_eta*10.0+1.0;
132 // }else{
133 // temp_double=m_eta*10.0-1.0;
134 // }
135 
136  ieta=static_cast<int>(temp_double);
137  if (m_debug) std::cout << "KU : (iphi, ieta) ("<<iphi<<","<<ieta<<")"<<std::endl;
138  ICoordinate* iCoord=new ICoordinate(iphi, ieta, eta);
139  return iCoord;
140 }
141 
142 
145 double LVL1::KeyUtilities::eta() const{

◆ coord()

LVL1::Coordinate LVL1::KeyUtilities::coord ( ) const
inherited

return central coords of current key value.

Definition at line 199 of file KeyUtilities.cxx.

199  {
200  return Coordinate(m_centralPhi,m_centralEta);
201 }

◆ dEta()

double LVL1::JetEnergyModuleKey::dEta ( const Coordinate coord) const
virtual

width

return width of JE

Implements LVL1::KeyUtilities.

Definition at line 180 of file JetEnergyModuleKey.cxx.

◆ dPhi()

double LVL1::JetEnergyModuleKey::dPhi ( const Coordinate coord) const
virtual

height

return height of JEM

Implements LVL1::KeyUtilities.

Definition at line 175 of file JetEnergyModuleKey.cxx.

175  {
176  if (region(coord) == MidJEM) return 0.8;
177  if ((region(coord) == LeftEndJEM)||(region(coord) == RightEndJEM))

◆ eta()

double LVL1::KeyUtilities::eta ( ) const
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.

◆ jeCoords()

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.

91  : 1 );
92  double phiStart = crate*TrigT1CaloDefs::jemPhiSize
95  double etaStart;
96  // Central JEMs are easy
97  if ( (module%8) > 0) {
98  etaStart = (module%8)*TrigT1CaloDefs::jemEtaSize - 3.1;
99  }
100  // -ive eta end
101  else {
103  }
104 
105  // First coordinate for this JEM
106  Coordinate startCol(phiStart, etaStart);
107  // Nested incrementation of eta and phi
108  CoordToHardware cth;
109  JetElementKey get(0.,0.);
110  while (cth.jepModule( startCol ) == module) {
111  Coordinate next = get.getCentre(startCol);
112  while (cth.jepCrate( next ) == crate) {
113  coords.push_back(next);
114  next = get.upPhi(next);
115  }
116  startCol = get.rightEta(startCol);
117  if (startCol.eta() == TrigT1CaloDefs::RegionERROREtaCentre) break;
118  }
119 
120  return coords;
121 }
122 
124 unsigned int LVL1::JetEnergyModuleKey::row(const Coordinate& coord) const{
125  double phi=coord.phi();
126  double rowHeight=TrigT1CaloDefs::jemPhiSize/8.0;

◆ jeKeys()

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.

70  : coords) {
71  keys.push_back(get.jeKey(c));
72  }
73 
74  return keys;
75 }
76 
77 
79 std::vector<Coordinate> JetEnergyModuleKey::jeCoords(unsigned int crate, unsigned int module) {
80  std::vector<Coordinate> coords;

◆ jem()

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.

229  {
230  double min=3.2; double jemEtaWidth=0.8;
231  unsigned int crateModifier=(phiQuadrant(coord.phi())/2);
232  //=0 for quad 0&1, =1 for quad 2&3
233 
234  double temp = (coord.eta()+min)/jemEtaWidth;
235  int jem = static_cast<int>(temp);
236  jem=(jem < 0 ? 0 : jem);
237  jem=(jem > 7 ? 7 : jem);
238 
239  jem+=(8*crateModifier);
240  return static_cast<unsigned int>(jem);
241 }

◆ jemKey() [1/2]

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.

51  {

◆ jemKey() [2/2]

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.

59  {
60  std::vector<unsigned int> keys;
61 

◆ key() [1/2]

unsigned int LVL1::KeyUtilities::key ( const Coordinate coord)
inherited

returns the key of the passed Coordinate

returns trigger tower key of passed Coordinate

Definition at line 101 of file KeyUtilities.cxx.

◆ key() [2/2]

unsigned int LVL1::KeyUtilities::key ( double  phi,
double  eta 
)
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.

82  : key: got bandc "<<std::endl;
83  m_phiBin=bandc->phiBin();
84  m_etaBin=bandc->etaBin();
85  m_centralPhi=bandc->coords()->phi();
86  m_centralEta=bandc->coords()->eta();
87  delete bandc;
88  delete iCoord;
89  int temp=((m_etaBin+50)<<6) + m_phiBin;
90 
91  if (m_debug) std::cout << "KU : key: returning - "<<temp<<std::endl;
92  return static_cast<unsigned int>(temp);
93 }
94 
96 unsigned int KeyUtilities::key(const Coordinate& coord) {
97  return key(coord.phi(), coord.eta());
98 }

◆ leftEndJEMEtaCol()

unsigned int LVL1::JetEnergyModuleKey::leftEndJEMEtaCol ( const Coordinate coord) const
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.

294  {
295  // left hand end first
296  JetElementKey get;
297  switch (get.jeRegion( coord )){
299  return 3;
300  break;
302  return 2;
303  break;
305  return 1;
306  break;
307  case JetElementKey::FCAL :
308  return 0;
309  break;
310  case JetElementKey::Barrel :
311  // here to stop compiler warnings
312  break;
314  // here to stop compiler warnings
315  break;
316  }
317  return static_cast<unsigned int>(JEMRegionERROR);
318 }

◆ midJEMEtaCol()

unsigned int LVL1::JetEnergyModuleKey::midJEMEtaCol ( const Coordinate coord) const
private

No descriptions.

Definition at line 278 of file JetEnergyModuleKey.cxx.

278  {
279  double etaWidth=0.2;//only true for middle JEMS
280  double JEMEtaSize=0.8;
281 // unsigned int columnsPerJEM= 4;
282  int etaBin=( jem(coord)%8)-4;//bins range from -4 to +3
283  double etaMin=(etaBin*JEMEtaSize);
284 
285  double temp =(coord.eta()-etaMin)/etaWidth;
286  int colNum=sharpRound(temp);
287 
288  colNum=(colNum < 0 ? 0 : colNum);//sorts out any rounding errors
289  colNum=(colNum > 3 ? 3 : colNum);
290 
291  return colNum;
292 }

◆ phi()

double LVL1::KeyUtilities::phi ( ) const
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.

159  {
160  return ((temp >= 0) ? 1 : -1);
161 }

◆ phiQuadrant()

unsigned int LVL1::JetEnergyModuleKey::phiQuadrant ( const double  phi) const
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.

354  {
355  double temp = phi/(M_PI/2);
356  unsigned int quad = static_cast<unsigned int>(temp);
357  quad=(quad > 3 ? 0 : quad);
358 
359  return static_cast<unsigned int>(quad);
360 }

◆ region()

LVL1::JetEnergyModuleKey::JEMRegion LVL1::JetEnergyModuleKey::region ( const Coordinate coord) const

region

r

Definition at line 187 of file JetEnergyModuleKey.cxx.

187  {
188  double absEta=fabs(coord.eta());
189  if (absEta<=2.4) return MidJEM;
190  if ((coord.eta()>2.4)&&(coord.eta()<=4.9))return RightEndJEM;
191  if ((coord.eta()>=-4.9)&&(coord.eta()<-2.4))return LeftEndJEM;
192  std::cerr << "JetEnergyModuleKey::region ... Unknown region!"<<std::endl
193  << "Coordinate is ("<<coord.phi()<<", "<<coord.eta()<<")"
194  <<std::endl;
195  return JEMRegionERROR;
196 }

◆ rightEndJEMEtaCol()

unsigned int LVL1::JetEnergyModuleKey::rightEndJEMEtaCol ( 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.

321  {
322  // left hand end first
323  JetElementKey get;
324  switch (get.jeRegion( coord )){
326  return 0;
327  break;
329  return 1;
330  break;
332  return 2;
333  break;
334  case JetElementKey::FCAL :
335  return 3;
336  break;
337  case JetElementKey::Barrel :
338  // here to stop compiler warnings
339  break;
341  // here to stop compiler warnings
342  break;
343  }
344  return static_cast<unsigned int>(JEMRegionERROR);
345 }

◆ round()

int LVL1::KeyUtilities::round ( double  a) const
protectedinherited

rounds number to nearest whole number

Definition at line 185 of file KeyUtilities.cxx.

185  {
186  return static_cast<int>(a<0.0?(a-1.0):a>0.0?(a):0.0);
187 }

◆ row() [1/2]

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.

136  {
137  Coordinate coord(JE->phi(), JE->eta());

◆ row() [2/2]

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.

143  {
144  //not sure how to do this.

◆ rowPhiCoord()

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.

152  {
153  std::cerr << "ERROR!!! JetEnergyModuleKey::rowPhiCoord exceeds allowed range. Row, "<<rowNum
154  <<" will be set to zero"<<std::endl;
155  rowNum=0;
156  }
157  double phi =( (static_cast<double>(phiBin))*TrigT1CaloDefs::jemPhiSize ); //bot of JEM
158  phi+= static_cast<double>( rowNum )*0.2+0.1; //mid of row
159  delete iCoord;
160  if (m_debugModuleKey){
161  if ( (phi<(jemCoord.phi()-0.8))||(phi>(jemCoord.phi()+0.8) ) ){
162  std::cerr << "ERROR!!! JetEnergyModuleKey::rowPhiCoord phi of row is "<<phi
163  <<" in a JEM at ("<<jemCoord.phi()<<", "<<jemCoord.eta()<<")"<<std::endl;
164  }//endif phi sensible
165  }//endif debug
166  return phi;
167 }
168 
170 double JetEnergyModuleKey::dPhi(const Coordinate& /*coord*/) const{
171  return M_PI/2;// one quadrant
172 }

◆ setBins()

void LVL1::JetEnergyModuleKey::setBins ( ICoordinate iCoord,
unsigned int &  phiBin,
int &  etaBin 
)
private

sets the eta and phi bins

Definition at line 201 of file JetEnergyModuleKey.cxx.

201  {
202  unsigned int iPhiSize=16 ; // =PI/2 * 10
203  phiBin=( iCoord->phi() )/(iPhiSize);
204  int iEtaSize=8;// JEMs are 0.8 in eta, i.e ietaSize=8
205  etaBin=sharpRound2(iCoord->eta(),iEtaSize);
206  // the above calculation fails since end JEMs are larger, so ....
207  etaBin=(etaBin < -4 ? -4 : etaBin); // etaBin=-5
208  etaBin=(etaBin > 4 ? 4 : etaBin); // belongs to the JEM in etaBin=-4
209 
210  return;
211 }

◆ setupThisKeyValues()

void LVL1::KeyUtilities::setupThisKeyValues ( )
protectedinherited

Definition at line 173 of file KeyUtilities.cxx.

180  {
181  return static_cast<int>(a<0.0?ceil(a-0.5):a>0.0?floor(a+0.5):0.0);
182 }

◆ sharpRound()

int LVL1::KeyUtilities::sharpRound ( double  a) const
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.

◆ sharpRound2()

int LVL1::KeyUtilities::sharpRound2 ( int  a,
int  b 
) const
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.

◆ sign() [1/2]

int LVL1::KeyUtilities::sign ( double  temp) const
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.

◆ sign() [2/2]

int LVL1::KeyUtilities::sign ( int  temp) const
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.

164  {
165  return ((temp >= 0.0) ? 1 : -1);
166 }

Member Data Documentation

◆ m_centralEta

double LVL1::KeyUtilities::m_centralEta
protectedinherited

this is the coordinate of the centre of the relevant trigger tower.

Definition at line 122 of file KeyUtilities.h.

◆ m_centralPhi

double LVL1::KeyUtilities::m_centralPhi
protectedinherited

this is the coordinate of the centre of the relevant trigger tower.

Definition at line 119 of file KeyUtilities.h.

◆ m_debug

bool LVL1::KeyUtilities::m_debug
protectedinherited

turns DEBUG code on and off

Definition at line 124 of file KeyUtilities.h.

◆ m_debugModuleKey

bool LVL1::JetEnergyModuleKey::m_debugModuleKey
private

set to true to turn debugging info on

Definition at line 110 of file JetEnergyModuleKey.h.

◆ m_eta

double LVL1::KeyUtilities::m_eta
protectedinherited

eta coordinate of key

Definition at line 110 of file KeyUtilities.h.

◆ m_etaBin

int LVL1::KeyUtilities::m_etaBin
protectedinherited

eta bin

Definition at line 116 of file KeyUtilities.h.

◆ m_ieta

int LVL1::KeyUtilities::m_ieta
protectedinherited

integer eta coord

Definition at line 108 of file KeyUtilities.h.

◆ m_iphi

int LVL1::KeyUtilities::m_iphi
protectedinherited

integer phi coord

Definition at line 106 of file KeyUtilities.h.

◆ m_phi

double LVL1::KeyUtilities::m_phi
protectedinherited

phi coordinate of key

Definition at line 112 of file KeyUtilities.h.

◆ m_phiBin

int LVL1::KeyUtilities::m_phiBin
protectedinherited

phi bin

Definition at line 114 of file KeyUtilities.h.


The documentation for this class was generated from the following files:
LVL1::KeyUtilities::sign
virtual int sign(int temp) const
returns -1 if temp is -ve and +1 if it is +ve.
Definition: KeyUtilities.cxx:164
LVL1::KeyUtilities::phi
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
Definition: KeyUtilities.cxx:159
LVL1::TrigT1CaloDefs::Region0Height
static const double Region0Height
Definition: TrigT1CaloDefs.h:112
LVL1::JetEnergyModuleKey::dPhi
double dPhi(const Coordinate &coord) const
height
Definition: JetEnergyModuleKey.cxx:175
LVL1::KeyUtilities::m_phi
double m_phi
phi coordinate of key
Definition: KeyUtilities.h:112
LVL1::Coordinate::phi
double phi() const
return phi
Definition: Coordinate.cxx:50
LVL1::KeyUtilities::sharpRound
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.
Definition: KeyUtilities.cxx:190
LVL1::JetElementKeyBase::FCAL
@ FCAL
Definition: JetElementKeyBase.h:78
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
LVL1::JetElementKeyBase::EndCap3
@ EndCap3
Definition: JetElementKeyBase.h:77
LVL1::TrigT1CaloDefs::jemEtaSize
static const double jemEtaSize
Definition: TrigT1CaloDefs.h:140
LVL1::KeyUtilities::key
unsigned int key(double phi, double eta)
calculates a map key from passed phi, eta coordinates
Definition: KeyUtilities.cxx:82
M_PI
#define M_PI
Definition: ActiveFraction.h:11
LVL1::JetEnergyModuleKey::setBins
void setBins(ICoordinate *iCoord, unsigned int &phiBin, int &etaBin)
sets the eta and phi bins
Definition: JetEnergyModuleKey.cxx:201
LVL1::JetEnergyModuleKey::phiQuadrant
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 2...
Definition: JetEnergyModuleKey.cxx:354
LVL1::JetEnergyModuleKey::m_debugModuleKey
bool m_debugModuleKey
set to true to turn debugging info on
Definition: JetEnergyModuleKey.h:110
LVL1::JetEnergyModuleKey::RightEndJEM
@ RightEndJEM
Definition: JetEnergyModuleKey.h:56
LVL1::KeyUtilities::eta
virtual double eta() const
returns the centre of the TT at eta_coord:
Definition: KeyUtilities.cxx:150
python.PyAthena.module
module
Definition: PyAthena.py:131
xAOD::etaBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
Definition: L2StandAloneMuon_v1.cxx:148
LVL1::KeyUtilities::coord
Coordinate coord() const
return central coords of current key value.
Definition: KeyUtilities.cxx:199
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
LVL1::JetEnergyModuleKey::leftEndJEMEtaCol
unsigned int leftEndJEMEtaCol(const Coordinate &coord) const
returns eta row of JEMs 0, or 8
Definition: JetEnergyModuleKey.cxx:294
LVL1::JetEnergyModuleKey::jem
unsigned int jem(const Coordinate &coord) const
returns ID of JEP module (i.e.
Definition: JetEnergyModuleKey.cxx:229
LVL1::JetEnergyModuleKey::rightEndJEMEtaCol
unsigned int rightEndJEMEtaCol(const Coordinate &coord) const
returns eta row of JEMs 7 or 15
Definition: JetEnergyModuleKey.cxx:321
LVL1::TrigT1CaloDefs::Region5EtaCentre
static const double Region5EtaCentre
Definition: TrigT1CaloDefs.h:101
LVL1::KeyUtilities::m_centralPhi
double m_centralPhi
this is the coordinate of the centre of the relevant trigger tower.
Definition: KeyUtilities.h:119
LVL1::KeyUtilities::m_eta
double m_eta
eta coordinate of key
Definition: KeyUtilities.h:110
xAOD::phiBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
Definition: L2StandAloneMuon_v2.cxx:144
LVL1::TrigT1CaloDefs::RegionERROREtaCentre
static const double RegionERROREtaCentre
Definition: TrigT1CaloDefs.h:103
LVL1::JetEnergyModuleKey::JEMRegionERROR
@ JEMRegionERROR
Definition: JetEnergyModuleKey.h:57
LVL1::JetEnergyModuleKey::MidJEM
@ MidJEM
Definition: JetEnergyModuleKey.h:54
LVL1::JetElementKeyBase::EndCap2
@ EndCap2
Definition: JetElementKeyBase.h:76
LVL1::JetEnergyModuleKey::region
JEMRegion region(const Coordinate &coord) const
region
Definition: JetEnergyModuleKey.cxx:187
LVL1::Coordinate::eta
double eta() const
return eta
Definition: Coordinate.cxx:45
LVL1::JetEnergyModuleKey::jeCoords
std::vector< Coordinate > jeCoords(unsigned int crate, unsigned int module)
returns coordinates of all JetElements in given crate and module
Definition: JetEnergyModuleKey.cxx:84
a
TList * a
Definition: liststreamerinfos.cxx:10
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
LVL1::JetEnergyModuleKey::LeftEndJEM
@ LeftEndJEM
Definition: JetEnergyModuleKey.h:55
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:244
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
top
@ top
Definition: TruthClasses.h:64
LVL1::JetEnergyModuleKey::row
unsigned int row(const Coordinate &coord) const
returns the phi row of a coord within the JEM that contains it.
Definition: JetEnergyModuleKey.cxx:129
LVL1::TrigT1CaloDefs::jemPhiSize
static const double jemPhiSize
Definition: TrigT1CaloDefs.h:139
LVL1::JetElementKeyBase::Barrel
@ Barrel
Definition: JetElementKeyBase.h:73
LVL1::JetEnergyModuleKey::midJEMEtaCol
unsigned int midJEMEtaCol(const Coordinate &coord) const
No descriptions.
Definition: JetEnergyModuleKey.cxx:278
python.compressB64.c
def c
Definition: compressB64.py:93
LVL1::KeyUtilities::m_centralEta
double m_centralEta
this is the coordinate of the centre of the relevant trigger tower.
Definition: KeyUtilities.h:122
LVL1::JetElementKeyBase::EndCap1
@ EndCap1
Definition: JetElementKeyBase.h:75
LVL1::JetElementKeyBase::EndBarrel
@ EndBarrel
Definition: JetElementKeyBase.h:74
dumpNswErrorDb.quad
def quad
Definition: dumpNswErrorDb.py:30
LVL1::KeyUtilities::sharpRound2
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,...
Definition: KeyUtilities.cxx:194