Classes | |
class | HDErrorNormException |
HepData exception relating to Error normalization. More... | |
class | HDException |
Generic HepData exception: may be a wrapper round another exception. More... | |
class | HDUnitException |
HepData exception relating to Unit conversions and other wranglings. More... | |
class | HDUtil |
General utilities for use with all HepData packages. More... | |
class | Unit |
A Unit is a combination of base unit terms, with a preferred power of 1000 multiple of the base unit for each term. More... | |
class | UnitTerm |
Representation of a term in a unit, expressed in terms of a scalefactor relative to a BaseUnit, and the power to which that base unit is raised. More... | |
Enumerations | |
enum | BaseUnit |
A semi-fundamental unit, expressed in terms of enums for particle physics units. More... | |
enum | SiPrefix |
SI prefixes as enums. More... |
enum BaseUnit |
A semi-fundamental unit, expressed in terms of enums for particle physics units.
This enum represents base units in a fairly abstract and uncomplicated form: these enums are used to identify terms in a units expression rather than to store numbers.
The base units are partially based on the CLHEP unit choices, with the exception that eV is used rather than MeV. The main reason for this choice is to pick suitable units without prefixes as the base units, and anyway there's confusion between the Fortran and C++ eras when it comes to the energy base units so we may as well add to the melee :-)
A word is probably helpful about some of the odder base units:
Definition at line 27 of file BaseUnit.java.
00027 { 00028 EV ("eV"), 00029 BARN ("b"), 00030 METRE ("m"), 00031 SECOND ("s"), 00032 CLIGHT ("c"), 00033 NUMBER ("num"), 00034 RADIAN ("rad"), 00035 DEGREE ("deg"); 00036 // STERADIAN ("sr"); 00037 private final String name; 00038 BaseUnit(String name) { this.name = name; } 00039 public String toString() { return name; } 00040 public String toHtmlString() { return toString(); } 00041 }
enum SiPrefix |
SI prefixes as enums.
YOTTA | |
ZETTA | |
EXA | |
PETA | |
TERA | |
GIGA | |
MEGA | |
KILO | |
UNIT | |
MILLI | |
MICRO | |
NANO | |
PICO | |
FEMTO | |
ATTO | |
ZEPTO | |
YOCTA |
Definition at line 6 of file SiPrefix.java.
00006 { 00007 YOTTA (24, "Y", "Y"), 00008 ZETTA (21, "Z", "Z"), 00009 EXA (18, "E", "E"), 00010 PETA (15, "P", "P"), 00011 TERA (12, "T", "T"), 00012 GIGA (9, "G", "G"), 00013 MEGA (6, "M", "M"), 00014 KILO (3, "k", "k"), 00015 UNIT (0, "", ""), 00016 MILLI (-3, "m", "m"), 00017 MICRO (-6, "u", "µ"), 00018 NANO (-9, "n", "n"), 00019 PICO (-12, "p", "p"), 00020 FEMTO (-15, "f", "f"), 00021 ATTO (-18, "a", "a"), 00022 ZEPTO (-21, "z", "z"), 00023 YOCTA (-24, "y", "y"); 00024 private final Integer powerOf10; 00025 private final String asciirep; 00026 private final String htmlrep; 00027 //private final String texrep; 00028 SiPrefix(Integer powerOf10, String asciirep, String htmlrep) { 00029 this.powerOf10 = powerOf10; 00030 this.asciirep = asciirep; 00031 this.htmlrep = htmlrep; 00032 } 00033 public Integer powerOf10() { return powerOf10; } 00034 public String toString() { return asciirep; } 00035 public String toHtmlString() { return htmlrep; } 00036 }