58 fScintillationProcess(NULL),
59 fCerenkovProcess(NULL),
61 fOpAbsorptionProcess(NULL),
62 fOpRayleighScatteringProcess(NULL),
63 fOpMieHGScatteringProcess(NULL),
64 fOpBoundaryProcess(NULL),
68 fExcitationRatio(0.0),
70 fFiniteRiseTime(false),
71 fScintillationByParticleType(false)
77 fProcesses.push_back(NULL);
78 fProcessUse.push_back(
true);
79 fProcessVerbose.push_back(verbose);
80 fProcessTrackSecondariesFirst.push_back(
true);
92 if (fScintillationProcess)
delete fScintillationProcess;
93 if (fCerenkovProcess)
delete fCerenkovProcess;
94 if (fOpWLSProcess)
delete fOpWLSProcess;
96 if (fOpAbsorptionProcess)
delete fOpAbsorptionProcess;
97 if (fOpRayleighScatteringProcess)
delete fOpRayleighScatteringProcess;
98 if (fOpMieHGScatteringProcess)
delete fOpMieHGScatteringProcess;
99 if (fOpBoundaryProcess)
delete fOpBoundaryProcess;
106void G4OpticalPhysics::PrintStatistics()
const
112 if ( ! fProcessUse[i] ) {
118 G4cout <<
" Max number of photons per step: " << fMaxNumPhotons <<
G4endl;
119 G4cout <<
" Max beta change per step: " << fMaxBetaChange <<
G4endl;
120 if ( fProcessTrackSecondariesFirst[
kCerenkov] )
G4cout <<
" Track secondaries first: activated" <<
G4endl;
123 if (fScintillationByParticleType)
124 G4cout <<
" Scintillation by Particle Type: activated " <<
G4endl;
126 G4cout <<
" ExcitationRatio: " << fExcitationRatio <<
G4endl;
130 G4cout <<
" WLS process time profile: " << fProfile <<
G4endl;
157 if (wasActivated)
return;
160 G4cout <<
"G4OpticalPhysics:: Add Optical Physics Processes"<<
G4endl;
177 std::ostringstream o;
178 o <<
"Optical Photon without a Process Manager";
179 G4Exception(
"G4OpticalPhysics::ConstructProcess()",
"",
185 if ( fProcessUse[i] ) {
195 fScintillationProcess->
218 std::ostringstream o;
219 o <<
"Particle " << particleName <<
"without a Process Manager";
220 G4Exception(
"G4OpticalPhysics::ConstructProcess()",
"",
241 fProcesses[i]->SetVerboseLevel(fProcessVerbose[i]);
256 fYieldFactor = yieldFactor;
258 if(fScintillationProcess)
266 fExcitationRatio = excitationRatio;
268 if(fScintillationProcess)
276 fMaxNumPhotons = maxNumPhotons;
286 fMaxBetaChange = maxBetaChange;
306 if(fScintillationProcess)
312 fScintillationByParticleType = scintillationByParticleType;
314 if (fScintillationProcess)
319 G4bool trackSecondariesFirst)
322 if ( fProcessTrackSecondariesFirst[index] == trackSecondariesFirst )
return;
323 fProcessTrackSecondariesFirst[index] = trackSecondariesFirst;
325 if(fCerenkovProcess && index ==
kCerenkov )
334 fFiniteRiseTime = finiteRiseTime;
335 if(fScintillationProcess)
348 if ( fProcessUse[index] == isUse )
return;
349 fProcessUse[index] = isUse;
353 G4int inputVerboseLevel)
358 if ( fProcessVerbose[index] == inputVerboseLevel )
return;
360 fProcessVerbose[index] = inputVerboseLevel;
362 if ( fProcesses[index] ) fProcesses[index]->SetVerboseLevel(inputVerboseLevel);
@ kWLS
Wave Length Shifting process index.
@ kScintillation
Scintillation process index.
@ kRayleigh
Rayleigh scattering process index.
@ kAbsorption
Absorption process index.
@ kBoundary
Boundary process index.
@ kNoProcess
Number of processes, no selected process.
@ kCerenkov
Cerenkov process index.
@ kMieHG
Mie scattering process index.
G4String G4OpticalProcessName(G4int)
Return the name for a given optical process index.
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
G4DLLIMPORT std::ostream G4cout
void SetMaxBetaChangePerStep(const G4double d)
void SetTrackSecondariesFirst(const G4bool state)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
static G4LossTableManager * Instance()
G4EmSaturation * EmSaturation()
void UseTimeProfile(const G4String name)
static G4OpticalPhoton * OpticalPhotonDefinition()
static G4OpticalPhoton * OpticalPhoton()
void SetProcessVerbose(G4int, G4int)
void SetMaxBetaChangePerStep(G4double)
void SetScintillationYieldFactor(G4double)
void Configure(G4OpticalProcessIndex, G4bool)
void SetScintillationByParticleType(G4bool)
void SetMaxNumPhotonsPerStep(G4int)
virtual ~G4OpticalPhysics()
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool)
virtual void ConstructProcess()
virtual void ConstructParticle()
void SetWLSTimeProfile(G4String)
void AddScintillationSaturation(G4EmSaturation *)
void SetFiniteRiseTime(G4bool)
void SetScintillationExcitationRatio(G4double)
G4OpticalPhysics(G4int verbose=0, const G4String &name="Optical")
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetScintillationYieldFactor(const G4double yieldfactor)
void SetTrackSecondariesFirst(const G4bool state)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
void SetScintillationExcitationRatio(const G4double excitationratio)
void AddSaturation(G4EmSaturation *sat)
void SetFiniteRiseTime(const G4bool state)
void SetScintillationByParticleType(const G4bool)
G4ParticleTable::G4PTblDicIterator * theParticleIterator
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)