Geant4 9.6.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=0)
 
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=0)
 
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 (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.) 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
 
G4double fwidth
 
G4double foffset
 
DivisionType fDivisionType
 
G4VSolidfmotherSolid
 
G4bool fReflectedSolid
 
G4bool fDeleteSolid
 
G4int theVoluFirstCopyNo
 
G4double kCarTolerance
 
G4double fhgap
 
- Static Protected Attributes inherited from G4VDivisionParameterisation
static G4int verbose = 5
 

Detailed Description

Definition at line 64 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 45 of file G4ParameterisationPolycone.cc.

49 : G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
50{
51 G4Polycone* msol = (G4Polycone*)(msolid);
52 if ((msolid->GetEntityType() != "G4ReflectedSolid") && (msol->IsGeneric()))
53 {
54 std::ostringstream message;
55 message << "Generic construct for G4Polycone NOT supported." << G4endl
56 << "Sorry! Solid: " << msol->GetName() << ".";
57 G4Exception("G4VParameterisationPolycone::G4VParameterisationPolycone()",
58 "GeomDiv0001", FatalException, message);
59 }
60 if (msolid->GetEntityType() == "G4ReflectedSolid")
61 {
62 // Get constituent solid
63 G4VSolid* mConstituentSolid
64 = ((G4ReflectedSolid*)msolid)->GetConstituentMovedSolid();
65 msol = (G4Polycone*)(mConstituentSolid);
66
67 // Get parameters
68 G4int nofZplanes = msol->GetOriginalParameters()->Num_z_planes;
69 G4double* zValues = msol->GetOriginalParameters()->Z_values;
70 G4double* rminValues = msol->GetOriginalParameters()->Rmin;
71 G4double* rmaxValues = msol->GetOriginalParameters()->Rmax;
72
73 // Invert z values
74 G4double* zValuesRefl = new double[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
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4double * Z_values
Definition: G4Polycone.hh:80
G4double GetEndPhi() const
G4double GetStartPhi() const
G4bool IsGeneric() const
G4PolyconeHistorical * GetOriginalParameters() const
G4String GetName() const
virtual G4GeometryType GetEntityType() const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ ~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: