DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Vector2D.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : F.Gaede
11 //
12 //==========================================================================
13 #ifndef DDREC_VECTOR2D_H
14 #define DDREC_VECTOR2D_H 1
15 
16 namespace dd4hep {
17  namespace rec {
18 
23  class Vector2D
24  {
25  public:
26  Vector2D() : _u(0.), _v(0.) {}
27  Vector2D(double u_val, double v_val) : _u(u_val), _v(v_val) {}
28 
29  double operator[](unsigned i) const
30  {
31  return i == 0 ? _u : _v ;
32  }
33 
34  double u() const { return _u ; }
35 
36  double v() const { return _v ; }
37 
38  double& u() { return _u; }
39  double& v() { return _v; }
40 
41  private:
42  double _u, _v ;
43 
44  };
45  } } // namespace
46 
47 
48 
49 
50 #endif
dd4hep::rec::Vector2D::_u
double _u
Definition: Vector2D.h:42
dd4hep::rec::Vector2D::Vector2D
Vector2D(double u_val, double v_val)
Definition: Vector2D.h:27
dd4hep::rec::Vector2D::v
double v() const
Definition: Vector2D.h:36
dd4hep::rec::Vector2D::u
double & u()
Definition: Vector2D.h:38
dd4hep::rec::Vector2D::operator[]
double operator[](unsigned i) const
Definition: Vector2D.h:29
dd4hep::rec::Vector2D::u
double u() const
Definition: Vector2D.h:34
dd4hep::rec::Vector2D
Definition: Vector2D.h:24
dd4hep::rec::Vector2D::_v
double _v
Definition: Vector2D.h:42
dd4hep::rec::Vector2D::Vector2D
Vector2D()
Definition: Vector2D.h:26
dd4hep::rec::Vector2D::v
double & v()
Definition: Vector2D.h:39
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28