56 fScintillationProcess(NULL),
57 fCerenkovProcess(NULL),
59 fOpAbsorptionProcess(NULL),
60 fOpRayleighScatteringProcess(NULL),
61 fOpMieHGScatteringProcess(NULL),
62 fOpBoundaryProcess(NULL),
66 fExcitationRatio(0.0),
68 fFiniteRiseTime(false),
69 fScintillationByParticleType(false)
75 fProcesses.push_back(NULL);
76 fProcessUse.push_back(
true);
77 fProcessVerbose.push_back(verbose);
78 fProcessTrackSecondariesFirst.push_back(
true);
106 void 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)
321 if ( index >= kNoProcess )
return;
322 if ( fProcessTrackSecondariesFirst[index] == trackSecondariesFirst )
return;
323 fProcessTrackSecondariesFirst[
index] = trackSecondariesFirst;
325 if(fCerenkovProcess && index ==
kCerenkov )
334 fFiniteRiseTime = finiteRiseTime;
335 if(fScintillationProcess)
347 if ( index >= kNoProcess )
return;
348 if ( fProcessUse[index] == isUse )
return;
349 fProcessUse[
index] = isUse;
353 G4int inputVerboseLevel)
357 if ( index >= kNoProcess )
return;
358 if ( fProcessVerbose[index] == inputVerboseLevel )
return;
360 fProcessVerbose[
index] = inputVerboseLevel;
362 if ( fProcesses[index] ) fProcesses[
index]->SetVerboseLevel(inputVerboseLevel);
void SetScintillationByParticleType(const G4bool)
void SetMaxBetaChangePerStep(const G4double d)
void SetProcessVerbose(G4int, G4int)
static G4LossTableManager * Instance()
void SetFiniteRiseTime(const G4bool state)
Number of processes, no selected process.
virtual void ConstructParticle()
void AddScintillationSaturation(G4EmSaturation *)
void SetTrackSecondariesFirst(const G4bool state)
void SetMaxBetaChangePerStep(G4double)
void SetScintillationExcitationRatio(const G4double excitationratio)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
Scintillation process index.
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
Mie scattering process index.
void SetFiniteRiseTime(G4bool)
Absorption process index.
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void SetScintillationByParticleType(G4bool)
void UseTimeProfile(const G4String name)
virtual void ConstructProcess()
virtual ~G4OpticalPhysics()
void SetScintillationYieldFactor(const G4double yieldfactor)
G4GLOB_DLL std::ostream G4cout
void SetMaxNumPhotonsPerStep(G4int)
#define aParticleIterator
void Configure(G4OpticalProcessIndex, G4bool)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4EmSaturation * EmSaturation()
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
Wave Length Shifting process index.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4OpticalPhoton * OpticalPhoton()
void SetScintillationExcitationRatio(G4double)
G4String G4OpticalProcessName(G4int)
Return the name for a given optical process index.
G4OpticalPhysics(G4int verbose=0, const G4String &name="Optical")
void SetScintillationYieldFactor(G4double)
void SetTrackSecondariesFirst(const G4bool state)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetWLSTimeProfile(G4String)
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool)
static G4OpticalPhoton * OpticalPhotonDefinition()
Rayleigh scattering process index.
void AddSaturation(G4EmSaturation *sat)
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)