Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -21,46 +21,38 @@
// ********************************************************************
//
//
// $Id: G4LogicalBorderSurface.cc,v 1.7 2001/07/11 10:00:32 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LogicalBorderSurface.cc,v 1.8 2002/08/06 08:23:38 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------------
// G4LogicalBorderSurface Implementation
////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------------
//
// A Logical Surface class for surfaces defined by the boundary
// of two physical volumes.
//
// File: G4LogicalBorderSurface.cc
// Description: A Logical Surface class for surfaces defined by the
// boundary of two physical volumes.
// Version: 1.0
// Created: 1997-06-26
// Author: John Apostolakis
// mail: John.Apostolakis@cern.ch
// Modified: 1997-06-26 John Apostolakis
// Author: John Apostolakis (John.Apostolakis@cern.ch)
//
// Id tag:
////////////////////////////////////////////////////////////////////////
// ********************************************************************
#include "G4LogicalBorderSurface.hh"
G4LogicalBorderSurfaceTable G4LogicalBorderSurface::theBorderSurfaceTable;
/////////////////////////
// Class Implementation
/////////////////////////
/////////////////
// Constructors
/////////////////
//
// Constructor & destructor
//
G4LogicalBorderSurface::G4LogicalBorderSurface(const G4String& name,
G4VPhysicalVolume* vol1,
G4VPhysicalVolume* vol2,
G4OpticalSurface* opticsSurface)
G4VPhysicalVolume* vol1,
G4VPhysicalVolume* vol2,
G4OpticalSurface* opticsSurface)
: G4LogicalSurface(name, opticsSurface),
Volume1(vol1), Volume2(vol2)
{
// Store in the table of Surfaces
//
theBorderSurfaceTable.push_back(this);
}
@@ -74,11 +66,13 @@ G4LogicalBorderSurface(const G4LogicalBorderSurface& right)
theBorderSurfaceTable = right.theBorderSurfaceTable;
}
G4LogicalBorderSurface::~G4LogicalBorderSurface(){}
G4LogicalBorderSurface::~G4LogicalBorderSurface()
{
}
//////////////
// Operators
//////////////
//
// Operators
//
const G4LogicalBorderSurface&
G4LogicalBorderSurface::operator=(const G4LogicalBorderSurface &right)
@@ -107,49 +101,47 @@ G4LogicalBorderSurface::operator!=(const G4LogicalBorderSurface &right) const
{
return (this != (G4LogicalBorderSurface *) &right);
}
////////////
// Methods
////////////
//
// Methods
//
const G4std::vector<G4LogicalBorderSurface*> *
G4LogicalBorderSurface::GetSurfaceTable()
{
return &theBorderSurfaceTable;
return &theBorderSurfaceTable;
}
size_t G4LogicalBorderSurface::GetNumberOfBorderSurfaces()
{
return theBorderSurfaceTable.size();
return theBorderSurfaceTable.size();
}
G4LogicalBorderSurface*
G4LogicalBorderSurface::GetSurface(const G4VPhysicalVolume* vol1,
const G4VPhysicalVolume* vol2)
const G4VPhysicalVolume* vol2)
{
for (size_t i=0; i<theBorderSurfaceTable.size(); i++) {
if(theBorderSurfaceTable[i]->GetVolume1() == vol1 &&
theBorderSurfaceTable[i]->GetVolume2() == vol2 )
return theBorderSurfaceTable[i];
}
return NULL;
for (size_t i=0; i<theBorderSurfaceTable.size(); i++)
{
if( (theBorderSurfaceTable[i]->GetVolume1() == vol1) &&
(theBorderSurfaceTable[i]->GetVolume2() == vol2) )
return theBorderSurfaceTable[i];
}
return NULL;
}
void G4LogicalBorderSurface::DumpInfo() // Class method (it is really const)
// Dump info for known surfaces
//
void G4LogicalBorderSurface::DumpInfo()
{
G4cout << "***** Surface Table : Nb of Surfaces = "
<< GetNumberOfBorderSurfaces() << " *****" << G4endl;
// Dump info for known surfaces
G4cout << "***** Surface Table : Nb of Surfaces = " <<
GetNumberOfBorderSurfaces() << " *****" << G4endl;
for (size_t i=0; i<theBorderSurfaceTable.size(); i++) {
G4cout << theBorderSurfaceTable[i]->GetName() << " : " << G4endl <<
" Surface type = " << theBorderSurfaceTable[i]->GetName() << G4endl;
#ifdef PRINT_INFO
" Surface type = " << theBorderSurfaceTable[i]->GetOpticalSurface()->GetType() << G4endl;
" Surface finish = " << theBorderSurfaceTable[i]->GetFinish() << G4endl <<
" Surface model = " << theBorderSurfaceTable[i]->GetModel() << G4endl;
#endif
}
G4cout << G4endl;
for (size_t i=0; i<theBorderSurfaceTable.size(); i++)
{
G4cout << theBorderSurfaceTable[i]->GetName() << " : " << G4endl
<< " Surface type = " << theBorderSurfaceTable[i]->GetName()
<< G4endl;
}
G4cout << G4endl;
}