| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | // $Id: Sc01PhysicsList.cc,v 1.4 2006/06/29 18:54:05 gunter Exp $
|
|---|
| 27 | // ------------------------------------------------------------
|
|---|
| 28 | // GEANT 4 class header file
|
|---|
| 29 | //
|
|---|
| 30 | // This is a version for maximum particle set
|
|---|
| 31 | // History
|
|---|
| 32 | // first version 10 Jan. 1998 by H.Kurashige
|
|---|
| 33 | // add decay at rest 26 Feb. 1998 by H.Kurashige
|
|---|
| 34 | // ------------------------------------------------------------
|
|---|
| 35 |
|
|---|
| 36 | #include "globals.hh"
|
|---|
| 37 | #include "Sc01PhysicsList.hh"
|
|---|
| 38 | #include "G4ParticleDefinition.hh"
|
|---|
| 39 | #include "G4ParticleWithCuts.hh"
|
|---|
| 40 | #include "G4ProcessManager.hh"
|
|---|
| 41 | #include "G4ProcessVector.hh"
|
|---|
| 42 | #include "G4Geantino.hh"
|
|---|
| 43 | #include "G4OpticalPhoton.hh"
|
|---|
| 44 | #include "G4ParticleTable.hh"
|
|---|
| 45 | #include "G4Material.hh"
|
|---|
| 46 | #include "G4MaterialTable.hh"
|
|---|
| 47 | #include "G4ios.hh"
|
|---|
| 48 | #include <iomanip>
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 | Sc01PhysicsList::Sc01PhysicsList(): G4VUserPhysicsList()
|
|---|
| 52 | {
|
|---|
| 53 | SetVerboseLevel(1);
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | Sc01PhysicsList::~Sc01PhysicsList()
|
|---|
| 57 | {
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | void Sc01PhysicsList::ConstructParticle()
|
|---|
| 61 | {
|
|---|
| 62 | // In this method, static member functions should be called
|
|---|
| 63 | // for all particles which you want to use.
|
|---|
| 64 | // This ensures that objects of these particle types will be
|
|---|
| 65 | // created in the program.
|
|---|
| 66 |
|
|---|
| 67 | ConstructBosons();
|
|---|
| 68 |
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | void Sc01PhysicsList::ConstructBosons()
|
|---|
| 72 | {
|
|---|
| 73 | // pseudo-particles
|
|---|
| 74 | G4Geantino::GeantinoDefinition();
|
|---|
| 75 |
|
|---|
| 76 | // optical photon
|
|---|
| 77 | G4OpticalPhoton::OpticalPhotonDefinition();
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 | void Sc01PhysicsList::ConstructProcess()
|
|---|
| 83 | {
|
|---|
| 84 | AddTransportation();
|
|---|
| 85 | ConstructEM();
|
|---|
| 86 | ConstructGeneral();
|
|---|
| 87 | }
|
|---|
| 88 | #include "G4OpBoundaryProcess.hh"
|
|---|
| 89 |
|
|---|
| 90 | void Sc01PhysicsList::ConstructEM()
|
|---|
| 91 | {
|
|---|
| 92 | theParticleIterator->reset();
|
|---|
| 93 | while( (*theParticleIterator)() )
|
|---|
| 94 | {
|
|---|
| 95 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 96 | // G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 97 | G4String particleName = particle->GetParticleName();
|
|---|
| 98 |
|
|---|
| 99 | if (particleName == "opticalphoton")
|
|---|
| 100 | {
|
|---|
| 101 | // opticalphoton
|
|---|
| 102 | // Construct processes for opticalphoton
|
|---|
| 103 | // pmanager->AddDiscreteProcess(new G4OpBoundaryProcess());
|
|---|
| 104 |
|
|---|
| 105 | }
|
|---|
| 106 | }
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|
| 109 | #include "G4Decay.hh"
|
|---|
| 110 | void Sc01PhysicsList::ConstructGeneral()
|
|---|
| 111 | {
|
|---|
| 112 | G4Decay* theDecayProcess = new G4Decay();
|
|---|
| 113 | theParticleIterator->reset();
|
|---|
| 114 |
|
|---|
| 115 | while( (*theParticleIterator)() )
|
|---|
| 116 | {
|
|---|
| 117 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 118 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 119 |
|
|---|
| 120 | if (theDecayProcess->IsApplicable(*particle))
|
|---|
| 121 | {
|
|---|
| 122 | pmanager->AddProcess(theDecayProcess, INT_MAX, -1, INT_MAX);
|
|---|
| 123 | }
|
|---|
| 124 | }
|
|---|
| 125 | }
|
|---|
| 126 |
|
|---|
| 127 | void Sc01PhysicsList::SetCuts()
|
|---|
| 128 | {
|
|---|
| 129 | if (verboseLevel >0)
|
|---|
| 130 | {
|
|---|
| 131 | G4cout << "Sc01PhysicsList::SetCuts:";
|
|---|
| 132 | G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
|
|---|
| 133 | }
|
|---|
| 134 | // set verbose level 0 to surpress messages
|
|---|
| 135 | G4int temp = GetVerboseLevel();
|
|---|
| 136 | SetVerboseLevel(0);
|
|---|
| 137 |
|
|---|
| 138 | SetCutsWithDefault();
|
|---|
| 139 |
|
|---|
| 140 | // retrieve verbose level
|
|---|
| 141 | SetVerboseLevel(temp);
|
|---|
| 142 | }
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|