#ifndef COORDINATETRAITS_H #define COORDINATETRAITS_H // $Id: CoordinateTraits.h,v 1.1 2005/09/19 14:22:38 brun Exp $ // // Coordinate System traits useful for testing purposes. // // For example, when reporting a problem, it is nice to be able // to present a human-readable name for the system. // // Created by: Mark Fischler at Mon May 30 12:21:43 2005 // // Last update: Wed Jun 1 2005 #include #include #include "Math/GenVector/Cartesian3D.h" #include "Math/GenVector/Cylindrical3D.h" #include "Math/GenVector/CylindricalEta3D.h" #include "Math/GenVector/Polar3D.h" #include "Math/GenVector/PxPyPzE4D.h" #include "Math/GenVector/PxPyPzM4D.h" #include "Math/GenVector/PtEtaPhiE4D.h" #include "Math/GenVector/PtEtaPhiM4D.h" namespace ROOT { namespace Math { template struct CoordinateTraits { static const std::string name() { std::string s = "NOT-A-COORDINATE-SYSTEM: "; s += typeid(C).name(); return s; } }; template struct CoordinateTraits < Cartesian3D >{ static const std::string name() { std::string s = "Cartesian Coordinates <"; s += typeid(Scalar).name(); s += "> (x, y, z)"; return s; } }; template struct CoordinateTraits < CylindricalEta3D >{ static const std::string name() { std::string s = "Cylindrical/Eta Coordinates <"; s += typeid(Scalar).name(); s += "> (rho, eta, phi)"; return s; } }; template struct CoordinateTraits < Cylindrical3D >{ static const std::string name() { std::string s = "Cylindrical Coordinates <"; s += typeid(Scalar).name(); s += "> (rho, z, phi)"; return s; } }; template struct CoordinateTraits < Polar3D >{ static const std::string name() { std::string s = "Polar Coordinates <"; s += typeid(Scalar).name(); s += "> (r, theta, phi)"; return s; } }; // 4D COORDINATES template struct CoordinateTraits < PxPyPzE4D >{ static const std::string name() { std::string s = "PxPyPzE4D Coordinates <"; s += typeid(Scalar).name(); s += "> (Px, Py, Pz, E)"; return s; } }; template struct CoordinateTraits < PxPyPzM4D >{ static const std::string name() { std::string s = "PxPyPzM4D Coordinates <"; s += typeid(Scalar).name(); s += "> (Px, Py, Pz, M)"; return s; } }; template struct CoordinateTraits < PtEtaPhiE4D >{ static const std::string name() { std::string s = "PtEtaPhiE4D4D Coordinates <"; s += typeid(Scalar).name(); s += "> (Pt, eta, phi, E)"; return s; } }; template struct CoordinateTraits < PtEtaPhiM4D >{ static const std::string name() { std::string s = "PtEtaPhiM4D4D Coordinates <"; s += typeid(Scalar).name(); s += "> (Pt, eta, phi, mass)"; return s; } }; } // namespace Math } // namespace ROOT #endif // COORDINATETRAITS_H