Public Member Functions | |
BLCMDstart () | |
Default constructor. Defines the command, args, etc. | |
virtual | ~BLCMDstart () |
Destructor. | |
G4String | commandName () |
commandName() returns "start". | |
int | command (BLArgumentVector &argv, BLArgumentMap &namedArgs) |
command() implements the start command. | |
void | defineNamedArgs () |
defineNamedArgs() defines the named arguments for the command. | |
Private Attributes | |
G4double | x |
G4double | y |
G4double | z |
G4double | initialZ |
G4String | rotation |
G4double | radiusCut |
G4int | ring |
BLCMDstart::BLCMDstart | ( | ) |
Default constructor. Defines the command, args, etc.
References BLCMDTYPE_LAYOUT, initialZ, radiusCut, BLCommand::registerCommand(), ring, rotation, BLCommand::setDescription(), BLCommand::setSynopsis(), x, y, and z.
00055 : BLCommand() 00056 { 00057 // register the commandName(), and its synopsis and description. 00058 registerCommand(BLCMDTYPE_LAYOUT); 00059 setSynopsis("Define the initial start of centerline coordinates."); 00060 setDescription("If used, this command must come before any other " 00061 "command that puts an element into the world or affects the " 00062 "centerline coordinates (place, beam, corner, cornerarc, and " 00063 "reference commands). This command may not always be needed, " 00064 "but it is needed to eliminate the ambiguities in " 00065 "the global to centerline coordinate transform, and " 00066 "when simulating a ring to ensure that " 00067 "sensible values of the centerline coordinates are used.\n\n" 00068 "Note that the radiusCut is important to reduce or eliminate " 00069 "ambiguities in the global to centerline coordinate transform. " 00070 "It can also be used to 'shield' the beamline to prevent " 00071 "particles from taking unusual paths around the outside " 00072 "of beamline elements."); 00073 00074 // provide initial values for fields 00075 x = 0.0; 00076 y = 0.0; 00077 z = 0.0; 00078 initialZ = 0.0; 00079 rotation = ""; 00080 radiusCut = 0.0; 00081 ring = 0; 00082 }
G4String BLCMDstart::commandName | ( | ) | [inline, virtual] |
int BLCMDstart::command | ( | BLArgumentVector & | argv, | |
BLArgumentMap & | namedArgs | |||
) | [virtual] |
command() implements the start command.
Implements BLCommand.
References BLCommand::handleNamedArgs(), initialZ, BLCommand::print(), radiusCut, ring, rotation, BLCoordinates::start(), BLCommand::stringToRotationMatrix(), x, y, and z.
00085 { 00086 int retval = handleNamedArgs(namedArgs); 00087 00088 if(radiusCut <= 0.0) 00089 G4Exception("start command","No radius cut",JustWarning, ""); 00090 00091 G4double point[4]; 00092 point[0] = x; 00093 point[1] = y; 00094 point[2] = z; 00095 point[3] = 0.0; 00096 00097 G4RotationMatrix *rot = stringToRotationMatrix(rotation); 00098 00099 BLCoordinates::start(point,initialZ,rot,radiusCut,ring); 00100 00101 print(""); 00102 00103 return retval; 00104 }
void BLCMDstart::defineNamedArgs | ( | ) | [virtual] |
defineNamedArgs() defines the named arguments for the command.
Reimplemented from BLCommand.
References BLCommand::argDouble(), BLCommand::argInt(), BLCommand::argString(), initialZ, radiusCut, ring, rotation, x, y, and z.
00107 { 00108 argDouble(x,"x","The global x position of the start."); 00109 argDouble(y,"y","The global y position of the start."); 00110 argDouble(z,"z","The global z position of the start."); 00111 argDouble(initialZ,"initialZ","The initial centerline z value."); 00112 argString(rotation,"rotation","The initial rotation of the centerline."); 00113 argDouble(radiusCut,"radiusCut","The radius cut for the initial segment (mm)."); 00114 argInt(ring,"ring","Set nonzero to indicate a ring is present."); 00115 }
G4double BLCMDstart::x [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4double BLCMDstart::y [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4double BLCMDstart::z [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4double BLCMDstart::initialZ [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4String BLCMDstart::rotation [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4double BLCMDstart::radiusCut [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().
G4int BLCMDstart::ring [private] |
Referenced by BLCMDstart(), command(), and defineNamedArgs().