42 #include "PrimaryGeneratorAction.hh"
45 #include "CommandLineParser.hh"
59 using namespace G4DNAPARSER ;
110 G4Orb* mediumSphere = 0;
111 G4Box* boundingSlice = 0;
112 if ( mediumLV && boundingLV)
115 boundingSlice =
dynamic_cast< G4Box*
>(boundingLV->
GetSolid());
117 if ( mediumSphere && boundingSlice)
119 mediumRadius = mediumSphere->
GetRadius();
127 if ( CommandLineParser::GetParser()->GetCommandIfActive(
"-sXY"))
147 else if ( CommandLineParser::GetParser()->GetCommandIfActive(
"-dXY"))
156 while (! (std::sqrt(x0*x0+y0*y0)<= mediumRadius) )
176 G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
178 G4ThreeVector positionStart(mediumRadius*sinTheta*std::cos(phi),
179 mediumRadius*sinTheta*std::sin(phi),
180 mediumRadius*cosTheta);
188 (positionDir-positionStart).unit());