40   :hadrontherapyDetector(detector)
 
   44     changeThePhantomDir -> SetGuidance(
"Command to change the Phantom Size/position");
 
   46     changeThePhantomSizeCmd -> SetGuidance(
"Insert sizes X Y and Z" 
   47                                        "\n   0 or negative values mean <<Don't change it!>>");
 
   48     changeThePhantomSizeCmd -> SetParameterName(
"PhantomSizeAlongX", 
 
   50                         "PhantomSizeAlongZ", 
false);
 
   51     changeThePhantomSizeCmd -> SetDefaultUnit(
"mm");
 
   52     changeThePhantomSizeCmd -> SetUnitCandidates(
"nm um mm cm"); 
 
   53     changeThePhantomSizeCmd -> AvailableForStates(
G4State_Idle);
 
   58     changeThePhantomMaterialCmd -> SetGuidance(
"Change the Phantom and the detector material"); 
 
   59     changeThePhantomMaterialCmd -> SetParameterName(
"PhantomMaterial", 
false);
 
   60     changeThePhantomMaterialCmd -> SetDefaultValue(
"G4_WATER");
 
   61     changeThePhantomMaterialCmd -> AvailableForStates(
G4State_Idle);
 
   65     changeThePhantomPositionCmd -> SetGuidance(
"Insert X Y and Z dimensions for the position of the center of the Phantom" 
   66                         " respect to that of the \"World\""); 
 
   67     changeThePhantomPositionCmd -> SetParameterName(
"PositionAlongX", 
 
   69                             "PositionAlongZ", 
false);
 
   70     changeThePhantomPositionCmd -> SetDefaultUnit(
"mm");
 
   71     changeThePhantomPositionCmd -> SetUnitCandidates(
"um mm cm m"); 
 
   72     changeThePhantomPositionCmd -> AvailableForStates(
G4State_Idle);
 
   76     updateCmd->
SetGuidance(
"Update Phantom/Detector geometry.");
 
   77     updateCmd->
SetGuidance(
"This command MUST be applied before \"beamOn\" ");
 
   78     updateCmd->
SetGuidance(
"if you changed geometrical value(s).");
 
   83     changeTheDetectorDir -> SetGuidance(
"Command to change the Detector's Size/position/Voxels");
 
   86     changeTheDetectorSizeCmd -> SetGuidance(
"Insert sizes for X Y and Z dimensions of the Detector" 
   87                         "\n   0 or negative values mean <<Don't change it>>");
 
   88     changeTheDetectorSizeCmd -> SetParameterName(
"DetectorSizeAlongX", 
"DetectorSizeAlongY", 
"DetectorSizeAlongZ", 
false);
 
   89     changeTheDetectorSizeCmd -> SetDefaultUnit(
"mm");
 
   90     changeTheDetectorSizeCmd -> SetUnitCandidates(
"nm um mm cm"); 
 
   91     changeTheDetectorSizeCmd -> AvailableForStates(
G4State_Idle);
 
   95     changeTheDetectorToPhantomPositionCmd -> SetGuidance(
"Insert X Y and Z displacements between Detector and Phantom" 
   96                                                      "\nNegative values mean <<Don't change it!>>"); 
 
   97     changeTheDetectorToPhantomPositionCmd -> SetParameterName(
"DisplacementAlongX",
 
   99                                   "DisplacementAlongZ", 
false);
 
  100     changeTheDetectorToPhantomPositionCmd -> SetDefaultUnit(
"mm");
 
  101     changeTheDetectorToPhantomPositionCmd -> SetUnitCandidates(
"nm um mm cm"); 
 
  102     changeTheDetectorToPhantomPositionCmd -> AvailableForStates(
G4State_Idle);
 
  106     changeTheDetectorVoxelCmd -> SetGuidance(
"Insert Voxel sizes for X Y and Z dimensions" 
  107                                      "\n   0 or negative values mean <<Don't change it!>>");
 
  108     changeTheDetectorVoxelCmd -> SetParameterName(
"VoxelSizeAlongX", 
"VoxelSizeAlongY", 
"VoxelSizeAlongZ", 
false);
 
  109     changeTheDetectorVoxelCmd -> SetDefaultUnit(
"mm");
 
  110     changeTheDetectorVoxelCmd -> SetUnitCandidates(
"nm um mm cm");
 
  111     changeTheDetectorVoxelCmd -> AvailableForStates(
G4State_Idle);
 
  118     delete changeThePhantomDir; 
 
  119     delete changeThePhantomSizeCmd; 
 
  120     delete changeThePhantomPositionCmd; 
 
  121     delete changeThePhantomMaterialCmd; 
 
  123     delete changeTheDetectorDir; 
 
  124     delete changeTheDetectorSizeCmd; 
 
  125     delete changeTheDetectorToPhantomPositionCmd; 
 
  126     delete changeTheDetectorVoxelCmd;
 
  133   if( command == changeThePhantomSizeCmd)
 
  135     G4ThreeVector size = changeThePhantomSizeCmd -> GetNew3VectorValue(newValue);
 
  136     hadrontherapyDetector -> SetPhantomSize(size.
getX(),size.
getY(),size.
getZ());
 
  138   else if (command == changeThePhantomPositionCmd )
 
  140      G4ThreeVector size = changeThePhantomPositionCmd -> GetNew3VectorValue(newValue);
 
  141          hadrontherapyDetector -> SetPhantomPosition(size);
 
  143   else if (command == changeThePhantomMaterialCmd)
 
  145       hadrontherapyDetector -> SetPhantomMaterial(newValue);
 
  147   else if (command == changeTheDetectorSizeCmd)
 
  149     G4ThreeVector size = changeTheDetectorSizeCmd  -> GetNew3VectorValue(newValue);
 
  150         hadrontherapyDetector -> SetDetectorSize(size.
getX(),size.
getY(),size.
getZ());
 
  152   else if (command == changeTheDetectorToPhantomPositionCmd)
 
  154     G4ThreeVector size = changeTheDetectorToPhantomPositionCmd-> GetNew3VectorValue(newValue);
 
  155         hadrontherapyDetector -> SetDetectorToPhantomPosition(size);
 
  157   else if (command == changeTheDetectorVoxelCmd)
 
  159     G4ThreeVector size = changeTheDetectorVoxelCmd  -> GetNew3VectorValue(newValue);
 
  160         hadrontherapyDetector -> SetVoxelSize(size.
getX(),size.
getY(),size.
getZ());
 
  162   else if (command == updateCmd)
 
  164       hadrontherapyDetector -> UpdateGeometry();
 
void SetNewValue(G4UIcommand *, G4String)
HadrontherapyDetectorMessenger(HadrontherapyDetectorConstruction *)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
~HadrontherapyDetectorMessenger()