ATLAS Offline Software
TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
4 */
5 /***************************************************************************
6  Coordinate.h - description
7  -------------------
8  begin : 28/02/2002
9  email : e.moyse@qmul.ac.uk
10 ***************************************************************************/
11 
12 
13 #ifndef TRIGT1INTERFACES_COORDINATE_H
14 #define TRIGT1INTERFACES_COORDINATE_H
15 
16 // STL include(s):
17 #include <iosfwd>
18 
19 // Gaudi/Athena include(s):
20 #include "GaudiKernel/MsgStream.h"
21 
31 namespace LVL1 {
32 
33  class Coordinate;
34  std::ostream& operator<< ( std::ostream& theStream, const Coordinate& theCoord );
35  MsgStream& operator<< ( MsgStream& theStream, const Coordinate& theCoord );
36 
45  class Coordinate {
46 
47  public:
48  Coordinate( double phi, double eta );
49  Coordinate();
50  virtual ~Coordinate() = default;
51 
52  void setCoords( double phi, double eta );
53  double eta() const;
54  double phi() const;
55 
58  friend std::ostream& operator<< ( std::ostream& theStream, const Coordinate& theCoord );
59  friend MsgStream& operator<< ( MsgStream& theStream, const Coordinate& theCoord );
60 
61  protected:
62  void checkBounds();
63 
64  private:
65  double m_phi;
66  double m_eta;
67  static const double m_twoPi;
68 
69  }; // class Coordinate
70 
71 } // namespace LVL1
72 
73 #endif // TRIGT1INTERFACES_COORDINATE_H
LVL1::Coordinate::~Coordinate
virtual ~Coordinate()=default
LVL1::operator<<
std::ostream & operator<<(std::ostream &theStream, const Coordinate &theCoord)
overload << operator so coordinate can be easily displayed...
Definition: Coordinate.cxx:61
LVL1::Coordinate::phi
double phi() const
return phi
Definition: Coordinate.cxx:50
LVL1::Coordinate::m_twoPi
static const double m_twoPi
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:72
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
LVL1::Coordinate::checkBounds
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!
Definition: Coordinate.cxx:57
LVL1::Coordinate::operator<<
friend std::ostream & operator<<(std::ostream &theStream, const Coordinate &theCoord)
overload << operator so coordinate can be easily displayed...
LVL1::Coordinate::m_eta
double m_eta
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:71
LVL1::Coordinate::Coordinate
Coordinate()
Definition: Coordinate.cxx:30
LVL1::Coordinate::m_phi
double m_phi
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:70
LVL1::Coordinate::eta
double eta() const
return eta
Definition: Coordinate.cxx:45
LVL1::Coordinate::setCoords
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
Definition: Coordinate.cxx:36