Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LogicalBorderSurface.cc,v 1.3 2000/04/25 16:15:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LogicalBorderSurface.cc,v 1.5 2000/11/20 19:05:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
////////////////////////////////////////////////////////////////////////
// G4LogicalBorderSurface Implementation
@@ -41,19 +41,23 @@ G4LogicalBorderSurface::G4LogicalBorderSurface(const G4String& name,
G4VPhysicalVolume* vol1,
G4VPhysicalVolume* vol2,
G4OpticalSurface* opticsSurface)
: G4LogicalSurface(name, opticsSurface),
Volume1(vol1),
Volume2(vol2)
: G4LogicalSurface(name, opticsSurface),
Volume1(vol1), Volume2(vol2)
{
// Store in the table of Surfaces
theBorderSurfaceTable.insert(this);
theIndexInTable = theBorderSurfaceTable.index(this);
// Store in the table of Surfaces
theBorderSurfaceTable.insert(this);
theIndexInTable = theBorderSurfaceTable.index(this);
}
G4LogicalBorderSurface::G4LogicalBorderSurface(const G4LogicalBorderSurface &right)
: G4LogicalSurface(right.GetName(), right.GetOpticalSurface())
G4LogicalBorderSurface::
G4LogicalBorderSurface(const G4LogicalBorderSurface& right)
: G4LogicalSurface(right.GetName(), right.GetOpticalSurface())
{
*this = right;
SetTransitionRadiationSurface(right.GetTransitionRadiationSurface());
Volume1 = right.Volume1;
Volume2 = right.Volume2;
theIndexInTable = right.theIndexInTable;
theBorderSurfaceTable = right.theBorderSurfaceTable;
}
G4LogicalBorderSurface::~G4LogicalBorderSurface(){}
@@ -62,19 +66,33 @@ G4LogicalBorderSurface::~G4LogicalBorderSurface(){}
// Operators
//////////////
const G4LogicalBorderSurface& G4LogicalBorderSurface::operator=(const G4LogicalBorderSurface &right)
const G4LogicalBorderSurface&
G4LogicalBorderSurface::operator=(const G4LogicalBorderSurface &right)
{
return right;
if (&right == this) return *this;
if (&right)
{
SetOpticalSurface(right.GetOpticalSurface());
SetName(right.GetName());
SetTransitionRadiationSurface(right.GetTransitionRadiationSurface());
Volume1 = right.Volume1;
Volume2 = right.Volume2;
theIndexInTable = right.theIndexInTable;
theBorderSurfaceTable = right.theBorderSurfaceTable;
}
return *this;
}
G4int G4LogicalBorderSurface::operator==(const G4LogicalBorderSurface &right) const
G4int
G4LogicalBorderSurface::operator==(const G4LogicalBorderSurface &right) const
{
return (this == (G4LogicalBorderSurface *) &right);
return (this == (G4LogicalBorderSurface *) &right);
}
G4int G4LogicalBorderSurface::operator!=(const G4LogicalBorderSurface &right) const
G4int
G4LogicalBorderSurface::operator!=(const G4LogicalBorderSurface &right) const
{
return (this != (G4LogicalBorderSurface *) &right);
return (this != (G4LogicalBorderSurface *) &right);
}
////////////
// Methods
@@ -91,10 +109,11 @@ size_t G4LogicalBorderSurface::GetNumberOfBorderSurfaces()
return theBorderSurfaceTable.length();
}
G4LogicalBorderSurface* G4LogicalBorderSurface::GetSurface(const G4VPhysicalVolume* vol1,
const G4VPhysicalVolume* vol2)
G4LogicalBorderSurface*
G4LogicalBorderSurface::GetSurface(const G4VPhysicalVolume* vol1,
const G4VPhysicalVolume* vol2)
{
for (int i=0; i<theBorderSurfaceTable.length(); i++) {
for (size_t i=0; i<theBorderSurfaceTable.length(); i++) {
if(theBorderSurfaceTable[i]->GetVolume1() == vol1 &&
theBorderSurfaceTable[i]->GetVolume2() == vol2 )
return theBorderSurfaceTable[i];
@@ -110,7 +129,7 @@ void G4LogicalBorderSurface::DumpInfo() // Class method (it is really const)
G4cout << "***** Surface Table : Nb of Surfaces = " <<
GetNumberOfBorderSurfaces() << " *****" << G4endl;
for (int i=0; i<theBorderSurfaceTable.length(); i++) {
for (size_t i=0; i<theBorderSurfaceTable.length(); i++) {
G4cout << theBorderSurfaceTable[i]->GetName() << " : " << G4endl <<
" Surface type = " << theBorderSurfaceTable[i]->GetName() << G4endl;
#ifdef PRINT_INFO