56 std::ostringstream oss;
57 oss <<
"G4GPSModel for General Particle Source " <<
fColour;
86 if (!pGPSData)
return;
89 for (
G4int iSource = 0; iSource < nSources; ++iSource) {
92 if (!pCurrentSingleSource)
return;
95 if (!pSPSPosDistribution)
return;
126 G4double smallHalfThickness = 10.*surfaceTolerance;
132 if (Type ==
"Point") {
142 }
else if (Type ==
"Plane") {
146 if (Shape ==
"Circle") {
148 (
G4Tubs(
"GPS_Circle",0.,Radius,smallHalfThickness,0.,
twopi));
149 }
else if (Shape ==
"Annulus") {
151 (
G4Tubs(
"GPS_Annulus",Radius0,Radius,smallHalfThickness,0.,
twopi));
152 }
else if (Shape ==
"Ellipse") {
155 }
else if (Shape ==
"Square") {
157 (
G4Box(
"GPS_Ellipse",halfx,halfx,smallHalfThickness));
158 }
else if (Shape ==
"Rectangle") {
160 (
G4Box(
"GPS_Rectangle",halfx,halfy,smallHalfThickness));
164 }
else if (Type ==
"Surface" || Type ==
"Volume") {
169 if (Shape ==
"Sphere") {
171 (
G4Orb(
"GPS_Sphere",Radius));
172 }
else if (Shape ==
"Ellipsoid") {
175 }
else if (Shape ==
"Cylinder") {
177 (
G4Tubs(
"GPS_Cylinder",0.,Radius, halfz, 0.,
twopi));
178 }
else if (Shape ==
"Para") {
180 (
G4Para(
"GPS_Para",halfx,halfy,halfz,ParAlpha,ParTheta,ParPhi));
void SetPosition(const G4Point3D &)
G4ThreeVector GetCentreCoords() const
virtual void AddSolid(const G4Box &)=0
virtual void EndPrimitives()=0
G4SingleParticleSource * GetCurrentSource(G4int idx)
G4String GetCurrentDescription() const
static G4GeneralParticleSourceData * Instance()
G4GPSModel(const G4Colour &colour=G4Colour(1., 0., 0., 0.3))
G4SPSPosDistribution * GetPosDist() const
const G4ThreeVector & GetRotz() const
G4double GetParTheta() const
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
G4double GetParPhi() const
G4String GetPosDisShape() const
G4String fGlobalDescription
G4String GetPosDisType() const
G4double GetRadius0() const
void DescribeYourselfTo(G4VGraphicsScene &)
static constexpr double twopi
G4double GetHalfZ() const
G4double GetParAlpha() const
G4String GetCurrentTag() const
virtual void AddPrimitive(const G4Polyline &)=0
G4int GetSourceVectorSize() const
void SetForceSolid(G4bool=true)
DLL_API const Hep3Vector HepXHat
DLL_API const Hep3Vector HepYHat
const G4ThreeVector & GetRotx() const
virtual void PostAddSolid()=0
const G4ThreeVector & GetRoty() const
DLL_API const Hep3Vector HepZHat
void SetColour(const G4Colour &)
static G4GeometryTolerance * GetInstance()
G4double GetHalfY() const
void SetScreenDiameter(G4double)
G4double GetHalfX() const
G4double GetSurfaceTolerance() const
void SetVisAttributes(const G4VisAttributes *)
G4double GetRadius() const
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)=0