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: G4ParticleChangeForDecay.hh,v 1.9 2006/06/29 21:14:19 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
29 | |
---|
30 | // |
---|
31 | // |
---|
32 | // ------------------------------------------------------------ |
---|
33 | // GEANT 4 class header file |
---|
34 | // |
---|
35 | // |
---|
36 | // ------------------------------------------------------------ |
---|
37 | // Implemented for the new scheme 23 Mar. 1998 H.Kurahige |
---|
38 | // |
---|
39 | // Class Description |
---|
40 | // This class is a concrete class for ParticleChange which |
---|
41 | // has functionality for G4Decay. |
---|
42 | // |
---|
43 | // This class contains the results after invocation of the decay process. |
---|
44 | // This includes secondary particles generated by the interaction. |
---|
45 | // ------------------------------------------------------------ |
---|
46 | #ifndef G4ParticleChangeForDecay_h |
---|
47 | #define G4ParticleChangeForDecay_h 1 |
---|
48 | |
---|
49 | #include "globals.hh" |
---|
50 | #include "G4ios.hh" |
---|
51 | #include "G4ThreeVector.hh" |
---|
52 | class G4DynamicParticle; |
---|
53 | #include "G4VParticleChange.hh" |
---|
54 | |
---|
55 | class G4ParticleChangeForDecay: public G4VParticleChange |
---|
56 | { |
---|
57 | public: |
---|
58 | // default constructor |
---|
59 | G4ParticleChangeForDecay(); |
---|
60 | |
---|
61 | // destructor |
---|
62 | virtual ~G4ParticleChangeForDecay(); |
---|
63 | |
---|
64 | protected: |
---|
65 | // hide copy constructor and assignment operaor as protected |
---|
66 | G4ParticleChangeForDecay(const G4ParticleChangeForDecay &right); |
---|
67 | G4ParticleChangeForDecay & operator=(const G4ParticleChangeForDecay &right); |
---|
68 | |
---|
69 | public: |
---|
70 | // equal/unequal operator |
---|
71 | G4bool operator==(const G4ParticleChangeForDecay &right) const; |
---|
72 | G4bool operator!=(const G4ParticleChangeForDecay &right) const; |
---|
73 | |
---|
74 | public: // with description |
---|
75 | // ---------------------------------------------------- |
---|
76 | // --- the following methods are for updating G4Step ----- |
---|
77 | // Return the pointer to the G4Step after updating the Step information |
---|
78 | // by using final state information of the track given by a physics |
---|
79 | // process |
---|
80 | |
---|
81 | // !!! No effect for AlongSteyp |
---|
82 | // virtual G4Step* UpdateStepForAlongStep(G4Step* Step); |
---|
83 | |
---|
84 | virtual G4Step* UpdateStepForAtRest(G4Step* Step); |
---|
85 | virtual G4Step* UpdateStepForPostStep(G4Step* Step); |
---|
86 | |
---|
87 | virtual void Initialize(const G4Track&); |
---|
88 | // Initialize all propoerties by using G4Track information |
---|
89 | |
---|
90 | G4double GetGlobalTime() const; |
---|
91 | void ProposeGlobalTime(G4double t); |
---|
92 | // Get/Propose the final GlobalTime |
---|
93 | |
---|
94 | G4double GetGlobalTime(G4double timeDelay) const; |
---|
95 | // Convert the time delay to the global time. |
---|
96 | |
---|
97 | const G4ThreeVector* GetPolarization() const; |
---|
98 | void ProposePolarization(G4double Px, G4double Py, G4double Pz); |
---|
99 | void ProposePolarization(const G4ThreeVector& finalPoralization); |
---|
100 | // Get/Propose the final Polarization vector. |
---|
101 | |
---|
102 | public: |
---|
103 | virtual void DumpInfo() const; |
---|
104 | |
---|
105 | protected: |
---|
106 | G4double theTimeChange; |
---|
107 | // The change of global time of a given particle. |
---|
108 | |
---|
109 | G4ThreeVector thePolarizationChange; |
---|
110 | // The changed (final) polarization of a given track |
---|
111 | |
---|
112 | public: |
---|
113 | // for Debug |
---|
114 | virtual G4bool CheckIt(const G4Track&); |
---|
115 | }; |
---|
116 | |
---|
117 | inline |
---|
118 | G4double G4ParticleChangeForDecay::GetGlobalTime() const |
---|
119 | { |
---|
120 | return theTimeChange; |
---|
121 | } |
---|
122 | |
---|
123 | inline |
---|
124 | void G4ParticleChangeForDecay::ProposeGlobalTime(G4double t) |
---|
125 | { |
---|
126 | theTimeChange = t; |
---|
127 | } |
---|
128 | |
---|
129 | inline |
---|
130 | G4double G4ParticleChangeForDecay::GetGlobalTime(G4double timeDelay) const |
---|
131 | { |
---|
132 | // Convert the time delay to the global time. |
---|
133 | return theTimeChange + timeDelay; |
---|
134 | } |
---|
135 | |
---|
136 | inline |
---|
137 | const G4ThreeVector* G4ParticleChangeForDecay::GetPolarization() const |
---|
138 | { |
---|
139 | return &thePolarizationChange; |
---|
140 | } |
---|
141 | |
---|
142 | inline |
---|
143 | void G4ParticleChangeForDecay::ProposePolarization(const G4ThreeVector& finalPoralization) |
---|
144 | { |
---|
145 | thePolarizationChange = finalPoralization; |
---|
146 | } |
---|
147 | |
---|
148 | inline |
---|
149 | void G4ParticleChangeForDecay::ProposePolarization( |
---|
150 | G4double Px, |
---|
151 | G4double Py, |
---|
152 | G4double Pz ) |
---|
153 | { |
---|
154 | thePolarizationChange.setX(Px); |
---|
155 | thePolarizationChange.setY(Py); |
---|
156 | thePolarizationChange.setZ(Pz); |
---|
157 | } |
---|
158 | |
---|
159 | #endif |
---|
160 | |
---|
161 | |
---|
162 | |
---|
163 | |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | |
---|
175 | |
---|