[807] | 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: A01GeneralPhysics.cc,v 1.6 2006/06/29 16:32:41 gunter Exp $ |
---|
| 27 | // -------------------------------------------------------------- |
---|
| 28 | // |
---|
| 29 | // 22-Nov-2004 Construt ALL Particles by T. Koi |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | #include "A01GeneralPhysics.hh" |
---|
| 33 | |
---|
| 34 | #include "globals.hh" |
---|
| 35 | #include "G4ios.hh" |
---|
| 36 | #include <iomanip> |
---|
| 37 | |
---|
| 38 | A01GeneralPhysics::A01GeneralPhysics(const G4String& name) |
---|
| 39 | : G4VPhysicsConstructor(name) |
---|
| 40 | { |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | A01GeneralPhysics::~A01GeneralPhysics() |
---|
| 44 | { |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | #include "G4BaryonConstructor.hh" |
---|
| 48 | #include "G4BosonConstructor.hh" |
---|
| 49 | #include "G4IonConstructor.hh" |
---|
| 50 | #include "G4LeptonConstructor.hh" |
---|
| 51 | #include "G4MesonConstructor.hh" |
---|
| 52 | #include "G4ShortLivedConstructor.hh" |
---|
| 53 | |
---|
| 54 | void A01GeneralPhysics::ConstructParticle() |
---|
| 55 | { |
---|
| 56 | // In Alphabetical Order |
---|
| 57 | |
---|
| 58 | // Construct all barions |
---|
| 59 | G4BaryonConstructor* baryonConstructor = new G4BaryonConstructor(); |
---|
| 60 | baryonConstructor -> ConstructParticle(); |
---|
| 61 | delete baryonConstructor; |
---|
| 62 | |
---|
| 63 | // Construct all bosons (including geantinos) |
---|
| 64 | G4BosonConstructor* bosonConstructor = new G4BosonConstructor(); |
---|
| 65 | bosonConstructor -> ConstructParticle(); |
---|
| 66 | delete bosonConstructor; |
---|
| 67 | |
---|
| 68 | // Construct all ions |
---|
| 69 | G4IonConstructor* ionConstructor = new G4IonConstructor(); |
---|
| 70 | ionConstructor -> ConstructParticle(); |
---|
| 71 | delete ionConstructor; |
---|
| 72 | |
---|
| 73 | // Construct all leptons |
---|
| 74 | G4LeptonConstructor* leptonConstructor = new G4LeptonConstructor(); |
---|
| 75 | leptonConstructor -> ConstructParticle(); |
---|
| 76 | delete leptonConstructor; |
---|
| 77 | |
---|
| 78 | // Construct all mesons |
---|
| 79 | G4MesonConstructor* mesonConstructor = new G4MesonConstructor(); |
---|
| 80 | mesonConstructor -> ConstructParticle(); |
---|
| 81 | delete mesonConstructor; |
---|
| 82 | |
---|
| 83 | // Construct resonaces and quarks |
---|
| 84 | G4ShortLivedConstructor* shortLivedConstructor = new G4ShortLivedConstructor(); |
---|
| 85 | shortLivedConstructor -> ConstructParticle(); |
---|
| 86 | delete shortLivedConstructor; |
---|
| 87 | |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | #include "G4Decay.hh" |
---|
| 91 | #include "G4ParticleDefinition.hh" |
---|
| 92 | #include "G4ProcessManager.hh" |
---|
| 93 | |
---|
| 94 | void A01GeneralPhysics::ConstructProcess() |
---|
| 95 | { |
---|
| 96 | // Add Decay Process |
---|
| 97 | G4Decay* theDecayProcess = new G4Decay(); |
---|
| 98 | theParticleIterator->reset(); |
---|
| 99 | while( (*theParticleIterator)() ){ |
---|
| 100 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 101 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 102 | if (theDecayProcess->IsApplicable(*particle)) { |
---|
| 103 | pmanager ->AddProcess(theDecayProcess); |
---|
| 104 | // set ordering for PostStepDoIt and AtRestDoIt |
---|
| 105 | pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); |
---|
| 106 | pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); |
---|
| 107 | } |
---|
| 108 | } |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | |
---|