Import Geant4 3.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:03:00 +02:00
parent cfcb558cfe
commit 137e303ecc
2843 changed files with 37082 additions and 38426 deletions
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4AffineTransform.hh,v 1.3 2000/04/20 16:49:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4AffineTransform
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4AffineTransform.icc,v 1.3 1999/12/15 14:49:50 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4AffineTransformation Inline implementation
@@ -0,0 +1,90 @@
// This code implementation is the intellectual property of
// 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: G4AssemblyTriplet.hh,v 1.4 2001/02/07 17:30:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Class G4AssemblyTriplet
//
// Class description:
//
// A class to help place logical volumes inside a generic containers (like
// STL vector ) together with information about its rotation and placement.
// How to interpret the rotation and translation depends on the class which
// uses a container of these triplets. The first class using G4AssemblyTriplet
// is G4AssemblyVolume class.
// The pointer to the logical volume is copied so this class does not take
// its ownership and does not delete the object behind.
// Author: Radovan Chytracek
// Version: 1.0
// Date: November 2000
// ----------------------------------------------------------------------
#ifndef G4_ASSEMBLYTRIPLET_H
#define G4_ASSEMBLYTRIPLET_H
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
class G4AssemblyTriplet
{
public: // with description
G4AssemblyTriplet();
// Default constructor
G4AssemblyTriplet( G4LogicalVolume* pVolume,
G4ThreeVector& translation,
G4RotationMatrix* pRotation);
// An explicit constructor
G4AssemblyTriplet( const G4AssemblyTriplet& second );
// Copy constructor
~G4AssemblyTriplet();
// Destructor
G4AssemblyTriplet& operator=( const G4AssemblyTriplet& second );
// Assignment operator
G4LogicalVolume* GetVolume() const;
// Retrieve the logical volume reference
void SetVolume( G4LogicalVolume* pVolume );
// Update the logical volume reference
G4ThreeVector GetTranslation() const;
// Retrieve the logical volume translation
void SetTranslation( G4ThreeVector& pVolume );
// Update the logical volume translation
G4RotationMatrix* GetRotation() const;
// Retrieve the logical volume rotation
void SetRotation( G4RotationMatrix* pVolume );
// Update the logical volume rotation
private:
G4LogicalVolume* fVolume;
// A logical volume
G4ThreeVector fTranslation;
// A logical volume translation
G4RotationMatrix* fRotation;
// A logical volume rotation
};
#include "G4AssemblyTriplet.icc"
#endif // G4_ASSEMBLYTRIPLET_H
@@ -0,0 +1,93 @@
// This code implementation is the intellectual property of
// 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: G4AssemblyTriplet.icc,v 1.4 2001/02/07 17:30:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Class G4AssemblyTriplet - inline implementation
//
// ----------------------------------------------------------------------
inline
G4AssemblyTriplet::G4AssemblyTriplet()
: fVolume( 0 ), fRotation( 0 )
{
G4ThreeVector v(0.,0.,0.);
fTranslation = v;
}
inline
G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
G4ThreeVector& translation,
G4RotationMatrix* pRotation )
: fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation )
{
}
inline
G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& second )
{
fVolume = second.GetVolume();
fRotation = second.GetRotation();
fTranslation = second.GetTranslation();
}
inline
G4AssemblyTriplet::~G4AssemblyTriplet()
{
}
inline
G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
{
return fVolume;
}
inline
void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
{
fVolume = pVolume;
}
inline
G4ThreeVector G4AssemblyTriplet::GetTranslation() const
{
return fTranslation;
}
inline
void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
{
fTranslation = translation;
}
inline
G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
{
return fRotation;
}
inline
void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
{
fRotation = pRotation;
}
inline
G4AssemblyTriplet&
G4AssemblyTriplet::operator=( const G4AssemblyTriplet& second )
{
if( this != &second )
{
fVolume = second.GetVolume();
fRotation = second.GetRotation();
fTranslation = second.GetTranslation();
}
return *this;
}
@@ -0,0 +1,148 @@
// This code implementation is the intellectual property of
// 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: G4AssemblyVolume.hh,v 1.4 2001/02/07 17:30:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Class G4AssemblyVolume
//
// Class description:
//
// G4AssemblyVolume is a helper class to make the build process of geometry
// easier. It allows to combine several volumes together in an arbitrary way
// in 3D space and then work with the result as with a single logical volume
// for placement.
// The resulting objects are independent copies of each of the assembled
// logical volumes. The placements are not, however, bound one to each other
// when placement is done. They are seen as independent physical volumes in
// space. This is the main difference when compared to the boolean solids or
// parametrised physical volumes.
// Author: Radovan Chytracek, John Apostolakis, Gabriele Cosmo
// Version: 1.0
// Date: November 2000
// ----------------------------------------------------------------------
#ifndef G4_ASSEMBLYVOLUME_H
#define G4_ASSEMBLYVOLUME_H
#include "g4std/vector"
#include "G4Transform3D.hh"
#include "G4AssemblyTriplet.hh"
class G4VPhysicalVolume;
class G4AssemblyVolume
{
public: // with description
G4AssemblyVolume();
G4AssemblyVolume( G4LogicalVolume* volume,
G4ThreeVector& translation,
G4RotationMatrix* rotation);
~G4AssemblyVolume();
//
// Constructors & destructor.
// At destruction all the generated physical volumes and associated
// rotation matrices of the imprints will be destroyed.
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4ThreeVector& translation,
G4RotationMatrix* rotation);
//
// Place the given volume 'pPlacedVolume' inside the assembly.
//
// The taken approach:
//
// - Place it w.r.t. the assembly coordinate system.
// This step is applied to each of the participating volumes.
//
// The other possible approaches:
//
// - Place w.r.t. the firstly added volume.
// When placed the first, the virtual coordinate system becomes
// the coordinate system of the first one.
// Every next volume being added into the assembly will be placed
// w.r.t to the first one.
//
// - Place w.r.t the last placed volume.
// When placed the first, the virtual coordinate system becomes
// the coordinate system of the first one.
// Every next volume being added into the assembly will be placed
// w.r.t to the previous one.
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4Transform3D& transformation);
//
// The same as previous but takes complete 3D transformation in space
// as its argument.
void MakeImprint( G4LogicalVolume* pMotherLV,
G4ThreeVector& translationInMother,
G4RotationMatrix* pRotationInMother);
//
// Creates instance of an assembly volume inside the given mother volume.
void MakeImprint( G4LogicalVolume* pMotherLV,
G4Transform3D& transformation);
//
// The same as previous but takes complete 3D transformation in space
// as its argument.
private:
G4std::vector<G4AssemblyTriplet> fTriplets;
//
// Participating volumes represented as a vector of
// <logical volume, translation, rotation>.
G4std::vector<G4VPhysicalVolume*> fPVStore;
//
// We need to keep list of physical volumes created by MakeImprint() method
// in order to be able to cleanup the objects when not needed anymore.
// This requires the user to keep assembly objects in memory during the
// whole job or during the life-time of G4Navigator, log. vol store
// and phys. vol. store may keep pointers to physical volumes generated by
// the assembly volume.
// When an assembly object is about to die it will destroy all its
// generated physical volumes and rotation matrices as well !
// This may affect validity of detector contruction !
protected:
unsigned int GetImprintsCount() const;
void SetImprintsCount( unsigned int value );
void ImprintsCountPlus();
void ImprintsCountMinus();
//
// Internal counting mechanism, used to compute unique the names of
// phys. volumes created by MakeImprint(...) method(s).
private:
unsigned int fImprintsCounter;
//
// Number of imprints of the given assembly volume.
protected:
unsigned int GetInstanceCount() const;
void SetInstanceCount( unsigned int value );
void InstanceCountPlus();
void InstanceCountMinus();
private:
static unsigned int fsInstanceCounter;
};
#include "G4AssemblyVolume.icc"
#endif // G4_ASSEMBLYVOLUME_H
@@ -0,0 +1,39 @@
// This code implementation is the intellectual property of
// 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: G4AssemblyVolume.icc,v 1.2 2001/02/07 17:30:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Class G4AssemblyVolume - inline implementation
//
// ----------------------------------------------------------------------
inline
unsigned int G4AssemblyVolume::GetImprintsCount() const
{
return fImprintsCounter;
}
inline
void G4AssemblyVolume::SetImprintsCount( unsigned int value )
{
fImprintsCounter = value;
}
inline
void G4AssemblyVolume::ImprintsCountPlus()
{
fImprintsCounter++;
}
inline
void G4AssemblyVolume::ImprintsCountMinus()
{
fImprintsCounter--;
}
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4DrawVoxels.hh,v 1.9 2000/06/06 13:18:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4DrawVoxels
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4GeometryManager.hh,v 1.3 2000/04/20 16:49:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4GeometryManager
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LogicalSurface.hh,v 1.4 2000/11/01 15:39:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4LogicalSurface.hh,v 1.5 2000/12/04 09:36:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
////////////////////////////////////////////////////////////////////////
// Class G4LogicalSurface
@@ -92,17 +92,13 @@ class G4LogicalSurface
public:
virtual ~G4LogicalSurface();
private:
G4LogicalSurface(const G4LogicalSurface &right); // Copying restricted
//////////////
// Operators
//////////////
public:
G4int operator==(const G4LogicalSurface &right) const;
G4int operator!=(const G4LogicalSurface &right) const;
private:
G4LogicalSurface(const G4LogicalSurface &right); // Copying restricted
const G4LogicalSurface& operator=(const G4LogicalSurface& right);
// ------------------
@@ -110,6 +106,7 @@ class G4LogicalSurface
// ------------------
private:
G4String theName; // Surface name
G4OpticalSurface* theOpticalSurface;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LogicalSurface.icc,v 1.3 2000/04/20 16:49:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4LogicalSurface.icc,v 1.4 2000/12/04 09:36:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
////////////////////////////////////////////////////////////////////////
// Surface Class Inline Methods
@@ -69,7 +69,12 @@ G4LogicalSurface::SetTransitionRadiationSurface(G4TransitionRadiationSurface*
inline const G4LogicalSurface &
G4LogicalSurface::operator=(const G4LogicalSurface &right)
{
return right;
if (&right == this) return *this;
theName = right.theName;
theOpticalSurface = right.theOpticalSurface;
theTransRadSurface = right.theTransRadSurface;
return *this;
}
inline G4int
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LogicalVolume.hh,v 1.6 2000/11/01 15:39:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4LogicalVolume
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LogicalVolume.icc,v 1.4 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4LogicalVolume Inline Implementation file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LogicalVolumeStore.hh,v 1.4 2000/04/20 16:49:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4LogicalVolumeStore
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVParameterised.hh,v 1.4 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4PVParameterised
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PVPlacement.hh,v 1.4 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4PVPlacement.hh,v 1.5 2001/03/07 17:34:37 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4PVPlacement
@@ -42,9 +42,8 @@ class G4PVPlacement : public G4VPhysicalVolume
G4bool pMany,
G4int pCopyNo);
// Initialise a single volume, positioned in a frame which is rotated by
// *pFrameRot, relative to the coordinate system of the mother volume
// pMother. The center of the object is then placed at volumeCenterCrd
// in the new coordinates.
// *pRot and traslated by tlate, relative to the coordinate system of the
// mother volume pMother.
// If pRot=0 the volume is unrotated with respect to its mother.
// The physical volume is added to the mother's logical volume.
// (The above are exactly the arguments of G4VPhysicalVolume)
@@ -63,12 +62,12 @@ class G4PVPlacement : public G4VPhysicalVolume
// the direct rotation and translation of the solid (NOT of the frame).
// The G4Transform3D argument should be constructed by:
// i) First rotating it to align the solid to the system of
// reference of its mother volume *pMother, and
// reference of its mother volume *pMother, and
// ii) Then placing the solid at the location Transform3D.getTranslation(),
// with respect to the origin of the system of coordinates of the
// mother volume.
// with respect to the origin of the system of coordinates of the
// mother volume.
// [ This is useful for the people who prefer to think in terms
// of moving objects in a given reference frame. ]
// of moving objects in a given reference frame. ]
// All other arguments are the same as for the previous constructor.
G4PVPlacement(G4RotationMatrix *pRot,
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVReplica.hh,v 1.4 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4PVReplica
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicalVolumeStore.hh,v 1.5 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4PhysicalVolume
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelHeader.hh,v 1.4 2000/04/20 16:49:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4SmartVoxelHeader
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelHeader.icc,v 1.1 2000/04/20 16:49:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4SmartVoxelHeader Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelNode.hh,v 1.4 2000/04/20 16:49:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4SmartVoxelNode
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelNode.icc,v 1.1 2000/04/20 16:49:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4SmartVoxelNode Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelProxy.hh,v 1.4 2000/11/20 17:31:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4SmartVoxelProxy
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SmartVoxelProxy.icc,v 1.1 2000/04/20 16:49:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4SmartVoxelProxy Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SolidStore.hh,v 1.4 2000/04/20 16:49:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4SolidStore
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VPVParameterisation.hh,v 1.3 2000/04/20 16:49:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4VPVParamterisation
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VPhysicalVolume.hh,v 1.5 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4VPhysicalVolume
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VPhysicalVolume.icc,v 1.4 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4VPhysicalVolume Inline Implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VSolid.hh,v 1.7 2000/11/01 15:39:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4VSolid
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VSolid.icc,v 1.4 2000/11/01 15:39:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4VSolid Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VTouchable.hh,v 1.4 2000/11/01 15:39:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4VTouchable
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VTouchable.icc,v 1.4 2000/11/01 15:39:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// class G4VTouchable Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VoxelLimits.hh,v 1.4 2000/04/20 16:49:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class G4VoxelLimits
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VoxelLimits.icc,v 1.1 2000/04/20 16:49:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// G4VoxelLimits Inline implementation
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: meshdefs.hh,v 1.3 2000/04/20 16:49:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Tube/Cone Meshing constants for extent calculations
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: voxeldefs.hh,v 1.4 2000/04/20 16:49:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
//