60 solidMod1(0), logicMod1(0), physiMod1(0),
61 solidMod2(0), logicMod2(0), physiMod2(0),
62 solidMod3(0), logicMod3(0), physiMod3(0),
63 solidMod4(0), logicMod4(0), physiMod4(0),
64 FileName(
"ModoulWeight.txt")
91 for (
G4int i=0;i<4*(StepNumbers-1)+1;i++)
174 File.open(Name, std::ios::in);
177 G4cout<<
" WARNING: The File with name of "<<Name<<
178 " doesn't exist to get modulator step properties. please modify it and try again"<<
G4endl;
180 G4Exception(
"HadrontherapyModulator::ModulatorPropertiesFromFile( )",
"Hadrontherapy0009"
181 ,
FatalException,
"Error: No available external file for reading from");
186 File >>
string>>
string>>string;
243 WholeStartingAngle=StartingAngle[i];
298 startAngleOfTheTube0,
299 spanningAngleOfTheTube0);
345 rm2.rotateZ(90 *
deg);
353 startAngleOfTheTube0,
354 spanningAngleOfTheTube0);
389 rm3.rotateZ(180 *
deg);
397 startAngleOfTheTube0/2.,
398 spanningAngleOfTheTube0);
433 rm4.rotateZ(270 *
deg);
441 startAngleOfTheTube0/2.,
442 spanningAngleOfTheTube0);
470 red-> SetVisibility(
true);
471 red-> SetForceSolid(
true);
481 logicMod[i] -> SetVisAttributes(red);
492 rm -> rotateZ(rotationAngle);
494 G4cout <<
"MODULATOR HAS BEEN ROTATED OF " << rotationAngle/
deg
508 logicMod[i] -> SetMaterial(NewMaterial);
514 G4cout <<
"The material of the Modulator wheel has been changed to " << Material <<
G4endl;
519 G4cout <<
"WARNING: material \"" << Material <<
"\" doesn't exist in NIST elements/materials"
520 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
521 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;
534 G4cout <<
"The modulator wheel is translated to"<< NewModulatorPos/
mm <<
"mm " <<
G4endl;
547 solidMod[i] -> SetInnerRadius(newvalue);}
549 G4cout <<
"InnerRadius of the Modulator Wheel has been changed to :"
562 solidMod[i] -> SetOuterRadius(newvalue);}
564 G4cout <<
"OuterRadius of the Modulator Wheel has been changed to :"
572 if(value==
"default" )
576 G4cout<<
" Step properties of modulator will be get out from the external file "
void ModulatorDefaultProperties()
G4VPhysicalVolume * physiMotherMod
void SetModulatorPosition(G4ThreeVector)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void GetDataFromFile(G4String value)
G4VPhysicalVolume * physiMod1
static constexpr double mm
void SetModulatorInnerRadius(G4double)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
void SetModulatorOuterRadius(G4double)
G4VPhysicalVolume * physiMod4
G4LogicalVolume * logicMod2
static G4double angle[DIM]
G4ThreeVector * PositionMod
void GetStepInformation()
G4double innerRadiusOfTheTube
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
G4double outerRadiusOfTheTube
void BuildModulator(G4VPhysicalVolume *)
static constexpr double cm
void SetModulatorMaterial(G4String)
G4LogicalVolume ** logicMod
G4VPhysicalVolume * physiMod3
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * physiMod2
G4LogicalVolume * logicMod1
static G4RunManager * GetRunManager()
G4LogicalVolume * logicMotherMod
~HadrontherapyModulator()
void ModulatorPropertiesFromFile(G4String)
G4VPhysicalVolume ** physiMod
static constexpr double deg
void SetModulatorAngle(G4double)
G4LogicalVolume * logicMod3
static const G4VisAttributes & GetInvisible()
void SetVisAttributes(const G4VisAttributes *pVA)
HadrontherapyModulatorMessenger * ModulatorMessenger
G4LogicalVolume * logicMod4