77{
79
80
81
82
83
84
85 if (!pGPSData) return;
86
88 for (
G4int iSource = 0; iSource < nSources; ++iSource) {
89
91 if (!pCurrentSingleSource) return;
92
94 if (!pSPSPosDistribution) return;
95
98
99
100
101
102
103
104
105
106
115
119
123
125 G4double smallHalfThickness = 10.*surfaceTolerance;
126
130
131 if (
Type ==
"Point") {
132
140
141 }
else if (
Type ==
"Plane") {
142
143
145 if (Shape == "Circle") {
147 (
G4Tubs(
"GPS_Circle",0.,Radius,smallHalfThickness,0.,twopi));
148 } else if (Shape == "Annulus") {
150 (
G4Tubs(
"GPS_Annulus",Radius0,Radius,smallHalfThickness,0.,twopi));
151 } else if (Shape == "Ellipse") {
154 } else if (Shape == "Square") {
156 (
G4Box(
"GPS_Ellipse",halfx,halfx,smallHalfThickness));
157 } else if (Shape == "Rectangle") {
159 (
G4Box(
"GPS_Rectangle",halfx,halfy,smallHalfThickness));
160 }
162
163 }
else if (
Type ==
"Surface" ||
Type ==
"Volume") {
164
165
166
168 if (Shape == "Sphere") {
170 (
G4Orb(
"GPS_Sphere",Radius));
171 } else if (Shape == "Ellipsoid") {
174 } else if (Shape == "Cylinder") {
176 (
G4Tubs(
"GPS_Cylinder",0.,Radius, halfz, 0., twopi));
177 } else if (Shape == "Para") {
179 (
G4Para(
"GPS_Para",halfx,halfy,halfz,ParAlpha,ParTheta,ParPhi));
180 }
182
183 }
184 }
185}
G4SingleParticleSource * GetCurrentSource(G4int idx)
G4int GetSourceVectorSize() const
static G4GeneralParticleSourceData * Instance()
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4double GetRadius() const
const G4ThreeVector & GetCentreCoords() const
G4double GetParAlpha() const
G4double GetHalfZ() const
G4double GetParPhi() const
const G4String & GetPosDisType() const
const G4ThreeVector & GetRotx() const
const G4ThreeVector & GetRotz() const
G4double GetRadius0() const
G4double GetHalfX() const
const G4String & GetPosDisShape() const
G4double GetParTheta() const
G4double GetHalfY() const
const G4ThreeVector & GetRoty() const
G4SPSPosDistribution * GetPosDist() const
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void PostAddSolid()=0
virtual void AddPrimitive(const G4Polyline &)=0
virtual void AddSolid(const G4Box &)=0
virtual void EndPrimitives()=0
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)=0
void SetPosition(const G4Point3D &)
void SetScreenDiameter(G4double)
void SetColour(const G4Colour &)
void SetForceSolid(G4bool=true)
void SetVisAttributes(const G4VisAttributes *)
DLL_API const Hep3Vector HepZHat
DLL_API const Hep3Vector HepXHat
DLL_API const Hep3Vector HepYHat