Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -23,9 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// class G4PVDivision
// G4PVDivision
//
// Class description:
//
@@ -61,8 +59,6 @@
// They have phi of offset+n*width to offset+(n+1)*width where
// n=0..nReplicas-1
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// ----------------------------------------------------------------------
#ifndef G4PVDIVISION_HH
@@ -104,8 +100,6 @@ class G4PVDivision : public G4VPhysicalVolume
const G4double offset );
// Constructor with width
public: // without description
G4PVDivision(const G4String& pName,
G4LogicalVolume* pLogical,
G4VPhysicalVolume* pMother,
@@ -113,12 +107,13 @@ class G4PVDivision : public G4VPhysicalVolume
const G4int nReplicas,
const G4double width,
const G4double offset);
// Constructor in mother physical volume
public: // with description
// Constructor in mother physical volume (same as first constructor)
virtual ~G4PVDivision();
G4PVDivision(const G4PVDivision&) = delete;
G4PVDivision& operator=(const G4PVDivision&) = delete;
virtual G4bool IsMany() const;
virtual G4int GetCopyNo() const;
virtual void SetCopyNo(G4int CopyNo);
@@ -132,8 +127,9 @@ class G4PVDivision : public G4VPhysicalVolume
G4bool& consuming ) const;
EAxis GetDivisionAxis() const;
G4bool IsParameterised() const;
public: // without description
virtual EVolume VolumeType() const;
// Characterise the type of volume - normal/replicated/parameterised.
G4bool IsRegularStructure() const;
G4int GetRegularStructureId() const;
@@ -149,9 +145,6 @@ class G4PVDivision : public G4VPhysicalVolume
DivisionType divType,
const G4LogicalVolume* pMotherLogical );
G4PVDivision(const G4PVDivision&);
const G4PVDivision& operator=(const G4PVDivision&);
void SetParameterisation( G4LogicalVolume* motherLogical,
const EAxis pAxis,
const G4int nReplicas,
@@ -164,10 +157,10 @@ class G4PVDivision : public G4VPhysicalVolume
EAxis faxis; // axis of optimisation
EAxis fdivAxis; // axis of division
G4int fnReplicas;
G4double fwidth,foffset;
G4int fcopyNo;
G4VDivisionParameterisation *fparam;
G4int fnReplicas = 0;
G4double fwidth = 0.0, foffset = 0.0;
G4int fcopyNo = -1;
G4VDivisionParameterisation* fparam = nullptr;
};
#endif
@@ -23,17 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4PVDivisionFactory
// G4PVDivisionFactory
//
// Class description:
//
// Implementation of the interfaces for creating volumes divisions
// Implementation of the interfaces for creating volume divisions
// (defined in G4VPVDivisionFactory) for G4PVDivision type.
// Author: Ivana Hrivnacova, 4.5.2004 (Ivana.Hrivnacova@cern.ch)
// Author: Ivana Hrivnacova, 04.05.2004 (Ivana.Hrivnacova@cern.ch)
// ------------------------------------------------------------------------
#ifndef G4PVDIVISION_FACTORY_HH
#define G4PVDIVISION_FACTORY_HH
@@ -93,7 +90,6 @@ class G4PVDivisionFactory : public G4VPVDivisionFactory
protected:
G4PVDivisionFactory();
};
#endif
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationBoxX,
// G4ParameterisationBoxY,
// G4ParameterisationBoxZ
// G4ParameterisationBox[X/Y/Z]
//
// Class description:
//
// These classes represent the parameterised positioning equivalent to
// dividing a G4Box along one of each axis X, Y, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#ifndef G4ParameterisationBox_H
#define G4ParameterisationBox_H 1
#ifndef G4PARAMETERISATIONBOX_HH
#define G4PARAMETERISATIONBOX_HH 1
#include "G4VDivisionParameterisation.hh"
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationConsRho,
// G4ParameterisationConsPhi,
// G4ParameterisationConsZ
// G4ParameterisationCons[Rho/Phi/Z]
//
// Class description:
//
// These classes represent the parameterised positioning equivalent to
// dividing a G4Cons along one of each axis Rho, Phi, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#ifndef G4ParameterisationCons_H
#define G4ParameterisationCons_H 1
#ifndef G4PARAMETERISATIONCONS_HH
#define G4PARAMETERISATIONCONS_HH 1
#include "G4VDivisionParameterisation.hh"
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationParaX,
// G4ParameterisationParaY,
// G4ParameterisationParaZ
// G4ParameterisationPara[X,Y,Z]
//
// Class description:
//
// These classes represent the parameterised positioning equivalent to
// dividing a G4Para along one of each axis X, Y, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#ifndef G4ParameterisationPara_H
#define G4ParameterisationPara_H 1
#ifndef G4PARAMETERISATIONPARA_HH
#define G4PARAMETERISATIONPARA_HH 1
#include "G4VDivisionParameterisation.hh"
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationPolyconeRho,
// G4ParameterisationPolyconePhi,
// G4ParameterisationPolyconeZ
// G4ParameterisationPolycone[Rho/Phi/Z]
//
// Class description:
//
// These classes represent the parameterised positioning equivalent to
// dividing a G4Polycone along one of each axis Rho, Phi, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
//---------------------------------------------------------------------
#ifndef G4ParameterisationPolycone_H
#define G4ParameterisationPolycone_H 1
#ifndef G4PARAMETERISATIONPOLYCONE_HH
#define G4PARAMETERISATIONPOLYCONE_HH 1
#include "G4VDivisionParameterisation.hh"
#include "G4Polycone.hh"
@@ -230,8 +224,8 @@ class G4ParameterisationPolyconeZ : public G4VParameterisationPolycone
const G4VPhysicalVolume*) const {}
private:
G4int fNSegment;
G4PolyconeHistorical* fOrigParamMother;
G4int fNSegment = 0;
G4PolyconeHistorical* fOrigParamMother = nullptr;
};
#endif
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationPolyhedraRho,
// G4ParameterisationPolyhedraPhi,
// G4ParameterisationPolyhedraZ
// G4ParameterisationPolyhedra[Rho/Phi/Z]
//
// Class description:
//
// These classes represent the parameterised positioning equivalent to
// dividing a G4Polyhedra along one of each axis Rho, Phi, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
//---------------------------------------------------------------------
#ifndef G4ParameterisationPolyhedra_H
#define G4ParameterisationPolyhedra_H 1
#ifndef G4PARAMETERISATIONPOLYHEDRA_HH
#define G4PARAMETERISATIONPOLYHEDRA_HH 1
#include "G4VDivisionParameterisation.hh"
#include "G4Polyhedra.hh"
@@ -237,8 +231,8 @@ class G4ParameterisationPolyhedraZ : public G4VParameterisationPolyhedra
const G4VPhysicalVolume*) const {}
private:
G4int fNSegment;
G4PolyhedraHistorical* fOrigParamMother;
G4int fNSegment = 0;
G4PolyhedraHistorical* fOrigParamMother = nullptr;
};
#endif
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationTrdX
// G4ParameterisationTrdY
// G4ParameterisationTrdZ
// G4ParameterisationTrd[X/Y/Z]
//
// Class description:
//
// This class represents the parameterised positioning equivalent to
// dividing a trapezoid along one of each axis X, Y, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#ifndef G4ParameterisationTrd_H
#define G4ParameterisationTrd_H 1
#ifndef G4PARAMETERISATIONTRD_HH
#define G4PARAMETERISATIONTRD_HH 1
#include <vector>
@@ -75,7 +69,7 @@ class G4VParameterisationTrd : public G4VDivisionParameterisation
protected:
G4bool bDivInTrap;
G4bool bDivInTrap = false;
};
class G4ParameterisationTrdX : public G4VParameterisationTrd
@@ -23,24 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// classes G4ParameterisationTubsRho
// G4ParameterisationTubsPhi
// G4ParameterisationTubsZ
// G4ParameterisationTubs[Rho/Phi/Z]
//
// Class description:
//
// This class represents the parameterised positioning equivalent to
// dividing a G4Tubs along one of each axis Rho, Phi, Z.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#ifndef G4ParameterisationTubsRho_H
#define G4ParameterisationTubsRho_H 1
#ifndef G4PARAMETERISATIONTUBS_HH
#define G4PARAMETERISATIONTUBS_HH 1
#include "G4VDivisionParameterisation.hh"
@@ -23,9 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// class G4ReplicatedSlice
// G4ReplicatedSlice
//
// Class description:
//
@@ -53,12 +51,10 @@
// They have phi of offset+n*width to offset+(n+1)*width where
// n=0..nReplicas-1
// History:
// -------
// Apr/20/2010 - Initial version extended from G4PVDivision
// Author: M.Asai (SLAC), 20/04/2010 - Extended from G4PVDivision
// ----------------------------------------------------------------------
#ifndef G4ReplicatedSlice_HH
#define G4ReplicatedSlice_HH 1
#ifndef G4REPLICATEDSLICE_HH
#define G4REPLICATEDSLICE_HH 1
#include "geomdefs.hh"
#include "G4VPhysicalVolume.hh"
@@ -99,8 +95,6 @@ class G4ReplicatedSlice : public G4VPhysicalVolume
const G4double offset );
// Constructor with width
public: // without description
G4ReplicatedSlice(const G4String& pName,
G4LogicalVolume* pLogical,
G4VPhysicalVolume* pMotherPhysical,
@@ -129,10 +123,11 @@ class G4ReplicatedSlice : public G4VPhysicalVolume
const G4double offset );
// Constructor with width
public: // with description
virtual ~G4ReplicatedSlice();
G4ReplicatedSlice(const G4ReplicatedSlice&) = delete;
G4ReplicatedSlice& operator=(const G4ReplicatedSlice&) = delete;
virtual G4bool IsMany() const;
virtual G4int GetCopyNo() const;
virtual void SetCopyNo(G4int CopyNo);
@@ -146,8 +141,9 @@ class G4ReplicatedSlice : public G4VPhysicalVolume
G4bool& consuming ) const;
EAxis GetDivisionAxis() const;
G4bool IsParameterised() const;
public: // without description
EVolume VolumeType() const final;
// Characterise the type of volume - normal/replicated/parameterised.
G4bool IsRegularStructure() const;
G4int GetRegularStructureId() const;
@@ -175,20 +171,14 @@ class G4ReplicatedSlice : public G4VPhysicalVolume
void ErrorInAxis( EAxis axis, G4VSolid* solid );
private:
G4ReplicatedSlice(const G4ReplicatedSlice&);
const G4ReplicatedSlice& operator=(const G4ReplicatedSlice&);
// Private copy constructor and assignment operator.
protected:
EAxis faxis; // axis of optimisation
EAxis fdivAxis; // axis of division
G4int fnReplicas;
G4double fwidth,foffset;
G4int fcopyNo;
G4VDivisionParameterisation *fparam;
G4int fnReplicas = 0;
G4double fwidth = 0.0, foffset = 0.0;
G4int fcopyNo = -1;
G4VDivisionParameterisation* fparam = nullptr;
};
#endif
@@ -23,23 +23,19 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// class G4VDivisionParameterisation
// G4VDivisionParameterisation
//
// Class description:
//
// Base class for parameterisations defining divisions of volumes
// for different kind of CSG and specific solids.
// History:
// -------
// 09.05.01 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// 21.04.10 - M.Asai, Added gaps
//---------------------------------------------------------------------
#ifndef G4VDivisionParameterisation_H
#define G4VDivisionParameterisation_H 1
#ifndef G4VDIVISIONPARAMETERISATION_HH
#define G4VDIVISIONPARAMETERISATION_HH 1
#include "G4Types.hh"
#include "geomdefs.hh"
@@ -57,10 +53,10 @@ class G4VDivisionParameterisation : public G4VPVParameterisation
G4VDivisionParameterisation( EAxis axis, G4int nDiv, G4double width,
G4double offset, DivisionType divType,
G4VSolid* motherSolid = 0);
G4VSolid* motherSolid = nullptr);
virtual ~G4VDivisionParameterisation();
virtual G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume *);
virtual G4VSolid* ComputeSolid(const G4int, G4VPhysicalVolume*);
virtual void ComputeTransformation(const G4int copyNo,
G4VPhysicalVolume *physVol) const = 0;
@@ -79,7 +75,7 @@ class G4VDivisionParameterisation : public G4VPVParameterisation
protected: // with description
void ChangeRotMatrix( G4VPhysicalVolume* physVol,
G4double rotZ = 0. ) const;
G4double rotZ = 0.0 ) const;
G4int CalculateNDiv( G4double motherDim, G4double width,
G4double offset ) const;
@@ -96,22 +92,22 @@ class G4VDivisionParameterisation : public G4VPVParameterisation
G4String ftype;
EAxis faxis;
G4int fnDiv;
G4double fwidth;
G4double foffset;
G4int fnDiv = 0;
G4double fwidth = 0.0;
G4double foffset = 0.0;
DivisionType fDivisionType;
G4VSolid* fmotherSolid;
G4bool fReflectedSolid;
G4bool fDeleteSolid;
G4VSolid* fmotherSolid = nullptr;
G4bool fReflectedSolid = false;
G4bool fDeleteSolid = false;
static G4ThreadLocal G4RotationMatrix* fRot;
static const G4int verbose;
G4int theVoluFirstCopyNo;
G4int theVoluFirstCopyNo = 1;
G4double kCarTolerance;
G4double fhgap;
G4double fhgap = 0.0;
};
#include "G4VDivisionParameterisation.icc"
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4VDivisionParameterisation inline methods implementation
//
//
// class G4VDivisionParameterisation Inline Implementation file
//
// 09.05.01 - P.Arce, Initial version
// --------------------------------------------------------------------
inline
@@ -80,11 +79,11 @@ G4int G4VDivisionParameterisation::VolumeFirstCopyNo() const
inline
void G4VDivisionParameterisation::SetHalfGap(G4double hg)
{
fhgap = hg;
fhgap = hg;
}
inline
G4double G4VDivisionParameterisation::GetHalfGap() const
{
return fhgap;
return fhgap;
}