Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VParameterisationPolycone Class Reference

#include <G4ParameterisationPolycone.hh>

+ Inheritance diagram for G4VParameterisationPolycone:

Public Member Functions

 G4VParameterisationPolycone (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationPolycone ()
 
- Public Member Functions inherited from G4VDivisionParameterisation
 G4VDivisionParameterisation (EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=nullptr)
 
virtual ~G4VDivisionParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const =0
 
const G4StringGetType () const
 
EAxis GetAxis () const
 
G4int GetNoDiv () const
 
G4double GetWidth () const
 
G4double GetOffset () const
 
G4VSolidGetMotherSolid () const
 
void SetType (const G4String &type)
 
G4int VolumeFirstCopyNo () const
 
void SetHalfGap (G4double hg)
 
G4double GetHalfGap () const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual void ComputeTransformation (const G4int, G4VPhysicalVolume *) const =0
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 
virtual void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VDivisionParameterisation
void ChangeRotMatrix (G4VPhysicalVolume *physVol, G4double rotZ=0.0) const
 
G4int CalculateNDiv (G4double motherDim, G4double width, G4double offset) const
 
G4double CalculateWidth (G4double motherDim, G4int nDiv, G4double offset) const
 
virtual void CheckParametersValidity ()
 
void CheckOffset (G4double maxPar)
 
void CheckNDivAndWidth (G4double maxPar)
 
virtual G4double GetMaxParameter () const =0
 
G4double OffsetZ () const
 
- Protected Attributes inherited from G4VDivisionParameterisation
G4String ftype
 
EAxis faxis
 
G4int fnDiv = 0
 
G4double fwidth = 0.0
 
G4double foffset = 0.0
 
DivisionType fDivisionType
 
G4VSolidfmotherSolid = nullptr
 
G4bool fReflectedSolid = false
 
G4bool fDeleteSolid = false
 
G4int theVoluFirstCopyNo = 1
 
G4double kCarTolerance
 
G4double fhgap = 0.0
 
- Static Protected Attributes inherited from G4VDivisionParameterisation
static G4ThreadLocal G4RotationMatrixfRot = nullptr
 
static const G4int verbose = 5
 

Detailed Description

Definition at line 58 of file G4ParameterisationPolycone.hh.

Constructor & Destructor Documentation

◆ G4VParameterisationPolycone()

G4VParameterisationPolycone::G4VParameterisationPolycone ( EAxis  axis,
G4int  nCopies,
G4double  offset,
G4double  step,
G4VSolid msolid,
DivisionType  divType 
)

Definition at line 42 of file G4ParameterisationPolycone.cc.

46 : G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
47{
48#ifdef G4MULTITHREADED
49 std::ostringstream message;
50 message << "Divisions for G4Polycone currently NOT supported in MT-mode."
51 << G4endl
52 << "Sorry! Solid: " << msolid->GetName();
53 G4Exception("G4VParameterisationPolycone::G4VParameterisationPolycone()",
54 "GeomDiv0001", FatalException, message);
55#endif
56 G4Polycone* msol = (G4Polycone*)(msolid);
57 if (msolid->GetEntityType() == "G4ReflectedSolid")
58 {
59 // Get constituent solid
60 //
61 G4VSolid* mConstituentSolid
62 = ((G4ReflectedSolid*)msolid)->GetConstituentMovedSolid();
63 msol = (G4Polycone*)(mConstituentSolid);
64
65 // Get parameters
66 //
67 G4int nofZplanes = msol->GetOriginalParameters()->Num_z_planes;
68 G4double* zValues = msol->GetOriginalParameters()->Z_values;
69 G4double* rminValues = msol->GetOriginalParameters()->Rmin;
70 G4double* rmaxValues = msol->GetOriginalParameters()->Rmax;
71
72 // Invert z values
73 //
74 G4double* zValuesRefl = new G4double[nofZplanes];
75 for (G4int i=0; i<nofZplanes; ++i) { zValuesRefl[i] = - zValues[i]; }
76
77 G4Polycone* newSolid
78 = new G4Polycone(msol->GetName(),
79 msol->GetStartPhi(),
80 msol->GetEndPhi() - msol->GetStartPhi(),
81 nofZplanes, zValuesRefl, rminValues, rmaxValues);
82
83 delete [] zValuesRefl;
84
85 msol = newSolid;
86 fmotherSolid = newSolid;
87 fReflectedSolid = true;
88 fDeleteSolid = true;
89 }
90}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4double GetEndPhi() const
G4double GetStartPhi() const
G4PolyconeHistorical * GetOriginalParameters() const
G4String GetName() const
virtual G4GeometryType GetEntityType() const =0

◆ ~G4VParameterisationPolycone()

G4VParameterisationPolycone::~G4VParameterisationPolycone ( )
virtual

Definition at line 93 of file G4ParameterisationPolycone.cc.

94{
95}

The documentation for this class was generated from the following files: