Geant4-11
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
G4GDMLParameterisation Class Reference

#include <G4GDMLParameterisation.hh>

Inheritance diagram for G4GDMLParameterisation:
G4VPVParameterisation

Data Structures

struct  PARAMETER
 

Public Member Functions

void AddParameter (const PARAMETER &)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 
G4int GetSize () const
 
virtual G4bool IsNested () const
 

Private Member Functions

void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeTransformation (const G4int, G4VPhysicalVolume *) const
 

Private Attributes

std::vector< PARAMETERparameterList
 

Detailed Description

Definition at line 60 of file G4GDMLParameterisation.hh.

Member Function Documentation

◆ AddParameter()

void G4GDMLParameterisation::AddParameter ( const PARAMETER newParameter)

Definition at line 42 of file G4GDMLParameterisation.cc.

43{
44 parameterList.push_back(newParameter);
45}
std::vector< PARAMETER > parameterList

References parameterList.

Referenced by G4GDMLReadParamvol::ParametersRead().

◆ ComputeDimensions() [1/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Box box,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 56 of file G4GDMLParameterisation.cc.

58{
59 box.SetXHalfLength(parameterList[index].dimension[0]);
60 box.SetYHalfLength(parameterList[index].dimension[1]);
61 box.SetZHalfLength(parameterList[index].dimension[2]);
62}
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:172
void SetYHalfLength(G4double dy)
Definition: G4Box.cc:149
void SetXHalfLength(G4double dx)
Definition: G4Box.cc:125

References parameterList, G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), and G4Box::SetZHalfLength().

