Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// G4UnitsTable class implementation
27//
28// Author: M.Maire, 17.05.1998 - First version
29// Revisions: G.Cosmo, 06.03.2001 - Migrated to STL vectors
30// --------------------------------------------------------------------
31
32#include <iomanip>
33#include <sstream>
34
35#include "G4SystemOfUnits.hh"
36#include "G4Threading.hh"
37#include "G4UnitsTable.hh"
38
39G4ThreadLocal G4UnitsTable* G4UnitDefinition::pUnitsTable = nullptr;
40G4ThreadLocal G4bool G4UnitDefinition::unitsTableDestroyed = false;
41
42#ifdef G4MULTITHREADED
43G4UnitsTable* G4UnitDefinition::pUnitsTableShadow = nullptr;
44
45// --------------------------------------------------------------------
46
47G4UnitsTable::G4UnitsTable() {}
48
49// --------------------------------------------------------------------
50
51G4UnitsTable::~G4UnitsTable()
52{
53 for(auto itr = cbegin(); itr != cend(); ++itr)
54 {
55 delete *itr;
56 }
57 clear();
58}
59
60#endif
61
62// --------------------------------------------------------------------
63
65 const G4String& category, G4double value)
66 : Name(name)
67 , SymbolName(symbol)
68 , Value(value)
69{
70 if(pUnitsTable == nullptr)
71 {
72 if(unitsTableDestroyed)
73 {
74 G4Exception("G4UnitDefinition::G4UnitDefinition", "UnitsTable0000",
75 FatalException, "G4UnitsTable had already deleted.");
76 }
77 pUnitsTable = new G4UnitsTable;
78#ifdef G4MULTITHREADED
80 {
81 pUnitsTableShadow = pUnitsTable;
82 }
83#endif
84 }
85
86 // Does the Category objet already exist ?
87 //
88 std::size_t nbCat = pUnitsTable->size();
89 std::size_t i = 0;
90 while((i < nbCat) && ((*pUnitsTable)[i]->GetName() != category))
91 {
92 ++i;
93 }
94 if(i == nbCat)
95 {
96 pUnitsTable->push_back(new G4UnitsCategory(category));
97 }
98 CategoryIndex = i;
99
100 // Insert this Unit in the Units table
101 //
102 ((*pUnitsTable)[CategoryIndex]->GetUnitsList()).push_back(this);
103
104 // Update string max length for name and symbol
105 //
106 (*pUnitsTable)[i]->UpdateNameMxLen((G4int) name.length());
107 (*pUnitsTable)[i]->UpdateSymbMxLen((G4int) symbol.length());
108}
109
110// --------------------------------------------------------------------
111
113
114// --------------------------------------------------------------------
115
117{
118 *this = right;
119}
120
121// --------------------------------------------------------------------
122
123G4UnitDefinition& G4UnitDefinition::operator=(const G4UnitDefinition& right)
124{
125 if(this != &right)
126 {
127 Name = right.Name;
128 SymbolName = right.SymbolName;
129 Value = right.Value;
130 CategoryIndex = right.CategoryIndex;
131 }
132 return *this;
133}
134
135// --------------------------------------------------------------------
136
138{
139 return (this == (G4UnitDefinition*) &right);
140}
141
142// --------------------------------------------------------------------
143
145{
146 return (this != (G4UnitDefinition*) &right);
147}
148
149// --------------------------------------------------------------------
150
152{
153 if(pUnitsTable == nullptr)
154 {
155 pUnitsTable = new G4UnitsTable;
156 }
157 if(pUnitsTable->size() == 0)
158 {
160 }
161#ifdef G4MULTITHREADED
162 if(G4Threading::IsMasterThread() && pUnitsTableShadow == nullptr)
163 {
164 pUnitsTableShadow = pUnitsTable;
165 }
166#endif
167 return *pUnitsTable;
168}
169
170// --------------------------------------------------------------------
171
173{
174 G4String name, symbol;
175 for(std::size_t i = 0; i < (GetUnitsTable()).size(); ++i)
176 {
177 G4UnitsContainer& units = (*pUnitsTable)[i]->GetUnitsList();
178 for(std::size_t j = 0; j < units.size(); ++j)
179 {
180 name = units[j]->GetName();
181 symbol = units[j]->GetSymbol();
182 if(str == name || str == symbol)
183 {
184 return true;
185 }
186 }
187 }
188 return false;
189}
190
191// --------------------------------------------------------------------
192
194{
195 G4String name, symbol;
196 for(std::size_t i = 0; i < (GetUnitsTable()).size(); ++i)
197 {
198 G4UnitsContainer& units = (*pUnitsTable)[i]->GetUnitsList();
199 for(std::size_t j = 0; j < units.size(); ++j)
200 {
201 name = units[j]->GetName();
202 symbol = units[j]->GetSymbol();
203 if(str == name || str == symbol)
204 {
205 return units[j]->GetValue();
206 }
207 }
208 }
209 std::ostringstream message;
210 message << "The unit '" << str << "' does not exist in the Units Table!";
211 G4Exception("G4UnitDefinition::GetValueOf()", "InvalidUnit", FatalException,
212 message);
213 return 0.;
214}
215
216// --------------------------------------------------------------------
217
219{
220 G4String name, symbol;
221 for(std::size_t i = 0; i < (GetUnitsTable()).size(); ++i)
222 {
223 G4UnitsContainer& units = (*pUnitsTable)[i]->GetUnitsList();
224 for(std::size_t j = 0; j < units.size(); ++j)
225 {
226 name = units[j]->GetName();
227 symbol = units[j]->GetSymbol();
228 if(str == name || str == symbol)
229 {
230 return (*pUnitsTable)[i]->GetName();
231 }
232 }
233 }
234 std::ostringstream message;
235 message << "The unit '" << str << "' does not exist in the Units Table!";
236 G4Exception("G4UnitDefinition::GetCategory()", "InvalidUnit", FatalException,
237 message);
238 name = "None";
239 return name;
240}
241
242// --------------------------------------------------------------------
243
245{
246 G4int nameL = (*pUnitsTable)[CategoryIndex]->GetNameMxLen();
247 G4int symbL = (*pUnitsTable)[CategoryIndex]->GetSymbMxLen();
248 G4cout << std::setw(nameL) << Name << " (" << std::setw(symbL) << SymbolName
249 << ") = " << Value << G4endl;
250}
251
252// --------------------------------------------------------------------
253
255{
256 // Length
257 new G4UnitDefinition("parsec", "pc", "Length", parsec);
258 new G4UnitDefinition("kilometer", "km", "Length", kilometer);
259 new G4UnitDefinition("meter", "m", "Length", meter);
260 new G4UnitDefinition("centimeter", "cm", "Length", centimeter);
261 new G4UnitDefinition("millimeter", "mm", "Length", millimeter);
262 new G4UnitDefinition("micrometer", "um", "Length", micrometer);
263 new G4UnitDefinition("nanometer", "nm", "Length", nanometer);
264 new G4UnitDefinition("angstrom", "Ang", "Length", angstrom);
265 new G4UnitDefinition("fermi", "fm", "Length", fermi);
266
267 // Surface
268 new G4UnitDefinition("kilometer2", "km2", "Surface", kilometer2);
269 new G4UnitDefinition("meter2", "m2", "Surface", meter2);
270 new G4UnitDefinition("centimeter2", "cm2", "Surface", centimeter2);
271 new G4UnitDefinition("millimeter2", "mm2", "Surface", millimeter2);
272 new G4UnitDefinition("barn", "barn", "Surface", barn);
273 new G4UnitDefinition("millibarn", "mbarn", "Surface", millibarn);
274 new G4UnitDefinition("microbarn", "mubarn", "Surface", microbarn);
275 new G4UnitDefinition("nanobarn", "nbarn", "Surface", nanobarn);
276 new G4UnitDefinition("picobarn", "pbarn", "Surface", picobarn);
277
278 // Volume
279 new G4UnitDefinition("kilometer3", "km3", "Volume", kilometer3);
280 new G4UnitDefinition("meter3", "m3", "Volume", meter3);
281 new G4UnitDefinition("centimeter3", "cm3", "Volume", centimeter3);
282 new G4UnitDefinition("millimeter3", "mm3", "Volume", millimeter3);
283
284 new G4UnitDefinition("liter", "L", "Volume", liter);
285 new G4UnitDefinition("dL", "dL", "Volume", dL);
286 new G4UnitDefinition("cL", "cL", "Volume", cL);
287 new G4UnitDefinition("mL", "mL", "Volume", mL);
288
289 // Angle
290 new G4UnitDefinition("radian", "rad", "Angle", radian);
291 new G4UnitDefinition("milliradian", "mrad", "Angle", milliradian);
292 new G4UnitDefinition("degree", "deg", "Angle", degree);
293
294 // Solid angle
295 new G4UnitDefinition("steradian", "sr", "Solid angle", steradian);
296 new G4UnitDefinition("millisteradian", "msr", "Solid angle",
297 steradian * 0.001);
298
299 // Time
300 new G4UnitDefinition("second", "s", "Time", second);
301 new G4UnitDefinition("millisecond", "ms", "Time", millisecond);
302 new G4UnitDefinition("microsecond", "us", "Time", microsecond);
303 new G4UnitDefinition("nanosecond", "ns", "Time", nanosecond);
304 new G4UnitDefinition("picosecond", "ps", "Time", picosecond);
305
306 // Frequency
307 new G4UnitDefinition("hertz", "Hz", "Frequency", hertz);
308 new G4UnitDefinition("kilohertz", "kHz", "Frequency", kilohertz);
309 new G4UnitDefinition("megahertz", "MHz", "Frequency", megahertz);
310
311 // Electric charge
312 new G4UnitDefinition("eplus", "e+", "Electric charge", eplus);
313 new G4UnitDefinition("coulomb", "C", "Electric charge", coulomb);
314
315 // Energy
316 new G4UnitDefinition("electronvolt", "eV", "Energy", electronvolt);
317 new G4UnitDefinition("kiloelectronvolt", "keV", "Energy", kiloelectronvolt);
318 new G4UnitDefinition("megaelectronvolt", "MeV", "Energy", megaelectronvolt);
319 new G4UnitDefinition("gigaelectronvolt", "GeV", "Energy", gigaelectronvolt);
320 new G4UnitDefinition("teraelectronvolt", "TeV", "Energy", teraelectronvolt);
321 new G4UnitDefinition("petaelectronvolt", "PeV", "Energy", petaelectronvolt);
322 new G4UnitDefinition("joule", "J", "Energy", joule);
323
324 // Energy/Length
325 new G4UnitDefinition("GeV/cm", "GeV/cm", "Energy/Length", GeV / cm);
326 new G4UnitDefinition("MeV/cm", "MeV/cm", "Energy/Length", MeV / cm);
327 new G4UnitDefinition("keV/cm", "keV/cm", "Energy/Length", keV / cm);
328 new G4UnitDefinition("eV/cm", "eV/cm", "Energy/Length", eV / cm);
329
330 // Mass
331 new G4UnitDefinition("milligram", "mg", "Mass", milligram);
332 new G4UnitDefinition("gram", "g", "Mass", gram);
333 new G4UnitDefinition("kilogram", "kg", "Mass", kilogram);
334
335 // Volumic Mass
336 new G4UnitDefinition("g/cm3", "g/cm3", "Volumic Mass", g / cm3);
337 new G4UnitDefinition("mg/cm3", "mg/cm3", "Volumic Mass", mg / cm3);
338 new G4UnitDefinition("kg/m3", "kg/m3", "Volumic Mass", kg / m3);
339
340 // Mass/Surface
341 new G4UnitDefinition("g/cm2", "g/cm2", "Mass/Surface", g / cm2);
342 new G4UnitDefinition("mg/cm2", "mg/cm2", "Mass/Surface", mg / cm2);
343 new G4UnitDefinition("kg/cm2", "kg/cm2", "Mass/Surface", kg / cm2);
344
345 // Surface/Mass
346 new G4UnitDefinition("cm2/g", "cm2/g", "Surface/Mass", cm2 / g);
347
348 // Energy.Surface/Mass
349 new G4UnitDefinition("eV*cm2/g", " eV*cm2/g", "Energy*Surface/Mass",
350 eV * cm2 / g);
351 new G4UnitDefinition("keV*cm2/g", "keV*cm2/g", "Energy*Surface/Mass",
352 keV * cm2 / g);
353 new G4UnitDefinition("MeV*cm2/g", "MeV*cm2/g", "Energy*Surface/Mass",
354 MeV * cm2 / g);
355 new G4UnitDefinition("GeV*cm2/g", "GeV*cm2/g", "Energy*Surface/Mass",
356 GeV * cm2 / g);
357
358 // Power
359 new G4UnitDefinition("watt", "W", "Power", watt);
360
361 // Force
362 new G4UnitDefinition("newton", "N", "Force", newton);
363
364 // Pressure
365 new G4UnitDefinition("pascal", "Pa", "Pressure", hep_pascal);
366 new G4UnitDefinition("bar", "bar", "Pressure", bar);
367 new G4UnitDefinition("atmosphere", "atm", "Pressure", atmosphere);
368
369 // Electric current
370 new G4UnitDefinition("ampere", "A", "Electric current", ampere);
371 new G4UnitDefinition("milliampere", "mA", "Electric current", milliampere);
372 new G4UnitDefinition("microampere", "muA", "Electric current", microampere);
373 new G4UnitDefinition("nanoampere", "nA", "Electric current", nanoampere);
374
375 // Electric potential
376 new G4UnitDefinition("volt", "V", "Electric potential", volt);
377 new G4UnitDefinition("kilovolt", "kV", "Electric potential", kilovolt);
378 new G4UnitDefinition("megavolt", "MV", "Electric potential", megavolt);
379
380 // Electric field
381 new G4UnitDefinition("volt/m", "V/m", "Electric field", volt / m);
382 new G4UnitDefinition("kilovolt/m", "kV/m", "Electric field", kilovolt / m);
383 new G4UnitDefinition("megavolt/m", "MV/m", "Electric field", megavolt / m);
384
385 // Magnetic flux
386 new G4UnitDefinition("weber", "Wb", "Magnetic flux", weber);
387
388 // Magnetic flux density
389 new G4UnitDefinition("tesla", "T", "Magnetic flux density", tesla);
390 new G4UnitDefinition("kilogauss", "kG", "Magnetic flux density", kilogauss);
391 new G4UnitDefinition("gauss", "G", "Magnetic flux density", gauss);
392
393 // Temperature
394 new G4UnitDefinition("kelvin", "K", "Temperature", kelvin);
395
396 // Amount of substance
397 new G4UnitDefinition("mole", "mol", "Amount of substance", mole);
398 new G4UnitDefinition("g/mole", "g/mol", "Molar mass", g / mole);
399
400 // Activity
401 new G4UnitDefinition("becquerel", "Bq", "Activity", becquerel);
402 new G4UnitDefinition("curie", "Ci", "Activity", curie);
403
404 // Dose
405 new G4UnitDefinition("gray", "Gy", "Dose", gray);
406}
407
408// --------------------------------------------------------------------
409
411{
412 G4cout << "\n ----- The Table of Units ----- \n";
413 if(pUnitsTable == nullptr)
414 {
415 pUnitsTable = new G4UnitsTable;
416 }
417 for(std::size_t i = 0; i < pUnitsTable->size(); ++i)
418 {
419 (*pUnitsTable)[i]->PrintCategory();
420 }
421}
422
423// --------------------------------------------------------------------
424
426{
427#ifdef G4MULTITHREADED
428 delete pUnitsTable;
429 pUnitsTable = nullptr;
431 {
432 pUnitsTableShadow = nullptr;
433 }
434#else
435 for(std::size_t i = 0; i < pUnitsTable->size(); ++i)
436 {
437 delete(*pUnitsTable)[i];
438 }
439 pUnitsTable->clear();
440#endif
441 unitsTableDestroyed = true;
442}
443
444// --------------------------------------------------------------------
445
447 : Name(name)
448 , UnitsList()
449{}
450
451// --------------------------------------------------------------------
452
454{
455 for(std::size_t i = 0; i < UnitsList.size(); ++i)
456 {
457 delete UnitsList[i];
458 }
459 UnitsList.clear();
460}
461
462// --------------------------------------------------------------------
463
465{
466 *this = right;
467}
468
469// --------------------------------------------------------------------
470
471G4UnitsCategory& G4UnitsCategory::operator=(const G4UnitsCategory& right)
472{
473 if(this != &right)
474 {
475 Name = right.Name;
476 UnitsList = right.UnitsList;
477 NameMxLen = right.NameMxLen;
478 SymbMxLen = right.SymbMxLen;
479 }
480 return *this;
481}
482
483// --------------------------------------------------------------------
484
486{
487 return (this == (G4UnitsCategory*) &right);
488}
489
490// --------------------------------------------------------------------
491
493{
494 return (this != (G4UnitsCategory*) &right);
495}
496
497// --------------------------------------------------------------------
498
500{
501 G4cout << "\n category: " << Name << G4endl;
502 for(std::size_t i = 0; i < UnitsList.size(); ++i)
503 {
504 UnitsList[i]->PrintDefinition();
505 }
506}
507
508// --------------------------------------------------------------------
509
511 : nbOfVals(1)
512{
513 // find the category
515 std::size_t nbCat = theUnitsTable.size();
516 std::size_t i = 0;
517 while((i < nbCat) && (theUnitsTable[i]->GetName() != category))
518 {
519 ++i;
520 }
521 if(i == nbCat)
522 {
523 G4cout << " G4BestUnit: the category " << category << " does not exist !!"
524 << G4endl;
525 G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall", FatalException,
526 "Missing unit category !");
527 }
528
529 Value[0] = value;
530 Value[1] = 0.;
531 Value[2] = 0.;
532 IndexOfCategory = i;
533}
534
535// --------------------------------------------------------------------
536
537G4BestUnit::G4BestUnit(const G4ThreeVector& value, const G4String& category)
538 : nbOfVals(3)
539{
540 // find the category
542 std::size_t nbCat = theUnitsTable.size();
543 std::size_t i = 0;
544 while((i < nbCat) && (theUnitsTable[i]->GetName() != category))
545 {
546 ++i;
547 }
548 if(i == nbCat)
549 {
550 G4cerr << " G4BestUnit: the category " << category << " does not exist."
551 << G4endl;
552 G4Exception("G4BestUnit::G4BestUnit()", "InvalidCall", FatalException,
553 "Missing unit category !");
554 }
555
556 Value[0] = value.x();
557 Value[1] = value.y();
558 Value[2] = value.z();
559 IndexOfCategory = i;
560}
561
562// --------------------------------------------------------------------
563
565
566// --------------------------------------------------------------------
567
568G4BestUnit::operator G4String() const
569{
570 std::ostringstream oss;
571 oss << *this;
572 return oss.str();
573}
574
575// --------------------------------------------------------------------
576
577std::ostream& operator<<(std::ostream& flux, G4BestUnit a)
578{
580 G4UnitsContainer& List = theUnitsTable[a.IndexOfCategory]->GetUnitsList();
581 G4int len = theUnitsTable[a.IndexOfCategory]->GetSymbMxLen();
582
583 G4int ksup(-1), kinf(-1);
584 G4double umax(0.), umin(DBL_MAX);
585 G4double rsup(DBL_MAX), rinf(0.);
586
587 // for a ThreeVector, choose the best unit for the biggest value
588 G4double value =
589 std::max(std::max(std::fabs(a.Value[0]), std::fabs(a.Value[1])),
590 std::fabs(a.Value[2]));
591
592 for(std::size_t k = 0; k < List.size(); ++k)
593 {
594 G4double unit = List[k]->GetValue();
595 if(!(value != DBL_MAX))
596 {
597 if(unit > umax)
598 {
599 umax = unit;
600 ksup = k;
601 }
602 }
603 else if(value <= DBL_MIN)
604 {
605 if(unit < umin)
606 {
607 umin = unit;
608 kinf = k;
609 }
610 }
611 else
612 {
613 G4double ratio = value / unit;
614 if((ratio >= 1.) && (ratio < rsup))
615 {
616 rsup = ratio;
617 ksup = k;
618 }
619 if((ratio < 1.) && (ratio > rinf))
620 {
621 rinf = ratio;
622 kinf = k;
623 }
624 }
625 }
626
627 G4int index = ksup;
628 if(index == -1)
629 {
630 index = kinf;
631 }
632 if(index == -1)
633 {
634 index = 0;
635 }
636
637 for(G4int j = 0; j < a.nbOfVals; ++j)
638 {
639 flux << a.Value[j] / (List[index]->GetValue()) << " ";
640 }
641
642 std::ios::fmtflags oldform = flux.flags();
643
644 flux.setf(std::ios::left, std::ios::adjustfield);
645 flux << std::setw(len) << List[index]->GetSymbol();
646 flux.flags(oldform);
647
648 return flux;
649}
650
651// --------------------------------------------------------------------
652
653#ifdef G4MULTITHREADED
654
655void G4UnitsTable::Synchronize()
656{
657 G4UnitsTable* orig = &(G4UnitDefinition::GetUnitsTableShadow());
658 if(this == orig)
659 return;
660
661 for(auto utItr = orig->cbegin(); utItr != orig->cend(); ++utItr)
662 {
663 G4UnitsCategory* category = *utItr;
664 G4String catName = category->GetName();
665 G4UnitsContainer* units = &(category->GetUnitsList());
666 for(auto ucItr = units->cbegin(); ucItr != units->cend(); ++ucItr)
667 {
668 G4UnitDefinition* unit = *ucItr;
669 if(!Contains(unit, catName))
670 {
671 new G4UnitDefinition(unit->GetName(), unit->GetSymbol(), catName,
672 unit->GetValue());
673 }
674 }
675 }
676}
677
678// --------------------------------------------------------------------
679
680G4bool G4UnitsTable::Contains(const G4UnitDefinition* unit,
681 const G4String& categoryName)
682{
683 for(auto utItr = cbegin(); utItr != cend(); ++utItr)
684 {
685 G4UnitsCategory* category = *utItr;
686 G4String catName = category->GetName();
687 if(catName != categoryName)
688 continue;
689 G4UnitsContainer* units = &(category->GetUnitsList());
690 for(auto ucItr = units->cbegin(); ucItr != units->cend(); ++ucItr)
691 {
692 if((*ucItr)->GetName() == unit->GetName() &&
693 (*ucItr)->GetSymbol() == unit->GetSymbol())
694 {
695 return true;
696 }
697 }
698 }
699 return false;
700}
701
702#endif
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
std::ostream & operator<<(std::ostream &flux, G4BestUnit a)
std::vector< G4UnitDefinition * > G4UnitsContainer
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:68
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
double z() const
double x() const
double y() const
G4BestUnit(G4double internalValue, const G4String &category)
static G4bool IsUnitDefined(const G4String &)
static void ClearUnitsTable()
G4UnitDefinition(const G4String &name, const G4String &symbol, const G4String &category, G4double value)
Definition: G4UnitsTable.cc:64
G4bool operator!=(const G4UnitDefinition &) const
G4bool operator==(const G4UnitDefinition &) const
static void BuildUnitsTable()
G4double GetValue() const
static G4double GetValueOf(const G4String &)
static G4String GetCategory(const G4String &)
static void PrintUnitsTable()
const G4String & GetName() const
static G4UnitsTable & GetUnitsTable()
const G4String & GetSymbol() const
const G4String & GetName() const
G4UnitsContainer & GetUnitsList()
G4UnitsCategory(const G4String &name)
G4bool operator!=(const G4UnitsCategory &) const
G4bool operator==(const G4UnitsCategory &) const
G4bool IsMasterThread()
Definition: G4Threading.cc:124
#define DBL_MIN
Definition: templates.hh:54
#define DBL_MAX
Definition: templates.hh:62
#define G4ThreadLocal
Definition: tls.hh:77