Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: G4EnergyLossMessenger.cc,v 1.5 2002/12/04 21:07:43 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4EnergyLossMessenger.cc,v 1.7 2003/04/04 14:33:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -32,6 +32,7 @@
#include "G4EnergyLossMessenger.hh"
#include "G4VEnergyLoss.hh"
#include "G4LossTableManager.hh"
#include "G4UIdirectory.hh"
#include "G4UIcommand.hh"
@@ -52,24 +53,24 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
RndmStepCmd->SetGuidance("Randomize the proposed step by eLoss.");
RndmStepCmd->SetParameterName("choice",true);
RndmStepCmd->SetDefaultValue(false);
RndmStepCmd->AvailableForStates(G4State_Idle);
RndmStepCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
EnlossFlucCmd = new G4UIcmdWithABool("/process/eLoss/fluct",this);
EnlossFlucCmd->SetGuidance("Switch true/false the energy loss fluctuations.");
EnlossFlucCmd->SetParameterName("choice",true);
EnlossFlucCmd->SetDefaultValue(true);
EnlossFlucCmd->AvailableForStates(G4State_Idle);
EnlossFlucCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
SubSecCmd = new G4UIcmdWithABool("/process/eLoss/subsec",this);
SubSecCmd->SetGuidance("Switch true/false the subcutoff generation.");
SubSecCmd->SetParameterName("choice",true);
SubSecCmd->SetDefaultValue(true);
SubSecCmd->AvailableForStates(G4State_Idle);
SubSecCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
MinSubSecCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minsubsec",this);
MinSubSecCmd->SetGuidance("Set the min. cut for subcutoff delta in range.");
MinSubSecCmd->SetParameterName("rcmin",true);
MinSubSecCmd->AvailableForStates(G4State_Idle);
MinSubSecCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters.");
@@ -93,7 +94,25 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
unitPrm->SetParameterCandidates(unitCandidates);
StepFuncCmd->SetParameter(unitPrm);
StepFuncCmd->AvailableForStates(G4State_Idle);
StepFuncCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
MinEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minKinEnergy",this);
MinEnCmd->SetGuidance("Set the min kinetic energy");
MinEnCmd->SetParameterName("emin",true);
MinEnCmd->SetUnitCategory("Energy");
MinEnCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
MaxEnCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/maxKinEnergy",this);
MaxEnCmd->SetGuidance("Set the max kinetic energy");
MaxEnCmd->SetParameterName("emax",true);
MaxEnCmd->SetUnitCategory("Energy");
MaxEnCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
IntegCmd = new G4UIcmdWithABool("/process/eLoss/integral",this);
IntegCmd->SetGuidance("Switch true/false the integration of cross section over step.");
IntegCmd->SetParameterName("integ",true);
IntegCmd->SetDefaultValue(true);
IntegCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -106,22 +125,29 @@ G4EnergyLossMessenger::~G4EnergyLossMessenger()
delete MinSubSecCmd;
delete StepFuncCmd;
delete eLossDirectory;
delete MinEnCmd;
delete MaxEnCmd;
delete IntegCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
G4LossTableManager* lossTables = G4LossTableManager::Instance();
if (command == RndmStepCmd)
{ G4VEnergyLoss::SetRndmStep(RndmStepCmd->GetNewBoolValue(newValue));
lossTables->SetRandomStep(RndmStepCmd->GetNewBoolValue(newValue));
}
if (command == EnlossFlucCmd)
{ G4VEnergyLoss::SetEnlossFluc(EnlossFlucCmd->GetNewBoolValue(newValue));
lossTables->SetLossFluctuations(EnlossFlucCmd->GetNewBoolValue(newValue));
}
if (command == SubSecCmd)
{ G4VEnergyLoss::SetSubSec(SubSecCmd->GetNewBoolValue(newValue));
lossTables->SetSubCutoff(SubSecCmd->GetNewBoolValue(newValue));
}
if (command == MinSubSecCmd)
@@ -138,7 +164,20 @@ void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
G4String unt = unts;
v2 *= G4UIcommand::ValueOf(unt);
G4VEnergyLoss::SetStepFunction(v1,v2);
lossTables->SetStepLimits(v1,v2);
}
if (command == MinEnCmd) {
lossTables->SetMinEnergy(MinEnCmd->GetNewDoubleValue(newValue));
}
if (command == MaxEnCmd) {
lossTables->SetMaxEnergy(MaxEnCmd->GetNewDoubleValue(newValue));
}
if (command == IntegCmd) {
lossTables->SetIntegral(IntegCmd->GetNewBoolValue(newValue));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....