87{
89 G4cout <<
"G4OpticalPhysics:: Add Optical Physics Processes"<<
G4endl;
90
92
93
94
96 if (!pManager) {
98 ed << "Optical Photon without a Process Manager";
99 G4Exception(
"G4OpticalPhysics::ConstructProcess()",
"",
101 return;
102 }
103
105 if (params->GetProcessActivation(
"OpAbsorption")) pManager->
AddDiscreteProcess(absorption);
106
108 if (params->GetProcessActivation(
"OpRayleigh")) pManager->
AddDiscreteProcess(rayleigh);
109
112
114 if (params->GetProcessActivation(
"OpBoundary")) pManager->
AddDiscreteProcess(boundary);
115
118
121
125
127
129 myParticleIterator->reset();
130
131 while( (*myParticleIterator)() ){
132
135
137 if (!pManager) {
139 ed << "Particle " << particleName << "without a Process Manager";
140 G4Exception(
"G4OpticalPhysics::ConstructProcess()",
"",
142 return;
143 }
144
145 if (cerenkov->
IsApplicable(*particle) && params->GetProcessActivation(
"Cerenkov")) {
148 }
149 if (scint->
IsApplicable(*particle) && params->GetProcessActivation(
"Scintillation")) {
153 }
154 if (boundary->
IsApplicable(*particle) && params->GetProcessActivation(
"OpBoundary")) {
156 }
157 }
158
159
163}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
static G4LossTableManager * Instance()
G4EmSaturation * EmSaturation()
virtual G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
static G4OpticalPhoton * OpticalPhoton()
virtual void PrintStatistics() const
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 AddSaturation(G4EmSaturation *sat)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const