Geant4  10.02
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 94074 2015-11-05 14:56:40Z 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  new G4UnitDefinition( "liter","L" ,"Volume",liter);
224  new G4UnitDefinition( "dL","dL" ,"Volume",dL);
225  new G4UnitDefinition( "cL","cL" ,"Volume",cL);
226  new G4UnitDefinition( "mL","mL" ,"Volume",mL);
227 
228  //Angle
229  new G4UnitDefinition( "radian","rad" ,"Angle",radian);
230  new G4UnitDefinition("milliradian","mrad" ,"Angle",milliradian);
231  new G4UnitDefinition( "degree","deg" ,"Angle",degree);
232 
233  //Solid angle
234  new G4UnitDefinition( "steradian","sr" ,"Solid angle",steradian);
235  new G4UnitDefinition("millisteradian","msr" ,"Solid angle",steradian*0.001);
236 
237  //Time
238  new G4UnitDefinition( "second","s" ,"Time",second);
239  new G4UnitDefinition("millisecond","ms" ,"Time",millisecond);
240  new G4UnitDefinition("microsecond","mus" ,"Time",microsecond);
241  new G4UnitDefinition( "nanosecond","ns" ,"Time",nanosecond);
242  new G4UnitDefinition( "picosecond","ps" ,"Time",picosecond);
243 
244  //Frequency
245  new G4UnitDefinition( "hertz","Hz" ,"Frequency",hertz);
246  new G4UnitDefinition("kilohertz","kHz" ,"Frequency",kilohertz);
247  new G4UnitDefinition("megahertz","MHz" ,"Frequency",megahertz);
248 
249  //Electric charge
250  new G4UnitDefinition( "eplus","e+" ,"Electric charge",eplus);
251  new G4UnitDefinition("coulomb","C" ,"Electric charge",coulomb);
252 
253  //Energy
254  new G4UnitDefinition( "electronvolt","eV" ,"Energy",electronvolt);
255  new G4UnitDefinition("kiloelectronvolt","keV","Energy",kiloelectronvolt);
256  new G4UnitDefinition("megaelectronvolt","MeV","Energy",megaelectronvolt);
257  new G4UnitDefinition("gigaelectronvolt","GeV","Energy",gigaelectronvolt);
258  new G4UnitDefinition("teraelectronvolt","TeV","Energy",teraelectronvolt);
259  new G4UnitDefinition("petaelectronvolt","PeV","Energy",petaelectronvolt);
260  new G4UnitDefinition( "joule","J" ,"Energy",joule);
261 
262  // Energy/Length
263  new G4UnitDefinition( "GeV/cm", "GeV/cm","Energy/Length", GeV/cm);
264  new G4UnitDefinition( "MeV/cm", "MeV/cm","Energy/Length", MeV/cm);
265  new G4UnitDefinition( "keV/cm", "keV/cm","Energy/Length", keV/cm);
266  new G4UnitDefinition( "eV/cm", "eV/cm","Energy/Length", eV/cm);
267 
268  //Mass
269  new G4UnitDefinition("milligram","mg","Mass",milligram);
270  new G4UnitDefinition( "gram","g" ,"Mass",gram);
271  new G4UnitDefinition( "kilogram","kg","Mass",kilogram);
272 
273  //Volumic Mass
274  new G4UnitDefinition( "g/cm3", "g/cm3","Volumic Mass", g/cm3);
275  new G4UnitDefinition("mg/cm3","mg/cm3","Volumic Mass",mg/cm3);
276  new G4UnitDefinition("kg/m3", "kg/m3", "Volumic Mass",kg/m3);
277 
278  // Mass/Surface
279  new G4UnitDefinition( "g/cm2", "g/cm2","Mass/Surface", g/cm2);
280  new G4UnitDefinition( "mg/cm2", "mg/cm2","Mass/Surface", mg/cm2);
281  new G4UnitDefinition( "kg/cm2", "kg/cm2","Mass/Surface", kg/cm2);
282 
283  // Surface/Mass
284  new G4UnitDefinition( "cm2/g", "cm2/g","Surface/Mass", cm2/g);
285 
286  // Energy.Surface/Mass
287  new G4UnitDefinition( "eV*cm2/g", " eV*cm2/g","Energy*Surface/Mass", eV*cm2/g);
288  new G4UnitDefinition("keV*cm2/g", "keV*cm2/g","Energy*Surface/Mass",keV*cm2/g);
289  new G4UnitDefinition("MeV*cm2/g", "MeV*cm2/g","Energy*Surface/Mass",MeV*cm2/g);
290  new G4UnitDefinition("GeV*cm2/g", "GeV*cm2/g","Energy*Surface/Mass",GeV*cm2/g);
291 
292  //Power
293  new G4UnitDefinition("watt","W","Power",watt);
294 
295  //Force
296  new G4UnitDefinition("newton","N","Force",newton);
297 
298  //Pressure
299  new G4UnitDefinition( "pascal","Pa" ,"Pressure",pascal);
300  new G4UnitDefinition( "bar","bar","Pressure",bar);
301  new G4UnitDefinition("atmosphere","atm","Pressure",atmosphere);
302 
303  //Electric current
304  new G4UnitDefinition( "ampere","A" ,"Electric current",ampere);
305  new G4UnitDefinition("milliampere","mA" ,"Electric current",milliampere);
306  new G4UnitDefinition("microampere","muA","Electric current",microampere);
307  new G4UnitDefinition( "nanoampere","nA" ,"Electric current",nanoampere);
308 
309  //Electric potential
310  new G4UnitDefinition( "volt","V" ,"Electric potential",volt);
311  new G4UnitDefinition("kilovolt","kV","Electric potential",kilovolt);
312  new G4UnitDefinition("megavolt","MV","Electric potential",megavolt);
313 
314  //Electric field
315  new G4UnitDefinition( "volt/m","V/m","Electric field",volt/m);
316 
317  //Magnetic flux
318  new G4UnitDefinition("weber","Wb","Magnetic flux",weber);
319 
320  //Magnetic flux density
321  new G4UnitDefinition( "tesla","T" ,"Magnetic flux density",tesla);
322  new G4UnitDefinition("kilogauss","kG","Magnetic flux density",kilogauss);
323  new G4UnitDefinition( "gauss","G" ,"Magnetic flux density",gauss);
324 
325  //Temperature
326  new G4UnitDefinition("kelvin","K","Temperature",kelvin);
327 
328  //Amount of substance
329  new G4UnitDefinition("mole","mol","Amount of substance",mole);
330  new G4UnitDefinition("g/mole","g/mol","Molar mass",g/mole);
331 
332  //Activity
333  new G4UnitDefinition("becquerel","Bq","Activity",becquerel);
334  new G4UnitDefinition( "curie","Ci","Activity",curie);
335 
336  //Dose
337  new G4UnitDefinition("gray","Gy","Dose",gray);
338 }
339 
340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
341 
343 {
344  G4cout << "\n ----- The Table of Units ----- \n";
345  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
346  for(size_t i=0;i<pUnitsTable->size();i++)
347  {
348  (*pUnitsTable)[i]->PrintCategory();
349  }
350 }
351 
352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
353 
355 {
356  if (!pUnitsTable) { pUnitsTable = new G4UnitsTable; }
357  for (size_t i=0;i<pUnitsTable->size();i++)
358  {
359  delete (*pUnitsTable)[i];
360  }
361  pUnitsTable->clear();
362 }
363 
364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
365 
367  : Name(name),UnitsList(),NameMxLen(0),SymbMxLen(0)
368 {
369 }
370 
371 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
372 
374 {
375  for(size_t i=0;i<UnitsList.size();i++)
376  {
377  delete UnitsList[i];
378  }
379  UnitsList.clear();
380 }
381 
382 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
383 
385 {
386  *this = right;
387 }
388 
389 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
390 
392 {
393  if (this != &right)
394  {
395  Name = right.Name;
396  UnitsList = right.UnitsList;
397  NameMxLen = right.NameMxLen;
398  SymbMxLen = right.SymbMxLen;
399  }
400  return *this;
401 }
402 
403 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
404 
406 {
407  return (this == (G4UnitsCategory *) &right);
408 }
409 
410 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
411 
413 {
414  return (this != (G4UnitsCategory *) &right);
415 }
416 
417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
418 
420 {
421  G4cout << "\n category: " << Name << G4endl;
422  for(size_t i=0;i<UnitsList.size();i++)
423  { UnitsList[i]->PrintDefinition(); }
424 }
425 
426 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
427 
428 G4BestUnit::G4BestUnit(G4double value, const G4String& category)
429  : nbOfVals(1)
430 {
431  // find the category
433  size_t nbCat = theUnitsTable.size();
434  size_t i = 0;
435  while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
436  if (i == nbCat)
437  {
438  G4cout << " G4BestUnit: the category " << category
439  << " does not exist !!" << G4endl;
440  G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall",
441  FatalException, "Missing unit category !") ;
442  }
443  //
444  Value[0] = value;
445  Value[1] = 0.;
446  Value[2] = 0.;
447  IndexOfCategory = i;
448 }
449 
450 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
451 
452 G4BestUnit::G4BestUnit(const G4ThreeVector& value, const G4String& category)
453  : nbOfVals(3)
454 {
455  // find the category
457  size_t nbCat = theUnitsTable.size();
458  size_t i = 0;
459  while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
460  if (i == nbCat)
461  {
462  G4cerr << " G4BestUnit: the category " << category
463  << " does not exist." << G4endl;
464  G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall",
465  FatalException, "Missing unit category !") ;
466  }
467  //
468  Value[0] = value.x();
469  Value[1] = value.y();
470  Value[2] = value.z();
471  IndexOfCategory = i;
472 }
473 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
474 
476 {}
477 
478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
479 
480 G4BestUnit::operator G4String () const
481 {
482  std::ostringstream oss;
483  oss << *this;
484  return oss.str();
485 }
486 
487 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
488 
489 std::ostream& operator<<(std::ostream& flux, G4BestUnit a)
490 {
492  G4UnitsContainer& List = theUnitsTable[a.IndexOfCategory]
493  ->GetUnitsList();
494  G4int len = theUnitsTable[a.IndexOfCategory]->GetSymbMxLen();
495 
496  G4int ksup(-1), kinf(-1);
497  G4double umax(0.), umin(DBL_MAX);
498  G4double rsup(DBL_MAX), rinf(0.);
499 
500  //for a ThreeVector, choose the best unit for the biggest value
501  G4double value = std::max(std::max(std::fabs(a.Value[0]),
502  std::fabs(a.Value[1])),
503  std::fabs(a.Value[2]));
504 
505  for (size_t k=0; k<List.size(); k++)
506  {
507  G4double unit = List[k]->GetValue();
508  if (!(value!=DBL_MAX))
509  {if(unit>umax) {umax=unit; ksup=k;}}
510  else if (value<=DBL_MIN)
511  {if(unit<umin) {umin=unit; kinf=k;}}
512  else
513  {
514  G4double ratio = value/unit;
515  if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=k;}
516  if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=k;}
517  }
518  }
519 
520  G4int index=ksup;
521  if(index==-1) { index=kinf; }
522  if(index==-1) { index=0; }
523 
524  for (G4int j=0; j<a.nbOfVals; j++)
525  { flux << a.Value[j]/(List[index]->GetValue()) << " "; }
526 
527  std::ios::fmtflags oldform = flux.flags();
528 
529  flux.setf(std::ios::left,std::ios::adjustfield);
530  flux << std::setw(len) << List[index]->GetSymbol();
531  flux.flags(oldform);
532 
533  return flux;
534 }
535 
536 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static const double cm
Definition: G4SIunits.hh:118
static const double kilometer3
Definition: G4SIunits.hh:95
static const double megavolt
Definition: G4SIunits.hh:239
static const double gram
Definition: G4SIunits.hh:175
G4UnitsCategory & operator=(const G4UnitsCategory &)
static void BuildUnitsTable()
static const double MeV
Definition: G4SIunits.hh:211
G4String symbol
Definition: TRTMaterials.hh:40
static const double megaelectronvolt
Definition: G4SIunits.hh:205
G4int operator==(const G4UnitsCategory &) const
static const double cm2
Definition: G4SIunits.hh:119
static const double kilometer
Definition: G4SIunits.hh:93
static const double nanobarn
Definition: G4SIunits.hh:107
CLHEP::Hep3Vector G4ThreeVector
static const double milligram
Definition: G4SIunits.hh:176
static const double liter
Definition: G4SIunits.hh:122
static const double m3
Definition: G4SIunits.hh:130
static const double nanometer
Definition: G4SIunits.hh:100
std::ostream & operator<<(std::ostream &flux, G4BestUnit a)
static const double volt
Definition: G4SIunits.hh:241
G4UnitDefinition & operator=(const G4UnitDefinition &)
G4BestUnit(G4double internalValue, const G4String &category)
G4String name
Definition: TRTMaterials.hh:40
static const double millimeter3
Definition: G4SIunits.hh:87
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:59
static const double microbarn
Definition: G4SIunits.hh:106
static const double joule
Definition: G4SIunits.hh:201
static const double centimeter3
Definition: G4SIunits.hh:91
static const double kilohertz
Definition: G4SIunits.hh:163
G4double a
Definition: TRTMaterials.hh:39
static const double parsec
Definition: G4SIunits.hh:97
static const double mg
Definition: G4SIunits.hh:181
#define G4ThreadLocal
Definition: tls.hh:89
static G4ThreadLocal G4UnitsTable * pUnitsTable
G4UnitsCategory(const G4String &name)
int G4int
Definition: G4Types.hh:78
static const double watt
Definition: G4SIunits.hh:221
static const double newton
Definition: G4SIunits.hh:226
static const double steradian
Definition: G4SIunits.hh:145
static const double centimeter2
Definition: G4SIunits.hh:90
static const double microsecond
Definition: G4SIunits.hh:159
static const double millimeter2
Definition: G4SIunits.hh:86
static const double kiloelectronvolt
Definition: G4SIunits.hh:204
static G4double GetValueOf(const G4String &)
G4GLOB_DLL std::ostream G4cout
static const double megahertz
Definition: G4SIunits.hh:164
static const double electronvolt
Definition: G4SIunits.hh:203
static const double meter2
Definition: G4SIunits.hh:82
static const double meter
Definition: G4SIunits.hh:81
G4int nbOfVals
static const double coulomb
Definition: G4SIunits.hh:194
G4UnitDefinition(const G4String &name, const G4String &symbol, const G4String &category, G4double value)
Definition: G4UnitsTable.cc:59
static const double becquerel
Definition: G4SIunits.hh:288
static const double cL
Definition: G4SIunits.hh:125
G4int operator!=(const G4UnitsCategory &) const
static const double cm3
Definition: G4SIunits.hh:120
static const double kg
Definition: G4SIunits.hh:179
static const double second
Definition: G4SIunits.hh:156
static const double GeV
Definition: G4SIunits.hh:214
static const double bar
Definition: G4SIunits.hh:233
static const double millisecond
Definition: G4SIunits.hh:158
static const double teraelectronvolt
Definition: G4SIunits.hh:207
static const double hertz
Definition: G4SIunits.hh:162
static const double nanoampere
Definition: G4SIunits.hh:189
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const double kelvin
Definition: G4SIunits.hh:278
static const double curie
Definition: G4SIunits.hh:289
static void ClearUnitsTable()
static G4UnitsTable & GetUnitsTable()
#define pascal
Definition: G4SIunits.hh:231
static const double gray
Definition: G4SIunits.hh:306
G4double Value[3]
static const double kilovolt
Definition: G4SIunits.hh:240
static G4String GetCategory(const G4String &)
static const double centimeter
Definition: G4SIunits.hh:89
static const double micrometer
Definition: G4SIunits.hh:99
static const double eV
Definition: G4SIunits.hh:212
static const double nanosecond
Definition: G4SIunits.hh:157
static const double mL
Definition: G4SIunits.hh:126
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static const double kilogram
Definition: G4SIunits.hh:174
static const double g
Definition: G4SIunits.hh:180
static const double dL
Definition: G4SIunits.hh:124
static const double gauss
Definition: G4SIunits.hh:267
static const double atmosphere
Definition: G4SIunits.hh:234
static const double gigaelectronvolt
Definition: G4SIunits.hh:206
#define DBL_MIN
Definition: templates.hh:75
static const double petaelectronvolt
Definition: G4SIunits.hh:208
G4int operator!=(const G4UnitDefinition &) const
static const double millibarn
Definition: G4SIunits.hh:105
static const double degree
Definition: G4SIunits.hh:143
G4int operator==(const G4UnitDefinition &) const
static const double milliampere
Definition: G4SIunits.hh:187
static void PrintUnitsTable()
const G4String & GetName() const
static const double mole
Definition: G4SIunits.hh:283
static const double millimeter
Definition: G4SIunits.hh:85
static const double radian
Definition: G4SIunits.hh:141
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:128
static const double keV
Definition: G4SIunits.hh:213
static const double barn
Definition: G4SIunits.hh:104
static const double picosecond
Definition: G4SIunits.hh:160
static const double tesla
Definition: G4SIunits.hh:265
double G4double
Definition: G4Types.hh:76
std::vector< G4UnitDefinition * > G4UnitsContainer
static const double eplus
Definition: G4SIunits.hh:196
static const double kilogauss
Definition: G4SIunits.hh:268
#define DBL_MAX
Definition: templates.hh:83
static const double microampere
Definition: G4SIunits.hh:188
size_t IndexOfCategory
static const double ampere
Definition: G4SIunits.hh:186
static const double milliradian
Definition: G4SIunits.hh:142
static const double fermi
Definition: G4SIunits.hh:102
static const double meter3
Definition: G4SIunits.hh:83
static const double weber
Definition: G4SIunits.hh:260
static const double kilometer2
Definition: G4SIunits.hh:94
G4UnitsContainer UnitsList
G4GLOB_DLL std::ostream G4cerr
static const double angstrom
Definition: G4SIunits.hh:101
static const double picobarn
Definition: G4SIunits.hh:108