Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A01GeneralPhysics.cc
Go to the documentation of this file.
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 //
28 //
29 // $Id$
30 // --------------------------------------------------------------
31 //
32 // 22-Nov-2004 Construt ALL Particles by T. Koi
33 
34 
35 #include "A01GeneralPhysics.hh"
36 
37 #include "globals.hh"
38 #include "G4ios.hh"
39 #include <iomanip>
40 
42  : G4VPhysicsConstructor(name)
43 {
44 }
45 
47 {
48 }
49 
50 #include "G4BaryonConstructor.hh"
51 #include "G4BosonConstructor.hh"
52 #include "G4IonConstructor.hh"
53 #include "G4LeptonConstructor.hh"
54 #include "G4MesonConstructor.hh"
56 
58 {
59  // In Alphabetical Order
60 
61  // Construct all barions
62  G4BaryonConstructor* baryonConstructor = new G4BaryonConstructor();
63  baryonConstructor -> ConstructParticle();
64  delete baryonConstructor;
65 
66  // Construct all bosons (including geantinos)
67  G4BosonConstructor* bosonConstructor = new G4BosonConstructor();
68  bosonConstructor -> ConstructParticle();
69  delete bosonConstructor;
70 
71  // Construct all ions
72  G4IonConstructor* ionConstructor = new G4IonConstructor();
73  ionConstructor -> ConstructParticle();
74  delete ionConstructor;
75 
76  // Construct all leptons
77  G4LeptonConstructor* leptonConstructor = new G4LeptonConstructor();
78  leptonConstructor -> ConstructParticle();
79  delete leptonConstructor;
80 
81  // Construct all mesons
82  G4MesonConstructor* mesonConstructor = new G4MesonConstructor();
83  mesonConstructor -> ConstructParticle();
84  delete mesonConstructor;
85 
86  // Construct resonaces and quarks
87  G4ShortLivedConstructor* shortLivedConstructor = new G4ShortLivedConstructor();
88  shortLivedConstructor -> ConstructParticle();
89  delete shortLivedConstructor;
90 
91 }
92 
93 #include "G4Decay.hh"
94 #include "G4ParticleDefinition.hh"
95 #include "G4ProcessManager.hh"
96 
98 {
99  // Add Decay Process
100  G4Decay* theDecayProcess = new G4Decay();
102  while( (*theParticleIterator)() ){
104  G4ProcessManager* pmanager = particle->GetProcessManager();
105  if (theDecayProcess->IsApplicable(*particle)) {
106  pmanager ->AddProcess(theDecayProcess);
107  // set ordering for PostStepDoIt and AtRestDoIt
108  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
109  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
110  }
111  }
112 }
113 
114