55 std::ostringstream oss;
56 oss <<
"G4GPSModel for General Particle Source " <<
fColour;
85 if (!pGPSData)
return;
88 for (
G4int iSource = 0; iSource < nSources; ++iSource) {
91 if (!pCurrentSingleSource)
return;
94 if (!pSPSPosDistribution)
return;
125 G4double smallHalfThickness = 10.*surfaceTolerance;
131 if (
Type ==
"Point") {
141 }
else if (
Type ==
"Plane") {
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));
163 }
else if (
Type ==
"Surface" ||
Type ==
"Volume") {
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));
G4String GetCurrentDescription() const
G4GPSModel(const G4Colour &colour=G4Colour(1., 0., 0., 0.3))
void DescribeYourselfTo(G4VGraphicsScene &)
G4String GetCurrentTag() const
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)
G4String fGlobalDescription
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