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: G4IonPhysics.cc,v 1.1 2006/10/31 11:35:02 gunter Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
28 | // |
---|
29 | //--------------------------------------------------------------------------- |
---|
30 | // |
---|
31 | // ClassName: G4IonPhysics |
---|
32 | // |
---|
33 | // Author: V.Ivanchenko 09.11.2005 |
---|
34 | // |
---|
35 | // Modified: |
---|
36 | // |
---|
37 | //---------------------------------------------------------------------------- |
---|
38 | // |
---|
39 | |
---|
40 | #include "G4IonPhysics.hh" |
---|
41 | |
---|
42 | #include "G4DeuteronInelasticProcess.hh" |
---|
43 | #include "G4LEDeuteronInelastic.hh" |
---|
44 | |
---|
45 | #include "G4TritonInelasticProcess.hh" |
---|
46 | #include "G4LETritonInelastic.hh" |
---|
47 | |
---|
48 | #include "G4AlphaInelasticProcess.hh" |
---|
49 | #include "G4LEAlphaInelastic.hh" |
---|
50 | |
---|
51 | #include "G4ParticleDefinition.hh" |
---|
52 | #include "G4ParticleTable.hh" |
---|
53 | #include "G4ProcessManager.hh" |
---|
54 | |
---|
55 | // Nuclei |
---|
56 | #include "G4IonConstructor.hh" |
---|
57 | |
---|
58 | G4IonPhysics::G4IonPhysics(const G4String& name) |
---|
59 | : G4VPhysicsConstructor(name), wasActivated(false) |
---|
60 | { |
---|
61 | } |
---|
62 | |
---|
63 | G4IonPhysics::~G4IonPhysics() |
---|
64 | { |
---|
65 | if(wasActivated) { |
---|
66 | |
---|
67 | delete fDeuteronProcess; |
---|
68 | delete fDeuteronModel; |
---|
69 | delete fTritonProcess; |
---|
70 | delete fTritonModel; |
---|
71 | delete fAlphaProcess; |
---|
72 | delete fAlphaModel; |
---|
73 | |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | void G4IonPhysics::ConstructProcess() |
---|
78 | { |
---|
79 | G4ProcessManager * pManager = 0; |
---|
80 | |
---|
81 | // Deuteron |
---|
82 | pManager = G4Deuteron::Deuteron()->GetProcessManager(); |
---|
83 | // add process |
---|
84 | fDeuteronModel = new G4LEDeuteronInelastic(); |
---|
85 | fDeuteronProcess = new G4DeuteronInelasticProcess(); |
---|
86 | fDeuteronProcess->RegisterMe(fDeuteronModel); |
---|
87 | pManager->AddDiscreteProcess(fDeuteronProcess); |
---|
88 | |
---|
89 | // Triton |
---|
90 | pManager = G4Triton::Triton()->GetProcessManager(); |
---|
91 | // add process |
---|
92 | fTritonModel = new G4LETritonInelastic(); |
---|
93 | fTritonProcess = new G4TritonInelasticProcess(); |
---|
94 | fTritonProcess->RegisterMe(fTritonModel); |
---|
95 | pManager->AddDiscreteProcess(fTritonProcess); |
---|
96 | |
---|
97 | // Alpha |
---|
98 | pManager = G4Alpha::Alpha()->GetProcessManager(); |
---|
99 | // add process |
---|
100 | fAlphaModel = new G4LEAlphaInelastic(); |
---|
101 | fAlphaProcess = new G4AlphaInelasticProcess(); |
---|
102 | fAlphaProcess->RegisterMe(fAlphaModel); |
---|
103 | pManager->AddDiscreteProcess(fAlphaProcess); |
---|
104 | |
---|
105 | wasActivated = true; |
---|
106 | } |
---|
107 | |
---|
108 | void G4IonPhysics::ConstructParticle() |
---|
109 | { |
---|
110 | // Construct light ions |
---|
111 | G4IonConstructor pConstructor; |
---|
112 | pConstructor.ConstructParticle(); |
---|
113 | } |
---|
114 | |
---|
115 | |
---|
116 | |
---|
117 | // 2002 by J.P. Wellisch |
---|