Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -5,10 +5,11 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN02DetectorMessenger.cc,v 1.2 1999/12/15 14:49:21 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id: ExN02DetectorMessenger.cc,v 1.3 2000/12/04 16:24:07 maire Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
#include "ExN02DetectorMessenger.hh"
@@ -18,6 +19,8 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
ExN02DetectorMessenger::ExN02DetectorMessenger(ExN02DetectorConstruction * myDet)
:myDetector(myDet)
{
@@ -25,47 +28,47 @@ ExN02DetectorMessenger::ExN02DetectorMessenger(ExN02DetectorConstruction * myDet
mydetDir = new G4UIdirectory("/mydet/");
mydetDir->SetGuidance("ExN02 detector control.");
MatCmd = new G4UIcmdWithAString("/mydet/setMaterial",this);
MatCmd->SetGuidance("Select Material of the SimpleBox.");
MatCmd->SetGuidance(" Choice : Air, Al(default), Pb, Vacuum");
MatCmd->SetParameterName("choice",true);
MatCmd->SetDefaultValue("Al");
MatCmd->SetCandidates("Air Al Pb Vacuum");
MatCmd->AvailableForStates(PreInit,Idle);
TargMatCmd = new G4UIcmdWithAString("/mydet/setTargetMate",this);
TargMatCmd->SetGuidance("Select Material of the Target.");
TargMatCmd->SetParameterName("choice",false);
TargMatCmd->AvailableForStates(PreInit,Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/mydet/setSize",this);
SizeCmd->SetGuidance("Set full Size of the Box");
SizeCmd->SetParameterName("Size",false,false);
SizeCmd->SetDefaultUnit("cm");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(PreInit,Idle);
ChamMatCmd = new G4UIcmdWithAString("/mydet/setChamberMate",this);
ChamMatCmd->SetGuidance("Select Material of the Target.");
ChamMatCmd->SetParameterName("choice",false);
ChamMatCmd->AvailableForStates(PreInit,Idle);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/mydet/setField",this);
FieldCmd->SetGuidance("Define magnetic field.");
FieldCmd->SetGuidance("Magnetic field will be in Z direction.");
FieldCmd->SetParameterName("Bz",false,false);
FieldCmd->SetParameterName("Bz",false);
FieldCmd->SetDefaultUnit("tesla");
FieldCmd->SetUnitCategory("Magnetic flux density");
FieldCmd->AvailableForStates(PreInit,Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
ExN02DetectorMessenger::~ExN02DetectorMessenger()
{
delete MatCmd;
delete SizeCmd;
delete TargMatCmd;
delete ChamMatCmd;
delete FieldCmd;
delete mydetDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
void ExN02DetectorMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
{
// if( command == MatCmd )
// { myDetector->setMaterial(newValues);}
if( command == SizeCmd )
{ myDetector->SetDetectorLength(SizeCmd->GetNewDoubleValue(newValues));}
if( command == TargMatCmd )
{ myDetector->setTargetMaterial(newValues);}
if( command == ChamMatCmd )
{ myDetector->setChamberMaterial(newValues);}
if( command == FieldCmd )
{ myDetector->SetMagField(FieldCmd->GetNewDoubleValue(newValues));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....