Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -6,6 +6,14 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-09-15 Gabriele Cosmo (geomdiv-V11-03-01)
|
||||
- Reorganised and enriched comments in headers to follow Doxygen style.
|
||||
- Removed unused data in G4VDivisionParameterisation.
|
||||
|
||||
## 2025-08-21 Gabriele Cosmo (geomdiv-V11-03-00)
|
||||
- Applied clang-tidy fixes (readability-braces-around-statements,
|
||||
readability-else-after-return).
|
||||
|
||||
## 2024-04-02 Gabriele Cosmo (geomdiv-V11-02-00)
|
||||
- Applied trivial clang-tidy fixes to G4PVDivisionFactory, i.e. use of default
|
||||
constructor/destructor.
|
||||
|
||||
@@ -30,39 +30,11 @@
|
||||
// Represents many touchable detector elements differing only in their
|
||||
// positioning. The elements' positions are calculated by means of a simple
|
||||
// linear formula.
|
||||
//
|
||||
// G4PVDivision(const G4String& pName,
|
||||
// G4LogicalVolume* pLogical,
|
||||
// G4LogicalVolume* pMother,
|
||||
// const EAxis pAxis,
|
||||
// const G4int nReplicas,
|
||||
// const G4double width,
|
||||
// const G4double offset=0)
|
||||
//
|
||||
// Division may occur along:
|
||||
//
|
||||
// o Cartesian axes (kXAxis,kYAxis,kZAxis)
|
||||
//
|
||||
// The divisions, of specified width have coordinates of
|
||||
// form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
|
||||
// for the case of kXAxis, and are unrotated.
|
||||
//
|
||||
// o Radial axis (cylindrical polar) (kRho)
|
||||
//
|
||||
// The divisions are cons/tubs sections, centred on the origin
|
||||
// and are unrotated.
|
||||
// They have radii of width*n+offset to width*(n+1)+offset
|
||||
// where n=0..nReplicas-1
|
||||
//
|
||||
// o Phi axis (cylindrical polar) (kPhi)
|
||||
// The divisions are `phi sections' or wedges, and of cons/tubs form
|
||||
// They have phi of offset+n*width to offset+(n+1)*width where
|
||||
// n=0..nReplicas-1
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4PVDIVISION_HH
|
||||
#define G4PVDIVISION_HH
|
||||
#define G4PVDIVISION_HH 1
|
||||
|
||||
#include "geomdefs.hh"
|
||||
#include "G4PVReplica.hh"
|
||||
@@ -71,10 +43,46 @@
|
||||
class G4LogicalVolume;
|
||||
class G4VSolid;
|
||||
|
||||
/**
|
||||
* @brief G4PVDivision represents many touchable detector elements differing
|
||||
* only in their positioning. The elements' positions are calculated by means
|
||||
* of a simple linear formula.
|
||||
*
|
||||
* Division may occur along:
|
||||
*
|
||||
* o Cartesian axes (kXAxis,kYAxis,kZAxis)
|
||||
*
|
||||
* The divisions, of specified width have coordinates of
|
||||
* form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
|
||||
* for the case of kXAxis, and are unrotated.
|
||||
*
|
||||
* o Radial axis (cylindrical polar) (kRho)
|
||||
*
|
||||
* The divisions are cons/tubs sections, centred on the origin
|
||||
* and are unrotated.
|
||||
* They have radii of width*n+offset to width*(n+1)+offset
|
||||
* where n=0..nReplicas-1
|
||||
*
|
||||
* o Phi axis (cylindrical polar) (kPhi)
|
||||
* The divisions are `phi sections' or wedges, and of cons/tubs form
|
||||
* They have phi of offset+n*width to offset+(n+1)*width where
|
||||
* n=0..nReplicas-1
|
||||
*/
|
||||
|
||||
class G4PVDivision : public G4PVReplica
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor with number of divisions and width.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4PVDivision(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
@@ -82,24 +90,49 @@ class G4PVDivision : public G4PVReplica
|
||||
const G4int nReplicas,
|
||||
const G4double width,
|
||||
const G4double offset );
|
||||
// Constructor with number of divisions and width
|
||||
|
||||
/**
|
||||
* Constructor with number of divisions.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4PVDivision(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
const EAxis pAxis,
|
||||
const G4int nReplicas,
|
||||
const G4double offset );
|
||||
// Constructor with number of divisions
|
||||
|
||||
/**
|
||||
* Constructor with width.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4PVDivision(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
const EAxis pAxis,
|
||||
const G4double width,
|
||||
const G4double offset );
|
||||
// Constructor with width
|
||||
|
||||
/**
|
||||
* Constructor in mother physical volume (same as first constructor).
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the physical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4PVDivision(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4VPhysicalVolume* pMother,
|
||||
@@ -107,35 +140,83 @@ class G4PVDivision : public G4PVReplica
|
||||
const G4int nReplicas,
|
||||
const G4double width,
|
||||
const G4double offset);
|
||||
// Constructor in mother physical volume (same as first constructor)
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
~G4PVDivision() override;
|
||||
|
||||
/**
|
||||
* Copy constructor and assignment operator not allowed.
|
||||
*/
|
||||
G4PVDivision(const G4PVDivision&) = delete;
|
||||
G4PVDivision& operator=(const G4PVDivision&) = delete;
|
||||
|
||||
/**
|
||||
* Not used.
|
||||
*/
|
||||
G4bool IsMany() const override;
|
||||
G4bool IsReplicated() const override;
|
||||
G4int GetMultiplicity() const override;
|
||||
G4VPVParameterisation* GetParameterisation() const override;
|
||||
void GetReplicationData( EAxis& axis,
|
||||
G4int& nReplicas,
|
||||
G4double& width,
|
||||
G4double& offset,
|
||||
G4bool& consuming ) const override;
|
||||
EAxis GetDivisionAxis() const;
|
||||
G4bool IsParameterised() const override;
|
||||
|
||||
EVolume VolumeType() const override;
|
||||
// Characterise the type of volume - normal/replicated/parameterised.
|
||||
|
||||
G4bool IsRegularStructure() const override;
|
||||
G4int GetRegularStructureId() const override;
|
||||
// Methods to identify volume that can have revised 'regular' navigation.
|
||||
// Currently divisions do not qualify for this.
|
||||
/**
|
||||
* Returns true.
|
||||
*/
|
||||
G4bool IsReplicated() const override;
|
||||
|
||||
/**
|
||||
* Returns the number of divisions.
|
||||
*/
|
||||
G4int GetMultiplicity() const override;
|
||||
|
||||
/**
|
||||
* Returns true to identify if it is a parameterised physical volume.
|
||||
*/
|
||||
G4bool IsParameterised() const override;
|
||||
|
||||
/**
|
||||
* Returns the pointer to the parameterisation algorithm.
|
||||
*/
|
||||
G4VPVParameterisation* GetParameterisation() const override;
|
||||
|
||||
/**
|
||||
* Fills arguments with the attributes from the base replica.
|
||||
* @param[in,out] axis Axis of parameterisation returned.
|
||||
* @param[in,out] nReplicas The number of division copies.
|
||||
* @param[in,out] width Width of the division slice.
|
||||
* @param[in,out] offset Potential offset in replication.
|
||||
* @param[in,out] consuming Flag of replica characterisation (always false
|
||||
* for parameterisations).
|
||||
*/
|
||||
void GetReplicationData( EAxis& axis,
|
||||
G4int& nReplicas,
|
||||
G4double& width,
|
||||
G4double& offset,
|
||||
G4bool& consuming ) const override;
|
||||
|
||||
/**
|
||||
* Returns the axis along which the division is made.
|
||||
* @returns The string Id of the axis.
|
||||
*/
|
||||
EAxis GetDivisionAxis() const;
|
||||
|
||||
/**
|
||||
* Returns the volume type characterisation.
|
||||
* @returns The string Id of the volume type, i.e. 'kParameterised'.
|
||||
*/
|
||||
EVolume VolumeType() const override;
|
||||
|
||||
/**
|
||||
* Methods to identify volumes that can have revised 'regular' navigation.
|
||||
* Currently divisions do not qualify for this.
|
||||
*/
|
||||
G4bool IsRegularStructure() const override; // Returns false
|
||||
G4int GetRegularStructureId() const override; // Returns 0
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Invoked in constructors to check and set the parameters for the
|
||||
* parameterisation.
|
||||
*/
|
||||
void CheckAndSetParameters( const EAxis pAxis,
|
||||
const G4int nDivs,
|
||||
const G4double width,
|
||||
@@ -143,20 +224,37 @@ class G4PVDivision : public G4PVReplica
|
||||
DivisionType divType,
|
||||
const G4LogicalVolume* pMotherLogical );
|
||||
|
||||
/**
|
||||
* Sets the parameterisation according to the allowed type of solid
|
||||
* to be divided.
|
||||
*/
|
||||
void SetParameterisation( G4LogicalVolume* motherLogical,
|
||||
const EAxis pAxis,
|
||||
const G4int nReplicas,
|
||||
const G4double width,
|
||||
const G4double offset,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Logging the axis when an error in division occurs.
|
||||
*/
|
||||
void ErrorInAxis( EAxis axis, G4VSolid* solid );
|
||||
|
||||
protected:
|
||||
|
||||
EAxis faxis; // axis of optimisation
|
||||
EAxis fdivAxis; // axis of division
|
||||
/** Axis of optimisation. */
|
||||
EAxis faxis;
|
||||
|
||||
/** Axis of division. */
|
||||
EAxis fdivAxis;
|
||||
|
||||
/** Number of divisions. */
|
||||
G4int fnReplicas = 0;
|
||||
|
||||
/** Width of the division slice and potential offset. */
|
||||
G4double fwidth = 0.0, foffset = 0.0;
|
||||
|
||||
/** Pointer to the parameterisation algorithm. */
|
||||
G4VDivisionParameterisation* fparam = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -30,22 +30,41 @@
|
||||
// Implementation of the interfaces for creating volume divisions
|
||||
// (defined in G4VPVDivisionFactory) for G4PVDivision type.
|
||||
|
||||
// Author: Ivana Hrivnacova, 04.05.2004 (Ivana.Hrivnacova@cern.ch)
|
||||
// Author: Ivana Hrivnacova (Orsay), 04.05.2004
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4PVDIVISION_FACTORY_HH
|
||||
#define G4PVDIVISION_FACTORY_HH
|
||||
#define G4PVDIVISION_FACTORY_HH 1
|
||||
|
||||
#include "geomdefs.hh"
|
||||
#include "G4VPVDivisionFactory.hh"
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
/**
|
||||
* @brief G4PVDivisionFactory implements the interfaces for creating volume
|
||||
* divisions (defined in G4VPVDivisionFactory) for G4PVDivision type.
|
||||
*/
|
||||
|
||||
class G4PVDivisionFactory : public G4VPVDivisionFactory
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4PVDivisionFactory() override = default;
|
||||
|
||||
/**
|
||||
* Creates a division, using number of divisions and width.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @returns The pointer to physical divided volume.
|
||||
*/
|
||||
G4VPhysicalVolume* CreatePVDivision(
|
||||
const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
@@ -54,41 +73,72 @@ class G4PVDivisionFactory : public G4VPVDivisionFactory
|
||||
const G4int nReplicas,
|
||||
const G4double width,
|
||||
const G4double offset ) override;
|
||||
// Create division - with number of divisions and width.
|
||||
|
||||
/**
|
||||
* Creates a division, using the number of divisions.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @returns The pointer to physical divided volume.
|
||||
*/
|
||||
G4VPhysicalVolume* CreatePVDivision(
|
||||
const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
const EAxis pAxis,
|
||||
const G4int nReplicas,
|
||||
const G4double offset ) override;
|
||||
// Create division - with number of divisions.
|
||||
|
||||
/**
|
||||
* Creates a division, using the width of the division slice.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @returns The pointer to physical divided volume.
|
||||
*/
|
||||
G4VPhysicalVolume* CreatePVDivision(
|
||||
const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
const EAxis pAxis,
|
||||
const G4double width,
|
||||
const G4double offset ) override;
|
||||
// Create division - with width.
|
||||
|
||||
/**
|
||||
* Creates a division, using a parameterisation algorithm.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMother Pointer to the logical volume of the mother.
|
||||
* @param[in] param The pointer to the parameterisation algorithm.
|
||||
* @returns The pointer to physical divided volume.
|
||||
*/
|
||||
G4VPhysicalVolume* CreatePVDivision(
|
||||
const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
G4LogicalVolume* pMother,
|
||||
const G4VPVParameterisation* param) override;
|
||||
// Create division - with parameterisation.
|
||||
|
||||
/**
|
||||
* Returns true if 'pv' is a pointer to a division.
|
||||
*/
|
||||
G4bool IsPVDivision(const G4VPhysicalVolume* pv) const override;
|
||||
// Returns true if pv is division.
|
||||
|
||||
/**
|
||||
* Creates the unique instance of the singleton.
|
||||
*/
|
||||
static G4PVDivisionFactory* GetInstance();
|
||||
// Create the unique instance of the singleton.
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Protected default Constructor.
|
||||
*/
|
||||
G4PVDivisionFactory() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// These classes represent the parameterised positioning equivalent to
|
||||
// dividing a G4Box along one of each axis X, Y, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONBOX_HH
|
||||
#define G4PARAMETERISATIONBOX_HH 1
|
||||
@@ -55,28 +55,71 @@ class G4Tubs;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationBox is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Box along one of each axis X, Y, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationBox : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised box, given the axis of parameterisation
|
||||
* 'axis' and the number of divided copies 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationBox( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationBox() override;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationBoxX represents the parameterised positioning
|
||||
* equivalent to dividing a G4Box along X axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationBoxX : public G4VParameterisationBox
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised box along X axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationBoxX( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationBoxX() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along X.
|
||||
* @returns The maximum width of the solid to divide along the X axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions(G4Box& box, const G4int copyNo,
|
||||
@@ -110,20 +153,45 @@ class G4ParameterisationBoxX : public G4VParameterisationBox
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationBoxY represents the parameterised positioning
|
||||
* equivalent to dividing a G4Box along Y axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationBoxY : public G4VParameterisationBox
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised box along Y axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationBoxY( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationBoxY() override;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the max width along Y.
|
||||
* @returns The maximum width of the solid to divide along the Y axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
|
||||
void ComputeDimensions(G4Box& box, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const override;
|
||||
|
||||
@@ -155,17 +223,43 @@ class G4ParameterisationBoxY : public G4VParameterisationBox
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationBoxZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Box along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationBoxZ : public G4VParameterisationBox
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised box along Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationBoxZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationBoxZ() override;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions(G4Box& box, const G4int copyNo,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// These classes represent the parameterised positioning equivalent to
|
||||
// dividing a G4Cons along one of each axis Rho, Phi, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONCONS_HH
|
||||
#define G4PARAMETERISATIONCONS_HH 1
|
||||
@@ -56,28 +56,72 @@ class G4Tubs;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationCons is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Cons along one of each axis Rho,
|
||||
* Phi, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationCons : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised cons, given the axis of parameterisation
|
||||
* 'axis' and the number of divided slices 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationCons( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationCons() override;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationConsRho represents the parameterised positioning
|
||||
* equivalent to dividing a G4Cons along Rho axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationConsRho : public G4VParameterisationCons
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised cons, along the Rho axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationConsRho( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationConsRho() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Rho.
|
||||
* @returns The maximum width of the solid to divide along the Rho axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
|
||||
@@ -111,17 +155,42 @@ class G4ParameterisationConsRho : public G4VParameterisationCons
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationConsPhi represents the parameterised positioning
|
||||
* equivalent to dividing a G4Cons along Phi axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationConsPhi : public G4VParameterisationCons
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised cons, along the Phi axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationConsPhi( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationConsPhi() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Phi.
|
||||
* @returns The maximum width of the solid to divide along the Phi axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
|
||||
@@ -155,17 +224,42 @@ class G4ParameterisationConsPhi : public G4VParameterisationCons
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationConsZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Cons along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationConsZ : public G4VParameterisationCons
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised cons, along the Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationConsZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationConsZ() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Cons& tubs, const G4int copyNo,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// These classes represent the parameterised positioning equivalent to
|
||||
// dividing a G4Para along one of each axis X, Y, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONPARA_HH
|
||||
#define G4PARAMETERISATIONPARA_HH 1
|
||||
@@ -55,28 +55,71 @@ class G4Tubs;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationPara is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Para along one of each axis X, Y, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationPara : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised para, given the axis of parameterisation
|
||||
* 'axis' and the number of divided copies 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationPara( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationPara() override;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationParaX represents the parameterised positioning
|
||||
* equivalent to dividing a G4Para along X axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationParaX : public G4VParameterisationPara
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised para along X axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationParaX( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationParaX() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along X.
|
||||
* @returns The maximum width of the solid to divide along the X axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions(G4Para& para, const G4int copyNo,
|
||||
@@ -112,17 +155,42 @@ class G4ParameterisationParaX : public G4VParameterisationPara
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationParaY represents the parameterised positioning
|
||||
* equivalent to dividing a G4Para along Y axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationParaY : public G4VParameterisationPara
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised para along Y axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationParaY( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationParaY() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Y.
|
||||
* @returns The maximum width of the solid to divide along the Y axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions(G4Para& para, const G4int copyNo,
|
||||
@@ -158,17 +226,42 @@ class G4ParameterisationParaY : public G4VParameterisationPara
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationParaZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Para along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationParaZ : public G4VParameterisationPara
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised para along Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationParaZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationParaZ() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions(G4Para& para, const G4int copyNo,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// These classes represent the parameterised positioning equivalent to
|
||||
// dividing a G4Polycone along one of each axis Rho, Phi, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
//---------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONPOLYCONE_HH
|
||||
#define G4PARAMETERISATIONPOLYCONE_HH 1
|
||||
@@ -55,35 +55,78 @@ class G4Hype;
|
||||
class G4Tubs;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationPolycone is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Polycone along one of each axis Rho,
|
||||
* Phi, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationPolycone : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polycone, given the axis of parameterisation
|
||||
* 'axis' and the number of divided slices 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationPolycone( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationPolycone() override;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyconeRho
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyconeRho represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polycone along Rho axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyconeRho : public G4VParameterisationPolycone
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polycone, along the Rho axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyconeRho( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyconeRho() override;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
void CheckParametersValidity() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Rho.
|
||||
* @returns The maximum width of the solid to divide along the Rho axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
|
||||
@@ -117,22 +160,43 @@ class G4ParameterisationPolyconeRho : public G4VParameterisationPolycone
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyconePhi
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyconePhi represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polycone along Phi axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyconePhi : public G4VParameterisationPolycone
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polycone, along the Phi axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyconePhi( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyconePhi() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Phi.
|
||||
* @returns The maximum width of the solid to divide along the Phi axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
|
||||
@@ -166,24 +230,48 @@ class G4ParameterisationPolyconePhi : public G4VParameterisationPolycone
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyconeZ
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyconeZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polycone along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyconeZ : public G4VParameterisationPolycone
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polycone, along the Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyconeZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyconeZ() override;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
void CheckParametersValidity() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
|
||||
@@ -191,6 +279,9 @@ class G4ParameterisationPolyconeZ : public G4VParameterisationPolycone
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Internal accessors for the original R parameters of the solid to divide.
|
||||
*/
|
||||
G4double GetR(G4double z, G4double z1, G4double r1,
|
||||
G4double z2, G4double r2) const;
|
||||
G4double GetRmin(G4double z, G4int nsegment) const;
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// These classes represent the parameterised positioning equivalent to
|
||||
// dividing a G4Polyhedra along one of each axis Rho, Phi, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
//---------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONPOLYHEDRA_HH
|
||||
#define G4PARAMETERISATIONPOLYHEDRA_HH 1
|
||||
@@ -55,41 +55,88 @@ class G4Hype;
|
||||
class G4Tubs;
|
||||
class G4Polycone;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationPolyhedra is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Polyhedra along one of each axis Rho,
|
||||
* Phi, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationPolyhedra : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polyhedra, given the axis of parameterisation
|
||||
* 'axis' and the number of divided slices 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationPolyhedra( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationPolyhedra() override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Converts radius of the sides to radius of the corners:
|
||||
* i.e. - r_corners = r_sides/factor.
|
||||
* @returns The cosine of (0.5*phiTotal/nofSides).
|
||||
*/
|
||||
G4double ConvertRadiusFactor(const G4Polyhedra& phedra) const;
|
||||
// Converts radius of the sides to radius of the corners:
|
||||
// r_corners = r_sides/factor
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyhedraRho
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyhedraRho represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polyhedra along Rho axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyhedraRho : public G4VParameterisationPolyhedra
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polyhedra, along the Rho axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyhedraRho( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyhedraRho() override;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
void CheckParametersValidity() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Rho.
|
||||
* @returns The maximum width of the solid to divide along the Rho axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
@@ -123,24 +170,48 @@ class G4ParameterisationPolyhedraRho : public G4VParameterisationPolyhedra
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyhedraPhi
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyhedraPhi represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polyhedra along Phi axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyhedraPhi : public G4VParameterisationPolyhedra
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polyhedra, along the Phi axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyhedraPhi( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
DivisionType divType );
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyhedraPhi() override;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
void CheckParametersValidity() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Phi.
|
||||
* @returns The maximum width of the solid to divide along the Phi axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
@@ -174,24 +245,48 @@ class G4ParameterisationPolyhedraPhi : public G4VParameterisationPolyhedra
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Class G4ParameterisationPolyhedraZ
|
||||
//---------------------------------------------------------------------
|
||||
/**
|
||||
* @brief G4ParameterisationPolyhedraZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Polyhedra along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationPolyhedraZ : public G4VParameterisationPolyhedra
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised polyhedra, along the Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationPolyhedraZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid,
|
||||
G4VSolid* pSolid,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationPolyhedraZ() override;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
void CheckParametersValidity() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol ) const override;
|
||||
void ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
@@ -199,6 +294,9 @@ class G4ParameterisationPolyhedraZ : public G4VParameterisationPolyhedra
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Internal accessors for the original R parameters of the solid to divide.
|
||||
*/
|
||||
G4double GetR(G4double z, G4double z1, G4double r1,
|
||||
G4double z2, G4double r2) const;
|
||||
G4double GetRmin(G4double z, G4int nsegment) const;
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// This class represents the parameterised positioning equivalent to
|
||||
// dividing a trapezoid along one of each axis X, Y, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONTRD_HH
|
||||
#define G4PARAMETERISATIONTRD_HH 1
|
||||
@@ -57,14 +57,32 @@ class G4Tubs;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationTrd is the base class for the parameterised
|
||||
* positioning equivalent to dividing a trapezoid along one of each axis X, Y, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationTrd : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised Trd, given the axis of parameterisation
|
||||
* 'axis' and the number of divided copies 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationTrd( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationTrd() override;
|
||||
|
||||
protected:
|
||||
@@ -72,23 +90,46 @@ class G4VParameterisationTrd : public G4VDivisionParameterisation
|
||||
G4bool bDivInTrap = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationTrdX represents the parameterised positioning
|
||||
* equivalent to dividing a G4Trd along X axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationTrdX : public G4VParameterisationTrd
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised Trd along X axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTrdX( EAxis axis, G4int nCopies,
|
||||
G4double width, G4double offset,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTrdX() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along X.
|
||||
* @returns The maximum width of the solid to divide along the X axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
|
||||
void ComputeDimensions(G4Trd& trd, const G4int copyNo,
|
||||
const G4VPhysicalVolume* pv) const override;
|
||||
|
||||
void ComputeDimensions(G4Trap& trd, const G4int copyNo,
|
||||
const G4VPhysicalVolume* pv) const override;
|
||||
|
||||
@@ -118,24 +159,46 @@ class G4ParameterisationTrdX : public G4VParameterisationTrd
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationTrdY represents the parameterised positioning
|
||||
* equivalent to dividing a G4Trd along Y axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationTrdY : public G4VParameterisationTrd
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised Trd along Y axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTrdY( EAxis axis, G4int nCopies,
|
||||
G4double width, G4double offset,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTrdY() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Y.
|
||||
* @returns The maximum width of the solid to divide along the Y axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const override;
|
||||
|
||||
void ComputeDimensions(G4Trd& trd, const G4int copyNo,
|
||||
const G4VPhysicalVolume* pv) const override;
|
||||
|
||||
void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const override;
|
||||
|
||||
@@ -165,18 +228,42 @@ class G4ParameterisationTrdY : public G4VParameterisationTrd
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief G4ParameterisationTrdZ represents the parameterised positioning
|
||||
* equivalent to dividing a G4Trd along Z axis.
|
||||
*/
|
||||
|
||||
class G4ParameterisationTrdZ : public G4VParameterisationTrd
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised Trd along Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided copies.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided entity.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTrdZ( EAxis axis, G4int nCopies,
|
||||
G4double width, G4double offset,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTrdZ() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeDimensions(G4Trd& trd, const G4int copyNo,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// This class represents the parameterised positioning equivalent to
|
||||
// dividing a G4Tubs along one of each axis Rho, Phi, Z.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PARAMETERISATIONTUBS_HH
|
||||
#define G4PARAMETERISATIONTUBS_HH 1
|
||||
@@ -54,28 +54,67 @@ class G4Hype;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
/**
|
||||
* @brief G4VParameterisationTubs is the base class for the parameterised
|
||||
* positioning equivalent to dividing a G4Tubs along one of each axis Rho,
|
||||
* Phi, Z.
|
||||
*/
|
||||
|
||||
class G4VParameterisationTubs : public G4VDivisionParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised tubs, given the axis of parameterisation
|
||||
* 'axis' and the number of divided slices 'nCopies'.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4VParameterisationTubs( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* msolid, DivisionType divType );
|
||||
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4VParameterisationTubs() override;
|
||||
};
|
||||
|
||||
class G4ParameterisationTubsRho : public G4VParameterisationTubs
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised tubs, along the Rho axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTubsRho( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTubsRho() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Rho.
|
||||
* @returns The maximum width of the solid to divide along the Rho axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeDimensions(G4Tubs& tubs, const G4int copyNo,
|
||||
@@ -112,15 +151,35 @@ class G4ParameterisationTubsRho : public G4VParameterisationTubs
|
||||
|
||||
class G4ParameterisationTubsPhi : public G4VParameterisationTubs
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised tubs, along the Phi axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTubsPhi( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTubsPhi() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Phi.
|
||||
* @returns The maximum width of the solid to divide along the Phi axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeDimensions(G4Tubs& tubs, const G4int copyNo,
|
||||
@@ -157,15 +216,35 @@ class G4ParameterisationTubsPhi : public G4VParameterisationTubs
|
||||
|
||||
class G4ParameterisationTubsZ : public G4VParameterisationTubs
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialises a parameterised tubs, along the Z axis.
|
||||
* @param[in] axis The axis along which apply the parameterisation.
|
||||
* @param[in] nCopies The total number of divided slices.
|
||||
* @param[in] offset Potential initial offset along the axis.
|
||||
* @param[in] step The width of the divided slice.
|
||||
* @param[in] pSolid Pointer to the original shape to parameterise.
|
||||
* @param[in] divType String identifier for the kind of division.
|
||||
*/
|
||||
G4ParameterisationTubsZ( EAxis axis, G4int nCopies,
|
||||
G4double offset, G4double step,
|
||||
G4VSolid* motherSolid, DivisionType divType );
|
||||
G4VSolid* pSolid, DivisionType divType );
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4ParameterisationTubsZ() override;
|
||||
|
||||
/**
|
||||
* Returns the max width along Z.
|
||||
* @returns The maximum width of the solid to divide along the Z axis.
|
||||
*/
|
||||
G4double GetMaxParameter() const override;
|
||||
|
||||
/**
|
||||
* Concrete methods implementing the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeDimensions(G4Tubs& tubs, const G4int copyNo,
|
||||
|
||||
@@ -30,28 +30,8 @@
|
||||
// G4ReplicatedSlice represents many touchable detector elements differing
|
||||
// only in their positioning. The elements' positions are calculated by means
|
||||
// of a simple linear formula.
|
||||
//
|
||||
// Division may occur along:
|
||||
//
|
||||
// o Cartesian axes (kXAxis,kYAxis,kZAxis)
|
||||
//
|
||||
// The divisions, of specified width have coordinates of
|
||||
// form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
|
||||
// for the case of kXAxis, and are unrotated.
|
||||
//
|
||||
// o Radial axis (cylindrical polar) (kRho)
|
||||
//
|
||||
// The divisions are cons/tubs sections, centred on the origin
|
||||
// and are unrotated.
|
||||
// They have radii of width*n+offset to width*(n+1)+offset
|
||||
// where n=0..nReplicas-1
|
||||
//
|
||||
// o Phi axis (cylindrical polar) (kPhi)
|
||||
// The divisions are `phi sections' or wedges, and of cons/tubs form
|
||||
// They have phi of offset+n*width to offset+(n+1)*width where
|
||||
// n=0..nReplicas-1
|
||||
|
||||
// Author: M.Asai (SLAC), 20/04/2010 - Extended from G4PVDivision
|
||||
// Author: Makoto Asai (SLAC), 20/04/2010 - Extended from G4PVDivision
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4REPLICATEDSLICE_HH
|
||||
#define G4REPLICATEDSLICE_HH 1
|
||||
@@ -63,10 +43,47 @@
|
||||
class G4LogicalVolume;
|
||||
class G4VSolid;
|
||||
|
||||
/**
|
||||
* @brief G4ReplicatedSlice represents many touchable detector elements
|
||||
* differing only in their positioning. The elements' positions are calculated
|
||||
* by means of a simple linear formula.
|
||||
*
|
||||
* Division may occur along:
|
||||
*
|
||||
* o Cartesian axes (kXAxis,kYAxis,kZAxis)
|
||||
*
|
||||
* The divisions, of specified width have coordinates of
|
||||
* form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
|
||||
* for the case of kXAxis, and are unrotated.
|
||||
*
|
||||
* o Radial axis (cylindrical polar) (kRho)
|
||||
*
|
||||
* The divisions are cons/tubs sections, centred on the origin
|
||||
* and are unrotated.
|
||||
* They have radii of width*n+offset to width*(n+1)+offset
|
||||
* where n=0..nReplicas-1
|
||||
*
|
||||
* o Phi axis (cylindrical polar) (kPhi)
|
||||
* The divisions are `phi sections' or wedges, and of cons/tubs form
|
||||
* They have phi of offset+n*width to offset+(n+1)*width where
|
||||
* n=0..nReplicas-1
|
||||
*/
|
||||
|
||||
class G4ReplicatedSlice : public G4PVReplica
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor with number of divisions and width.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherLogical Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
@@ -75,8 +92,17 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4double width,
|
||||
const G4double half_gap,
|
||||
const G4double offset );
|
||||
// Constructor with number of divisions and width
|
||||
|
||||
/**
|
||||
* Constructor with number of divisions.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherLogical Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
@@ -84,8 +110,17 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4int nReplicas,
|
||||
const G4double half_gap,
|
||||
const G4double offset );
|
||||
// Constructor with number of divisions
|
||||
|
||||
/**
|
||||
* Constructor with width of the division slice.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherLogical Pointer to the logical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
@@ -93,8 +128,18 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4double width,
|
||||
const G4double half_gap,
|
||||
const G4double offset );
|
||||
// Constructor with width
|
||||
|
||||
/**
|
||||
* Constructor in mother physical volume with number of divisions and width.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherPhysical Pointer to the physical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4VPhysicalVolume* pMotherPhysical,
|
||||
@@ -103,8 +148,17 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4double width,
|
||||
const G4double half_gap,
|
||||
const G4double offset);
|
||||
// Constructor in mother physical volume
|
||||
|
||||
/**
|
||||
* Constructor in mother physical volume with number of divisions.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherPhysical Pointer to the physical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] nReplicas The number of copies to replicate.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4VPhysicalVolume* pMotherPhysical,
|
||||
@@ -112,8 +166,17 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4int nReplicas,
|
||||
const G4double half_gap,
|
||||
const G4double offset );
|
||||
// Constructor with number of divisions
|
||||
|
||||
/**
|
||||
* Constructor in mother physical volume with width of division slice.
|
||||
* @param[in] pName The volume name.
|
||||
* @param[in] pLogical Pointer to the logical volume of the division.
|
||||
* @param[in] pMotherPhysical Pointer to the physical volume of the mother.
|
||||
* @param[in] pAxis The axis along which do the division.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] half_gap The half-witdh of the gap between slices.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4String& pName,
|
||||
G4LogicalVolume* pLogical,
|
||||
G4VPhysicalVolume* pMotherPhysical,
|
||||
@@ -121,35 +184,83 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4double width,
|
||||
const G4double half_gap,
|
||||
const G4double offset );
|
||||
// Constructor with width
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
~G4ReplicatedSlice() override;
|
||||
|
||||
/**
|
||||
* Copy constructor and assignment operator not allowed.
|
||||
*/
|
||||
G4ReplicatedSlice(const G4ReplicatedSlice&) = delete;
|
||||
G4ReplicatedSlice& operator=(const G4ReplicatedSlice&) = delete;
|
||||
|
||||
/**
|
||||
* Not used.
|
||||
*/
|
||||
G4bool IsMany() const override;
|
||||
|
||||
/**
|
||||
* Returns true.
|
||||
*/
|
||||
G4bool IsReplicated() const override;
|
||||
|
||||
/**
|
||||
* Returns the number of slices.
|
||||
*/
|
||||
G4int GetMultiplicity() const override;
|
||||
|
||||
/**
|
||||
* Returns true to identify if it is a parameterised physical volume.
|
||||
*/
|
||||
G4bool IsParameterised() const override;
|
||||
|
||||
/**
|
||||
* Returns the pointer to the parameterisation algorithm.
|
||||
*/
|
||||
G4VPVParameterisation* GetParameterisation() const override;
|
||||
|
||||
/**
|
||||
* Fills arguments with the attributes from the base replica.
|
||||
* @param[in,out] axis Axis of parameterisation returned.
|
||||
* @param[in,out] nReplicas The number of division copies.
|
||||
* @param[in,out] width Width of the division slice.
|
||||
* @param[in,out] offset Potential offset in replication.
|
||||
* @param[in,out] consuming Flag of replica characterisation (always false
|
||||
* for parameterisations).
|
||||
*/
|
||||
void GetReplicationData( EAxis& axis,
|
||||
G4int& nReplicas,
|
||||
G4double& width,
|
||||
G4double& offset,
|
||||
G4bool& consuming ) const override;
|
||||
EAxis GetDivisionAxis() const;
|
||||
G4bool IsParameterised() const override;
|
||||
|
||||
EVolume VolumeType() const final;
|
||||
// Characterise the type of volume - normal/replicated/parameterised.
|
||||
|
||||
/**
|
||||
* Returns the axis along which the division is made.
|
||||
* @returns The string Id of the axis.
|
||||
*/
|
||||
EAxis GetDivisionAxis() const;
|
||||
|
||||
/**
|
||||
* Returns the volume type characterisation.
|
||||
* @returns The string Id of the volume type, i.e. 'kParameterised'.
|
||||
*/
|
||||
EVolume VolumeType() const final;
|
||||
|
||||
/**
|
||||
* Methods to identify volumes that can have revised 'regular' navigation.
|
||||
* Currently divisions do not qualify for this.
|
||||
*/
|
||||
G4bool IsRegularStructure() const override;
|
||||
G4int GetRegularStructureId() const override;
|
||||
// Methods to identify volume that can apply 'regular' navigation.
|
||||
// Currently divisions do not qualify for this.
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Invoked in constructors to check and set the parameters for the
|
||||
* parameterisation.
|
||||
*/
|
||||
void CheckAndSetParameters( const EAxis pAxis,
|
||||
const G4int nDivs,
|
||||
const G4double width,
|
||||
@@ -159,6 +270,10 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
G4LogicalVolume* pMotherLogical,
|
||||
const G4LogicalVolume* pLogical );
|
||||
|
||||
/**
|
||||
* Sets the parameterisation according to the allowed type of solid
|
||||
* to be divided.
|
||||
*/
|
||||
void SetParameterisation( G4LogicalVolume* motherLogical,
|
||||
const EAxis pAxis,
|
||||
const G4int nReplicas,
|
||||
@@ -167,14 +282,26 @@ class G4ReplicatedSlice : public G4PVReplica
|
||||
const G4double offset,
|
||||
DivisionType divType );
|
||||
|
||||
/**
|
||||
* Logging the axis when an error in division occurs.
|
||||
*/
|
||||
void ErrorInAxis( EAxis axis, G4VSolid* solid );
|
||||
|
||||
protected:
|
||||
|
||||
EAxis faxis; // axis of optimisation
|
||||
EAxis fdivAxis; // axis of division
|
||||
/** Axis of optimisation. */
|
||||
EAxis faxis;
|
||||
|
||||
/** Axis of division. */
|
||||
EAxis fdivAxis;
|
||||
|
||||
/** Number of slices. */
|
||||
G4int fnReplicas = 0;
|
||||
|
||||
/** Width of the division slice and potential offset. */
|
||||
G4double fwidth = 0.0, foffset = 0.0;
|
||||
|
||||
/** Pointer to the parameterisation algorithm. */
|
||||
G4VDivisionParameterisation* fparam = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
// Base class for parameterisations defining divisions of volumes
|
||||
// for different kind of CSG and specific solids.
|
||||
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// 21.04.10 - M.Asai, Added gaps
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// Ivana Hrivnacova (Orsay), 08.04.2004 - Implemented reflection
|
||||
// Makoto Asai (SLAC), 21.04.2010 - Added gaps
|
||||
//---------------------------------------------------------------------
|
||||
#ifndef G4VDIVISIONPARAMETERISATION_HH
|
||||
#define G4VDIVISIONPARAMETERISATION_HH 1
|
||||
@@ -47,20 +47,53 @@ enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH };
|
||||
class G4VPhysicalVolume;
|
||||
class G4VSolid;
|
||||
|
||||
/**
|
||||
* @brief G4VDivisionParameterisation is the base class for parameterisations
|
||||
* defining divisions of volumes for different kind of CSG and specific solids.
|
||||
*/
|
||||
|
||||
class G4VDivisionParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VDivisionParameterisation( EAxis axis, G4int nDiv, G4double width,
|
||||
G4double offset, DivisionType divType,
|
||||
G4VSolid* motherSolid = nullptr);
|
||||
/**
|
||||
* Constructor with number of divisions and width.
|
||||
* @param[in] axis The axis along which do the division.
|
||||
* @param[in] nDiv The number of division copies to replicate.
|
||||
* @param[in] width The witdh of the divided slice along the axis.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @param[in] divType The kind of division type, based on input parameters.
|
||||
* @param[in] motherSolid Pointer to the solid to be divided.
|
||||
*/
|
||||
G4VDivisionParameterisation( EAxis axis,
|
||||
G4int nDiv,
|
||||
G4double width,
|
||||
G4double offset,
|
||||
DivisionType divType,
|
||||
G4VSolid* motherSolid = nullptr );
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
~G4VDivisionParameterisation() override;
|
||||
|
||||
G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume*) override;
|
||||
/**
|
||||
* Invokes the base parameterisation to compute the parameterised solid.
|
||||
* @param[in] pv Pointer to the physical volume to divide.
|
||||
* @returns The pointer to the generated solid slice.
|
||||
*/
|
||||
G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume* pv) override;
|
||||
|
||||
/**
|
||||
* Base method to be implemented in derived classes for defining the
|
||||
* transformation in the parameterisation.
|
||||
*/
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const override = 0;
|
||||
G4VPhysicalVolume* physVol) const override = 0;
|
||||
|
||||
/**
|
||||
* Accessors and setters.
|
||||
*/
|
||||
inline const G4String& GetType() const;
|
||||
inline EAxis GetAxis() const;
|
||||
inline G4int GetNoDiv() const;
|
||||
@@ -68,46 +101,80 @@ class G4VDivisionParameterisation : public G4VPVParameterisation
|
||||
inline G4double GetOffset() const;
|
||||
inline G4VSolid* GetMotherSolid() const;
|
||||
inline void SetType(const G4String& type);
|
||||
inline G4int VolumeFirstCopyNo() const;
|
||||
inline void SetHalfGap(G4double hg);
|
||||
inline G4double GetHalfGap() const;
|
||||
|
||||
protected: // with description
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Defines and sets rotation on Z in trasformation for given volume.
|
||||
* @param[in,out] physVol Pointer to the physical volume to apply rotation.
|
||||
* @param[in] rotZ The rotation on Z (default is 0).
|
||||
*/
|
||||
void ChangeRotMatrix( G4VPhysicalVolume* physVol,
|
||||
G4double rotZ = 0.0 ) const;
|
||||
|
||||
/**
|
||||
* Calculates the number of divisions, based on the input parameters.
|
||||
* @param[in] motherDim The width of the volume to divide.
|
||||
* @param[in] width The width of the division slice.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @returns The number of divisions.
|
||||
*/
|
||||
G4int CalculateNDiv( G4double motherDim, G4double width,
|
||||
G4double offset ) const;
|
||||
|
||||
/**
|
||||
* Calculates the slice width, based on the input parameters.
|
||||
* @param[in] motherDim The width of the volume to divide.
|
||||
* @param[in] nDiv The number of division slices to create.
|
||||
* @param[in] offset The optional offset distance from mother's border.
|
||||
* @returns The width of the division slice.
|
||||
*/
|
||||
G4double CalculateWidth( G4double motherDim, G4int nDiv,
|
||||
G4double offset ) const;
|
||||
|
||||
/**
|
||||
* Checks the validity of parameters given in input, issuing an exception.
|
||||
*/
|
||||
virtual void CheckParametersValidity();
|
||||
|
||||
/**
|
||||
* Internal methods for checking parameters.
|
||||
*/
|
||||
void CheckOffset( G4double maxPar );
|
||||
void CheckNDivAndWidth( G4double maxPar );
|
||||
|
||||
/**
|
||||
* Returns the max width along the axis of division.
|
||||
* @returns The maximum width of the solid to divide along the axis.
|
||||
*/
|
||||
virtual G4double GetMaxParameter() const = 0;
|
||||
|
||||
/**
|
||||
* Sets the offset, taking into account potential reflection.
|
||||
*/
|
||||
G4double OffsetZ() const;
|
||||
|
||||
protected:
|
||||
|
||||
G4String ftype;
|
||||
EAxis faxis;
|
||||
G4int fnDiv = 0;
|
||||
G4double fwidth = 0.0;
|
||||
G4double foffset = 0.0;
|
||||
DivisionType fDivisionType;
|
||||
G4VSolid* fmotherSolid = nullptr;
|
||||
G4bool fReflectedSolid = false;
|
||||
G4bool fDeleteSolid = false;
|
||||
G4String ftype; // String for division type
|
||||
EAxis faxis; // Axis of division
|
||||
G4int fnDiv = 0; // Number of divisions
|
||||
G4double fwidth = 0.0; // Width of division slice
|
||||
G4double foffset = 0.0; // Offset distance from mother's border
|
||||
DivisionType fDivisionType; // Division type ID
|
||||
G4VSolid* fmotherSolid = nullptr; // Pointer to solid to divide
|
||||
G4bool fReflectedSolid = false; // Specifies if solid is reflected
|
||||
G4bool fDeleteSolid = false; // Specifies if delete solid to divide
|
||||
|
||||
static G4ThreadLocal G4RotationMatrix* fRot;
|
||||
static G4ThreadLocal G4RotationMatrix* fRot; // Rotation transformation
|
||||
|
||||
static const G4int verbose;
|
||||
G4int theVoluFirstCopyNo = 1;
|
||||
static const G4int verbose; // Verbosity level
|
||||
|
||||
G4double kCarTolerance;
|
||||
G4double kCarTolerance; // Cached surface tolerance
|
||||
|
||||
G4double fhgap = 0.0;
|
||||
G4double fhgap = 0.0; // Cached gap between slices
|
||||
};
|
||||
|
||||
#include "G4VDivisionParameterisation.icc"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
// G4VDivisionParameterisation inline methods implementation
|
||||
//
|
||||
// 09.05.01 - P.Arce, Initial version
|
||||
// Author: Pedro Arce (CIEMAT), 09.05.2001 - Initial version
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
inline
|
||||
@@ -70,12 +70,6 @@ void G4VDivisionParameterisation::SetType( const G4String& type )
|
||||
ftype = type;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4VDivisionParameterisation::VolumeFirstCopyNo() const
|
||||
{
|
||||
return theVoluFirstCopyNo;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VDivisionParameterisation::SetHalfGap(G4double hg)
|
||||
{
|
||||
|
||||
@@ -117,16 +117,14 @@ G4PVDivisionFactory::CreatePVDivision(const G4String& pName,
|
||||
"Unexpected parameterisation type!");
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
EAxis axis = divParam->GetAxis();
|
||||
G4int nofDivisions = divParam->GetNoDiv();
|
||||
G4double width = divParam->GetWidth();
|
||||
G4double offset = divParam->GetOffset();
|
||||
|
||||
EAxis axis = divParam->GetAxis();
|
||||
G4int nofDivisions = divParam->GetNoDiv();
|
||||
G4double width = divParam->GetWidth();
|
||||
G4double offset = divParam->GetOffset();
|
||||
|
||||
return new G4PVDivision(pName, pLogical, pMotherLogical,
|
||||
axis, nofDivisions, width, offset);
|
||||
}
|
||||
return new G4PVDivision(pName, pLogical, pMotherLogical,
|
||||
axis, nofDivisions, width, offset);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
@@ -550,10 +550,14 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol) const
|
||||
//
|
||||
posi = fOrigParamMother->Z_values[0];
|
||||
|
||||
if ( !fReflectedSolid )
|
||||
if ( !fReflectedSolid )
|
||||
{
|
||||
posi += foffset + (2*copyNo + 1) * fwidth/2.;
|
||||
}
|
||||
else
|
||||
{
|
||||
posi -= foffset + (2*copyNo + 1) * fwidth/2.;
|
||||
}
|
||||
|
||||
physVol->SetTranslation( G4ThreeVector(0, 0, posi) );
|
||||
}
|
||||
@@ -660,8 +664,8 @@ ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
|
||||
|
||||
// It can happen due to rounding errors
|
||||
//
|
||||
if ( origparam.Rmin[0] < 0.0 ) origparam.Rmin[0] = 0.0;
|
||||
if ( origparam.Rmin[nz-1] < 0.0 ) origparam.Rmin[1] = 0.0;
|
||||
if ( origparam.Rmin[0] < 0.0 ) { origparam.Rmin[0] = 0.0; }
|
||||
if ( origparam.Rmin[nz-1] < 0.0 ) { origparam.Rmin[1] = 0.0; }
|
||||
}
|
||||
|
||||
pcone.SetOriginalParameters(&origparam); // copy values & transfer pointers
|
||||
|
||||
@@ -628,9 +628,13 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol) const
|
||||
posi = fOrigParamMother->Z_values[0];
|
||||
|
||||
if ( !fReflectedSolid )
|
||||
{
|
||||
posi += foffset + (2*copyNo + 1) * fwidth/2.;
|
||||
}
|
||||
else
|
||||
{
|
||||
posi -= foffset + (2*copyNo + 1) * fwidth/2.;
|
||||
}
|
||||
|
||||
physVol->SetTranslation( G4ThreeVector(0, 0, posi) );
|
||||
}
|
||||
@@ -739,8 +743,8 @@ ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
|
||||
// It can happen due to rounding errors
|
||||
//
|
||||
if ( origparam.Rmin[0] < 0.0 ) origparam.Rmin[0] = 0.0;
|
||||
if ( origparam.Rmin[nz-1] < 0.0 ) origparam.Rmin[1] = 0.0;
|
||||
if ( origparam.Rmin[0] < 0.0 ) { origparam.Rmin[0] = 0.0; }
|
||||
if ( origparam.Rmin[nz-1] < 0.0 ) { origparam.Rmin[1] = 0.0; }
|
||||
}
|
||||
|
||||
phedra.SetOriginalParameters(&origparam); // copy values & transfer pointers
|
||||
|
||||
Reference in New Issue
Block a user