Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4AssemblyStore
// G4AssemblyStore
//
// Class description:
//
@@ -36,15 +36,9 @@
// their destruction. The underlying container initially has a capacity of 20.
//
// If much additional functionality is added, should consider containment
// instead of inheritance for std::vector<T>
//
// Member data:
//
// static G4AssemblyStore*
// - Pointer to the single G4AssemblyStore
// instead of inheritance for std::vector<T>.
// History:
// 9.10.18 G.Cosmo Initial version
// 9.10.2018 G.Cosmo - Initial version
// --------------------------------------------------------------------
#ifndef G4ASSEMBLYSTORE_HH
#define G4ASSEMBLYSTORE_HH
@@ -58,7 +52,7 @@ class G4AssemblyVolume;
class G4AssemblyStore : public std::vector<G4AssemblyVolume*>
{
public: // with description
public:
static void Register(G4AssemblyVolume* pAssembly);
// Add the assembly to the collection.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4AssemblyTriplet
// G4AssemblyTriplet
//
// Class description:
//
@@ -40,8 +40,8 @@
// Ivana Hrivnacova: extended to support assembly of assemblies
// of volumes and reflections, March 2006
// ----------------------------------------------------------------------
#ifndef G4_ASSEMBLYTRIPLET_H
#define G4_ASSEMBLYTRIPLET_H
#ifndef G4_ASSEMBLYTRIPLET_HH
#define G4_ASSEMBLYTRIPLET_HH
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
@@ -51,7 +51,7 @@ class G4AssemblyVolume;
class G4AssemblyTriplet
{
public: // with description
public:
G4AssemblyTriplet();
// Default constructor
@@ -104,28 +104,26 @@ class G4AssemblyTriplet
inline G4bool IsReflection() const;
// Return true if the logical or assembly volume has reflection
private:
private:
G4LogicalVolume* fVolume = nullptr;
G4LogicalVolume* fVolume = nullptr;
// A logical volume
G4ThreeVector fTranslation;
G4ThreeVector fTranslation;
// A logical volume translation
G4RotationMatrix* fRotation = nullptr;
// A logical volume rotation
private:
// Member data for handling assemblies of assemblies and reflections
G4AssemblyVolume* fAssembly = nullptr;
// An assembly volume
G4bool fIsReflection = false;
G4bool fIsReflection = false;
// True if the logical or assembly volume has reflection
};
#include "G4AssemblyTriplet.icc"
#endif // G4_ASSEMBLYTRIPLET_H
#endif // G4_ASSEMBLYTRIPLET_HH
@@ -65,8 +65,7 @@ G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
}
inline
G4AssemblyTriplet::~G4AssemblyTriplet()
= default;
G4AssemblyTriplet::~G4AssemblyTriplet() = default;
inline
G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4AssemblyVolume
// G4AssemblyVolume
//
// Class description:
//
@@ -40,8 +40,8 @@
// Ivana Hrivnacova: extended to support assembly of assemblies
// of volumes and reflections - March 2006
// ----------------------------------------------------------------------
#ifndef G4_ASSEMBLYVOLUME_H
#define G4_ASSEMBLYVOLUME_H
#ifndef G4_ASSEMBLYVOLUME_HH
#define G4_ASSEMBLYVOLUME_HH
#include <vector>
@@ -52,177 +52,177 @@ class G4VPhysicalVolume;
class G4AssemblyVolume
{
public: // with description
public:
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.
//
// The rotation matrix passed as argument can be nullptr (identity) or an
// address even of an object on the upper stack frame. During assembly
// imprint, a new matrix is created anyway and it is kept track of it so
// it can be automatically deleted later at the end of the application.
// This policy is adopted since user has no control on the way the
// rotations are combined.
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.
//
// The rotation matrix passed as argument can be nullptr (identity) or an
// address even of an object on the upper stack frame. During assembly
// imprint, a new matrix is created anyway and it is kept track of it so
// it can be automatically deleted later at the end of the application.
// This policy is adopted since user has no control on the way the
// rotations are combined.
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4ThreeVector& translation,
G4RotationMatrix* rotation);
//
// Place the given volume 'pPlacedVolume' inside the assembly.
//
// The adopted 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.
//
// The rotation matrix passed as argument can be nullptr (identity) or an
// address even of an object on the upper stack frame. During assembly
// imprint, a new matrix is created anyway and it is kept track of it so
// it can be automatically deleted later at the end of the application.
// This policy is adopted since user has no control on the way the
// rotations are combined.
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4Transform3D& transformation);
//
// The same as previous, but takes complete 3D transformation in space
// as its argument.
void AddPlacedAssembly( G4AssemblyVolume* pAssembly,
G4Transform3D& transformation);
//
// The same as previous AddPlacedVolume(), but takes an assembly volume
// as its argument.
void AddPlacedAssembly( G4AssemblyVolume* pAssembly,
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4ThreeVector& translation,
G4RotationMatrix* rotation);
//
// The same as above AddPlacedVolume(), but takes an assembly volume
// as its argument with translation and rotation.
//
// Place the given volume 'pPlacedVolume' inside the assembly.
//
// The adopted 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.
//
// The rotation matrix passed as argument can be nullptr (identity) or an
// address even of an object on the upper stack frame. During assembly
// imprint, a new matrix is created anyway and it is kept track of it so
// it can be automatically deleted later at the end of the application.
// This policy is adopted since user has no control on the way the
// rotations are combined.
void MakeImprint( G4LogicalVolume* pMotherLV,
G4ThreeVector& translationInMother,
G4RotationMatrix* pRotationInMother,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// Creates instance of an assembly volume inside the given mother volume.
void AddPlacedVolume( G4LogicalVolume* pPlacedVolume,
G4Transform3D& transformation);
//
// The same as previous, but takes complete 3D transformation in space
// as its argument.
void MakeImprint( G4LogicalVolume* pMotherLV,
G4Transform3D& transformation,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// The same as previous Imprint() method, but takes complete 3D
// transformation in space as its argument.
void AddPlacedAssembly( G4AssemblyVolume* pAssembly,
G4Transform3D& transformation);
//
// The same as previous AddPlacedVolume(), but takes an assembly volume
// as its argument.
inline std::vector<G4VPhysicalVolume*>::iterator GetVolumesIterator();
inline std::size_t TotalImprintedVolumes() const;
//
// Methods to access the physical volumes imprinted with the assembly.
inline G4Transform3D& GetImprintTransformation(unsigned int imprintID);
// Method to access transformation for each imprint
void AddPlacedAssembly( G4AssemblyVolume* pAssembly,
G4ThreeVector& translation,
G4RotationMatrix* rotation);
//
// The same as above AddPlacedVolume(), but takes an assembly volume
// as its argument with translation and rotation.
inline std::vector<G4AssemblyTriplet>::iterator GetTripletsIterator();
inline std::size_t TotalTriplets() const;
//
// Methods to access the triplets which are part of the assembly
void MakeImprint( G4LogicalVolume* pMotherLV,
G4ThreeVector& translationInMother,
G4RotationMatrix* pRotationInMother,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// Creates instance of an assembly volume inside the given mother volume.
void MakeImprint( G4LogicalVolume* pMotherLV,
G4Transform3D& transformation,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// The same as previous Imprint() method, but takes complete 3D
// transformation in space as its argument.
inline std::vector<G4VPhysicalVolume*>::iterator GetVolumesIterator();
inline std::size_t TotalImprintedVolumes() const;
//
// Methods to access the physical volumes imprinted with the assembly.
inline G4Transform3D& GetImprintTransformation(unsigned int imprintID);
// Method to access transformation for each imprint
inline std::vector<G4AssemblyTriplet>::iterator GetTripletsIterator();
inline std::size_t TotalTriplets() const;
//
// Methods to access the triplets which are part of the assembly
inline unsigned int GetImprintsCount() const;
//
// Return the number of made imprints.
inline unsigned int GetImprintsCount() const;
//
// Return the number of made imprints.
unsigned int GetInstanceCount() const;
//
// Return the number of existing instance of G4AssemblyVolume class.
unsigned int GetInstanceCount() const;
//
// Return the number of existing instance of G4AssemblyVolume class.
inline unsigned int GetAssemblyID() const;
//
// Return instance number of this concrete object.
inline unsigned int GetAssemblyID() const;
//
// Return instance number of this concrete object.
protected:
inline void SetInstanceCount( unsigned int value );
inline void SetAssemblyID( unsigned int value );
protected:
inline void SetInstanceCount( unsigned int value );
inline void SetAssemblyID( unsigned int value );
void InstanceCountPlus();
void InstanceCountMinus();
void InstanceCountPlus();
void InstanceCountMinus();
inline void SetImprintsCount( unsigned int value );
inline void ImprintsCountPlus();
inline void ImprintsCountMinus();
//
// Internal counting mechanism, used to compute unique the names of
// physical volumes created by MakeImprint() methods.
inline void SetImprintsCount( unsigned int value );
inline void ImprintsCountPlus();
inline void ImprintsCountMinus();
//
// Internal counting mechanism, used to compute unique the names of
// physical volumes created by MakeImprint() methods.
private:
private:
void MakeImprint( G4AssemblyVolume* pAssembly,
G4LogicalVolume* pMotherLV,
G4Transform3D& transformation,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// Function for placement of the given assembly in the given mother
// (called recursively if the assembly contains an assembly).
void MakeImprint( G4AssemblyVolume* pAssembly,
G4LogicalVolume* pMotherLV,
G4Transform3D& transformation,
G4int copyNumBase = 0,
G4bool surfCheck = false );
//
// Function for placement of the given assembly in the given mother
// (called recursively if the assembly contains an assembly).
private:
private:
std::vector<G4AssemblyTriplet> fTriplets;
//
// Participating volumes represented as a vector of
// <logical volume, translation, rotation>.
std::vector<G4AssemblyTriplet> fTriplets;
//
// Participating volumes represented as a vector of
// <logical volume, translation, rotation>.
std::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, logical volume store
// and physical volume store 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 !
std::vector<G4VPhysicalVolume*> fPVStore;
//
// We need to keep list of physical volumes created by MakeImprint()
// 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, logical volume store
// and physical volume store 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 !
unsigned int fImprintsCounter;
//
// Number of imprints of the given assembly volume.
unsigned int fImprintsCounter;
//
// Number of imprints of the given assembly volume.
static G4ThreadLocal unsigned int fsInstanceCounter;
//
// Class instance counter.
static G4ThreadLocal unsigned int fsInstanceCounter;
//
// Class instance counter.
unsigned int fAssemblyID = 0;
//
// Assembly object ID derived from instance counter at construction time.
unsigned int fAssemblyID = 0;
//
// Assembly object ID derived from instance counter at construction time.
std::map<unsigned int, G4Transform3D> fImprintsTransf;
//
// Container of transformations for each imprint (used by GDML persistency)
std::map<unsigned int, G4Transform3D> fImprintsTransf;
//
// Container of transformations for each imprint (used in GDML)
};
#include "G4AssemblyVolume.icc"
#endif // G4_ASSEMBLYVOLUME_H
#endif // G4_ASSEMBLYVOLUME_HH
@@ -34,19 +34,19 @@ unsigned int G4AssemblyVolume::GetImprintsCount() const
}
inline
void G4AssemblyVolume::SetImprintsCount( unsigned int value )
void G4AssemblyVolume::SetImprintsCount( unsigned int value )
{
fImprintsCounter = value;
}
inline
void G4AssemblyVolume::ImprintsCountPlus()
void G4AssemblyVolume::ImprintsCountPlus()
{
++fImprintsCounter;
}
inline
void G4AssemblyVolume::ImprintsCountMinus()
void G4AssemblyVolume::ImprintsCountMinus()
{
--fImprintsCounter;
}
@@ -58,7 +58,7 @@ unsigned int G4AssemblyVolume::GetAssemblyID() const
}
inline
void G4AssemblyVolume::SetAssemblyID( unsigned int value )
void G4AssemblyVolume::SetAssemblyID( unsigned int value )
{
fAssemblyID = value;
}
@@ -33,9 +33,8 @@
// Original author: X.Dong (NorthEastern Univ.), November 2009
// Reviewed implementation: G.Cosmo (CERN), December 2009
// ------------------------------------------------------------
#ifndef G4EnhancedVecAllocator_h
#define G4EnhancedVecAllocator_h 1
#ifndef G4EnhancedVecAllocator_hh
#define G4EnhancedVecAllocator_hh 1
#include "G4Types.hh"
@@ -1,75 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4GRSSolid
//
// Class description:
//
// Object representing a touchable solid - maintains the association
// between a solid and its net resultant local->global transform.
//
// NOTE: The (optional) rotation matrix is copied
// Created: Paul Kent - August 1996
// ----------------------------------------------------------------------
#ifndef G4GRSSOLID_HH
#define G4GRSSOLID_HH
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4VTouchable.hh"
class G4VSolid;
class G4GRSSolid : public G4VTouchable
{
public: // with description
G4GRSSolid(G4VSolid *pSolid,
const G4RotationMatrix *pRot,
const G4ThreeVector &tlate);
G4GRSSolid(G4VSolid *pSolid,
const G4RotationMatrix &rot,
const G4ThreeVector &tlate);
~G4GRSSolid() override;
G4GRSSolid(const G4GRSSolid&) = delete;
G4GRSSolid& operator=(const G4GRSSolid&) = delete;
// Copy constructor and assignment operator not allowed
inline G4VSolid* GetSolid(G4int depth=0) const override;
inline const G4ThreeVector& GetTranslation(G4int depth=0) const override;
inline const G4RotationMatrix* GetRotation(G4int depth=0) const override;
private:
G4VSolid* fsolid = nullptr;
G4RotationMatrix* frot = nullptr;
G4ThreeVector ftlate;
};
#include "G4GRSSolid.icc"
#endif
@@ -1,98 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4GRSSolid inline implementation
// ----------------------------------------------------------------------
inline
G4GRSSolid::G4GRSSolid( G4VSolid *pSolid,
const G4RotationMatrix *pRot,
const G4ThreeVector &tlate )
: fsolid(pSolid), ftlate(tlate)
{
if (pRot != nullptr)
{
frot = new G4RotationMatrix(*pRot);
if ( frot == nullptr )
{
G4Exception("G4GRSSolid::G4GRSSolid()","GeomVol0002",FatalException,
"Cannot allocate G4RotationMatrix, NULL pointer.");
}
}
else
{
frot = nullptr;
}
}
inline
G4GRSSolid::G4GRSSolid( G4VSolid *pSolid,
const G4RotationMatrix &rot,
const G4ThreeVector &tlate )
: fsolid(pSolid), ftlate(tlate)
{
frot = new G4RotationMatrix(rot);
if ( frot == nullptr )
{
G4Exception("G4GRSSolid::G4GRSSolid()","GeomVol0002",FatalException,
"Cannot allocate G4RotationMatrix, NULL pointer.");
}
}
inline
G4VSolid* G4GRSSolid::GetSolid( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSSolid::GetSolid()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return fsolid;
}
inline
const G4ThreeVector& G4GRSSolid::GetTranslation( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSSolid::GetTranslation()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return ftlate;
}
inline
const G4RotationMatrix* G4GRSSolid::GetRotation( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSSolid::GetRotation()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return frot;
}
@@ -1,48 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4GRSSolidHandle
//
// Class description:
//
// Type providing reference counting mechanism solid touchables.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek (Radovan.Chytracek@cern.ch), March 2001
//
// ----------------------------------------------------------------------
#ifndef G4GRSSOLIDHANDLE_HH
#define G4GRSSOLIDHANDLE_HH 1
#include "G4GRSSolid.hh"
#include "G4ReferenceCountedHandle.hh"
using G4GRSSolidHandle = G4ReferenceCountedHandle<G4GRSSolid>;
#endif // G4GRSSOLIDHANDLE_HH
@@ -1,77 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4GRSVolume
//
// Class description:
//
// Object representing a touchable detector element - maintains
// associations between a physical volume and its net resultant
// local->global transform.
//
// NOTE: The (optional) rotation matrix is copied
// Created: Paul Kent - August 1996
// ----------------------------------------------------------------------
#ifndef G4GRSVOLUME_HH
#define G4GRSVOLUME_HH
#include "G4VTouchable.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
class G4GRSVolume : public G4VTouchable
{
public: // with description
G4GRSVolume(G4VPhysicalVolume* pVol,
const G4RotationMatrix* pRot,
const G4ThreeVector& tlate);
G4GRSVolume(G4VPhysicalVolume* pVol,
const G4RotationMatrix& rot,
const G4ThreeVector& tlate);
~G4GRSVolume() override;
G4GRSVolume(const G4GRSVolume&) = delete;
G4GRSVolume& operator=(const G4GRSVolume&) = delete;
// Copy constructor and assignment operator not allowed
inline G4VPhysicalVolume* GetVolume(G4int depth=0) const override;
inline G4VSolid* GetSolid(G4int depth=0) const override;
inline const G4ThreeVector& GetTranslation(G4int depth=0) const override;
inline const G4RotationMatrix* GetRotation(G4int depth=0) const override;
private:
G4VPhysicalVolume* fvol = nullptr;
G4RotationMatrix* frot = nullptr;
G4ThreeVector ftlate;
};
#include "G4GRSVolume.icc"
#endif
@@ -1,109 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4GRSVolume inline implementation
// ----------------------------------------------------------------------
inline
G4GRSVolume::G4GRSVolume( G4VPhysicalVolume* pVol,
const G4RotationMatrix* pRot,
const G4ThreeVector& tlate )
: fvol(pVol), ftlate(tlate)
{
if ( pRot != nullptr )
{
frot = new G4RotationMatrix(*pRot);
if ( frot == nullptr )
{
G4Exception("G4GRSVolume::G4GRSVolume()", "GeomVol0002", FatalException,
"Cannot allocate G4RotationMatrix, NULL pointer.");
}
}
else
{
frot = nullptr;
}
}
inline
G4GRSVolume::G4GRSVolume( G4VPhysicalVolume* pVol,
const G4RotationMatrix& rot,
const G4ThreeVector& tlate )
: fvol(pVol), ftlate(tlate)
{
frot = new G4RotationMatrix(rot);
if ( frot == nullptr )
{
G4Exception("G4GRSVolume::G4GRSVolume()", "GeomVol0002", FatalException,
"Cannot allocate G4RotationMatrix, NULL pointer.");
}
}
inline
G4VPhysicalVolume* G4GRSVolume::GetVolume( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSVolume::GetVolume()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return fvol;
}
inline
G4VSolid* G4GRSVolume::GetSolid( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSVolume::GetSolid()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return fvol->GetLogicalVolume()->GetSolid();
}
inline
const G4ThreeVector& G4GRSVolume::GetTranslation( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSVolume::GetTranslation()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return ftlate;
}
inline
const G4RotationMatrix* G4GRSVolume::GetRotation( G4int depth ) const
{
if( depth != 0 )
{
G4Exception("G4GRSVolume::GetRotation()", "GeomVol0003",
FatalException, "History depth in input must be 0 !");
}
return frot;
}
@@ -1,48 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4GRSVolumeHandle
//
// Class description:
//
// Type providing reference counting mechanism for volume touchables.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek (Radovan.Chytracek@cern.ch), March 2001
//
// ----------------------------------------------------------------------
#ifndef G4GRSVOLUMEHANDLE_HH
#define G4GRSVOLUMEHANDLE_HH 1
#include "G4GRSVolume.hh"
#include "G4ReferenceCountedHandle.hh"
using G4GRSVolumeHandle = G4ReferenceCountedHandle<G4GRSVolume>;
#endif // G4GRSVOLUMEHANDLE_HH
@@ -30,7 +30,7 @@
// A Logical Surface class for surfaces defined by the boundary
// of two physical volumes.
// Author: John Apostolakis (John.Apostolakis@cern.ch), 17-06-1997
// Author: John Apostolakis, CERN - 17-06-1997
// --------------------------------------------------------------------
#ifndef G4LogicalBorderSurface_hh
#define G4LogicalBorderSurface_hh 1
@@ -49,7 +49,6 @@ using G4LogicalBorderSurfaceTable
class G4LogicalBorderSurface : public G4LogicalSurface
{
public:
G4LogicalBorderSurface( const G4String& name,
@@ -30,7 +30,7 @@
// A Logical Surface class for the surface surrounding a single logical
// volume.
// Author: John Apostolakis (John.Apostolakis@cern.ch), 16-06-1997
// Author: John Apostolakis, CERN - 16-06-1997
// --------------------------------------------------------------------
#ifndef G4LogicalSkinSurface_hh
#define G4LogicalSkinSurface_hh 1
@@ -46,7 +46,6 @@ using G4LogicalSkinSurfaceTable = std::vector<G4LogicalSkinSurface*>;
class G4LogicalSkinSurface : public G4LogicalSurface
{
public:
G4LogicalSkinSurface( const G4String& name,
@@ -81,7 +80,6 @@ class G4LogicalSkinSurface : public G4LogicalSurface
static G4LogicalSkinSurfaceTable *theSkinSurfaceTable;
// The static Table of SkinSurfaces.
};
// ********************************************************************
@@ -1,153 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationHistory
//
// Class description:
//
// Responsible for maintenance of the history of the path taken through
// the geometrical hierarchy. Principally a utility class for use by the
// G4Navigator.
// 25.07.96 - P.Kent Initial version. Services derived from
// requirements of G4Navigator.
// ----------------------------------------------------------------------
#ifndef G4NAVIGATIONHISTORY_HH
#define G4NAVIGATIONHISTORY_HH
#include <assert.h>
#include <vector>
#include <iostream>
#include "geomdefs.hh"
#include "geomwdefs.hh"
#include "G4AffineTransform.hh"
#include "G4VPhysicalVolume.hh"
#include "G4NavigationLevel.hh"
#include "G4NavigationHistoryPool.hh"
#include "G4Allocator.hh"
class G4NavigationHistory
{
public: // with description
friend std::ostream&
operator << (std::ostream& os, const G4NavigationHistory& h);
G4NavigationHistory();
// Constructor: sizes history lists & resets histories.
~G4NavigationHistory();
// Destructor.
G4NavigationHistory(const G4NavigationHistory& h);
// Copy constructor.
inline G4NavigationHistory& operator=(const G4NavigationHistory& h);
// Assignment operator.
inline void Reset();
// Resets history. It now does clear most entries.
// Level 0 is preserved.
inline void Clear();
// Clears entries, zeroing transforms, matrices & negating
// replica history.
inline void SetFirstEntry(G4VPhysicalVolume* pVol);
// Setup initial entry in stack: copies through volume transform & matrix.
// The volume is assumed to be unrotated.
inline const G4AffineTransform& GetTopTransform() const;
// Returns topmost transform.
inline const G4AffineTransform* GetPtrTopTransform() const;
// Returns pointer to topmost transform.
inline G4int GetTopReplicaNo() const;
// Returns topmost replica no record.
inline EVolume GetTopVolumeType() const;
// Returns topmost volume type.
inline G4VPhysicalVolume* GetTopVolume() const;
// Returns topmost physical volume pointer.
inline std::size_t GetDepth() const;
// Returns current history depth.
inline std::size_t GetMaxDepth() const;
// Returns current maximum size of history.
// Note: MaxDepth of 16 mean history entries [0..15] inclusive.
inline const G4AffineTransform& GetTransform(G4int n) const;
// Returns specified transformation.
inline G4int GetReplicaNo(G4int n) const;
// Returns specified replica no record.
inline EVolume GetVolumeType(G4int n) const;
// Returns specified volume type.
inline G4VPhysicalVolume* GetVolume(G4int n) const;
// Returns specified physical volume pointer.
inline void NewLevel(G4VPhysicalVolume* pNewMother,
EVolume vType = kNormal,
G4int nReplica = -1);
// Changes navigation level to that of the new mother.
inline void BackLevel();
// Back up one level in history: from mother to grandmother.
// It does not erase history record of current mother.
inline void BackLevel(G4int n);
// Back up specified number of levels in history.
inline void *operator new(std::size_t);
// Override "new" for "G4Allocator".
inline void operator delete(void *aHistory);
// Override "delete" for "G4Allocator".
private:
inline void EnlargeHistory();
// Enlarge history if required: increase size by kHistoryStride.
// Note that additional history entries are `dirty' (non zero) apart
// from the volume history.
private:
std::vector<G4NavigationLevel>* fNavHistory;
// Pointer to the vector of navigation levels.
std::size_t fStackDepth{0};
// Depth of stack: effectively depth in geometrical tree.
};
#include "G4NavigationHistory.icc"
#endif
@@ -1,225 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4NavigationHistory Inline implementation
//
// ----------------------------------------------------------------------
extern G4GEOM_DLL G4Allocator<G4NavigationHistory>*& aNavigHistoryAllocator();
// There is no provision that this class is subclassed.
// If it is subclassed & new data members are added then the
// following "new" & "delete" will fail and give errors.
//
inline
void* G4NavigationHistory::operator new(std::size_t)
{
if (aNavigHistoryAllocator() == nullptr)
{
aNavigHistoryAllocator() = new G4Allocator<G4NavigationHistory>;
}
return (void *) aNavigHistoryAllocator()->MallocSingle();
}
inline
void G4NavigationHistory::operator delete(void *aHistory)
{
aNavigHistoryAllocator()->FreeSingle((G4NavigationHistory *) aHistory);
}
inline
G4NavigationHistory&
G4NavigationHistory::operator=(const G4NavigationHistory &h)
{
if (&h == this) { return *this; }
// *fNavHistory=*(h.fNavHistory); // This works, but is very slow.
if( GetMaxDepth() != h.GetMaxDepth() )
{
fNavHistory->resize( h.GetMaxDepth() );
}
for ( auto ilev=G4int(h.fStackDepth); ilev>=0; --ilev )
{
(*fNavHistory)[ilev] = (*h.fNavHistory)[ilev];
}
fStackDepth = h.fStackDepth;
return *this;
}
inline
void G4NavigationHistory::Reset()
{
fStackDepth=0;
}
inline
void G4NavigationHistory::Clear()
{
G4AffineTransform origin(G4ThreeVector(0.,0.,0.));
G4NavigationLevel tmpNavLevel = G4NavigationLevel(nullptr, origin, kNormal, -1) ;
Reset();
for (auto ilev=G4long(fNavHistory->size()-1); ilev>=0; --ilev)
{
(*fNavHistory)[ilev] = tmpNavLevel;
}
}
inline
void G4NavigationHistory::SetFirstEntry(G4VPhysicalVolume* pVol)
{
G4ThreeVector translation(0.,0.,0.);
G4int copyNo = -1;
// Protection needed in case pVol=null
// so that a touchable-history can signal OutOfWorld
//
if( pVol != nullptr )
{
translation = pVol->GetTranslation();
copyNo = pVol->GetCopyNo();
}
(*fNavHistory)[0] =
G4NavigationLevel( pVol, G4AffineTransform(translation), kNormal, copyNo );
}
inline
const G4AffineTransform* G4NavigationHistory::GetPtrTopTransform() const
{
return (*fNavHistory)[fStackDepth].GetPtrTransform();
}
inline
const G4AffineTransform& G4NavigationHistory::GetTopTransform() const
{
return (*fNavHistory)[fStackDepth].GetTransform();
}
inline
G4int G4NavigationHistory::GetTopReplicaNo() const
{
return (*fNavHistory)[fStackDepth].GetReplicaNo();
}
inline
EVolume G4NavigationHistory::GetTopVolumeType() const
{
return (*fNavHistory)[fStackDepth].GetVolumeType();
}
inline
G4VPhysicalVolume* G4NavigationHistory::GetTopVolume() const
{
return (*fNavHistory)[fStackDepth].GetPhysicalVolume();
}
inline
std::size_t G4NavigationHistory::GetDepth() const
{
return fStackDepth;
}
inline
const G4AffineTransform&
G4NavigationHistory::GetTransform(G4int n) const
{
return (*fNavHistory)[n].GetTransform();
}
inline
G4int G4NavigationHistory::GetReplicaNo(G4int n) const
{
return (*fNavHistory)[n].GetReplicaNo();
}
inline
EVolume G4NavigationHistory::GetVolumeType(G4int n) const
{
return (*fNavHistory)[n].GetVolumeType();
}
inline
G4VPhysicalVolume* G4NavigationHistory::GetVolume(G4int n) const
{
return (*fNavHistory)[n].GetPhysicalVolume();
}
inline
std::size_t G4NavigationHistory::GetMaxDepth() const
{
return fNavHistory->size();
}
inline
void G4NavigationHistory::BackLevel()
{
assert( fStackDepth>0 );
// Tell the level that I am forgetting it
// delete (*fNavHistory)[fStackDepth];
//
--fStackDepth;
}
inline
void G4NavigationHistory::BackLevel(G4int n)
{
assert( n<=G4int(fStackDepth) );
fStackDepth-=n;
}
inline
void G4NavigationHistory::EnlargeHistory()
{
std::size_t len = fNavHistory->size();
if ( len == fStackDepth )
{
// Note: Resize operation clears additional entries
//
std::size_t nlen = len+kHistoryStride;
fNavHistory->resize(nlen);
}
}
inline
void G4NavigationHistory::NewLevel( G4VPhysicalVolume* pNewMother,
EVolume vType,
G4int nReplica )
{
++fStackDepth;
EnlargeHistory(); // Enlarge if required
(*fNavHistory)[fStackDepth] =
G4NavigationLevel( pNewMother,
(*fNavHistory)[fStackDepth-1].GetTransform(),
G4AffineTransform(pNewMother->GetRotation(),
pNewMother->GetTranslation()),
vType,
nReplica );
// The constructor computes the new global->local transform
}
@@ -1,142 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationHistoryPool
//
// Class description:
//
// Thread-local pool for navigation history levels collections being
// allocated by G4NavigationHistory. Allows for reuse of the vectors
// allocated according to lifetime of G4NavigationHistory objects.
// 07.05.14 G.Cosmo Initial version
// --------------------------------------------------------------------
#ifndef G4NAVIGATIONHISTORYPOOL_HH
#define G4NAVIGATIONHISTORYPOOL_HH
#include <vector>
#include "G4NavigationLevel.hh"
class G4NavigationHistoryPool
{
public: // with description
static G4NavigationHistoryPool* GetInstance();
// Return unique instance of G4NavigationHistoryPool.
inline std::vector<G4NavigationLevel> * GetNewLevels();
// Return the pointer to a new collection of levels being allocated.
inline std::vector<G4NavigationLevel> * GetLevels();
// Return the pointer of the first available collection of levels
// If none are available (i.e. empty Free vector) allocate collection.
inline void DeRegister(std::vector<G4NavigationLevel> * pLevels);
// Deactivate levels collection in pool.
void Clean();
// Delete all levels stored in the pool.
void Print() const;
// Print number of entries.
~G4NavigationHistoryPool();
// Destructor: takes care to delete allocated levels.
private:
G4NavigationHistoryPool();
// Default constructor.
inline void Register(std::vector<G4NavigationLevel> * pLevels);
// Register levels collection to pool and activate it.
void Reset();
// Set internal vectors content to zero.
private:
static G4ThreadLocal G4NavigationHistoryPool* fgInstance;
std::vector<std::vector<G4NavigationLevel> *> fPool;
std::vector<std::vector<G4NavigationLevel> *> fFree;
};
// ***************************************************************************
// Register levels collection to pool (add and/or activate)
// ***************************************************************************
//
inline void G4NavigationHistoryPool::
Register(std::vector<G4NavigationLevel> * pLevels)
{
fPool.push_back(pLevels);
}
// ***************************************************************************
// Deactivate levels collection in pool
// ***************************************************************************
//
inline void G4NavigationHistoryPool::
DeRegister(std::vector<G4NavigationLevel> * pLevels)
{
fFree.push_back(pLevels);
}
// ***************************************************************************
// Return the pointer of a new collection of levels allocated
// ***************************************************************************
//
inline std::vector<G4NavigationLevel> * G4NavigationHistoryPool::GetNewLevels()
{
auto aLevelVec = new std::vector<G4NavigationLevel>(kHistoryMax);
Register(aLevelVec);
return aLevelVec;
}
// ***************************************************************************
// Return the pointer of the first available collection of levels
// If none are available (i.e. non active) allocate collection
// ***************************************************************************
//
inline std::vector<G4NavigationLevel> * G4NavigationHistoryPool::GetLevels()
{
std::vector<G4NavigationLevel> * levels = nullptr;
if (!fFree.empty())
{
levels = fFree.back();
fFree.pop_back();
}
else
{
levels = GetNewLevels();
}
return levels;
}
#endif
@@ -1,105 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationLevel
//
// Class description:
//
// Maintains one level of the geometrical hierarchy.
// A utility class for use by G4NavigationHistory.
// 30.09.97 J.Apostolakis Initial version. Services derived from
// requirements of touchables & G4NavigatorHistory
// ----------------------------------------------------------------------
#ifndef G4NAVIGATIONLEVEL_HH
#define G4NAVIGATIONLEVEL_HH
#include "G4Types.hh"
#include "G4AffineTransform.hh"
#include "G4VPhysicalVolume.hh"
#include "G4NavigationLevelRep.hh"
#include "G4Allocator.hh"
#include "geomwdefs.hh"
class G4NavigationLevel
{
public: // with description
G4NavigationLevel(G4VPhysicalVolume* newPtrPhysVol,
const G4AffineTransform& newT,
EVolume newVolTp,
G4int newRepNo = -1);
G4NavigationLevel(G4VPhysicalVolume* newPtrPhysVol,
const G4AffineTransform& levelAbove,
const G4AffineTransform& relativeCurrent,
EVolume newVolTp,
G4int newRepNo = -1);
// As the previous constructor, but instead of giving Transform, give
// the AffineTransform to the level above and the current level's
// Transform relative to that.
G4NavigationLevel();
G4NavigationLevel( const G4NavigationLevel& );
~G4NavigationLevel();
G4NavigationLevel& operator=(const G4NavigationLevel& right);
inline G4VPhysicalVolume* GetPhysicalVolume() const;
inline const G4AffineTransform* GetTransformPtr() const ; // New
inline const G4AffineTransform& GetTransform() const ; // Old
inline EVolume GetVolumeType() const ;
inline G4int GetReplicaNo() const ;
public: // without description
inline const G4AffineTransform* GetPtrTransform() const;
// To try to resolve the possible problem with returning a reference.
inline void* operator new(size_t);
inline void operator delete(void* aLevel);
// Override "new" and "delete" to use "G4Allocator".
inline void* operator new(size_t, void*);
#ifndef G4NOT_ISO_DELETES
inline void operator delete(void* ptr, void*); // Not accepted Sun/HP
#endif
// Pre-allocated 'new' and 'delete' for use with STL
// Do not (directly) use Allocator
private:
G4NavigationLevelRep* fLevelRep;
};
#include "G4NavigationLevel.icc"
#endif
@@ -1,97 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationLevel inline implementation
//
// 30.09.97 J.Apostolakis Initial version
// ----------------------------------------------------------------------
extern G4GEOM_DLL G4Allocator<G4NavigationLevel>*& aNavigationLevelAllocator();
inline
G4VPhysicalVolume* G4NavigationLevel::GetPhysicalVolume() const
{
return fLevelRep->GetPhysicalVolume();
}
inline
const G4AffineTransform& G4NavigationLevel::GetTransform() const
{
return fLevelRep->GetTransform() ;
}
inline
const G4AffineTransform* G4NavigationLevel::GetPtrTransform() const
{
return fLevelRep->GetTransformPtr() ;
}
inline
EVolume G4NavigationLevel::GetVolumeType() const
{
return fLevelRep->GetVolumeType() ;
}
inline
G4int G4NavigationLevel::GetReplicaNo() const
{
return fLevelRep->GetReplicaNo() ;
}
// There is no provision in case this class is subclassed.
// If it is subclassed, this will fail and may not give errors!
//
inline
void* G4NavigationLevel::operator new(size_t)
{
if (aNavigationLevelAllocator() == nullptr)
{
aNavigationLevelAllocator() = new G4Allocator<G4NavigationLevel>;
}
return (void *) aNavigationLevelAllocator()->MallocSingle();
}
// Added for use by STL (used for pre-allocation).
//
inline
void* G4NavigationLevel::operator new(size_t, void* a)
{
return a;
}
inline
void G4NavigationLevel::operator delete(void* aLevel)
{
aNavigationLevelAllocator()->FreeSingle((G4NavigationLevel *) aLevel);
}
// Added for use by STL (used for free-ing pre-allocated?).
//
#ifndef G4NOT_ISO_DELETES
inline
void G4NavigationLevel::operator delete(void *, void *)
{
}
#endif
@@ -1,112 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationLevelRep
//
// Class description:
//
// A data representation class, used to hold the data for a single level
// of the Navigation history tree.
//
// This is the body of a handle/body pair of classes, that implement
// reference counting for NavigationLevels.
// The corresponding handle class is G4NavigationLevel
// 1 October 1997, J.Apostolakis: initial version
// ----------------------------------------------------------------------
#ifndef G4NAVIGATIONLEVELREP_HH
#define G4NAVIGATIONLEVELREP_HH
#include "G4Types.hh"
#include "G4AffineTransform.hh"
#include "G4VPhysicalVolume.hh"
#include "G4Allocator.hh"
#include "geomwdefs.hh"
class G4NavigationLevelRep
{
public: // with description
inline G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol,
const G4AffineTransform& newT,
EVolume newVolTp,
G4int newRepNo = -1 );
inline G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol,
const G4AffineTransform& levelAbove,
const G4AffineTransform& relativeCurrent,
EVolume newVolTp,
G4int newRepNo = -1 );
// As the previous constructor, but instead of giving Transform, give
// the AffineTransform to the level above and the current level's
// Transform relative to that.
inline G4NavigationLevelRep();
inline G4NavigationLevelRep( G4NavigationLevelRep& );
inline ~G4NavigationLevelRep();
inline G4NavigationLevelRep& operator=(const G4NavigationLevelRep& right);
inline G4VPhysicalVolume* GetPhysicalVolume();
inline const G4AffineTransform* GetTransformPtr() const ; // New
inline const G4AffineTransform& GetTransform() const ; // Old
inline EVolume GetVolumeType() const ;
inline G4int GetReplicaNo() const ;
inline void AddAReference();
inline G4bool RemoveAReference();
// Take care of the reference counts.
inline void* operator new(size_t);
// Override "new" to use "G4Allocator".
inline void operator delete(void* aTrack);
// Override "delete" to use "G4Allocator".
private:
G4AffineTransform sTransform;
// Compounded global->local transformation (takes a point in the
// global reference system to the system of the volume at this level)
G4VPhysicalVolume* sPhysicalVolumePtr = nullptr;
// Physical volume ptrs, for this level's volume
G4int sReplicaNo = -1;
EVolume sVolumeType;
// Volume `type'
G4int fCountRef = 1;
};
#include "G4NavigationLevelRep.icc"
#endif
@@ -1,176 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4NavigationLevelRep inline implementation
//
// 1 October 1997, J.Apostolakis Initial version
// ----------------------------------------------------------------------
extern G4GEOM_DLL G4Allocator<G4NavigationLevelRep>*& aNavigLevelRepAllocator();
// Constructors
//--------------
inline
G4NavigationLevelRep::G4NavigationLevelRep( G4VPhysicalVolume* pPhysVol,
const G4AffineTransform& afTransform,
EVolume volTp,
G4int repNo )
: sTransform(afTransform),
sPhysicalVolumePtr(pPhysVol),
sReplicaNo(repNo),
sVolumeType(volTp)
{
}
inline
G4NavigationLevelRep::G4NavigationLevelRep()
: sVolumeType(kReplica)
{
}
inline
G4NavigationLevelRep::G4NavigationLevelRep( G4VPhysicalVolume* pPhysVol,
const G4AffineTransform& levelAbove,
const G4AffineTransform& relativeCurrent,
EVolume volTp,
G4int repNo )
: sPhysicalVolumePtr(pPhysVol),
sReplicaNo(repNo),
sVolumeType(volTp)
{
sTransform.InverseProduct( levelAbove, relativeCurrent );
}
inline
G4NavigationLevelRep::G4NavigationLevelRep( G4NavigationLevelRep& right )
: sTransform(right.sTransform),
sPhysicalVolumePtr(right.sPhysicalVolumePtr),
sReplicaNo(right.sReplicaNo),
sVolumeType(right.sVolumeType)
{
}
// Destructor
//--------------
inline
G4NavigationLevelRep::~G4NavigationLevelRep()
{
#ifdef DEBUG_NAVIG_LEVEL
if(fCountRef>0)
{
G4Exception("G4NavigationLevelRep::~G4NavigationLevelRep()",
"GeomVol0003", FatalException,
"Deletion of data-level object with positive reference count.");
}
#endif
}
// Operators
// --------------
inline
G4NavigationLevelRep&
G4NavigationLevelRep::operator=( const G4NavigationLevelRep& right )
{
if ( &right != this )
{
sTransform = right.sTransform;
sPhysicalVolumePtr = right.sPhysicalVolumePtr;
sVolumeType = right.sVolumeType;
sReplicaNo = right.sReplicaNo;
fCountRef = right.fCountRef;
}
return *this;
}
// Accessors
// --------------
inline
G4VPhysicalVolume*
G4NavigationLevelRep::GetPhysicalVolume()
{
return sPhysicalVolumePtr;
}
inline
const G4AffineTransform&
G4NavigationLevelRep::GetTransform() const
{
return sTransform;
}
inline
const G4AffineTransform*
G4NavigationLevelRep::GetTransformPtr() const
{
return &sTransform;
}
inline
EVolume G4NavigationLevelRep::GetVolumeType() const
{
return sVolumeType;
}
inline
G4int G4NavigationLevelRep::GetReplicaNo() const
{
return sReplicaNo;
}
inline
void G4NavigationLevelRep::AddAReference()
{
++fCountRef;
}
inline
G4bool G4NavigationLevelRep::RemoveAReference()
{
return( --fCountRef <= 0 );
}
// There is no provision that this class is subclassed.
// If it is subclassed & new data members are added then the
// following "new" & "delete" will fail and give errors.
//
inline
void* G4NavigationLevelRep::operator new(size_t)
{
if (aNavigLevelRepAllocator() == nullptr)
{
aNavigLevelRepAllocator() = new G4Allocator<G4NavigationLevelRep>;
}
return (void *) aNavigLevelRepAllocator()->MallocSingle();
}
inline
void G4NavigationLevelRep::operator delete(void* aLevelRep)
{
aNavigLevelRepAllocator()->FreeSingle((G4NavigationLevelRep *) aLevelRep);
}
@@ -35,13 +35,13 @@
// 29.07.95, P.Kent - first non-stub version
// ----------------------------------------------------------------------
#ifndef G4PVPARAMETERISED_HH
#define G4PVPARAMETERISED_HH
#define G4PVPARAMETERISED_HH 1
#include "G4PVReplica.hh"
class G4PVParameterised : public G4PVReplica
{
public: // with description
public:
G4PVParameterised(const G4String& pName,
G4LogicalVolume* pLogical,
@@ -55,8 +55,6 @@ class G4PVParameterised : public G4PVReplica
// The positioning of the replicas is dominant along the specified axis.
// pSurfChk if true activates check for overlaps with existing volumes.
public: // without description
G4PVParameterised(const G4String& pName,
G4LogicalVolume* pLogical,
G4VPhysicalVolume* pMother,
@@ -72,8 +70,6 @@ class G4PVParameterised : public G4PVReplica
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
public: // with description
~G4PVParameterised() override;
// Virtual empty destructor.
@@ -30,19 +30,17 @@
// Class representing a single volume positioned within and relative
// to a mother volume.
// 24.07.95 P.Kent, First non-stub version
// 25.07.96 P.Kent, Modified interface for new `Replica' capable geometry
// 28.08.96 P.Kent. Tidied + transform replaced by rotmat+vector
// 24.07.95 P.Kent, First non-stub version.
// ----------------------------------------------------------------------
#ifndef G4PVPLACEMENT_HH
#define G4PVPLACEMENT_HH
#define G4PVPLACEMENT_HH 1
#include "G4VPhysicalVolume.hh"
#include "G4Transform3D.hh"
class G4PVPlacement : public G4VPhysicalVolume
{
public: // with description
public:
G4PVPlacement(G4RotationMatrix* pRot,
const G4ThreeVector& tlate,
@@ -85,8 +83,6 @@ class G4PVPlacement : public G4VPhysicalVolume
// of moving objects in a given reference frame. ]
// All other arguments are the same as for the previous constructor.
public: // without description
G4PVPlacement(G4RotationMatrix* pRot,
const G4ThreeVector& tlate,
const G4String& pName,
@@ -109,8 +105,6 @@ class G4PVPlacement : public G4VPhysicalVolume
// Utilises both variations above (from 2nd and 3rd constructor).
// The effect is the same as for the 2nd constructor.
public: // with description
~G4PVPlacement() override;
// Default destructor.
@@ -129,8 +123,6 @@ class G4PVPlacement : public G4VPhysicalVolume
// Reports a maximum of overlaps errors according to parameter in input.
// Returns true if the volume is overlapping.
public: // without description
G4PVPlacement(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
@@ -166,8 +158,6 @@ class G4PVPlacement : public G4VPhysicalVolume
G4bool fmany = false; // flag for overlapping structure - not used
G4bool fallocatedRotM = false; // flag for allocation of Rotation Matrix
G4int fcopyNo = 0; // for identification
};
#endif
@@ -61,7 +61,6 @@
// n=0..nReplicas-1
// 29.07.95 P.Kent - First non-stub version
// 26.10.97 J.Apostolakis - Added constructor that takes mother LV
// 13.01.13 G.Cosmo, A.Dotti - Modified for thread-safety for MT
// ----------------------------------------------------------------------
#ifndef G4PVREPLICA_HH
@@ -77,9 +77,9 @@ using G4ReflectedVolumesMap = std::map<G4LogicalVolume*, G4LogicalVolume*,
std::less<G4LogicalVolume*> >;
class G4ReflectionFactory
{
using LogicalVolumesMapIterator = G4ReflectedVolumesMap::const_iterator;
using LogicalVolumesMapIterator = G4ReflectedVolumesMap::const_iterator;
public: // with description
public:
virtual ~G4ReflectionFactory();
// Virtual destructor.
@@ -188,11 +188,11 @@ class G4ReflectionFactory
private:
G4LogicalVolume* ReflectLV(G4LogicalVolume* LV, G4bool surfCheck = false);
G4LogicalVolume* ReflectLV(G4LogicalVolume* LV, G4bool surfCheck = false);
// Gets/creates the reflected solid and logical volume
// and copies + transforms LV daughters.
G4LogicalVolume* CreateReflectedLV(G4LogicalVolume* LV);
G4LogicalVolume* CreateReflectedLV(G4LogicalVolume* LV);
// Creates the reflected solid and logical volume
// and add the logical volumes pair in the maps.
@@ -1,98 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4TouchableHistory
//
// Class description:
//
// Object representing a touchable detector element, and its history in the
// geometrical hierarchy, including its net resultant local->global transform.
// Created: Paul Kent, August 1996
// ----------------------------------------------------------------------
#ifndef G4TOUCHABLEHISTORY_HH
#define G4TOUCHABLEHISTORY_HH
#include "G4VTouchable.hh"
#include "G4NavigationHistory.hh"
#include "G4Allocator.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "geomwdefs.hh"
class G4TouchableHistory : public G4VTouchable
{
public: // with description
G4TouchableHistory();
// The default constructor produces a touchable-history of
// 'zero-depth', ie an "unphysical" and not very unusable one.
// It is for initialisation only.
G4TouchableHistory( const G4NavigationHistory& history );
// Copy constructor
~G4TouchableHistory() override;
// Destructor
inline G4VPhysicalVolume* GetVolume( G4int depth = 0 ) const override;
inline G4VSolid* GetSolid( G4int depth = 0 ) const override;
const G4ThreeVector& GetTranslation( G4int depth = 0 ) const override;
const G4RotationMatrix* GetRotation( G4int depth = 0 ) const override;
inline G4int GetReplicaNumber( G4int depth = 0 ) const override;
inline G4int GetHistoryDepth() const override;
G4int MoveUpHistory( G4int num_levels = 1 ) override;
// Access methods for touchables with history
void UpdateYourself( G4VPhysicalVolume* pPhysVol,
const G4NavigationHistory* history = nullptr ) override;
// Update methods for touchables with history
public: // without description
inline const G4NavigationHistory* GetHistory() const override;
// Should this method be "deprecated" ?
// it is used now in G4Navigator::LocateGlobalPointAndSetup
inline void* operator new(size_t);
inline void operator delete(void* aTH);
// Override "new" and "delete" to use "G4Allocator".
private:
inline G4int CalculateHistoryIndex( G4int stackDepth ) const;
G4RotationMatrix frot;
G4ThreeVector ftlate;
G4NavigationHistory fhistory;
};
#include "G4TouchableHistory.icc"
#endif
@@ -1,130 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4TouchableHistory inline implementation
//
// Created: Paul Kent, August 1996
// ----------------------------------------------------------------------
extern G4GEOM_DLL G4Allocator<G4TouchableHistory>*& aTouchableHistoryAllocator();
inline
void G4TouchableHistory::UpdateYourself( G4VPhysicalVolume* pPhysVol,
const G4NavigationHistory* pHistory )
{
fhistory = *pHistory;
const G4AffineTransform& tf = fhistory.GetTopTransform();
if( pPhysVol == nullptr )
{
// This means that the track has left the World Volume.
// Since the Navigation History does not already reflect this,
// we must correct this problem here.
//
fhistory.SetFirstEntry(pPhysVol);
}
ftlate = tf.InverseNetTranslation();
frot = tf.InverseNetRotation();
}
inline
G4int G4TouchableHistory::CalculateHistoryIndex( G4int stackDepth ) const
{
return G4int(fhistory.GetDepth()-stackDepth); // was -1
}
inline
G4VPhysicalVolume* G4TouchableHistory::GetVolume( G4int depth ) const
{
return fhistory.GetVolume(CalculateHistoryIndex(depth));
}
inline
G4VSolid* G4TouchableHistory::GetSolid( G4int depth ) const
{
return fhistory.GetVolume(CalculateHistoryIndex(depth))
->GetLogicalVolume()->GetSolid();
}
inline
G4int G4TouchableHistory::GetReplicaNumber( G4int depth ) const
{
return fhistory.GetReplicaNo(CalculateHistoryIndex(depth));
}
inline
G4int G4TouchableHistory::GetHistoryDepth() const
{
return G4int(fhistory.GetDepth());
}
inline
G4int G4TouchableHistory::MoveUpHistory( G4int num_levels )
{
auto maxLevelsMove = G4int(fhistory.GetDepth());
G4int minLevelsMove = 0; // Cannot redescend today!
// Soon it will be possible
// by adding a data member here
// fCurrentDepth;
if( num_levels > maxLevelsMove )
{
num_levels = maxLevelsMove;
}
else if( num_levels < minLevelsMove )
{
num_levels = minLevelsMove;
}
fhistory.BackLevel( num_levels );
return num_levels;
}
inline
const G4NavigationHistory* G4TouchableHistory::GetHistory() const
{
return &fhistory;
}
// There is no provision in case this class is subclassed.
// If it is subclassed, this will fail and may not give errors!
//
inline
void* G4TouchableHistory::operator new(size_t)
{
// Once the Navigator calls InitializeAllocator,
// the if block below can be removed.
//
if (aTouchableHistoryAllocator() == nullptr)
{
aTouchableHistoryAllocator() = new G4Allocator<G4TouchableHistory>;
}
return (void *) aTouchableHistoryAllocator()->MallocSingle();
}
inline
void G4TouchableHistory::operator delete(void* aTH)
{
aTouchableHistoryAllocator()->FreeSingle((G4TouchableHistory *) aTH);
}
@@ -1,48 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4TouchableHistoryHandle
//
// Class description:
//
// A type providing reference counting mechanism for a G4TouchableHistory
// object.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek (Radovan.Chytracek@cern.ch), March 2001
// ----------------------------------------------------------------------
#ifndef G4TOUCHABLEHISTORYHANDLE_HH
#define G4TOUCHABLEHISTORYHANDLE_HH 1
#include "G4TouchableHistory.hh"
#include "G4ReferenceCountedHandle.hh"
using G4TouchableHistoryHandle = G4ReferenceCountedHandle<G4TouchableHistory>;
#endif // G4TOUCHABLEHISTORYHANDLE_HH
@@ -34,17 +34,17 @@
// * volume type is similar to G4PVPlacement -- not replicated
// * external navigator may provide 'many'/Boolean operation
// Author: J.Apostolakis, October 2019
// Author: J.Apostolakis, CERN - October 2019
// ----------------------------------------------------------------------
#ifndef G4VEXTERNALPHYSICSVOLUME_HH
#define G4VEXTERNALPHYSICSVOLUME_HH
#define G4VEXTERNALPHYSICSVOLUME_HH 1
#include "G4VPhysicalVolume.hh"
#include "G4Transform3D.hh"
class G4VExternalPhysicalVolume : public G4VPhysicalVolume
{
public: // with description
public:
G4VExternalPhysicalVolume( G4RotationMatrix* pRot,
const G4ThreeVector& tlate,
@@ -69,8 +69,6 @@ class G4VExternalPhysicalVolume : public G4VPhysicalVolume
// Reports a maximum of overlaps errors according to parameter in input.
// Returns true if the volume is overlapping.
public: // without description
G4VExternalPhysicalVolume(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
@@ -102,4 +100,3 @@ class G4VExternalPhysicalVolume : public G4VPhysicalVolume
};
#endif