Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4EnergyLossMessenger.cc,v 1.38 2009/10/29 19:25:28 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4EnergyLossMessenger.cc,v 1.40 2010/11/23 19:01:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// -------------------------------------------------------------------
//
@@ -177,21 +177,48 @@ G4EnergyLossMessenger::G4EnergyLossMessenger()
aplCmd->SetDefaultValue(false);
aplCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
deCmd = new G4UIcmdWithABool("/process/em/fluo",this);
deCmd->SetGuidance("The flag to enable/disable deexcitation");
deCmd->SetParameterName("fluoFlag",true);
deCmd->SetDefaultValue(false);
deCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
auCmd = new G4UIcmdWithABool("/process/em/auger",this);
auCmd->SetGuidance("The flag to enable/disable Auger electrons");
auCmd->SetParameterName("augerFlag",true);
auCmd->SetDefaultValue(false);
auCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
pixeCmd = new G4UIcmdWithABool("/process/em/pixe",this);
pixeCmd->SetGuidance("The flag to enable/disable PIXE");
pixeCmd->SetParameterName("pixeFlag",true);
pixeCmd->SetDefaultValue(false);
pixeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
pixeXsCmd = new G4UIcmdWithAString("/process/em/pixeXSmodel",this);
pixeXsCmd->SetGuidance("The name of PIXE cross section");
pixeXsCmd->SetParameterName("pixeXS",true);
pixeXsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
deexCmd = new G4UIcommand("/process/em/deexcitation",this);
deexCmd->SetGuidance("Set deexcitation flag per process and G4Region.");
deexCmd->SetGuidance(" procName : process name");
deexCmd->SetGuidance(" flag : flag");
deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
deexCmd->SetGuidance(" regName : G4Region name");
G4UIparameter* pName = new G4UIparameter("pName",'s',false);
deexCmd->SetParameter(pName);
G4UIparameter* flag = new G4UIparameter("flag",'s',false);
deexCmd->SetParameter(flag);
deexCmd->SetGuidance(" flagFluo : Fluorescence");
deexCmd->SetGuidance(" flagAuger : Auger");
deexCmd->SetGuidance(" flagPIXE : PIXE");
G4UIparameter* regName = new G4UIparameter("regName",'s',false);
deexCmd->SetParameter(regName);
G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'b',false);
deexCmd->SetParameter(flagFluo);
G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'b',false);
deexCmd->SetParameter(flagAuger);
G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'b',false);
deexCmd->SetParameter(flagPIXE);
dedxCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsDEDX",this);
dedxCmd->SetGuidance("Set number of bins for DEDX tables");
dedxCmd->SetParameterName("binsDEDX",true);
@@ -296,6 +323,10 @@ G4EnergyLossMessenger::~G4EnergyLossMessenger()
delete ver1Cmd;
delete mscCmd;
delete dedxCmd;
delete deCmd;
delete auCmd;
delete pixeCmd;
delete pixeXsCmd;
delete frCmd;
delete fgCmd;
delete lllCmd;
@@ -315,24 +346,24 @@ void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
if (command == RndmStepCmd) {
G4VEnergyLoss::SetRndmStep(RndmStepCmd->GetNewBoolValue(newValue));
opt->SetRandomStep(RndmStepCmd->GetNewBoolValue(newValue));
return;
}
if (command == EnlossFlucCmd) {
G4VEnergyLoss::SetEnlossFluc(EnlossFlucCmd->GetNewBoolValue(newValue));
opt->SetLossFluctuations(EnlossFlucCmd->GetNewBoolValue(newValue));
return;
}
if (command == SubSecCmd) {
G4VEnergyLoss::SetSubSec(SubSecCmd->GetNewBoolValue(newValue));
opt->SetSubCutoff(SubSecCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == MinSubSecCmd) {
opt->SetMinSubRange(MinSubSecCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == StepFuncCmd) {
G4double v1,v2;
G4String unt;
@@ -341,17 +372,35 @@ void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
v2 *= G4UIcommand::ValueOf(unt);
G4VEnergyLoss::SetStepFunction(v1,v2);
opt->SetStepFunction(v1,v2);
return;
}
if (command == deexCmd) {
G4String s1 (""), s2(""), s3("");
G4bool b = false;
G4String s1 (""), s2(""), s3(""), s4("");
G4bool b2(false), b3(false), b4(false);
std::istringstream is(newValue);
is >> s1 >> s2 >> s3;
if(s2 == "true") b = true;
opt->ActivateDeexcitation(s1,b,s3);
is >> s1 >> s2 >> s3 >> s4;
if(s2 == "true") { b2 = true; }
if(s3 == "true") { b3 = true; }
if(s4 == "true") { b4 = true; }
opt->SetDeexcitationActiveRegion(s1,b2,b3,b4);
return;
}
if (command == deCmd) {
opt->SetDeexcitationActive(deCmd->GetNewBoolValue(newValue));
return;
}
if (command == auCmd) {
opt->SetAugerActive(auCmd->GetNewBoolValue(newValue));
return;
}
if (command == pixeCmd) {
opt->SetPIXEActive(pixeCmd->GetNewBoolValue(newValue));
return;
}
if (command == pixeXsCmd) {
opt->SetPIXECrossSectionModel(newValue);
return;
}
if (command == mscCmd) {
if(newValue == "Minimal")
opt->SetMscStepLimitation(fMinimal);
@@ -368,80 +417,91 @@ void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
return;
}
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == MinEnCmd) {
opt->SetMinEnergy(MinEnCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == MaxEnCmd) {
opt->SetMaxEnergy(MaxEnCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == IntegCmd) {
opt->SetIntegral(IntegCmd->GetNewBoolValue(newValue));
return;
}
if (command == rangeCmd) {
opt->SetBuildCSDARange(rangeCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == lpmCmd) {
opt->SetLPMFlag(lpmCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == splCmd) {
opt->SetSplineFlag(splCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == aplCmd) {
opt->SetApplyCuts(aplCmd->GetNewBoolValue(newValue));
return;
}
if (command == latCmd) {
opt->SetMscLateralDisplacement(latCmd->GetNewBoolValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == verCmd) {
opt->SetVerbose(verCmd->GetNewIntValue(newValue));
return;
}
if (command == ver1Cmd) {
opt->SetVerbose(ver1Cmd->GetNewIntValue(newValue));
return;
}
if (command == lllCmd) {
opt->SetLinearLossLimit(lllCmd->GetNewDoubleValue(newValue));
return;
}
if (command == labCmd) {
opt->SetLambdaFactor(labCmd->GetNewDoubleValue(newValue));
return;
}
if (command == skinCmd) {
opt->SetSkin(skinCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == dedxCmd) {
opt->SetDEDXBinning(dedxCmd->GetNewIntValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == lamCmd) {
opt->SetLambdaBinning(lamCmd->GetNewIntValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == frCmd) {
opt->SetMscRangeFactor(frCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == fgCmd) {
opt->SetMscGeomFactor(fgCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == mscfCmd) {
opt->SetFactorForAngleLimit(mscfCmd->GetNewDoubleValue(newValue));
G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
return;
}
if (command == angCmd) {
opt->SetPolarAngleLimit(angCmd->GetNewDoubleValue(newValue));