Import Geant4 10.3.1 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 101864 2016-12-02 12:50:38Z gcosmo $
|
||||
$Id: History 102543 2017-02-08 14:16:52Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -14,6 +14,10 @@ introduced in the code and keeptrack of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
19-January-2017 P. Gumplinger (phys-ctor-em-V10-02-39)
|
||||
- add setCerenkov/ScintillationStackPhotons commands to
|
||||
G4OpticalPhysicsMessenger and use them in G4OpticalPhysics
|
||||
|
||||
02-December-2016 V.Ivanchenko (phys-ctor-em-V10-02-38)
|
||||
- G4EmModelActivator - added initialisation of atomic deexcitation
|
||||
for radioactive decay (also for the cases when radioactive
|
||||
|
||||
@@ -96,6 +96,9 @@ class G4OpticalPhysics : public G4VPhysicsConstructor
|
||||
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool );
|
||||
void SetFiniteRiseTime(G4bool );
|
||||
|
||||
void SetCerenkovStackPhotons(G4bool );
|
||||
void SetScintillationStackPhotons(G4bool );
|
||||
|
||||
void SetInvokeSD(G4bool );
|
||||
|
||||
private:
|
||||
@@ -146,6 +149,11 @@ class G4OpticalPhysics : public G4VPhysicsConstructor
|
||||
/// to call/not call InvokeSD method
|
||||
G4bool fInvokeSD;
|
||||
|
||||
/// option to allow stacking of secondary Cerenkov photons
|
||||
G4bool fCerenkovStackPhotons;
|
||||
/// option to allow stacking of secondary Scintillation photons
|
||||
G4bool fScintillationStackPhotons;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -65,9 +65,11 @@ class G4UIcommand;
|
||||
// - /process/optical/setTrackSecondariesFirst proc_name flag
|
||||
// - /process/optical/defaults/cerenkov/setMaxPhotons val
|
||||
// - /process/optical/defaults/cerenkov/setMaxBetaChange val
|
||||
// - /process/optical/defaults/cerenkov/setStackPhotons flag
|
||||
// - /process/optical/defaults/scintillation/setYieldFactor val
|
||||
// - /process/optical/defaults/scintillation/setByParticleType val
|
||||
// - /process/optical/defaults/scintillation/setFiniteRiseTime val
|
||||
// - /process/optical/defaults/scintillation/setStackPhotons flag
|
||||
// - /process/optical/defaults/wls/setTimeProfile val
|
||||
// - /process/optical/defaults/boundary/setInvokeSD flag
|
||||
|
||||
@@ -115,6 +117,9 @@ private:
|
||||
/// setCerenkovMaxBetaChange command
|
||||
G4UIcmdWithADouble* fSetCerenkovMaxBetaChangeCmd;
|
||||
|
||||
/// setStackPhotons command
|
||||
G4UIcmdWithABool* fSetCerenkovStackPhotonsCmd;
|
||||
|
||||
/// setScintillationYieldFactor command
|
||||
G4UIcmdWithADouble* fSetScintillationYieldFactorCmd;
|
||||
|
||||
@@ -124,6 +129,9 @@ private:
|
||||
/// setScintillationTrackInfo command
|
||||
G4UIcmdWithABool* fSetScintillationTrackInfoCmd;
|
||||
|
||||
/// setStackPhotons command
|
||||
G4UIcmdWithABool* fSetScintillationStackPhotonsCmd;
|
||||
|
||||
// /// setOpticalSurfaceModel command
|
||||
// G4UIcmdWithAString* fSetOpticalSurfaceModelCmd;
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@ G4OpticalPhysics::G4OpticalPhysics(G4int verbose, const G4String& name)
|
||||
fFiniteRiseTime(false),
|
||||
fScintillationByParticleType(false),
|
||||
fScintillationTrackInfo(false),
|
||||
fInvokeSD(true)
|
||||
fInvokeSD(true),
|
||||
fCerenkovStackPhotons(true),
|
||||
fScintillationStackPhotons(true)
|
||||
{
|
||||
verboseLevel = verbose;
|
||||
fMessenger = new G4OpticalPhysicsMessenger(this);
|
||||
@@ -323,6 +325,7 @@ void G4OpticalPhysics::ConstructProcess()
|
||||
ScintillationProcess->SetScintillationByParticleType(fScintillationByParticleType);
|
||||
ScintillationProcess->SetScintillationTrackInfo(fScintillationTrackInfo);
|
||||
ScintillationProcess->SetTrackSecondariesFirst(fProcessTrackSecondariesFirst[kScintillation]);
|
||||
ScintillationProcess->SetStackPhotons(fScintillationStackPhotons);
|
||||
G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
|
||||
ScintillationProcess->AddSaturation(emSaturation);
|
||||
UIhelpers::buildCommands(ScintillationProcess);
|
||||
@@ -332,6 +335,7 @@ void G4OpticalPhysics::ConstructProcess()
|
||||
CerenkovProcess->SetMaxNumPhotonsPerStep(fMaxNumPhotons);
|
||||
CerenkovProcess->SetMaxBetaChangePerStep(fMaxBetaChange);
|
||||
CerenkovProcess->SetTrackSecondariesFirst(fProcessTrackSecondariesFirst[kCerenkov]);
|
||||
CerenkovProcess->SetStackPhotons(fCerenkovStackPhotons);
|
||||
UIhelpers::buildCommands(CerenkovProcess);
|
||||
OpProcesses[kCerenkov] = CerenkovProcess;
|
||||
|
||||
@@ -458,6 +462,16 @@ void G4OpticalPhysics::SetInvokeSD(G4bool invokeSD)
|
||||
fInvokeSD = invokeSD;
|
||||
}
|
||||
|
||||
void G4OpticalPhysics::SetCerenkovStackPhotons(G4bool stackingFlag)
|
||||
{
|
||||
fCerenkovStackPhotons = stackingFlag;
|
||||
}
|
||||
|
||||
void G4OpticalPhysics::SetScintillationStackPhotons(G4bool stackingFlag)
|
||||
{
|
||||
fScintillationStackPhotons = stackingFlag;
|
||||
}
|
||||
|
||||
void G4OpticalPhysics::Configure(G4OpticalProcessIndex index, G4bool isUse)
|
||||
{
|
||||
// Configure the physics constructor to use/not use a selected process.
|
||||
|
||||
@@ -66,9 +66,11 @@ G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(
|
||||
fSetOpProcessVerboseCmd(0),
|
||||
fSetCerenkovMaxPhotonsCmd(0),
|
||||
fSetCerenkovMaxBetaChangeCmd(0),
|
||||
fSetCerenkovStackPhotonsCmd(0),
|
||||
fSetScintillationYieldFactorCmd(0),
|
||||
fSetScintillationByParticleTypeCmd(0),
|
||||
fSetScintillationTrackInfoCmd(0),
|
||||
fSetScintillationStackPhotonsCmd(0),
|
||||
fSetWLSTimeProfileCmd(0),
|
||||
fSetTrackSecondariesFirstCmd(0),
|
||||
fSetFiniteRiseTimeCmd(0),
|
||||
@@ -134,6 +136,13 @@ G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(
|
||||
fSetCerenkovMaxBetaChangeCmd->SetRange("CerenkovMaxBetaChange>=0");
|
||||
fSetCerenkovMaxBetaChangeCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fSetCerenkovStackPhotonsCmd = new G4UIcmdWithABool("/process/optical/defaults/cerenkov/setStackPhotons", this);
|
||||
fSetCerenkovStackPhotonsCmd->SetGuidance("Set default whether or not to stack secondary Cerenkov photons");
|
||||
fSetCerenkovStackPhotonsCmd->SetGuidance("Note this command is used to set the default value,");
|
||||
fSetCerenkovStackPhotonsCmd->SetGuidance("if process is not active command will not have effect.");
|
||||
fSetCerenkovStackPhotonsCmd->SetParameterName("CerenkovStackPhotons", true);
|
||||
fSetCerenkovStackPhotonsCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fSetScintillationYieldFactorCmd = new G4UIcmdWithADouble("/process/optical/defaults/scintillation/setYieldFactor", this);
|
||||
fSetScintillationYieldFactorCmd->SetGuidance("Set scintillation yield factor");
|
||||
fSetScintillationYieldFactorCmd->SetGuidance("Note this command is used to set the default value,");
|
||||
@@ -162,6 +171,13 @@ G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(
|
||||
fSetFiniteRiseTimeCmd->SetParameterName("FiniteRiseTime", false);
|
||||
fSetFiniteRiseTimeCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fSetScintillationStackPhotonsCmd = new G4UIcmdWithABool("/process/optical/defaults/scintillation/setStackPhotons", this);
|
||||
fSetScintillationStackPhotonsCmd->SetGuidance("Set default whether or not to stack secondary Scintillation photons");
|
||||
fSetScintillationStackPhotonsCmd->SetGuidance("Note this command is used to set the default value,");
|
||||
fSetScintillationStackPhotonsCmd->SetGuidance("if process is not active command will not have effect.");
|
||||
fSetScintillationStackPhotonsCmd->SetParameterName("ScintillationStackPhotons", true);
|
||||
fSetScintillationStackPhotonsCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fSetWLSTimeProfileCmd = new G4UIcmdWithAString("/process/optical/defaults/wls/setTimeProfile", this);
|
||||
fSetWLSTimeProfileCmd->SetGuidance("Set the WLS time profile (delta or exponential)");
|
||||
fSetWLSTimeProfileCmd->SetParameterName("WLSTimeProfile", false);
|
||||
@@ -184,9 +200,11 @@ G4OpticalPhysicsMessenger::~G4OpticalPhysicsMessenger()
|
||||
delete fSetOpProcessVerboseCmd;
|
||||
delete fSetCerenkovMaxPhotonsCmd;
|
||||
delete fSetCerenkovMaxBetaChangeCmd;
|
||||
delete fSetCerenkovStackPhotonsCmd;
|
||||
delete fSetScintillationYieldFactorCmd;
|
||||
delete fSetScintillationByParticleTypeCmd;
|
||||
delete fSetScintillationTrackInfoCmd;
|
||||
delete fSetScintillationStackPhotonsCmd;
|
||||
delete fSetWLSTimeProfileCmd;
|
||||
delete fSetTrackSecondariesFirstCmd;
|
||||
delete fSetFiniteRiseTimeCmd;
|
||||
@@ -266,6 +284,11 @@ void G4OpticalPhysicsMessenger::SetNewValue(G4UIcommand* command,
|
||||
->SetMaxBetaChangePerStep(
|
||||
fSetCerenkovMaxBetaChangeCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
else if (command == fSetCerenkovStackPhotonsCmd) {
|
||||
fOpticalPhysics
|
||||
->SetCerenkovStackPhotons(
|
||||
fSetCerenkovStackPhotonsCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
else if (command == fSetScintillationYieldFactorCmd) {
|
||||
fOpticalPhysics
|
||||
->SetScintillationYieldFactor(
|
||||
@@ -286,6 +309,11 @@ void G4OpticalPhysicsMessenger::SetNewValue(G4UIcommand* command,
|
||||
->SetFiniteRiseTime(
|
||||
fSetFiniteRiseTimeCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
else if (command == fSetScintillationStackPhotonsCmd) {
|
||||
fOpticalPhysics
|
||||
->SetScintillationStackPhotons(
|
||||
fSetScintillationStackPhotonsCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
else if (command == fSetWLSTimeProfileCmd) {
|
||||
fOpticalPhysics->SetWLSTimeProfile(newValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user