[966] | 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 | // |
---|
| 27 | // $Id: Tst01GeneralPhysics.cc,v 1.4 2006/06/29 19:32:00 gunter Exp $ |
---|
[1055] | 28 | // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ |
---|
[966] | 29 | // |
---|
| 30 | // |
---|
| 31 | |
---|
| 32 | #include "Tst01GeneralPhysics.hh" |
---|
| 33 | |
---|
| 34 | #include "globals.hh" |
---|
| 35 | #include "G4ios.hh" |
---|
| 36 | #include <iomanip> |
---|
| 37 | |
---|
| 38 | Tst01GeneralPhysics::Tst01GeneralPhysics(const G4String& name) |
---|
| 39 | : G4VPhysicsConstructor(name) |
---|
| 40 | { |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | Tst01GeneralPhysics::~Tst01GeneralPhysics() |
---|
| 44 | { |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | #include "G4ParticleDefinition.hh" |
---|
| 48 | #include "G4ProcessManager.hh" |
---|
| 49 | |
---|
| 50 | #include "G4Gamma.hh" |
---|
| 51 | |
---|
| 52 | #include "G4Electron.hh" |
---|
| 53 | #include "G4Positron.hh" |
---|
| 54 | #include "G4MuonMinus.hh" |
---|
| 55 | #include "G4MuonPlus.hh" |
---|
| 56 | |
---|
| 57 | #include "G4NeutrinoE.hh" |
---|
| 58 | #include "G4AntiNeutrinoE.hh" |
---|
| 59 | #include "G4NeutrinoMu.hh" |
---|
| 60 | #include "G4AntiNeutrinoMu.hh" |
---|
| 61 | |
---|
| 62 | #include "G4Proton.hh" |
---|
| 63 | #include "G4AntiProton.hh" |
---|
| 64 | #include "G4Neutron.hh" |
---|
| 65 | #include "G4AntiNeutron.hh" |
---|
| 66 | |
---|
| 67 | #include "G4MesonConstructor.hh" |
---|
| 68 | |
---|
| 69 | void Tst01GeneralPhysics::ConstructParticle() |
---|
| 70 | { |
---|
| 71 | // gamma |
---|
| 72 | G4Gamma::GammaDefinition(); |
---|
| 73 | |
---|
| 74 | // electron |
---|
| 75 | G4Electron::ElectronDefinition(); |
---|
| 76 | G4Positron::PositronDefinition(); |
---|
| 77 | G4NeutrinoE::NeutrinoEDefinition(); |
---|
| 78 | G4AntiNeutrinoE::AntiNeutrinoEDefinition(); |
---|
| 79 | |
---|
| 80 | // muon |
---|
| 81 | G4MuonMinus::MuonMinusDefinition(); |
---|
| 82 | G4MuonPlus::MuonPlusDefinition(); |
---|
| 83 | G4NeutrinoMu::NeutrinoMuDefinition(); |
---|
| 84 | G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); |
---|
| 85 | |
---|
| 86 | // nucleon |
---|
| 87 | G4Proton::ProtonDefinition(); |
---|
| 88 | G4Neutron::NeutronDefinition(); |
---|
| 89 | G4AntiProton::AntiProtonDefinition(); |
---|
| 90 | G4AntiNeutron::AntiNeutronDefinition(); |
---|
| 91 | |
---|
| 92 | // Construct all mesons |
---|
| 93 | G4MesonConstructor pMesonConstructor; |
---|
| 94 | pMesonConstructor.ConstructParticle(); |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | void Tst01GeneralPhysics::ConstructProcess() |
---|
| 98 | { |
---|
| 99 | // Add Decay Process |
---|
| 100 | theParticleIterator->reset(); |
---|
| 101 | while( (*theParticleIterator)() ){ |
---|
| 102 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 103 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 104 | if (fDecayProcess.IsApplicable(*particle)) { |
---|
| 105 | pmanager ->AddProcess(&fDecayProcess); |
---|
| 106 | // set ordering for PostStepDoIt and AtRestDoIt |
---|
| 107 | pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep); |
---|
| 108 | pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest); |
---|
| 109 | } |
---|
| 110 | } |
---|
| 111 | } |
---|
| 112 | |
---|
| 113 | |
---|