VGM Version 5.3
Loading...
Searching...
No Matches
Units.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef ROOT_GM_UNITS_H
21#define ROOT_GM_UNITS_H
22
23#include "VGM/common/Axis.h"
24
25namespace RootGM {
26
27class Units
28{
29 public:
30 // --> protected
31 // Units();
32 virtual ~Units();
33
34 //
35 // static get methods
36 //
37
40 static double Length();
41
44 static double Angle();
45
48 static double AxisUnit(VGM::Axis axis);
49
52 static double MassDensity();
53
56 static double AtomicWeight();
57
60 static double Temperature();
61
64 static double Pressure();
65
66 protected:
67 Units();
68 // only static data members and methods
69
70 private:
71 // static data members
72 static const double fgkLength;
73 static const double fgkAngle;
74 static const double fgkMassDensity;
75 static const double fgkAtomicWeight;
76 static const double fgkTemperature;
77 static const double fgkPressure;
78};
79
80} // namespace RootGM
81
82// inline methods
83
84inline double RootGM::Units::Length() { return fgkLength; }
85inline double RootGM::Units::Angle() { return fgkAngle; }
86inline double RootGM::Units::MassDensity() { return fgkMassDensity; }
87inline double RootGM::Units::AtomicWeight() { return fgkAtomicWeight; }
88inline double RootGM::Units::Temperature() { return fgkTemperature; }
89inline double RootGM::Units::Pressure() { return fgkPressure; }
90
91#endif // ROOT_GM_UNITS_H
Conversion from Root physical units to VGM units.
Definition Units.h:28
virtual ~Units()
Definition Units.cxx:42
static double AxisUnit(VGM::Axis axis)
Return Root unit for the given axis in VGM units.
Definition Units.cxx:52
static double Pressure()
Return Root pressure unit in VGM unit.
Definition Units.h:89
static double Length()
Return Root length unit in VGM units.
Definition Units.h:84
static double MassDensity()
Return Root mass density unit in VGM units.
Definition Units.h:86
static double Temperature()
Return Root temperature unit in VGM unit.
Definition Units.h:88
static double AtomicWeight()
Return Root atomic weight unit in VGM units.
Definition Units.h:87
static double Angle()
Return Root angle unit in VGM units.
Definition Units.h:85
VGM Axis enumeration.
VGM implementation for Root.
Definition axis.h:28