Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
@@ -1,25 +1,31 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UnitsTable.hh,v 1.2 1999/03/30 13:09:25 maire Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4UnitsTable.hh,v 1.7 1999/11/23 15:00:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// -----------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
//
// ------------------- class G4UnitsTable -----------------
//
// 17-05-98: first version, M.Maire
// 13-10-98: Units and symbols printed in fxed length
// 13-10-98: Units and symbols printed in fixed length
// Class description:
//
// This class maintains a table of Units.
// A Unit has a name, a symbol, a value and belong to a category (i.e. its
// dimensional definition): Length, Time, Energy, etc...
// The Units are grouped by category. The TableOfUnits is a list of categories.
// The class BestUnit allow to convert automaticaly a physical quantity
// from its internal value into the most appropriate Unit of the same category.
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -28,28 +34,34 @@
#define G4UnitsTable_HH
#include "globals.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4UnitsCategory;
typedef RWTPtrOrderedVector<G4UnitsCategory> G4UnitsTable;
typedef G4RWTPtrOrderedVector<G4UnitsCategory> G4UnitsTable;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4UnitDefinition
{
public:
public: // with description
G4UnitDefinition(G4String name, G4String symbol,G4String category,
G4double value);
public: // without description
~G4UnitDefinition();
G4int operator==(const G4UnitDefinition&) const;
G4int operator!=(const G4UnitDefinition&) const;
private:
G4UnitDefinition(G4UnitDefinition&);
G4UnitDefinition& operator=(const G4UnitDefinition&);
public:
public: // with description
G4String GetName() {return Name;};
G4String GetSymbol() {return SymbolName;};
G4double GetValue() {return Value;};
@@ -66,6 +78,7 @@ public:
static G4String GetCategory(G4String);
private:
G4String Name; // SI name
G4String SymbolName; // SI symbol
G4double Value; // value in the internal system of units
@@ -79,21 +92,24 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
typedef RWTPtrOrderedVector<G4UnitDefinition> G4UnitsContainer;
typedef G4RWTPtrOrderedVector<G4UnitDefinition> G4UnitsContainer;
class G4UnitsCategory
{
public:
public: // without description
G4UnitsCategory(G4String name);
~G4UnitsCategory();
G4int operator==(const G4UnitsCategory&) const;
G4int operator!=(const G4UnitsCategory&) const;
private:
G4UnitsCategory(G4UnitsCategory&);
G4UnitsCategory& operator=(const G4UnitsCategory&);
public:
public: // without description
G4String GetName() {return Name;};
G4UnitsContainer& GetUnitsList() {return UnitsList;};
G4int GetNameMxLen() {return NameMxLen;};
@@ -103,6 +119,7 @@ public:
void PrintCategory();
private:
G4String Name; // dimensional family: Length,Volume,Energy ...
G4UnitsContainer UnitsList; // List of units in this family
G4int NameMxLen; // max length of the units name
@@ -113,20 +130,29 @@ private:
class G4BestUnit
{
public:
G4BestUnit(G4double,G4String);
public: // with description
G4BestUnit(G4double internalValue, G4String category);
// This constructor converts a physical quantity from its internalValue
// into the most appropriate unit of the same category.
// In practice it builds an object VU = (newValue, newUnit)
~G4BestUnit();
public:
public: // without description
G4double GetValue() {return Value;};
G4String GetCategory() {return Category;};
size_t GetIndexOfCategory() {return IndexOfCategory;};
public: // with description
friend
ostream& operator<<(ostream&,G4BestUnit);
G4std::ostream& operator<<(G4std::ostream&,G4BestUnit VU);
// Default format to print the objet VU above.
private:
G4double Value; // value in the internal system of units
G4String Category; // dimensional family: Length,Volume,Energy ...
size_t IndexOfCategory; // position of Category in UnitsTable