ATLAS Offline Software
ChannelCoordinate.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT1CALOMAPPINGTOOLS_CHANNELCOORDINATE_H
6 #define TRIGT1CALOMAPPINGTOOLS_CHANNELCOORDINATE_H
7 
8 #include <string>
9 
10 namespace LVL1 {
11 
20 
21  public:
22 
23  enum CaloLayer { NONE, EM, HAD, FCAL2, FCAL3 };
24 
26  ChannelCoordinate(CaloLayer layer, double eta, double phi,
27  double etaGran, double phiGran);
28 
29  // Getters
30  CaloLayer layer() const;
31  double eta() const;
32  double phi() const;
33  double etaGranularity() const;
34  double phiGranularity() const;
35 
36  // Setters
37  void setLayer(CaloLayer layer);
38  void setEta(double eta);
39  void setPhi(double phi);
40  void setEtaGranularity(double etaGran);
41  void setPhiGranularity(double phiGran);
42 
44  static std::string layerName(CaloLayer layer);
45 
46  private:
47 
49  double m_eta;
50  double m_phi;
51  double m_etaGran;
52  double m_phiGran;
53 
54 };
55 
57 {
58  return m_layer;
59 }
60 
61 inline double ChannelCoordinate::eta() const
62 {
63  return m_eta;
64 }
65 
66 inline double ChannelCoordinate::phi() const
67 {
68  return m_phi;
69 }
70 
71 inline double ChannelCoordinate::etaGranularity() const
72 {
73  return m_etaGran;
74 }
75 
76 inline double ChannelCoordinate::phiGranularity() const
77 {
78  return m_phiGran;
79 }
80 
83 {
84  m_layer = layer;
85 }
86 
87 inline void ChannelCoordinate::setEta(const double eta)
88 {
89  m_eta = eta;
90 }
91 
92 inline void ChannelCoordinate::setPhi(const double phi)
93 {
94  m_phi = phi;
95 }
96 
97 inline void ChannelCoordinate::setEtaGranularity(const double etaGran)
98 {
99  m_etaGran = etaGran;
100 }
101 
102 inline void ChannelCoordinate::setPhiGranularity(const double phiGran)
103 {
104  m_phiGran = phiGran;
105 }
106 
107 } // end namespace
108 
109 #endif
LVL1::ChannelCoordinate::etaGranularity
double etaGranularity() const
Definition: ChannelCoordinate.h:71
LVL1::ChannelCoordinate::m_layer
CaloLayer m_layer
calo layer
Definition: ChannelCoordinate.h:48
LVL1::ChannelCoordinate::m_etaGran
double m_etaGran
eta granularity
Definition: ChannelCoordinate.h:51
LVL1::ChannelCoordinate::setPhi
void setPhi(double phi)
Definition: ChannelCoordinate.h:92
LVL1::ChannelCoordinate::ChannelCoordinate
ChannelCoordinate()
Definition: ChannelCoordinate.cxx:10
LVL1::ChannelCoordinate::setEta
void setEta(double eta)
Definition: ChannelCoordinate.h:87
LVL1::ChannelCoordinate::phi
double phi() const
Definition: ChannelCoordinate.h:66
LVL1::ChannelCoordinate::layer
CaloLayer layer() const
Definition: ChannelCoordinate.h:56
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::ChannelCoordinate::EM
@ EM
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::setEtaGranularity
void setEtaGranularity(double etaGran)
Definition: ChannelCoordinate.h:97
LVL1::ChannelCoordinate
Holds eta/phi coordinates corresponding to a crate/module channel.
Definition: ChannelCoordinate.h:19
LVL1::ChannelCoordinate::FCAL3
@ FCAL3
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::layerName
static std::string layerName(CaloLayer layer)
Return layer name.
Definition: ChannelCoordinate.cxx:22
LVL1::ChannelCoordinate::m_eta
double m_eta
central eta
Definition: ChannelCoordinate.h:49
LVL1::ChannelCoordinate::m_phi
double m_phi
central phi
Definition: ChannelCoordinate.h:50
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::ChannelCoordinate::phiGranularity
double phiGranularity() const
Definition: ChannelCoordinate.h:76
LVL1::ChannelCoordinate::NONE
@ NONE
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::setPhiGranularity
void setPhiGranularity(double phiGran)
Definition: ChannelCoordinate.h:102
LVL1::ChannelCoordinate::CaloLayer
CaloLayer
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::FCAL2
@ FCAL2
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::eta
double eta() const
Definition: ChannelCoordinate.h:61
LVL1::ChannelCoordinate::setLayer
void setLayer(CaloLayer layer)
Definition: ChannelCoordinate.h:81
LVL1::ChannelCoordinate::HAD
@ HAD
Definition: ChannelCoordinate.h:23
LVL1::ChannelCoordinate::m_phiGran
double m_phiGran
phi granularity
Definition: ChannelCoordinate.h:52