Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file field/field01/src/F01DetectorMessenger.cc
/// \brief Implementation of the F01DetectorMessenger class
//
// $Id: F01DetectorMessenger.cc,v 1.5 2006-06-29 17:16:27 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//
@@ -43,63 +45,73 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
F01DetectorMessenger::F01DetectorMessenger(F01DetectorConstruction * F01Det)
:F01Detector(F01Det)
F01DetectorMessenger::F01DetectorMessenger(F01DetectorConstruction* det)
: G4UImessenger(),
fDetector(det),
fDetDir(0),
fAbsMaterCmd(0),
fAbsThickCmd(0),
fAbsRadCmd(0),
fAbsZposCmd(0),
fWorldMaterCmd(0),
fWorldZCmd(0),
fWorldRCmd(0),
fUpdateCmd(0)
{
F01detDir = new G4UIdirectory("/calor/");
F01detDir->SetGuidance("F01 detector control.");
fDetDir = new G4UIdirectory("/calor/");
fDetDir->SetGuidance("F01 detector control.");
AbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
AbsMaterCmd->SetParameterName("choice",true);
AbsMaterCmd->SetDefaultValue("Lead");
AbsMaterCmd->AvailableForStates(G4State_Idle);
fAbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
fAbsMaterCmd->SetParameterName("choice",true);
fAbsMaterCmd->SetDefaultValue("Lead");
fAbsMaterCmd->AvailableForStates(G4State_Idle);
WorldMaterCmd = new G4UIcmdWithAString("/calor/setWorldMat",this);
WorldMaterCmd->SetGuidance("Select Material of the World.");
WorldMaterCmd->SetParameterName("wchoice",true);
WorldMaterCmd->SetDefaultValue("Air");
WorldMaterCmd->AvailableForStates(G4State_Idle);
fWorldMaterCmd = new G4UIcmdWithAString("/calor/setWorldMat",this);
fWorldMaterCmd->SetGuidance("Select Material of the World.");
fWorldMaterCmd->SetParameterName("wchoice",true);
fWorldMaterCmd->SetDefaultValue("Air");
fWorldMaterCmd->AvailableForStates(G4State_Idle);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
AbsThickCmd->SetParameterName("SizeZ",false,false);
AbsThickCmd->SetDefaultUnit("mm");
AbsThickCmd->SetRange("SizeZ>0.");
AbsThickCmd->AvailableForStates(G4State_Idle);
fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
fAbsThickCmd->SetGuidance("Set Thickness of the Absorber");
fAbsThickCmd->SetParameterName("SizeZ",false,false);
fAbsThickCmd->SetDefaultUnit("mm");
fAbsThickCmd->SetRange("SizeZ>0.");
fAbsThickCmd->AvailableForStates(G4State_Idle);
AbsRadCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsRad",this);
AbsRadCmd->SetGuidance("Set radius of the Absorber");
AbsRadCmd->SetParameterName("SizeR",false,false);
AbsRadCmd->SetDefaultUnit("mm");
AbsRadCmd->SetRange("SizeR>0.");
AbsRadCmd->AvailableForStates(G4State_Idle);
fAbsRadCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsRad",this);
fAbsRadCmd->SetGuidance("Set radius of the Absorber");
fAbsRadCmd->SetParameterName("SizeR",false,false);
fAbsRadCmd->SetDefaultUnit("mm");
fAbsRadCmd->SetRange("SizeR>0.");
fAbsRadCmd->AvailableForStates(G4State_Idle);
AbsZposCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsZpos",this);
AbsZposCmd->SetGuidance("Set Z pos. of the Absorber");
AbsZposCmd->SetParameterName("Zpos",false,false);
AbsZposCmd->SetDefaultUnit("mm");
AbsZposCmd->AvailableForStates(G4State_Idle);
fAbsZposCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsZpos",this);
fAbsZposCmd->SetGuidance("Set Z pos. of the Absorber");
fAbsZposCmd->SetParameterName("Zpos",false,false);
fAbsZposCmd->SetDefaultUnit("mm");
fAbsZposCmd->AvailableForStates(G4State_Idle);
WorldZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldZ",this);
WorldZCmd->SetGuidance("Set Z size of the World");
WorldZCmd->SetParameterName("WSizeZ",false,false);
WorldZCmd->SetDefaultUnit("mm");
WorldZCmd->SetRange("WSizeZ>0.");
WorldZCmd->AvailableForStates(G4State_Idle);
fWorldZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldZ",this);
fWorldZCmd->SetGuidance("Set Z size of the World");
fWorldZCmd->SetParameterName("WSizeZ",false,false);
fWorldZCmd->SetDefaultUnit("mm");
fWorldZCmd->SetRange("WSizeZ>0.");
fWorldZCmd->AvailableForStates(G4State_Idle);
WorldRCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldR",this);
WorldRCmd->SetGuidance("Set R size of the World");
WorldRCmd->SetParameterName("WSizeR",false,false);
WorldRCmd->SetDefaultUnit("mm");
WorldRCmd->SetRange("WSizeR>0.");
WorldRCmd->AvailableForStates(G4State_Idle);
fWorldRCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldR",this);
fWorldRCmd->SetGuidance("Set R size of the World");
fWorldRCmd->SetParameterName("WSizeR",false,false);
fWorldRCmd->SetDefaultUnit("mm");
fWorldRCmd->SetRange("WSizeR>0.");
fWorldRCmd->AvailableForStates(G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(G4State_Idle);
fUpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
fUpdateCmd->SetGuidance("Update calorimeter geometry.");
fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
fUpdateCmd->AvailableForStates(G4State_Idle);
}
@@ -107,44 +119,44 @@ F01DetectorMessenger::F01DetectorMessenger(F01DetectorConstruction * F01Det)
F01DetectorMessenger::~F01DetectorMessenger()
{
delete AbsMaterCmd;
delete AbsThickCmd;
delete AbsRadCmd;
delete AbsZposCmd;
delete WorldMaterCmd;
delete WorldZCmd;
delete WorldRCmd;
delete UpdateCmd;
delete F01detDir;
delete fAbsMaterCmd;
delete fAbsThickCmd;
delete fAbsRadCmd;
delete fAbsZposCmd;
delete fWorldMaterCmd;
delete fWorldZCmd;
delete fWorldRCmd;
delete fUpdateCmd;
delete fDetDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void F01DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == AbsMaterCmd )
{ F01Detector->SetAbsorberMaterial(newValue);}
if( command == fAbsMaterCmd )
{ fDetector->SetAbsorberMaterial(newValue);}
if( command == WorldMaterCmd )
{ F01Detector->SetWorldMaterial(newValue);}
if( command == fWorldMaterCmd )
{ fDetector->SetWorldMaterial(newValue);}
if( command == AbsThickCmd )
{ F01Detector->SetAbsorberThickness(AbsThickCmd->GetNewDoubleValue(newValue));}
if( command == fAbsThickCmd )
{ fDetector->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));}
if( command == AbsRadCmd )
{ F01Detector->SetAbsorberRadius(AbsRadCmd->GetNewDoubleValue(newValue));}
if( command == fAbsRadCmd )
{ fDetector->SetAbsorberRadius(fAbsRadCmd->GetNewDoubleValue(newValue));}
if( command == AbsZposCmd )
{ F01Detector->SetAbsorberZpos(AbsZposCmd->GetNewDoubleValue(newValue));}
if( command == fAbsZposCmd )
{ fDetector->SetAbsorberZpos(fAbsZposCmd->GetNewDoubleValue(newValue));}
if( command == WorldZCmd )
{ F01Detector->SetWorldSizeZ(WorldZCmd->GetNewDoubleValue(newValue));}
if( command == fWorldZCmd )
{ fDetector->SetWorldSizeZ(fWorldZCmd->GetNewDoubleValue(newValue));}
if( command == WorldRCmd )
{ F01Detector->SetWorldSizeR(WorldRCmd->GetNewDoubleValue(newValue));}
if( command == fWorldRCmd )
{ fDetector->SetWorldSizeR(fWorldRCmd->GetNewDoubleValue(newValue));}
if( command == UpdateCmd )
{ F01Detector->UpdateGeometry(); }
if( command == fUpdateCmd )
{ fDetector->UpdateGeometry(); }
}