Geant4  10.02.p03
G4GDMLParameterisation Class Reference

#include <G4GDMLParameterisation.hh>

Inheritance diagram for G4GDMLParameterisation:
Collaboration diagram for G4GDMLParameterisation:

Classes

struct  PARAMETER
 

Public Member Functions

G4int GetSize () const
 
void AddParameter (const PARAMETER &)
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

Private Member Functions

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

Private Attributes

std::vector< PARAMETERparameterList
 

Detailed Description

Definition at line 66 of file G4GDMLParameterisation.hh.

Member Function Documentation

◆ AddParameter()

void G4GDMLParameterisation::AddParameter ( const PARAMETER newParameter)

Definition at line 43 of file G4GDMLParameterisation.cc.

44 {
45  parameterList.push_back(newParameter);
46 }
std::vector< PARAMETER > parameterList
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

57 {
58  box.SetXHalfLength(parameterList[index].dimension[0]);
59  box.SetYHalfLength(parameterList[index].dimension[1]);
60  box.SetZHalfLength(parameterList[index].dimension[2]);
61 }
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:171
Int_t index
void SetYHalfLength(G4double dy)
Definition: G4Box.cc:151
void SetXHalfLength(G4double dx)
Definition: G4Box.cc:131
std::vector< PARAMETER > parameterList
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeDimensions() [2/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 64 of file G4GDMLParameterisation.cc.

65 {
66  trd.SetXHalfLength1(parameterList[index].dimension[0]);
67  trd.SetXHalfLength2(parameterList[index].dimension[1]);
68  trd.SetYHalfLength1(parameterList[index].dimension[2]);
69  trd.SetYHalfLength2(parameterList[index].dimension[3]);
70  trd.SetZHalfLength(parameterList[index].dimension[4]);
71 }
Int_t index
void SetXHalfLength2(G4double val)
void SetZHalfLength(G4double val)
void SetYHalfLength1(G4double val)
void SetXHalfLength1(G4double val)
void SetYHalfLength2(G4double val)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [3/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 74 of file G4GDMLParameterisation.cc.

75 {
76  trap.SetAllParameters(parameterList[index].dimension[0], // Dz
77  parameterList[index].dimension[1], // Theta
78  parameterList[index].dimension[2], // Phi
79  parameterList[index].dimension[3], // Dy1
80  parameterList[index].dimension[4], // Dx1
81  parameterList[index].dimension[5], // Dx2
82  parameterList[index].dimension[6], // pAlp1,
83  parameterList[index].dimension[7], // pDy2,
84  parameterList[index].dimension[8], // pDx3,
85  parameterList[index].dimension[9], // pDx4,
86  parameterList[index].dimension[10]); // pAlp2
87 }
Int_t index
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:604
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [4/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 100 of file G4GDMLParameterisation.cc.

101 {
102  cons.SetInnerRadiusMinusZ(parameterList[index].dimension[0]);
103  cons.SetOuterRadiusMinusZ(parameterList[index].dimension[1]);
104  cons.SetInnerRadiusPlusZ(parameterList[index].dimension[2]);
105  cons.SetOuterRadiusPlusZ(parameterList[index].dimension[3]);
106  cons.SetZHalfLength(parameterList[index].dimension[4]);
107  cons.SetStartPhiAngle(parameterList[index].dimension[5]);
108  cons.SetDeltaPhiAngle(parameterList[index].dimension[6]);
109 }
void SetZHalfLength(G4double newDz)
void SetInnerRadiusMinusZ(G4double Rmin1)
Int_t index
void SetOuterRadiusPlusZ(G4double Rmax2)
void SetDeltaPhiAngle(G4double newDPhi)
void SetOuterRadiusMinusZ(G4double Rmax1)
void SetStartPhiAngle(G4double newSPhi, G4bool trig=true)
std::vector< PARAMETER > parameterList
void SetInnerRadiusPlusZ(G4double Rmin2)
Here is the call graph for this function:

◆ ComputeDimensions() [5/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 112 of file G4GDMLParameterisation.cc.

113 {
114  sphere.SetInnerRadius(parameterList[index].dimension[0]);
115  sphere.SetOuterRadius(parameterList[index].dimension[1]);
116  sphere.SetStartPhiAngle(parameterList[index].dimension[2]);
117  sphere.SetDeltaPhiAngle(parameterList[index].dimension[3]);
118  sphere.SetStartThetaAngle(parameterList[index].dimension[4]);
119  sphere.SetDeltaThetaAngle(parameterList[index].dimension[5]);
120 }
void SetStartPhiAngle(G4double newSphi, G4bool trig=true)
Int_t index
void SetDeltaThetaAngle(G4double newDTheta)
void SetStartThetaAngle(G4double newSTheta)
void SetOuterRadius(G4double newRmax)
void SetDeltaPhiAngle(G4double newDphi)
void SetInnerRadius(G4double newRMin)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [6/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 123 of file G4GDMLParameterisation.cc.

124 {
125  orb.SetRadius(parameterList[index].dimension[0]);
126 }
void SetRadius(G4double newRmax)
Int_t index
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [7/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 129 of file G4GDMLParameterisation.cc.

130 {
131  ellipsoid.SetSemiAxis(parameterList[index].dimension[0],
132  parameterList[index].dimension[1],
133  parameterList[index].dimension[2]);
134  ellipsoid.SetZCuts(parameterList[index].dimension[3],
135  parameterList[index].dimension[4]);
136 }
Int_t index
void SetZCuts(G4double newzBottomCut, G4double newzTopCut)
void SetSemiAxis(G4double x, G4double y, G4double z)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [8/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 139 of file G4GDMLParameterisation.cc.

140 {
141  torus.SetAllParameters(parameterList[index].dimension[0], // pRmin
142  parameterList[index].dimension[1], // pRmax
143  parameterList[index].dimension[2], // pRtor
144  parameterList[index].dimension[3], // pSPhi
145  parameterList[index].dimension[4]); // pDPhi
146 }
Int_t index
void SetAllParameters(G4double pRmin, G4double pRmax, G4double pRtor, G4double pSPhi, G4double pDPhi)
Definition: G4Torus.cc:98
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [9/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 149 of file G4GDMLParameterisation.cc.

150 {
151  para.SetXHalfLength(parameterList[index].dimension[0]);
152  para.SetYHalfLength(parameterList[index].dimension[1]);
153  para.SetZHalfLength(parameterList[index].dimension[2]);
154  para.SetAlpha(parameterList[index].dimension[3]);
155  para.SetTanAlpha(std::tan(parameterList[index].dimension[3]));
156  para.SetThetaAndPhi(parameterList[index].dimension[4],parameterList[index].dimension[5]);
157 }
void SetXHalfLength(G4double val)
void SetAlpha(G4double alpha)
Int_t index
void SetThetaAndPhi(double pTheta, double pPhi)
void SetZHalfLength(G4double val)
void SetYHalfLength(G4double val)
void SetTanAlpha(G4double val)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [10/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 160 of file G4GDMLParameterisation.cc.

161 {
162  hype.SetInnerRadius(parameterList[index].dimension[0]);
163  hype.SetOuterRadius(parameterList[index].dimension[1]);
164  hype.SetZHalfLength(parameterList[index].dimension[4]);
165  hype.SetInnerStereo(parameterList[index].dimension[2]);
166  hype.SetOuterStereo(parameterList[index].dimension[3]);
167 }
Int_t index
void SetOuterRadius(G4double newORad)
void SetInnerRadius(G4double newIRad)
void SetZHalfLength(G4double newHLZ)
void SetOuterStereo(G4double newOSte)
std::vector< PARAMETER > parameterList
void SetInnerStereo(G4double newISte)
Here is the call graph for this function:

◆ ComputeDimensions() [11/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 90 of file G4GDMLParameterisation.cc.

91 {
92  tubs.SetInnerRadius(parameterList[index].dimension[0]);
93  tubs.SetOuterRadius(parameterList[index].dimension[1]);
94  tubs.SetZHalfLength(parameterList[index].dimension[2]);
95  tubs.SetStartPhiAngle(parameterList[index].dimension[3]);
96  tubs.SetDeltaPhiAngle(parameterList[index].dimension[4]);
97 }
Int_t index
void SetStartPhiAngle(G4double newSPhi, G4bool trig=true)
void SetDeltaPhiAngle(G4double newDPhi)
void SetInnerRadius(G4double newRMin)
void SetOuterRadius(G4double newRMax)
std::vector< PARAMETER > parameterList
void SetZHalfLength(G4double newDz)
Here is the call graph for this function:

◆ ComputeDimensions() [12/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 170 of file G4GDMLParameterisation.cc.

171 {
172 
173  G4PolyconeHistorical origparam( *(pcone.GetOriginalParameters()) );
174  origparam.Start_angle = parameterList[index].dimension[0];
175  origparam.Opening_angle = parameterList[index].dimension[1];
176  origparam.Num_z_planes = (G4int) parameterList[index].dimension[2];
177  G4int nZplanes = origparam.Num_z_planes;
178 
179  for( G4int ii = 0; ii < nZplanes; ii++ )
180  {
181  origparam.Rmin[ii] = parameterList[index].dimension[3+ii*3] ;
182  origparam.Rmax[ii] = parameterList[index].dimension[4+ii*3] ;
183  origparam.Z_values[ii] = parameterList[index].dimension[5+ii*3] ;
184  }
185 
186  pcone.SetOriginalParameters(&origparam); // copy values & transfer pointers
187  pcone.Reset(); // reset to new solid parameters
188 
189 }
Int_t index
int G4int
Definition: G4Types.hh:78
void SetOriginalParameters(G4PolyconeHistorical *pars)
G4PolyconeHistorical * GetOriginalParameters() const
G4bool Reset()
Definition: G4Polycone.cc:442
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeDimensions() [13/13]

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

Reimplemented from G4VPVParameterisation.

Definition at line 192 of file G4GDMLParameterisation.cc.

193 {
194  G4PolyhedraHistorical origparam( *(polyhedra.GetOriginalParameters()) );
195  origparam.Start_angle = parameterList[index].dimension[0];
196  origparam.Opening_angle = parameterList[index].dimension[1];
197  origparam.Num_z_planes = (G4int) parameterList[index].dimension[2];
198  origparam.numSide = (G4int) parameterList[index].dimension[3];
199 
200  G4int nZplanes = origparam.Num_z_planes;
201 
202  for( G4int ii = 0; ii < nZplanes; ii++ )
203  {
204 
205  origparam.Rmin[ii] = parameterList[index].dimension[4+ii*3] ;
206  origparam.Rmax[ii] = parameterList[index].dimension[5+ii*3] ;
207  origparam.Z_values[ii] = parameterList[index].dimension[6+ii*3] ;
208 
209  }
210  polyhedra.SetOriginalParameters(&origparam); // copy values & transfer pointers
211  polyhedra.Reset(); // reset to new solid parameters
212 }
Int_t index
G4bool Reset()
Definition: G4Polyhedra.cc:481
int G4int
Definition: G4Types.hh:78
G4PolyhedraHistorical * GetOriginalParameters() const
void SetOriginalParameters(G4PolyhedraHistorical *pars)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:

◆ ComputeTransformation()

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

Implements G4VPVParameterisation.

Definition at line 49 of file G4GDMLParameterisation.cc.

50 {
52  physvol->SetRotation(parameterList[index].pRot);
53 }
Int_t index
void SetRotation(G4RotationMatrix *)
void SetTranslation(const G4ThreeVector &v)
std::vector< PARAMETER > parameterList
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSize()

G4int G4GDMLParameterisation::GetSize ( ) const

Definition at line 38 of file G4GDMLParameterisation.cc.

39 {
40  return (G4int)parameterList.size();
41 }
int G4int
Definition: G4Types.hh:78
std::vector< PARAMETER > parameterList
Here is the caller graph for this function:

Member Data Documentation

◆ parameterList

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

Definition at line 102 of file G4GDMLParameterisation.hh.


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