Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4EnergyLossMessenger.cc,v 1.21 2006/11/10 18:34:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4EnergyLossMessenger.cc,v 1.27 2007/03/17 19:24:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
@@ -41,7 +41,12 @@
// 10-01-06 SetStepLimits -> SetStepFunction (V.Ivanchenko)
// 10-01-06 PreciseRange -> CSDARange (V.Ivanchenko)
// 10-05-06 Add command MscStepLimit (V.Ivanchenko)
// 10-10-06 Ann DEDXBinning command (V.Ivanchenko)
// 10-10-06 Add DEDXBinning command (V.Ivanchenko)
// 07-02-07 Add MscLateralDisplacement command (V.Ivanchenko)
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
// 15-03-07 Send a message "/run/physicsModified" if reinitialisation
// is needed after the command (V.Ivanchenko)
// 16-03-07 modify /process/eLoss/minsubsec command (V.Ivanchenko)
//
// -------------------------------------------------------------------
//
@@ -59,8 +64,10 @@
#include "G4UIparameter.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4EmProcessOptions.hh"
#include "G4UImanager.hh"
#include <sstream>
@@ -89,8 +96,8 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
SubSecCmd->SetDefaultValue(true);
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 = new G4UIcmdWithADouble("/process/eLoss/minsubsec",this);
MinSubSecCmd->SetGuidance("Set the ratio subcut/cut ");
MinSubSecCmd->SetParameterName("rcmin",true);
MinSubSecCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
@@ -149,19 +156,25 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
lpmCmd->SetDefaultValue(true);
lpmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
latCmd = new G4UIcmdWithABool("/process/eLoss/MscLateralDisplacement",this);
latCmd->SetGuidance("Switch true/false sampling of latra dislacent.");
latCmd->SetParameterName("lat",true);
latCmd->SetDefaultValue(true);
latCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
dedxCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsDEDX",this);
dedxCmd->SetGuidance("Set number of bins for DEDX tables.");
dedxCmd->SetParameterName("binsDEDX",true);
// dedxCmd->SetParameterRange("binsDEDX>59");
dedxCmd->SetDefaultValue(120);
dedxCmd->AvailableForStates(G4State_PreInit);
dedxCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
lbCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsLambda",this);
lbCmd->SetGuidance("Set number of bins for Lambda tables.");
lbCmd->SetParameterName("binsL",true);
// lbCmd->SetParameterRange("binsL>59");
lbCmd->SetDefaultValue(120);
lbCmd->AvailableForStates(G4State_PreInit);
lbCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
verCmd = new G4UIcmdWithAnInteger("/process/eLoss/verbose",this);
verCmd->SetGuidance("Set verbose level for EM physics.");
@@ -171,18 +184,26 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
mscCmd = new G4UIcommand("/process/eLoss/MscStepLimit",this);
mscCmd->SetGuidance("Set msc step limit flag and facRange value.");
G4UIparameter* facRange = new G4UIparameter("facRange",'d',false);
facRange->SetGuidance("msc parameter facRange");
facRange->SetParameterRange("facRange>0.");
mscCmd->SetParameter(facRange);
G4UIparameter* msc = new G4UIparameter("algMsc",'s',true);
msc->SetGuidance("msc step algorithm flag");
msc->SetDefaultValue("true");
mscCmd->SetParameter(msc);
mscCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
lllCmd = new G4UIcmdWithADouble("/process/eLoss/linLossLimit",this);
lllCmd->SetGuidance("Set linearLossLimit parameter.");
lllCmd->SetParameterName("linlim",true);
lllCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
skinCmd = new G4UIcmdWithADouble("/process/eLoss/MscSkin",this);
skinCmd->SetGuidance("Set skin parameter for multiple scattering.");
skinCmd->SetParameterName("skin",true);
skinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -200,10 +221,13 @@ G4EnergyLossMessenger::~G4EnergyLossMessenger()
delete IntegCmd;
delete rangeCmd;
delete lpmCmd;
delete latCmd;
delete verCmd;
delete mscCmd;
delete dedxCmd;
delete lbCmd;
delete lllCmd;
delete skinCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -211,73 +235,95 @@ G4EnergyLossMessenger::~G4EnergyLossMessenger()
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 == 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 == 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 == SubSecCmd) {
G4VEnergyLoss::SetSubSec(SubSecCmd->GetNewBoolValue(newValue));
lossTables->SetSubCutoff(SubSecCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == MinSubSecCmd)
{ G4VEnergyLoss::SetMinDeltaCutInRange(
MinSubSecCmd->GetNewDoubleValue(newValue));
}
if (command == MinSubSecCmd) {
lossTables->SetMinSubRange(MinSubSecCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == StepFuncCmd)
{
G4double v1,v2;
G4String unt;
std::istringstream is(newValue);
is >> v1 >> v2 >> unt;
v2 *= G4UIcommand::ValueOf(unt);
G4VEnergyLoss::SetStepFunction(v1,v2);
lossTables->SetStepFunction(v1,v2);
}
if (command == StepFuncCmd) {
G4double v1,v2;
G4String unt;
std::istringstream is(newValue);
is >> v1 >> v2 >> unt;
v2 *= G4UIcommand::ValueOf(unt);
G4VEnergyLoss::SetStepFunction(v1,v2);
lossTables->SetStepFunction(v1,v2);
}
if (command == mscCmd)
{
G4double f;
G4bool a = true;
G4String s;
std::istringstream is(newValue);
is >> f >> s;
if(s == "false" || s == "0" || s == "no") a = false;
lossTables->SetMscStepLimitation(a,f);
}
if (command == mscCmd) {
G4double f;
G4bool a = true;
G4String s;
std::istringstream is(newValue);
is >> f >> s;
if(s == "false" || s == "0" || s == "no") a = false;
lossTables->SetMscStepLimitation(a,f);
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == MinEnCmd) {
lossTables->SetMinEnergy(MinEnCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == MaxEnCmd) {
if (command == MaxEnCmd) {
lossTables->SetMaxEnergy(MaxEnCmd->GetNewDoubleValue(newValue));
}
if (command == IntegCmd) {
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == IntegCmd)
lossTables->SetIntegral(IntegCmd->GetNewBoolValue(newValue));
}
if (command == rangeCmd) {
if (command == rangeCmd)
lossTables->SetBuildCSDARange(rangeCmd->GetNewBoolValue(newValue));
}
if (command == lpmCmd) {
lossTables->SetLPMFlag(lpmCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == verCmd) {
if (command == latCmd) {
lossTables->SetMscLateralDisplacement(latCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == verCmd)
lossTables->SetVerbose(verCmd->GetNewIntValue(newValue));
}
if (command == lllCmd)
lossTables->SetLinearLossLimit(lllCmd->GetNewDoubleValue(newValue));
if (command == skinCmd) {
lossTables->SetSkin(skinCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
G4EmProcessOptions opt;
if (command == dedxCmd) {
opt.SetDEDXBinning(verCmd->GetNewIntValue(newValue));
if (command == dedxCmd) {
opt.SetDEDXBinning(dedxCmd->GetNewIntValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
if (command == lbCmd) {
opt.SetDEDXBinning(verCmd->GetNewIntValue(newValue));
opt.SetDEDXBinning(lbCmd->GetNewIntValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
}
}