Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: DetectorMessenger.cc,v 1.1 2003/10/08 17:28:43 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: DetectorMessenger.cc,v 1.6 2004/06/18 15:43:41 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -42,41 +42,41 @@
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:Detector(Det)
{
{
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance(" detector control.");
MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
MaterCmd->SetGuidance("Select Material.");
MaterCmd->SetParameterName("material",false);
MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
LBinCmd = new G4UIcmdWith3Vector("/testem/det/setLbin",this);
LBinCmd->SetGuidance("set longitudinal bining");
LBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
LBinCmd->SetParameterName("nLtot","dLradl"," ",true);
LBinCmd->SetRange("nLtot>=1 && dLradl>0");
LBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RBinCmd = new G4UIcmdWith3Vector("/testem/det/setRbin",this);
RBinCmd->SetGuidance("set radial bining");
RBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
RBinCmd->SetParameterName("nRtot","dRradl"," ",true);
RBinCmd->SetRange("nRtot>=1 && dRradl>0");
RBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
FieldCmd->SetGuidance("Define magnetic field.");
FieldCmd->SetGuidance("Magnetic field will be in Z direction.");
FieldCmd->SetParameterName("Bz",false);
FieldCmd->SetUnitCategory("Magnetic flux density");
FieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
UpdateCmd->SetGuidance("Update geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(G4State_Idle);
UpdateCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -86,27 +86,27 @@ DetectorMessenger::~DetectorMessenger()
delete MaterCmd;
delete LBinCmd;
delete RBinCmd;
delete FieldCmd;
delete FieldCmd;
delete UpdateCmd;
delete testemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if( command == MaterCmd )
{ Detector->SetMaterial(newValue);}
if( command == LBinCmd )
{ Detector->SetLBining(LBinCmd->GetNew3VectorValue(newValue));}
if( command == RBinCmd )
{ Detector->SetRBining(RBinCmd->GetNew3VectorValue(newValue));}
if( command == FieldCmd )
{ Detector->SetMagField(FieldCmd->GetNewDoubleValue(newValue));}
if( command == UpdateCmd )
{ Detector->UpdateGeometry();}
}