◆ ComputeDimensions() [2/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Cons cons,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 104 of file G4GDMLParameterisation.cc.

106{
107 cons.SetInnerRadiusMinusZ(parameterList[index].dimension[0]);
108 cons.SetOuterRadiusMinusZ(parameterList[index].dimension[1]);
109 cons.SetInnerRadiusPlusZ(parameterList[index].dimension[2]);
110 cons.SetOuterRadiusPlusZ(parameterList[index].dimension[3]);
111 cons.SetZHalfLength(parameterList[index].dimension[4]);
112 cons.SetStartPhiAngle(parameterList[index].dimension[5]);
113 cons.SetDeltaPhiAngle(parameterList[index].dimension[6]);
114}
void SetInnerRadiusPlusZ(G4double Rmin2)
void SetZHalfLength(G4double newDz)
void SetStartPhiAngle(G4double newSPhi, G4bool trig=true)
void SetOuterRadiusMinusZ(G4double Rmax1)
void SetOuterRadiusPlusZ(G4double Rmax2)
void SetDeltaPhiAngle(G4double newDPhi)
void SetInnerRadiusMinusZ(G4double Rmin1)

References parameterList, G4Cons::SetDeltaPhiAngle(), G4Cons::SetInnerRadiusMinusZ(), G4Cons::SetInnerRadiusPlusZ(), G4Cons::SetOuterRadiusMinusZ(), G4Cons::SetOuterRadiusPlusZ(), G4Cons::SetStartPhiAngle(), and G4Cons::SetZHalfLength().

◆ ComputeDimensions() [3/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Ellipsoid ellipsoid,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 137 of file G4GDMLParameterisation.cc.

140{
141 ellipsoid.SetSemiAxis(parameterList[index].dimension[0],
142 parameterList[index].dimension[1],
143 parameterList[index].dimension[2]);
144 ellipsoid.SetZCuts(parameterList[index].dimension[3],
145 parameterList[index].dimension[4]);
146}
void SetZCuts(G4double newzBottomCut, G4double newzTopCut)
void SetSemiAxis(G4double x, G4double y, G4double z)

References parameterList, G4Ellipsoid::SetSemiAxis(), and G4Ellipsoid::SetZCuts().

◆ ComputeDimensions() [4/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Hype hype,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 174 of file G4GDMLParameterisation.cc.

176{
177 hype.SetInnerRadius(parameterList[index].dimension[0]);
178 hype.SetOuterRadius(parameterList[index].dimension[1]);
179 hype.SetZHalfLength(parameterList[index].dimension[4]);
180 hype.SetInnerStereo(parameterList[index].dimension[2]);
181 hype.SetOuterStereo(parameterList[index].dimension[3]);
182}
void SetOuterStereo(G4double newOSte)
void SetOuterRadius(G4double newORad)
void SetZHalfLength(G4double newHLZ)
void SetInnerStereo(G4double newISte)
void SetInnerRadius(G4double newIRad)

References parameterList, G4Hype::SetInnerRadius(), G4Hype::SetInnerStereo(), G4Hype::SetOuterRadius(), G4Hype::SetOuterStereo(), and G4Hype::SetZHalfLength().

◆ ComputeDimensions() [5/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Orb orb,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 130 of file G4GDMLParameterisation.cc.

132{
133 orb.SetRadius(parameterList[index].dimension[0]);
134}
void SetRadius(G4double newRmax)

References parameterList, and G4Orb::SetRadius().

◆ ComputeDimensions() [6/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Para para,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 161 of file G4GDMLParameterisation.cc.

163{
164 para.SetXHalfLength(parameterList[index].dimension[0]);
165 para.SetYHalfLength(parameterList[index].dimension[1]);
166 para.SetZHalfLength(parameterList[index].dimension[2]);
167 para.SetAlpha(parameterList[index].dimension[3]);
168 para.SetTanAlpha(std::tan(parameterList[index].dimension[3]));
169 para.SetThetaAndPhi(parameterList[index].dimension[4],
170 parameterList[index].dimension[5]);
171}
void SetYHalfLength(G4double val)
void SetTanAlpha(G4double val)
void SetThetaAndPhi(double pTheta, double pPhi)
void SetZHalfLength(G4double val)
void SetXHalfLength(G4double val)
void SetAlpha(G4double alpha)

References parameterList, G4Para::SetAlpha(), G4Para::SetTanAlpha(), G4Para::SetThetaAndPhi(), G4Para::SetXHalfLength(), G4Para::SetYHalfLength(), and G4Para::SetZHalfLength().

◆ ComputeDimensions() [7/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Polycone pcone,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 185 of file G4GDMLParameterisation.cc.

188{
189 G4PolyconeHistorical origparam(*(pcone.GetOriginalParameters()));
190 origparam.Start_angle = parameterList[index].dimension[0];
191 origparam.Opening_angle = parameterList[index].dimension[1];
192 origparam.Num_z_planes = (G4int) parameterList[index].dimension[2];
193 G4int nZplanes = origparam.Num_z_planes;
194
195 for(G4int ii = 0; ii < nZplanes; ++ii)
196 {
197 origparam.Rmin[ii] = parameterList[index].dimension[3 + ii * 3];
198 origparam.Rmax[ii] = parameterList[index].dimension[4 + ii * 3];
199 origparam.Z_values[ii] = parameterList[index].dimension[5 + ii * 3];
200 }
201
202 pcone.SetOriginalParameters(&origparam); // copy values & transfer pointers
203 pcone.Reset(); // reset to new solid parameters
204}
int G4int
Definition: G4Types.hh:85
void SetOriginalParameters(G4PolyconeHistorical *pars)
G4PolyconeHistorical * GetOriginalParameters() const
G4bool Reset()
Definition: G4Polycone.cc:436

References G4Polycone::GetOriginalParameters(), G4PolyconeHistorical::Num_z_planes, G4PolyconeHistorical::Opening_angle, parameterList, G4Polycone::Reset(), G4PolyconeHistorical::Rmax, G4PolyconeHistorical::Rmin, G4Polycone::SetOriginalParameters(), G4PolyconeHistorical::Start_angle, and G4PolyconeHistorical::Z_values.

◆ ComputeDimensions() [8/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Polyhedra polyhedra,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 207 of file G4GDMLParameterisation.cc.

210{
211 G4PolyhedraHistorical origparam(*(polyhedra.GetOriginalParameters()));
212 origparam.Start_angle = parameterList[index].dimension[0];
213 origparam.Opening_angle = parameterList[index].dimension[1];
214 origparam.Num_z_planes = (G4int) parameterList[index].dimension[2];
215 origparam.numSide = (G4int) parameterList[index].dimension[3];
216
217 G4int nZplanes = origparam.Num_z_planes;
218
219 for(G4int ii = 0; ii < nZplanes; ++ii)
220 {
221 origparam.Rmin[ii] = parameterList[index].dimension[4 + ii * 3];
222 origparam.Rmax[ii] = parameterList[index].dimension[5 + ii * 3];
223 origparam.Z_values[ii] = parameterList[index].dimension[6 + ii * 3];
224 }
225 polyhedra.SetOriginalParameters(
226 &origparam); // copy values & transfer pointers
227 polyhedra.Reset(); // reset to new solid parameters
228}
void SetOriginalParameters(G4PolyhedraHistorical *pars)
G4PolyhedraHistorical * GetOriginalParameters() const
G4bool Reset()
Definition: G4Polyhedra.cc:463

References G4Polyhedra::GetOriginalParameters(), G4PolyhedraHistorical::Num_z_planes, G4PolyhedraHistorical::numSide, G4PolyhedraHistorical::Opening_angle, parameterList, G4Polyhedra::Reset(), G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, G4Polyhedra::SetOriginalParameters(), G4PolyhedraHistorical::Start_angle, and G4PolyhedraHistorical::Z_values.

◆ ComputeDimensions() [9/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Sphere sphere,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 117 of file G4GDMLParameterisation.cc.

120{
121 sphere.SetInnerRadius(parameterList[index].dimension[0]);
122 sphere.SetOuterRadius(parameterList[index].dimension[1]);
123 sphere.SetStartPhiAngle(parameterList[index].dimension[2]);
124 sphere.SetDeltaPhiAngle(parameterList[index].dimension[3]);
125 sphere.SetStartThetaAngle(parameterList[index].dimension[4]);
126 sphere.SetDeltaThetaAngle(parameterList[index].dimension[5]);
127}
void SetDeltaPhiAngle(G4double newDphi)
void SetStartThetaAngle(G4double newSTheta)
void SetOuterRadius(G4double newRmax)
void SetDeltaThetaAngle(G4double newDTheta)
void SetInnerRadius(G4double newRMin)
void SetStartPhiAngle(G4double newSphi, G4bool trig=true)

References parameterList, G4Sphere::SetDeltaPhiAngle(), G4Sphere::SetDeltaThetaAngle(), G4Sphere::SetInnerRadius(), G4Sphere::SetOuterRadius(), G4Sphere::SetStartPhiAngle(), and G4Sphere::SetStartThetaAngle().

◆ ComputeDimensions() [10/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Torus torus,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 149 of file G4GDMLParameterisation.cc.

152{
153 torus.SetAllParameters(parameterList[index].dimension[0], // pRmin
154 parameterList[index].dimension[1], // pRmax
155 parameterList[index].dimension[2], // pRtor
156 parameterList[index].dimension[3], // pSPhi
157 parameterList[index].dimension[4]); // pDPhi
158}
void SetAllParameters(G4double pRmin, G4double pRmax, G4double pRtor, G4double pSPhi, G4double pDPhi)
Definition: G4Torus.cc:81

References parameterList, and G4Torus::SetAllParameters().

◆ ComputeDimensions() [11/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Trap trap,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 76 of file G4GDMLParameterisation.cc.

78{
79 trap.SetAllParameters(parameterList[index].dimension[0], // Dz
80 parameterList[index].dimension[1], // Theta
81 parameterList[index].dimension[2], // Phi
82 parameterList[index].dimension[3], // Dy1
83 parameterList[index].dimension[4], // Dx1
84 parameterList[index].dimension[5], // Dx2
85 parameterList[index].dimension[6], // pAlp1,
86 parameterList[index].dimension[7], // pDy2,
87 parameterList[index].dimension[8], // pDx3,
88 parameterList[index].dimension[9], // pDx4,
89 parameterList[index].dimension[10]); // pAlp2
90}
void SetAllParameters(G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pAlp1, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlp2)
Definition: G4Trap.cc:282

References parameterList, and G4Trap::SetAllParameters().

◆ ComputeDimensions() [12/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Trd trd,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 65 of file G4GDMLParameterisation.cc.

67{
68 trd.SetXHalfLength1(parameterList[index].dimension[0]);
69 trd.SetXHalfLength2(parameterList[index].dimension[1]);
70 trd.SetYHalfLength1(parameterList[index].dimension[2]);
71 trd.SetYHalfLength2(parameterList[index].dimension[3]);
72 trd.SetZHalfLength(parameterList[index].dimension[4]);
73}
void SetYHalfLength2(G4double val)
void SetXHalfLength1(G4double val)
void SetYHalfLength1(G4double val)
void SetXHalfLength2(G4double val)
void SetZHalfLength(G4double val)

References parameterList, G4Trd::SetXHalfLength1(), G4Trd::SetXHalfLength2(), G4Trd::SetYHalfLength1(), G4Trd::SetYHalfLength2(), and G4Trd::SetZHalfLength().

◆ ComputeDimensions() [13/13]

void G4GDMLParameterisation::ComputeDimensions ( G4Tubs tubs,
const G4int  index,
const G4VPhysicalVolume  
) const
privatevirtual

Reimplemented from G4VPVParameterisation.

Definition at line 93 of file G4GDMLParameterisation.cc.

95{
96 tubs.SetInnerRadius(parameterList[index].dimension[0]);
97 tubs.SetOuterRadius(parameterList[index].dimension[1]);
98 tubs.SetZHalfLength(parameterList[index].dimension[2]);
99 tubs.SetStartPhiAngle(parameterList[index].dimension[3]);
100 tubs.SetDeltaPhiAngle(parameterList[index].dimension[4]);
101}
void SetDeltaPhiAngle(G4double newDPhi)
void SetStartPhiAngle(G4double newSPhi, G4bool trig=true)
void SetInnerRadius(G4double newRMin)
void SetOuterRadius(G4double newRMax)
void SetZHalfLength(G4double newDz)

References parameterList, G4Tubs::SetDeltaPhiAngle(), G4Tubs::SetInnerRadius(), G4Tubs::SetOuterRadius(), G4Tubs::SetStartPhiAngle(), and G4Tubs::SetZHalfLength().

◆ ComputeMaterial()

G4Material * G4VPVParameterisation::ComputeMaterial ( const G4int  repNo,
G4VPhysicalVolume currentVol,
const G4VTouchable parentTouch = nullptr 
)
virtualinherited

◆ ComputeSolid()

G4VSolid * G4VPVParameterisation::ComputeSolid ( const  G4int,
G4VPhysicalVolume pPhysicalVol 
)
virtualinherited

◆ ComputeTransformation()

void G4GDMLParameterisation::ComputeTransformation ( const G4int  index,
G4VPhysicalVolume physvol 
) const
privatevirtual

Implements G4VPVParameterisation.

Definition at line 48 of file G4GDMLParameterisation.cc.

50{
51 physvol->SetTranslation(parameterList[index].position);
52 physvol->SetRotation(parameterList[index].pRot);
53}
void SetTranslation(const G4ThreeVector &v)
void SetRotation(G4RotationMatrix *)

References parameterList, G4VPhysicalVolume::SetRotation(), and G4VPhysicalVolume::SetTranslation().

◆ GetMaterialScanner()

G4VVolumeMaterialScanner * G4VPVParameterisation::GetMaterialScanner ( )
virtualinherited

Reimplemented in G4VNestedParameterisation.

Definition at line 62 of file G4VPVParameterisation.cc.

63{
64 return nullptr;
65}

Referenced by G4Region::ScanVolumeTree().

◆ GetSize()

G4int G4GDMLParameterisation::GetSize ( ) const

Definition at line 36 of file G4GDMLParameterisation.cc.

37{
38 return (G4int) parameterList.size();
39}

References parameterList.

Referenced by G4GDMLReadParamvol::ParamvolRead().

◆ IsNested()

G4bool G4VPVParameterisation::IsNested ( ) const
virtualinherited

Field Documentation

◆ parameterList

std::vector<PARAMETER> G4GDMLParameterisation::parameterList
private

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