72 G4Cerenkov* theCerenkovProcess =
new G4Cerenkov (
"Cerenkov");
73 G4Scintillation* theScintillationProcess =
new G4Scintillation (
"Scintillation");
74 G4OpAbsorption* theOpAbsorptionProcess =
new G4OpAbsorption ();
75 G4OpRayleigh* theOpRayleighProcess =
new G4OpRayleigh ();
76 G4OpBoundaryProcess* theOpBoundaryProcess =
new G4OpBoundaryProcess();
78 theCerenkovProcess->SetVerboseLevel(0);
79 theScintillationProcess->SetVerboseLevel(0);
80 theOpAbsorptionProcess->SetVerboseLevel(0);
81 theOpRayleighProcess->SetVerboseLevel(0);
82 theOpBoundaryProcess->SetVerboseLevel(0);
84 G4int MaxNumPhotons = 300;
86 theCerenkovProcess->SetTrackSecondariesFirst(
true);
87 theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumPhotons);
89 theScintillationProcess->SetTrackSecondariesFirst(
true);
90 #if G4VERSION_NUMBER < 1100
92 theScintillationProcess->SetScintillationYieldFactor(1.);
101 G4ProcessManager* pmanager =
particle->GetProcessManager();
104 if (theCerenkovProcess->IsApplicable(*
particle)) {
106 pmanager->AddProcess (theCerenkovProcess);
107 pmanager->SetProcessOrdering(theCerenkovProcess, idxPostStep);
110 if (theScintillationProcess->IsApplicable(*
particle)) {
112 pmanager->AddProcess (theScintillationProcess);
113 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
114 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
119 ATH_MSG_DEBUG(
" Adding OpAbsorptionProcess, OpRayleighProcess and OpBoundaryProcess to opticalphoton " );
120 pmanager->AddDiscreteProcess(theOpAbsorptionProcess);
121 pmanager->AddDiscreteProcess(theOpRayleighProcess);
122 pmanager->AddDiscreteProcess(theOpBoundaryProcess);