Geant4  10.00.p03
G4UnitsTable.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4UnitsTable.cc 67970 2013-03-13 10:10:06Z gcosmo $
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 //
31 // 17-05-98: first version, M.Maire
32 // 05-08-98: angstrom,microbarn,picobarn,petaelectronvolt, M.Maire
33 // 13-10-98: units and symbols printed in fixed length, M.Maire
34 // 01-03-01: parsec, M.Maire
35 // 06-03-01: migration to STL vectors, G.Cosmo
36 // 06-05-02: BestUnit operator<< flux instead of G4cout (mma)
37 // 12-08-05: cm2/g ("Surface/Mass") (mma)
38 // 30-06-05: um for micrometer (mma)
39 // 07-02-06: GeV/cm MeV/cm keV/cm eV/cm ("Energy/Length") (mma)
40 // 15-02-06: g/cm2 ("Mass/Surface")
41 // MeV*cm2/g ..etc.. ("Energy*Surface/Mass")
42 // 18-08-06: remove symbol mum (mma)
43 // 06-05-08: V/m ("Electric field") (mma)
44 // 09-08-10: new category "Solid angle" (mma)
45 //
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 
49 #include <iomanip>
50 #include <sstream>
51 
52 #include "G4UnitsTable.hh"
53 #include "G4SystemOfUnits.hh"
54 
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
60  const G4String& symbol,
61  const G4String& category, G4double value)
62  : Name(name),SymbolName(symbol),Value(value)
63 {
64  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
65 
66  // Does the Category objet already exist ?
67  //
68  size_t nbCat = pUnitsTable->size();
69  size_t i = 0;
70  while ((i<nbCat)&&((*pUnitsTable)[i]->GetName()!=category)) { i++; }
71  if (i == nbCat)
72  { pUnitsTable->push_back( new G4UnitsCategory(category)); }
73  CategoryIndex = i;
74 
75  // Insert this Unit in the Units table
76  //
77  ((*pUnitsTable)[CategoryIndex]->GetUnitsList()).push_back(this);
78 
79  // Update string max length for name and symbol
80  //
81  (*pUnitsTable)[i]->UpdateNameMxLen((G4int)name.length());
82  (*pUnitsTable)[i]->UpdateSymbMxLen((G4int)symbol.length());
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
88 {
89  if (!pUnitsTable) { delete pUnitsTable; pUnitsTable = 0; }
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
96  *this = right;
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 {
103  if (this != &right)
104  {
105  Name = right.Name;
106  SymbolName = right.SymbolName;
107  Value = right.Value;
109  }
110  return *this;
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114 
116 {
117  return (this == (G4UnitDefinition *) &right);
118 }
119 
120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121 
123 {
124  return (this != (G4UnitDefinition *) &right);
125 }
126 
127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
128 
130 {
131  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
132  if(pUnitsTable->size()==0) { BuildUnitsTable(); }
133  return *pUnitsTable;
134 }
135 
136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
137 
139 {
141  for (size_t i=0;i<(GetUnitsTable()).size();i++)
142  {
143  G4UnitsContainer& units = (*pUnitsTable)[i]->GetUnitsList();
144  for (size_t j=0;j<units.size();j++)
145  {
146  name=units[j]->GetName(); symbol=units[j]->GetSymbol();
147  if(str==name||str==symbol)
148  { return units[j]->GetValue(); }
149  }
150  }
151  std::ostringstream message;
152  message << "The unit '" << str << "' does not exist in the Units Table.";
153  G4Exception("G4UnitDefinition::GetValueOf()", "InvalidUnit",
154  JustWarning, message, "Returning Value = 0.");
155  return 0.;
156 }
157 
158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159 
161 {
163  for (size_t i=0;i<(GetUnitsTable()).size();i++)
164  {
165  G4UnitsContainer& units = (*pUnitsTable)[i]->GetUnitsList();
166  for (size_t j=0;j<units.size();j++)
167  {
168  name=units[j]->GetName(); symbol=units[j]->GetSymbol();
169  if(str==name||str==symbol)
170  { return (*pUnitsTable)[i]->GetName(); }
171  }
172  }
173  std::ostringstream message;
174  message << "The unit '" << str << "' does not exist in the Units Table.";
175  G4Exception("G4UnitDefinition::GetCategory()", "InvalidUnit",
176  JustWarning, message, "Returning Value = 0.");
177  name = "None";
178  return name;
179 }
180 
181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182 
184 {
185  G4int nameL = (*pUnitsTable)[CategoryIndex]->GetNameMxLen();
186  G4int symbL = (*pUnitsTable)[CategoryIndex]->GetSymbMxLen();
187  G4cout << std::setw(nameL) << Name << " ("
188  << std::setw(symbL) << SymbolName << ") = " << Value << G4endl;
189 }
190 
191 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
192 
194 {
195  //Length
196  new G4UnitDefinition( "parsec","pc" ,"Length",parsec);
197  new G4UnitDefinition( "kilometer","km" ,"Length",kilometer);
198  new G4UnitDefinition( "meter","m" ,"Length",meter);
199  new G4UnitDefinition("centimeter","cm" ,"Length",centimeter);
200  new G4UnitDefinition("millimeter","mm" ,"Length",millimeter);
201  new G4UnitDefinition("micrometer","um" ,"Length",micrometer);
202  new G4UnitDefinition( "nanometer","nm" ,"Length",nanometer);
203  new G4UnitDefinition( "angstrom","Ang" ,"Length",angstrom);
204  new G4UnitDefinition( "fermi","fm" ,"Length",fermi);
205 
206  //Surface
207  new G4UnitDefinition( "kilometer2","km2" ,"Surface",kilometer2);
208  new G4UnitDefinition( "meter2","m2" ,"Surface",meter2);
209  new G4UnitDefinition("centimeter2","cm2" ,"Surface",centimeter2);
210  new G4UnitDefinition("millimeter2","mm2" ,"Surface",millimeter2);
211  new G4UnitDefinition( "barn","barn" ,"Surface",barn);
212  new G4UnitDefinition( "millibarn","mbarn" ,"Surface",millibarn);
213  new G4UnitDefinition( "microbarn","mubarn" ,"Surface",microbarn);
214  new G4UnitDefinition( "nanobarn","nbarn" ,"Surface",nanobarn);
215  new G4UnitDefinition( "picobarn","pbarn" ,"Surface",picobarn);
216 
217  //Volume
218  new G4UnitDefinition( "kilometer3","km3" ,"Volume",kilometer3);
219  new G4UnitDefinition( "meter3","m3" ,"Volume",meter3);
220  new G4UnitDefinition("centimeter3","cm3" ,"Volume",centimeter3);
221  new G4UnitDefinition("millimeter3","mm3" ,"Volume",millimeter3);
222 
223  //Angle
224  new G4UnitDefinition( "radian","rad" ,"Angle",radian);
225  new G4UnitDefinition("milliradian","mrad" ,"Angle",milliradian);
226  new G4UnitDefinition( "degree","deg" ,"Angle",degree);
227 
228  //Solid angle
229  new G4UnitDefinition( "steradian","sr" ,"Solid angle",steradian);
230  new G4UnitDefinition("millisteradian","msr" ,"Solid angle",steradian*0.001);
231 
232  //Time
233  new G4UnitDefinition( "second","s" ,"Time",second);
234  new G4UnitDefinition("millisecond","ms" ,"Time",millisecond);
235  new G4UnitDefinition("microsecond","mus" ,"Time",microsecond);
236  new G4UnitDefinition( "nanosecond","ns" ,"Time",nanosecond);
237  new G4UnitDefinition( "picosecond","ps" ,"Time",picosecond);
238 
239  //Frequency
240  new G4UnitDefinition( "hertz","Hz" ,"Frequency",hertz);
241  new G4UnitDefinition("kilohertz","kHz" ,"Frequency",kilohertz);
242  new G4UnitDefinition("megahertz","MHz" ,"Frequency",megahertz);
243 
244  //Electric charge
245  new G4UnitDefinition( "eplus","e+" ,"Electric charge",eplus);
246  new G4UnitDefinition("coulomb","C" ,"Electric charge",coulomb);
247 
248  //Energy
249  new G4UnitDefinition( "electronvolt","eV" ,"Energy",electronvolt);
250  new G4UnitDefinition("kiloelectronvolt","keV","Energy",kiloelectronvolt);
251  new G4UnitDefinition("megaelectronvolt","MeV","Energy",megaelectronvolt);
252  new G4UnitDefinition("gigaelectronvolt","GeV","Energy",gigaelectronvolt);
253  new G4UnitDefinition("teraelectronvolt","TeV","Energy",teraelectronvolt);
254  new G4UnitDefinition("petaelectronvolt","PeV","Energy",petaelectronvolt);
255  new G4UnitDefinition( "joule","J" ,"Energy",joule);
256 
257  // Energy/Length
258  new G4UnitDefinition( "GeV/cm", "GeV/cm","Energy/Length", GeV/cm);
259  new G4UnitDefinition( "MeV/cm", "MeV/cm","Energy/Length", MeV/cm);
260  new G4UnitDefinition( "keV/cm", "keV/cm","Energy/Length", keV/cm);
261  new G4UnitDefinition( "eV/cm", "eV/cm","Energy/Length", eV/cm);
262 
263  //Mass
264  new G4UnitDefinition("milligram","mg","Mass",milligram);
265  new G4UnitDefinition( "gram","g" ,"Mass",gram);
266  new G4UnitDefinition( "kilogram","kg","Mass",kilogram);
267 
268  //Volumic Mass
269  new G4UnitDefinition( "g/cm3", "g/cm3","Volumic Mass", g/cm3);
270  new G4UnitDefinition("mg/cm3","mg/cm3","Volumic Mass",mg/cm3);
271  new G4UnitDefinition("kg/m3", "kg/m3", "Volumic Mass",kg/m3);
272 
273  // Mass/Surface
274  new G4UnitDefinition( "g/cm2", "g/cm2","Mass/Surface", g/cm2);
275  new G4UnitDefinition( "mg/cm2", "mg/cm2","Mass/Surface", mg/cm2);
276  new G4UnitDefinition( "kg/cm2", "kg/cm2","Mass/Surface", kg/cm2);
277 
278  // Surface/Mass
279  new G4UnitDefinition( "cm2/g", "cm2/g","Surface/Mass", cm2/g);
280 
281  // Energy.Surface/Mass
282  new G4UnitDefinition( "eV*cm2/g", " eV*cm2/g","Energy*Surface/Mass", eV*cm2/g);
283  new G4UnitDefinition("keV*cm2/g", "keV*cm2/g","Energy*Surface/Mass",keV*cm2/g);
284  new G4UnitDefinition("MeV*cm2/g", "MeV*cm2/g","Energy*Surface/Mass",MeV*cm2/g);
285  new G4UnitDefinition("GeV*cm2/g", "GeV*cm2/g","Energy*Surface/Mass",GeV*cm2/g);
286 
287  //Power
288  new G4UnitDefinition("watt","W","Power",watt);
289 
290  //Force
291  new G4UnitDefinition("newton","N","Force",newton);
292 
293  //Pressure
294  new G4UnitDefinition( "pascal","Pa" ,"Pressure",pascal);
295  new G4UnitDefinition( "bar","bar","Pressure",bar);
296  new G4UnitDefinition("atmosphere","atm","Pressure",atmosphere);
297 
298  //Electric current
299  new G4UnitDefinition( "ampere","A" ,"Electric current",ampere);
300  new G4UnitDefinition("milliampere","mA" ,"Electric current",milliampere);
301  new G4UnitDefinition("microampere","muA","Electric current",microampere);
302  new G4UnitDefinition( "nanoampere","nA" ,"Electric current",nanoampere);
303 
304  //Electric potential
305  new G4UnitDefinition( "volt","V" ,"Electric potential",volt);
306  new G4UnitDefinition("kilovolt","kV","Electric potential",kilovolt);
307  new G4UnitDefinition("megavolt","MV","Electric potential",megavolt);
308 
309  //Electric field
310  new G4UnitDefinition( "volt/m","V/m","Electric field",volt/m);
311 
312  //Magnetic flux
313  new G4UnitDefinition("weber","Wb","Magnetic flux",weber);
314 
315  //Magnetic flux density
316  new G4UnitDefinition( "tesla","T" ,"Magnetic flux density",tesla);
317  new G4UnitDefinition("kilogauss","kG","Magnetic flux density",kilogauss);
318  new G4UnitDefinition( "gauss","G" ,"Magnetic flux density",gauss);
319 
320  //Temperature
321  new G4UnitDefinition("kelvin","K","Temperature",kelvin);
322 
323  //Amount of substance
324  new G4UnitDefinition("mole","mol","Amount of substance",mole);
325 
326  //Activity
327  new G4UnitDefinition("becquerel","Bq","Activity",becquerel);
328  new G4UnitDefinition( "curie","Ci","Activity",curie);
329 
330  //Dose
331  new G4UnitDefinition("gray","Gy","Dose",gray);
332 }
333 
334 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
335 
337 {
338  G4cout << "\n ----- The Table of Units ----- \n";
339  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
340  for(size_t i=0;i<pUnitsTable->size();i++)
341  {
342  (*pUnitsTable)[i]->PrintCategory();
343  }
344 }
345 
346 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
347 
349 {
350  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
351  for (size_t i=0;i<pUnitsTable->size();i++)
352  {
353  delete (*pUnitsTable)[i];
354  }
355  pUnitsTable->clear();
356 }
357 
358 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
359 
361  : Name(name),UnitsList(),NameMxLen(0),SymbMxLen(0)
362 {
363 }
364 
365 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
366 
368 {
369  for(size_t i=0;i<UnitsList.size();i++)
370  {
371  delete UnitsList[i];
372  }
373  UnitsList.clear();
374 }
375 
376 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
377 
379 {
380  *this = right;
381 }
382 
383 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
384 
386 {
387  if (this != &right)
388  {
389  Name = right.Name;
390  UnitsList = right.UnitsList;
391  NameMxLen = right.NameMxLen;
392  SymbMxLen = right.SymbMxLen;
393  }
394  return *this;
395 }
396 
397 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
398 
400 {
401  return (this == (G4UnitsCategory *) &right);
402 }
403 
404 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
405 
407 {
408  return (this != (G4UnitsCategory *) &right);
409 }
410 
411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
412 
414 {
415  G4cout << "\n category: " << Name << G4endl;
416  for(size_t i=0;i<UnitsList.size();i++)
417  { UnitsList[i]->PrintDefinition(); }
418 }
419 
420 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
421 
422 G4BestUnit::G4BestUnit(G4double value, const G4String& category)
423  : nbOfVals(1)
424 {
425  // find the category
427  size_t nbCat = theUnitsTable.size();
428  size_t i = 0;
429  while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
430  if (i == nbCat)
431  {
432  G4cout << " G4BestUnit: the category " << category
433  << " does not exist !!" << G4endl;
434  G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall",
435  FatalException, "Missing unit category !") ;
436  }
437  //
438  Value[0] = value;
439  Value[1] = 0.;
440  Value[2] = 0.;
441  IndexOfCategory = i;
442 }
443 
444 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
445 
446 G4BestUnit::G4BestUnit(const G4ThreeVector& value, const G4String& category)
447  : nbOfVals(3)
448 {
449  // find the category
451  size_t nbCat = theUnitsTable.size();
452  size_t i = 0;
453  while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
454  if (i == nbCat)
455  {
456  G4cerr << " G4BestUnit: the category " << category
457  << " does not exist." << G4endl;
458  G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall",
459  FatalException, "Missing unit category !") ;
460  }
461  //
462  Value[0] = value.x();
463  Value[1] = value.y();
464  Value[2] = value.z();
465  IndexOfCategory = i;
466 }
467 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
468 
470 {}
471 
472 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
473 
474 G4BestUnit::operator G4String () const
475 {
476  std::ostringstream oss;
477  oss << *this;
478  return oss.str();
479 }
480 
481 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
482 
483 std::ostream& operator<<(std::ostream& flux, G4BestUnit a)
484 {
486  G4UnitsContainer& List = theUnitsTable[a.IndexOfCategory]
487  ->GetUnitsList();
488  G4int len = theUnitsTable[a.IndexOfCategory]->GetSymbMxLen();
489 
490  G4int ksup(-1), kinf(-1);
491  G4double umax(0.), umin(DBL_MAX);
492  G4double rsup(DBL_MAX), rinf(0.);
493 
494  //for a ThreeVector, choose the best unit for the biggest value
495  G4double value = std::max(std::max(std::fabs(a.Value[0]),
496  std::fabs(a.Value[1])),
497  std::fabs(a.Value[2]));
498 
499  for (size_t k=0; k<List.size(); k++)
500  {
501  G4double unit = List[k]->GetValue();
502  if (!(value!=DBL_MAX))
503  {if(unit>umax) {umax=unit; ksup=k;}}
504  else if (value<=DBL_MIN)
505  {if(unit<umin) {umin=unit; kinf=k;}}
506  else
507  {
508  G4double ratio = value/unit;
509  if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=k;}
510  if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=k;}
511  }
512  }
513 
514  G4int index=ksup;
515  if(index==-1) { index=kinf; }
516  if(index==-1) { index=0; }
517 
518  for (G4int j=0; j<a.nbOfVals; j++)
519  { flux << a.Value[j]/(List[index]->GetValue()) << " "; }
520 
521  std::ios::fmtflags oldform = flux.flags();
522 
523  flux.setf(std::ios::left,std::ios::adjustfield);
524  flux << std::setw(len) << List[index]->GetSymbol();
525  flux.flags(oldform);
526 
527  return flux;
528 }
529 
530 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static const double cm
Definition: G4SIunits.hh:106
static const double kilometer3
Definition: G4SIunits.hh:86
static const double megavolt
Definition: G4SIunits.hh:221
static const double gram
Definition: G4SIunits.hh:157
G4UnitsCategory & operator=(const G4UnitsCategory &)
static void BuildUnitsTable()
static const double MeV
Definition: G4SIunits.hh:193
G4String symbol
Definition: TRTMaterials.hh:40
static const double megaelectronvolt
Definition: G4SIunits.hh:187
G4int operator==(const G4UnitsCategory &) const
static const double cm2
Definition: G4SIunits.hh:107
static const double kilometer
Definition: G4SIunits.hh:84
static const double nanobarn
Definition: G4SIunits.hh:98
CLHEP::Hep3Vector G4ThreeVector
static const double milligram
Definition: G4SIunits.hh:158
static const double m3
Definition: G4SIunits.hh:112
static const double nanometer
Definition: G4SIunits.hh:91
std::ostream & operator<<(std::ostream &flux, G4BestUnit a)
static const double volt
Definition: G4SIunits.hh:223
G4UnitDefinition & operator=(const G4UnitDefinition &)
G4BestUnit(G4double internalValue, const G4String &category)
G4String name
Definition: TRTMaterials.hh:40
static const double millimeter3
Definition: G4SIunits.hh:78
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:59
static const double microbarn
Definition: G4SIunits.hh:97
static const double joule
Definition: G4SIunits.hh:183
static const double centimeter3
Definition: G4SIunits.hh:82
static const double kilohertz
Definition: G4SIunits.hh:145
G4double a
Definition: TRTMaterials.hh:39
static const double parsec
Definition: G4SIunits.hh:88
static const double mg
Definition: G4SIunits.hh:163
#define G4ThreadLocal
Definition: tls.hh:52
static G4ThreadLocal G4UnitsTable * pUnitsTable
G4UnitsCategory(const G4String &name)
int G4int
Definition: G4Types.hh:78
static const double watt
Definition: G4SIunits.hh:203
static const double newton
Definition: G4SIunits.hh:208
static const double steradian
Definition: G4SIunits.hh:127
static const double centimeter2
Definition: G4SIunits.hh:81
static const double microsecond
Definition: G4SIunits.hh:141
static const double millimeter2
Definition: G4SIunits.hh:77
static const double kiloelectronvolt
Definition: G4SIunits.hh:186
static G4double GetValueOf(const G4String &)
G4GLOB_DLL std::ostream G4cout
static const double megahertz
Definition: G4SIunits.hh:146
static const double electronvolt
Definition: G4SIunits.hh:185
static const double meter2
Definition: G4SIunits.hh:73
static const double meter
Definition: G4SIunits.hh:72
G4int nbOfVals
static const double coulomb
Definition: G4SIunits.hh:176
G4UnitDefinition(const G4String &name, const G4String &symbol, const G4String &category, G4double value)
Definition: G4UnitsTable.cc:59
static const double becquerel
Definition: G4SIunits.hh:270
G4int operator!=(const G4UnitsCategory &) const
static const double cm3
Definition: G4SIunits.hh:108
static const double kg
Definition: G4SIunits.hh:161
static const double second
Definition: G4SIunits.hh:138
static const double GeV
Definition: G4SIunits.hh:196
static const double bar
Definition: G4SIunits.hh:215
static const double millisecond
Definition: G4SIunits.hh:140
static const double teraelectronvolt
Definition: G4SIunits.hh:189
static const double hertz
Definition: G4SIunits.hh:144
static const double nanoampere
Definition: G4SIunits.hh:171
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const double kelvin
Definition: G4SIunits.hh:260
static const double curie
Definition: G4SIunits.hh:271
static void ClearUnitsTable()
static G4UnitsTable & GetUnitsTable()
#define pascal
Definition: G4SIunits.hh:213
static const double gray
Definition: G4SIunits.hh:276
G4double Value[3]
static const double kilovolt
Definition: G4SIunits.hh:222
static G4String GetCategory(const G4String &)
static const double centimeter
Definition: G4SIunits.hh:80
static const double micrometer
Definition: G4SIunits.hh:90
static const double eV
Definition: G4SIunits.hh:194
static const double nanosecond
Definition: G4SIunits.hh:139
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static const double kilogram
Definition: G4SIunits.hh:156
static const double g
Definition: G4SIunits.hh:162
static const double gauss
Definition: G4SIunits.hh:249
static const double atmosphere
Definition: G4SIunits.hh:216
static const double gigaelectronvolt
Definition: G4SIunits.hh:188
#define DBL_MIN
Definition: templates.hh:75
static const double petaelectronvolt
Definition: G4SIunits.hh:190
G4int operator!=(const G4UnitDefinition &) const
static const double millibarn
Definition: G4SIunits.hh:96
static const double degree
Definition: G4SIunits.hh:125
G4int operator==(const G4UnitDefinition &) const
static const double milliampere
Definition: G4SIunits.hh:169
static void PrintUnitsTable()
const G4String & GetName() const
static const double mole
Definition: G4SIunits.hh:265
static const double millimeter
Definition: G4SIunits.hh:76
static const double radian
Definition: G4SIunits.hh:123
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:110
static const double keV
Definition: G4SIunits.hh:195
static const double barn
Definition: G4SIunits.hh:95
static const double picosecond
Definition: G4SIunits.hh:142
static const double tesla
Definition: G4SIunits.hh:247
double G4double
Definition: G4Types.hh:76
std::vector< G4UnitDefinition * > G4UnitsContainer
static const double eplus
Definition: G4SIunits.hh:178
static const double kilogauss
Definition: G4SIunits.hh:250
#define DBL_MAX
Definition: templates.hh:83
static const double microampere
Definition: G4SIunits.hh:170
size_t IndexOfCategory
static const double ampere
Definition: G4SIunits.hh:168
static const double milliradian
Definition: G4SIunits.hh:124
static const double fermi
Definition: G4SIunits.hh:93
static const double meter3
Definition: G4SIunits.hh:74
static const double weber
Definition: G4SIunits.hh:242
static const double kilometer2
Definition: G4SIunits.hh:85
G4UnitsContainer UnitsList
G4GLOB_DLL std::ostream G4cerr
static const double angstrom
Definition: G4SIunits.hh:92
static const double picobarn
Definition: G4SIunits.hh:99