Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -23,21 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4VPVParamterisation
// G4VPVParameterisation
//
// Class description:
//
// Parameterisation class, able to compute the transformation and
// (indirectly) the dimensions of parameterised volumes, given a
// Parameterisation abstract base class, able to compute the transformation
// and (indirectly) the dimensions of parameterised volumes, given a
// replication number.
// 25.07.96, P.Kent - Initial stub version
// 20.09.96, V.Grichine - Modifications for G4Trap/Cons/Sphere
// 31.10.96, V.Grichine - Modifications for G4Torus/Para
// 17.02.98, J.Apostolakis - Allowing the parameterisation of solid type
// Author: Paul Kent (CERN), 25.07.1996, P.Kent - Initial stub version
// --------------------------------------------------------------------
#ifndef G4VPVPARAMETERISATION_HH
#define G4VPVPARAMETERISATION_HH 1
#define G4VPVPARAMETERISATION_HH
#include "G4Types.hh"
#include "G4VVolumeMaterialScanner.hh"
@@ -65,75 +62,100 @@ class G4Hype;
class G4VVolumeMaterialScanner;
/**
* @brief G4VPVParameterisation ia an abstract base class for Parameterisation,
* able to compute the transformation and (indirectly) the dimensions of
* parameterised volumes, given a replication number.
*/
class G4VPVParameterisation
{
public:
/**
* Default Constructor & Destructor.
*/
G4VPVParameterisation() = default;
virtual ~G4VPVParameterisation() = default;
virtual void ComputeTransformation(const G4int,
G4VPhysicalVolume * ) const = 0;
/**
* Computes the transformation for the 'pv' volume and replica number 'no'.
* It is a required method, as it is the reason for this class.
* @param[in] pv Pointer to the current physical volume.
* @param[in] no The copy number index.
*/
virtual void ComputeTransformation(const G4int no,
G4VPhysicalVolume* pv) const = 0;
virtual G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume *);
/**
* Computes the solid for the 'pv' volume and replica number 'no'.
* To be optionally defined in derived classes, for parameterisation of
* the solid type.
* @param[in] no The copy number index.
* @param[in] pv Pointer to the current physical volume.
*/
virtual G4VSolid* ComputeSolid(const G4int no, G4VPhysicalVolume* pv);
/**
* Computes the material for the 'currentVol' and replica number 'repNo'.
* Must cope with 'parentTouch' for navigator's SetupHierarchy() when
* used for nested parameterisations.
* @param[in] currentVol Pointer to the current physical volume.
* @param[in] repNo The copy number index.
* @param[in] parentTouch Pointer to the touchable of the parent volume.
* @returns A pointer to the associated material.
*/
virtual G4Material* ComputeMaterial(const G4int repNo,
G4VPhysicalVolume* currentVol,
const G4VTouchable* parentTouch = nullptr);
// Refined method, enabling nested parameterisations
/**
* Methods to identify nested parameterisations. Required in order
* to enable material scan for nested parameterisations.
*/
virtual G4bool IsNested() const;
virtual G4VVolumeMaterialScanner* GetMaterialScanner();
// These enable material scan for nested parameterisations
/**
* Dispatch methods for the specific solids where parameterisation
* is allowed.
*/
virtual void ComputeDimensions(G4Box &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Tubs &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Trd &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Trap &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Cons &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Sphere &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Orb &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Ellipsoid &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Torus &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Para &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Polycone &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Polyhedra &,
const G4int,
const G4VPhysicalVolume *) const {}
virtual void ComputeDimensions(G4Hype &,
const G4int,
const G4VPhysicalVolume *) const {}