ATLAS Offline Software
CoordToHardware.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  CoordToHardware.h - description
6  -------------------
7  begin : Fri Apr 19 2002
8  email : moyse@ph.qmw.ac.uk
9  ***************************************************************************/
10 
11 
12 #ifndef COORDTOHARDWARE_H
13 #define COORDTOHARDWARE_H
14 
15 #ifndef TRIGGERSPACE
16 // running in Athena
19 #else
20 // running in TRIGGERSPACE
21 #include "Coordinate.h"
22 #include "JetEnergyModuleKey.h"
23 #endif
24 
25 
26 
30 namespace LVL1 {
31 
32 
37 class CoordToHardware {
38 public:
42  unsigned int jepCrate(const Coordinate& Coord);
45  unsigned int cpCrate(const Coordinate& coord);
47  unsigned int cpRoIROD(const Coordinate& coord);
53  unsigned int jepModule(const Coordinate& coord);
56  unsigned int cpModule(const Coordinate& coord);
58  unsigned int cpModuleFPGA(const Coordinate& coord);
60  unsigned int cpModuleLocalRoI(const Coordinate& coord);
67  unsigned int cpCoordinateWord(const Coordinate& coord);
72  unsigned int jepCoordinateWord(const Coordinate& coord);
76  unsigned int jepLocalCoordinate(const Coordinate& coord);
78  unsigned int cpCrateOverlap(const Coordinate& coord);
80  unsigned int cpModuleOverlap(const Coordinate& coord);
82  unsigned int jepCrateOverlap(const Coordinate& coord);
84  unsigned int jepModuleOverlap(const Coordinate& coord);
85 public: // attributes
86  enum SubDet_ID {PPr=0x71, CP=0x72, JEP=0x73};
87 
88 private: // Private methods
90  void fillRoILocalMap();
96  unsigned int phiQuadrant(const double phi) const;
98  bool cpCoordIsValid(const Coordinate& coord) const;
100  double cpPhiOverlap(const Coordinate& coord) const;
102  double jepPhiOverlap(const Coordinate& coord) const;
103 
104 
105 private: //attribs
107  double m_cpmEtaWidth;
109  double m_cpmEtaMax;
111  double m_cpFPGAPhiWidth;
113  double m_cpEtaMax;
115  //double m_jemEtaWidth ;
117  unsigned int m_roiLocalMap[2][4];
119  static const unsigned int m_error=999;
120  bool m_debug;
121 
122 };
123 
124 #endif
125 }//end of ns
126 
LVL1::CoordToHardware::cpModuleOverlap
unsigned int cpModuleOverlap(const Coordinate &coord)
return ID of CP module for overlap coord
Definition: CoordToHardware.cxx:213
LVL1::CoordToHardware::cpCoordinateWord
unsigned int cpCoordinateWord(const Coordinate &coord)
return CP (Cluster Processing) hardware coordinate word for this coordinate.
Definition: CoordToHardware.cxx:174
LVL1::CoordToHardware::m_roiLocalMap
unsigned int m_roiLocalMap[2][4]
width of JEMs
Definition: CoordToHardware.h:127
LVL1::CoordToHardware::jepPhiOverlap
double jepPhiOverlap(const Coordinate &coord) const
returns a phi in core area for overlap jet elements
Definition: CoordToHardware.cxx:255
LVL1::CoordToHardware::m_cpmEtaMax
double m_cpmEtaMax
extreme value of eta, covered by CPMs.
Definition: CoordToHardware.h:119
LVL1::CoordToHardware::cpModuleFPGA
unsigned int cpModuleFPGA(const Coordinate &coord)
returns ID [0-7] of the CP FPGA.
Definition: CoordToHardware.cxx:74
LVL1::CoordToHardware::PPr
@ PPr
Definition: CoordToHardware.h:96
LVL1::CoordToHardware::phiQuadrant
unsigned int phiQuadrant(const double phi) const
returns the quadrant number associated with the phi coordinate,
Definition: CoordToHardware.cxx:164
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
LVL1::CoordToHardware::jepCoordinateWord
unsigned int jepCoordinateWord(const Coordinate &coord)
return JEP (Jet Energy Processing) hardware coordinate word for this coordinate.
Definition: CoordToHardware.cxx:140
LVL1::CoordToHardware::cpModuleLocalRoI
unsigned int cpModuleLocalRoI(const Coordinate &coord)
returns local RoI coordinate within FPGA
Definition: CoordToHardware.cxx:104
LVL1::CoordToHardware::cpPhiOverlap
double cpPhiOverlap(const Coordinate &coord) const
returns a phi in core area for overlap CPM towers
Definition: CoordToHardware.cxx:237
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
LVL1::CoordToHardware::cpCoordIsValid
bool cpCoordIsValid(const Coordinate &coord) const
returns false if Coord is outside permitted region
Definition: CoordToHardware.cxx:128
Coordinate.h
Coordinate policies.
LVL1::CoordToHardware::cpModule
unsigned int cpModule(const Coordinate &coord)
return ID of CP module.
Definition: CoordToHardware.cxx:52
LVL1::CoordToHardware::m_cpFPGAPhiWidth
double m_cpFPGAPhiWidth
phi width of CP FPGAs
Definition: CoordToHardware.h:121
Coordinate.h
LVL1::CoordToHardware::jepModuleOverlap
unsigned int jepModuleOverlap(const Coordinate &coord)
returns ID of JEP module (i.e.
Definition: CoordToHardware.cxx:229
LVL1::CoordToHardware::fillRoILocalMap
void fillRoILocalMap()
No descriptions.
Definition: CoordToHardware.cxx:91
LVL1::CoordToHardware::jepModule
unsigned int jepModule(const Coordinate &coord)
returns ID of JEP module (i.e.
Definition: CoordToHardware.cxx:67
LVL1::CoordToHardware::cpRoIROD
unsigned int cpRoIROD(const Coordinate &coord)
returns Module ID of CP RoI ROD
Definition: CoordToHardware.cxx:47
LVL1::CoordToHardware::SubDet_ID
SubDet_ID
Definition: CoordToHardware.h:96
LVL1::CoordToHardware::cpCrate
unsigned int cpCrate(const Coordinate &coord)
returns crate ID covering that coord.
Definition: CoordToHardware.cxx:39
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
LVL1::CoordToHardware::cpCrateOverlap
unsigned int cpCrateOverlap(const Coordinate &coord)
returns crate ID covering that overlap coord.
Definition: CoordToHardware.cxx:205
LVL1::CoordToHardware::JEP
@ JEP
Definition: CoordToHardware.h:96
JetEnergyModuleKey.h
LVL1::CoordToHardware::jepLocalCoordinate
unsigned int jepLocalCoordinate(const Coordinate &coord)
returns the roi's local coord, in the form of a 5b word.
Definition: CoordToHardware.cxx:195
LVL1::CoordToHardware::m_cpmEtaWidth
double m_cpmEtaWidth
eta width of CP modules (CPMs)
Definition: CoordToHardware.h:117
LVL1::CoordToHardware::~CoordToHardware
~CoordToHardware()
Definition: CoordToHardware.cxx:27
LVL1::CoordToHardware::jepCrate
unsigned int jepCrate(const Coordinate &Coord)
returns ID of JEP Crate that covers this coordinate
Definition: CoordToHardware.cxx:32
LVL1::CoordToHardware::jepCrateOverlap
unsigned int jepCrateOverlap(const Coordinate &coord)
returns ID of JEP Crate that covers this overlap coordinate
Definition: CoordToHardware.cxx:221
LVL1::CoordToHardware::m_error
static const unsigned int m_error
returned value in the case of an invalid Coordinate error
Definition: CoordToHardware.h:129
LVL1::CoordToHardware::CoordToHardware
CoordToHardware()
Definition: CoordToHardware.cxx:20
LVL1::CoordToHardware::m_debug
bool m_debug
Definition: CoordToHardware.h:130
LVL1::CoordToHardware::m_cpEtaMax
double m_cpEtaMax
contains the maximum permissable eta for CP system.
Definition: CoordToHardware.h:123