Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -32,57 +32,57 @@
|
||||
#include "DetectorMessenger.hh"
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorMessenger::DetectorMessenger( DetectorConstruction* Det)
|
||||
: fDetector(Det)
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction* Det) : fDetector(Det)
|
||||
{
|
||||
G4bool broadcast = false;
|
||||
fDetDir = new G4UIdirectory("/det/",broadcast);
|
||||
fDetDir = new G4UIdirectory("/det/", broadcast);
|
||||
fDetDir->SetGuidance("Detector control");
|
||||
|
||||
fAbsMaterCmd = new G4UIcmdWithAString("/det/setAbsMat",this);
|
||||
fAbsMaterCmd = new G4UIcmdWithAString("/det/setAbsMat", this);
|
||||
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
|
||||
fAbsMaterCmd->SetParameterName("AbsMat",false);
|
||||
fAbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fAbsMaterCmd->SetParameterName("AbsMat", false);
|
||||
fAbsMaterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fGapMaterCmd = new G4UIcmdWithAString("/det/setGapMat",this);
|
||||
fGapMaterCmd = new G4UIcmdWithAString("/det/setGapMat", this);
|
||||
fGapMaterCmd->SetGuidance("Select Material of the Gap.");
|
||||
fGapMaterCmd->SetParameterName("GapMat",false);
|
||||
fGapMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fGapMaterCmd->SetParameterName("GapMat", false);
|
||||
fGapMaterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setAbsThick",this);
|
||||
fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setAbsThick", this);
|
||||
fAbsThickCmd->SetGuidance("Set Thickness of the Absorber");
|
||||
fAbsThickCmd->SetParameterName("AbsThick",false);
|
||||
fAbsThickCmd->SetParameterName("AbsThick", false);
|
||||
fAbsThickCmd->SetRange("AbsThick>=0.");
|
||||
fAbsThickCmd->SetUnitCategory("Length");
|
||||
fAbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fAbsThickCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fGapThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setGapThick",this);
|
||||
fGapThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setGapThick", this);
|
||||
fGapThickCmd->SetGuidance("Set Thickness of the Gap");
|
||||
fGapThickCmd->SetParameterName("GapThick",false);
|
||||
fGapThickCmd->SetParameterName("GapThick", false);
|
||||
fGapThickCmd->SetRange("GapThick>=0.");
|
||||
fGapThickCmd->SetUnitCategory("Length");
|
||||
fGapThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fGapThickCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fSizeYZCmd = new G4UIcmdWithADoubleAndUnit("/det/setSizeYZ",this);
|
||||
fSizeYZCmd = new G4UIcmdWithADoubleAndUnit("/det/setSizeYZ", this);
|
||||
fSizeYZCmd->SetGuidance("Set tranverse size of the calorimeter");
|
||||
fSizeYZCmd->SetParameterName("SizeYZ",false);
|
||||
fSizeYZCmd->SetParameterName("SizeYZ", false);
|
||||
fSizeYZCmd->SetRange("SizeYZ>0.");
|
||||
fSizeYZCmd->SetUnitCategory("Length");
|
||||
fSizeYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fSizeYZCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fNbLayersCmd = new G4UIcmdWithAnInteger("/det/setNbOfLayers",this);
|
||||
fNbLayersCmd = new G4UIcmdWithAnInteger("/det/setNbOfLayers", this);
|
||||
fNbLayersCmd->SetGuidance("Set number of layers.");
|
||||
fNbLayersCmd->SetParameterName("NbLayers",false);
|
||||
fNbLayersCmd->SetParameterName("NbLayers", false);
|
||||
fNbLayersCmd->SetRange("NbLayers>0 && NbLayers<500");
|
||||
fNbLayersCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fNbLayersCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -102,32 +102,32 @@ DetectorMessenger::~DetectorMessenger()
|
||||
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if( command == fAbsMaterCmd ) {
|
||||
if (command == fAbsMaterCmd) {
|
||||
fDetector->SetAbsorberMaterial(newValue);
|
||||
return;
|
||||
}
|
||||
|
||||
if( command == fGapMaterCmd ) {
|
||||
if (command == fGapMaterCmd) {
|
||||
fDetector->SetGapMaterial(newValue);
|
||||
return;
|
||||
}
|
||||
|
||||
if( command == fAbsThickCmd ) {
|
||||
if (command == fAbsThickCmd) {
|
||||
fDetector->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));
|
||||
return;
|
||||
}
|
||||
|
||||
if( command == fGapThickCmd ) {
|
||||
if (command == fGapThickCmd) {
|
||||
fDetector->SetGapThickness(fGapThickCmd->GetNewDoubleValue(newValue));
|
||||
return;
|
||||
}
|
||||
|
||||
if( command == fSizeYZCmd ) {
|
||||
if (command == fSizeYZCmd) {
|
||||
fDetector->SetCalorSizeYZ(fSizeYZCmd->GetNewDoubleValue(newValue));
|
||||
return;
|
||||
}
|
||||
|
||||
if( command == fNbLayersCmd ) {
|
||||
if (command == fNbLayersCmd) {
|
||||
fDetector->SetNbOfLayers(fNbLayersCmd->GetNewIntValue(newValue));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user