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 | // the GEANT4 collaboration. |
---|
27 | // |
---|
28 | // By copying, distributing or modifying the Program (or any work |
---|
29 | // based on the Program) you indicate your acceptance of this statement, |
---|
30 | // and all its terms. |
---|
31 | // |
---|
32 | // $Id: tst2ParticleConstructor.cc,v 1.6 2006/06/29 19:27:32 gunter Exp $ |
---|
33 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
34 | // |
---|
35 | // |
---|
36 | // --------------------------------------------------------------- |
---|
37 | #include "tst2ParticleConstructor.hh" |
---|
38 | |
---|
39 | |
---|
40 | #include "G4BosonConstructor.hh" |
---|
41 | #include "G4LeptonConstructor.hh" |
---|
42 | #include "G4MesonConstructor.hh" |
---|
43 | #include "G4BaryonConstructor.hh" |
---|
44 | #include "G4IonConstructor.hh" |
---|
45 | #include "G4ShortLivedConstructor.hh" |
---|
46 | |
---|
47 | void tst2ParticleConstructor::ConstructAllBosons() |
---|
48 | { |
---|
49 | // Construct all bosons |
---|
50 | G4cout << "Bosons" << G4endl; |
---|
51 | G4BosonConstructor pConstructor; |
---|
52 | pConstructor.ConstructParticle(); |
---|
53 | } |
---|
54 | |
---|
55 | void tst2ParticleConstructor::ConstructAllLeptons() |
---|
56 | { |
---|
57 | // Construct all leptons |
---|
58 | G4cout << "Leptons" << G4endl; |
---|
59 | G4LeptonConstructor pConstructor; |
---|
60 | pConstructor.ConstructParticle(); |
---|
61 | } |
---|
62 | |
---|
63 | void tst2ParticleConstructor::ConstructAllMesons() |
---|
64 | { |
---|
65 | // Construct all mesons |
---|
66 | G4cout << "Leptons" << G4endl; |
---|
67 | G4MesonConstructor pConstructor; |
---|
68 | pConstructor.ConstructParticle(); |
---|
69 | } |
---|
70 | |
---|
71 | void tst2ParticleConstructor::ConstructAllBaryons() |
---|
72 | { |
---|
73 | // Construct all barions |
---|
74 | G4cout << "Baryons" << G4endl; |
---|
75 | G4BaryonConstructor pConstructor; |
---|
76 | pConstructor.ConstructParticle(); |
---|
77 | } |
---|
78 | |
---|
79 | void tst2ParticleConstructor::ConstructAllIons() |
---|
80 | { |
---|
81 | // Construct light ions |
---|
82 | G4cout << "Ions" << G4endl; |
---|
83 | G4IonConstructor pConstructor; |
---|
84 | pConstructor.ConstructParticle(); |
---|
85 | } |
---|
86 | |
---|
87 | void tst2ParticleConstructor::ConstructAllShortLiveds() |
---|
88 | { |
---|
89 | // Construct resonaces and quarks |
---|
90 | G4cout << "Shortlived particles" << G4endl; |
---|
91 | G4ShortLivedConstructor pConstructor; |
---|
92 | pConstructor.ConstructParticle(); |
---|
93 | } |
---|
94 | |
---|
95 | |
---|
96 | void tst2ParticleConstructor::ConstructParticle() |
---|
97 | { |
---|
98 | |
---|
99 | // In this method, static member functions should be called |
---|
100 | // for all particles which you want to use. |
---|
101 | // This ensures that objects of these particle types will be |
---|
102 | // created in the program. |
---|
103 | |
---|
104 | // create all particles |
---|
105 | ConstructAllBosons(); |
---|
106 | ConstructAllLeptons(); |
---|
107 | ConstructAllMesons(); |
---|
108 | ConstructAllBaryons(); |
---|
109 | ConstructAllIons(); |
---|
110 | ConstructAllShortLiveds(); |
---|
111 | } |
---|
112 | |
---|