ATLAS Offline Software
JetEnergyModuleKey.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  JetEnergyModuleKey.h - description
6  -------------------
7  begin : Monday August 20 2001
8  email : e.moyse@qmw.ac.uk
9  ***************************************************************************/
10 
11 
12 #ifndef JETENERGYMODULEKEY_H
13 #define JETENERGYMODULEKEY_H
14 
15 #include <iostream>
16 #include <vector>
17 
18 // running in Athena
24 
25 namespace LVL1 {
26 
35 class JetEnergyModuleKey : public KeyUtilities {
36 
37 public:
38  enum JEMRegion {
39  MidJEM=0,
41  RightEndJEM=2,
42  JEMRegionERROR=999
43  };
44 
46  virtual ~JetEnergyModuleKey();
47 
48 
50  unsigned int jemKey(const xAOD::JetElement* jetElement);
52  unsigned int jemKey(unsigned int crate, unsigned int module);
54  std::vector<unsigned int> jeKeys(unsigned int crate, unsigned int module);
56  std::vector<Coordinate> jeCoords(unsigned int crate, unsigned int module);
59  unsigned int row(const Coordinate& coord) const;
62  unsigned int row(const xAOD::JetElement* jetElement) const;
64  double rowPhiCoord(unsigned int row, const Coordinate& jemCoord);
66  double dPhi(const Coordinate& coord) const;
68  double dEta(const Coordinate& coord) const;
70  JEMRegion region(const Coordinate& coord) const;
72  unsigned int col(const Coordinate& coord) ;
78  unsigned int jem(const Coordinate & coord) const;
79 
80 private: // Private methods
85  void setBins(ICoordinate* iCoord,unsigned int& phiBin, int& etaBin);
87  unsigned int midJEMEtaCol(const Coordinate& coord) const;
89  unsigned int leftEndJEMEtaCol(const Coordinate& coord) const;
91  unsigned int rightEndJEMEtaCol(const Coordinate& coord) const;
97  unsigned int phiQuadrant(const double phi) const ;
98 private:
100  bool m_debugModuleKey;
101 };
102 }
103 
104 #endif
LVL1::KeyUtilities::phi
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
Definition: KeyUtilities.cxx:159
LVL1::JetEnergyModuleKey::dPhi
double dPhi(const Coordinate &coord) const
height
Definition: JetEnergyModuleKey.cxx:175
LVL1::JetEnergyModuleKey::rowPhiCoord
double rowPhiCoord(unsigned int row, const Coordinate &jemCoord)
returns the phi coord of the row of the JEM at the coordinates passed
Definition: JetEnergyModuleKey.cxx:148
LVL1::JetEnergyModuleKey::jeKeys
std::vector< unsigned int > jeKeys(unsigned int crate, unsigned int module)
calculates keys of all JetElements in given crate and module
Definition: JetEnergyModuleKey.cxx:64
JetElementKey.h
xAOD::JetElement_v2
Description of JetElement_v2.
Definition: JetElement_v2.h:26
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::col
unsigned int col(const Coordinate &coord)
return row of passed coordinate
Definition: JetEnergyModuleKey.cxx:214
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::JetEnergyModuleKey::RightEndJEM
@ RightEndJEM
Definition: JetEnergyModuleKey.h:56
LVL1::ICoordinate
Used by Key Classes, returns and integer coorginate for the bin Eta-Phi.
Definition: ICoordinate.h:31
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
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
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::~JetEnergyModuleKey
virtual ~JetEnergyModuleKey()
Definition: JetEnergyModuleKey.cxx:45
LVL1::JetEnergyModuleKey::rightEndJEMEtaCol
unsigned int rightEndJEMEtaCol(const Coordinate &coord) const
returns eta row of JEMs 7 or 15
Definition: JetEnergyModuleKey.cxx:321
LVL1::JetEnergyModuleKey::JetEnergyModuleKey
JetEnergyModuleKey()
constructs a JetEnergyModuleKey object
Definition: JetEnergyModuleKey.cxx:41
LVL1::BinAndCoord
Used to pass data between the methods of the Key Classes: Returns the Eta and Phi bins,...
Definition: BinAndCoord.h:40
BinAndCoord.h
JetElement.h
Coordinate.h
KeyUtilities.h
LVL1::JetEnergyModuleKey::calculateTriggerBin
BinAndCoord * calculateTriggerBin(ICoordinate *iCoord)
converts integer phi, eta coordinates to phi, eta trigger bins, and central coords
Definition: JetEnergyModuleKey.cxx:246
xAOD::phiBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
Definition: L2StandAloneMuon_v2.cxx:144
LVL1::JetEnergyModuleKey::dEta
double dEta(const Coordinate &coord) const
width
Definition: JetEnergyModuleKey.cxx:180
LVL1::JetEnergyModuleKey::JEMRegionERROR
@ JEMRegionERROR
Definition: JetEnergyModuleKey.h:57
LVL1::JetEnergyModuleKey::MidJEM
@ MidJEM
Definition: JetEnergyModuleKey.h:54
LVL1::JetEnergyModuleKey::region
JEMRegion region(const Coordinate &coord) const
region
Definition: JetEnergyModuleKey.cxx:187
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
LVL1::JetEnergyModuleKey::LeftEndJEM
@ LeftEndJEM
Definition: JetEnergyModuleKey.h:55
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::JetEnergyModuleKey::jemKey
unsigned int jemKey(const xAOD::JetElement *jetElement)
returns the key of the passed Coordinate
Definition: JetEnergyModuleKey.cxx:49
LVL1::JetEnergyModuleKey::JEMRegion
JEMRegion
Definition: JetEnergyModuleKey.h:48
LVL1::JetEnergyModuleKey::midJEMEtaCol
unsigned int midJEMEtaCol(const Coordinate &coord) const
No descriptions.
Definition: JetEnergyModuleKey.cxx:278