Logo ROOT   6.10/09
Reference Guide
CoordinateTraits.h
Go to the documentation of this file.
1 #ifndef COORDINATETRAITS_H
2 #define COORDINATETRAITS_H
3 
4 // $Id: CoordinateTraits.h,v 1.1 2005/09/19 14:22:38 brun Exp $
5 //
6 // Coordinate System traits useful for testing purposes.
7 //
8 // For example, when reporting a problem, it is nice to be able
9 // to present a human-readable name for the system.
10 //
11 // Created by: Mark Fischler at Mon May 30 12:21:43 2005
12 //
13 // Last update: Wed Jun 1 2005
14 
15 #include <string>
16 #include <typeinfo>
20 #include "Math/GenVector/Polar3D.h"
25 
26 namespace ROOT {
27 namespace Math {
28 
29 template <class C>
31  static const std::string name() {
32  std::string s = "NOT-A-COORDINATE-SYSTEM: ";
33  s += typeid(C).name();
34  return s;
35  }
36 };
37 
38 template <class Scalar>
40  static const std::string name() {
41  std::string s = "Cartesian Coordinates <";
42  s += typeid(Scalar).name();
43  s += "> (x, y, z)";
44  return s;
45  }
46 };
47 
48 template <class Scalar>
50  static const std::string name() {
51  std::string s = "Cylindrical/Eta Coordinates <";
52  s += typeid(Scalar).name();
53  s += "> (rho, eta, phi)";
54  return s;
55  }
56 };
57 
58 template <class Scalar>
60  static const std::string name() {
61  std::string s = "Cylindrical Coordinates <";
62  s += typeid(Scalar).name();
63  s += "> (rho, z, phi)";
64  return s;
65  }
66 };
67 
68 template <class Scalar>
70  static const std::string name() {
71  std::string s = "Polar Coordinates <";
72  s += typeid(Scalar).name();
73  s += "> (r, theta, phi)";
74  return s;
75  }
76 };
77 
78  // 4D COORDINATES
79 
80 template <class Scalar>
82  static const std::string name() {
83  std::string s = "PxPyPzE4D Coordinates <";
84  s += typeid(Scalar).name();
85  s += "> (Px, Py, Pz, E)";
86  return s;
87  }
88 };
89 
90 template <class Scalar>
92  static const std::string name() {
93  std::string s = "PxPyPzM4D Coordinates <";
94  s += typeid(Scalar).name();
95  s += "> (Px, Py, Pz, M)";
96  return s;
97  }
98 };
99 
100 template <class Scalar>
102  static const std::string name() {
103  std::string s = "PtEtaPhiE4D4D Coordinates <";
104  s += typeid(Scalar).name();
105  s += "> (Pt, eta, phi, E)";
106  return s;
107  }
108 };
109 
110 template <class Scalar>
112  static const std::string name() {
113  std::string s = "PtEtaPhiM4D4D Coordinates <";
114  s += typeid(Scalar).name();
115  s += "> (Pt, eta, phi, mass)";
116  return s;
117  }
118 };
119 
120 
121 } // namespace Math
122 } // namespace ROOT
123 
124 #endif // COORDINATETRAITS_H
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho...
Definition: PtEtaPhiE4D.h:52
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and M (mass) The metric used ...
Definition: PtEtaPhiM4D.h:52
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Class describing a cylindrical coordinate system based on eta (pseudorapidity) instead of z...
Class describing a 3D cartesian coordinate system (x, y, z coordinates)
Definition: Cartesian3D.h:44
Class describing a cylindrical coordinate system based on rho, z and phi.
Definition: Cylindrical3D.h:40
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Definition: PxPyPzE4D.h:42
Class describing a 4D coordinate system or momentum-energy vectors stored as (Px, Py...
Definition: PxPyPzM4D.h:47
static const std::string name()
static double C[]
Namespace for new Math classes and functions.
Rotation3D::Scalar Scalar
Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the r...
Definition: Polar3D.h:43