Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4Exception.cc,v 1.8 1999/11/29 10:17:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ----------------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LPhysicsFreeVector.cc,v 1.2 1999/11/16 17:46:51 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// --------------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicsFreeVector.cc,v 1.2 1999/11/16 17:46:51 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//--------------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicsLinearVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//--------------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicsLogVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicsOrderedFreeVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
////////////////////////////////////////////////////////////////////////
// PhysicsOrderedFreeVector Class Implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicsVector.cc,v 1.4 1999/11/23 15:00:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// --------------------------------------------------------------
+4 -7
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Timer.cc,v 1.5 1999/11/23 15:00:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Timer.cc,v 1.7 2000/01/06 14:27:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ----------------------------------------------------------------------
@@ -18,15 +18,12 @@
#include "G4Timer.hh"
#include "G4ios.hh"
#ifdef G4USE_STL
#undef times
#endif
#undef times
// Global error function
void G4Exception(const char* s=0);
#ifdef WIN32
# include <sys/types.h>
# include <windows.h>
@@ -59,7 +56,7 @@ void G4Exception(const char* s=0);
}
#endif /* WIN32 */
// Print timer status n ostream
// Print timer status n G4std::ostream
G4std::ostream& operator << (G4std::ostream& os, const G4Timer& t)
{
if (t.IsValid())
+34 -8
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UnitsTable.cc,v 1.7 1999/11/23 15:00:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4UnitsTable.cc,v 1.9 2000/01/19 11:17:50 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ------------------------------------------------------------
@@ -340,10 +340,33 @@ G4BestUnit::G4BestUnit(G4double value,G4String category)
}
//
IndexOfCategory = i;
Value = value;
nbOfVals = 1;
Value[0] = value; Value[1] = 0.; Value[2] = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4BestUnit::G4BestUnit(const G4ThreeVector& value,G4String category)
{
// find the category
G4UnitsTable& theUnitsTable = G4UnitDefinition::GetUnitsTable();
size_t nbCat = theUnitsTable.entries();
size_t i = 0;
while
((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
if (i == nbCat)
{ G4cerr << " G4BestUnit: the category " << category
<< " does not exist." << G4endl;
G4Exception("Unit category not existing !");
}
//
IndexOfCategory = i;
nbOfVals = 3;
Value[0] = value.x();
Value[1] = value.y();
Value[2] = value.z();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4BestUnit::~G4BestUnit()
{}
@@ -360,8 +383,10 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
G4int ksup(-1), kinf(-1);
G4double umax(0.), umin(DBL_MAX);
G4double rsup(DBL_MAX), rinf(0.);
G4double value =fabs(a.Value);
//for a ThreeVector, choose the best unit for the biggest value
G4double value = G4std::max(G4std::max(fabs(a.Value[0]),fabs(a.Value[1])),
fabs(a.Value[2]));
for (G4int k=0; k<List.entries(); k++)
{
@@ -376,10 +401,11 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
}
G4int index=ksup; if(index==-1) index=kinf; if(index==-1) index=0;
flux << a.Value/(List[index]->GetValue());
for (G4int j=0; j<a.nbOfVals; j++)
{flux << a.Value[j]/(List[index]->GetValue()) << " ";}
G4long oldform = G4cout.setf(G4std::ios::left,G4std::ios::adjustfield);
flux << " " << G4std::setw(len) << List[index]->GetSymbol();
flux << G4std::setw(len) << List[index]->GetSymbol();
G4cout.setf(oldform,G4std::ios::adjustfield);
return flux;
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4ios.cc,v 1.4 1999/11/23 15:00:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// --------------------------------------------------------------