29
29
#include "Geant4/G4ProcessVector.hh"
30
30
#include "Geant4/G4PhysListFactory.hh"
32
#include "Geant4/G4Cerenkov.hh"
33
#include "Geant4/G4Scintillation.hh"
34
#include "Geant4/G4OpAbsorption.hh"
35
#include "Geant4/G4OpRayleigh.hh"
36
#include "Geant4/G4OpBoundaryProcess.hh"
32
38
#include "Interface/Squeak.hh"
34
40
#include "src/common_cpp/Utils/Globals.hh"
192
198
void MAUSPhysicsList::ConstructProcess() {
193
199
_list->ConstructProcess();
194
200
SetSpecialProcesses();
201
std::cerr << "CONSTRUCTPROCESS" << std::endl;
205
void MAUSPhysicsList::ConstructOp()
207
G4Cerenkov* theCerenkovProcess = new G4Cerenkov("Cerenkov");
208
G4Scintillation* theScintillationProcess = new G4Scintillation("Scintillation");
209
G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption();
210
G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh();
211
G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
212
theCerenkovProcess->SetMaxNumPhotonsPerStep(20);
213
theScintillationProcess->SetScintillationYieldFactor(1.);
214
theScintillationProcess->SetTrackSecondariesFirst(true);
216
G4OpticalSurfaceModel themodel = unified;
217
theBoundaryProcess->SetModel(themodel);
219
theParticleIterator->reset();
220
while( (*theParticleIterator)() ){
221
G4ParticleDefinition* particle = theParticleIterator->value();
222
G4ProcessManager* pmanager = particle->GetProcessManager();
223
G4String particleName = particle->GetParticleName();
224
if (theCerenkovProcess->IsApplicable(*particle)) {
225
pmanager->AddProcess(theCerenkovProcess);
226
pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
228
if (theScintillationProcess->IsApplicable(*particle)) {
229
pmanager->AddProcess(theScintillationProcess);
230
pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
231
pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
233
if (particleName == "opticalphoton") {
234
G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
235
pmanager->AddDiscreteProcess(theAbsorptionProcess);
236
pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
237
pmanager->AddDiscreteProcess(theBoundaryProcess);
240
std::cerr << "CONSTRUCT OP" << std::endl;
197
243
void MAUSPhysicsList::SetSpecialProcesses() {