Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4ParticleChangeForLoss.hh
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//
26//
27// $Id$
28//
29//
30// ------------------------------------------------------------
31// GEANT 4 class header file
32//
33//
34// ------------------------------------------------------------
35// Implemented for the new scheme 23 Mar. 1998 H.Kurahige
36//
37// Modified:
38// 16.01.04 V.Ivanchenko update for model variant of energy loss
39// 15.04.05 V.Ivanchenko inline update methods
40// 30.01.06 V.Ivanchenko add ProposedMomentumDirection for AlongStep
41// and ProposeWeight for PostStep
42// 07.06.06 V.Ivanchenko RemoveProposedMomentumDirection from AlongStep
43// 28.08.06 V.Ivanchenko Added access to current track and polarizaion
44// 17.06.09 V.Ivanchenko Added SetLowEnergyLimit method
45//
46// ------------------------------------------------------------
47//
48// Class Description
49// This class is a concrete class for ParticleChange for EnergyLoss
50//
51#ifndef G4ParticleChangeForLoss_h
52#define G4ParticleChangeForLoss_h 1
53
54#include "globals.hh"
55#include "G4ios.hh"
56#include "G4VParticleChange.hh"
57
59
61{
62public:
63 // default constructor
65
66 // destructor
68
69 // with description
70 // ----------------------------------------------------
71 // --- the following methods are for updating G4Step -----
72
75 // A physics process gives the final state of the particle
76 // based on information of G4Track
77
79 void InitializeForPostStep(const G4Track&);
80 //Initialize all propoerties by using G4Track information
81
82 void AddSecondary(G4DynamicParticle* aParticle);
83 // Add next secondary
84
86 void SetProposedCharge(G4double theCharge);
87 // Get/Set theCharge
88
89 G4double GetCharge() const;
90 void ProposeCharge(G4double finalCharge);
91 // Get/Propose the final dynamical Charge in G4DynamicParticle
92
94 void SetProposedKineticEnergy(G4double proposedKinEnergy);
95 // Get/Set the final kinetic energy of the current particle.
96
101 void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
102 // Get/Propose the MomentumDirection vector: it is the final momentum direction.
103
105 void ProposePolarization(const G4ThreeVector& dir);
107
108 const G4Track* GetCurrentTrack() const;
109
110 void SetLowEnergyLimit(G4double elimit);
111
112 virtual void DumpInfo() const;
113
114 // for Debug
115 virtual G4bool CheckIt(const G4Track&);
116
117protected:
118 // hide copy constructor and assignment operaor as protected
121
122private:
123
124 const G4Track* currentTrack;
125 // The pointer to G4Track
126
127 G4double proposedKinEnergy;
128 // The final kinetic energy of the current particle.
129
130 G4double lowEnergyLimit;
131 // The limit kinetic energy below which particle is stopped
132
133 G4double currentCharge;
134 // The final charge of the current particle.
135
136 G4ThreeVector proposedMomentumDirection;
137 // The final momentum direction of the current particle.
138
139 G4ThreeVector proposedPolarization;
140 // The final polarization of the current particle.
141};
142
143// ------------------------------------------------------------
144
146{
147 return proposedKinEnergy;
148}
149
151{
152 proposedKinEnergy = energy;
153}
154
156{
157 return currentCharge;
158}
159
161{
162 return currentCharge;
163}
164
166{
167 currentCharge = theCharge;
168}
169
171{
172 currentCharge = theCharge;
173}
174
175inline
177{
178 return proposedMomentumDirection;
179}
180
181inline
183{
184 return proposedMomentumDirection;
185}
186
187inline
189{
190 proposedMomentumDirection = dir;
191}
192
193inline
195{
196 proposedMomentumDirection = dir;
197}
198
199inline
201{
202 proposedMomentumDirection.setX(Px);
203 proposedMomentumDirection.setY(Py);
204 proposedMomentumDirection.setZ(Pz);
205}
206
208{
209 return currentTrack;
210}
211
212inline
214{
215 return proposedPolarization;
216}
217
218inline
220{
221 proposedPolarization = dir;
222}
223
224inline
226{
227 proposedPolarization.setX(Px);
228 proposedPolarization.setY(Py);
229 proposedPolarization.setZ(Pz);
230}
231
233{
238 theParentWeight = track.GetWeight();
240 proposedKinEnergy = track.GetKineticEnergy();
241 currentCharge = track.GetDynamicParticle()->GetCharge();
242}
243
245{
250 theParentWeight = track.GetWeight();
252 proposedKinEnergy = track.GetKineticEnergy();
253 currentCharge = track.GetDynamicParticle()->GetCharge();
254 proposedMomentumDirection = track.GetMomentumDirection();
255 proposedPolarization = track.GetPolarization();
256 currentTrack = &track;
257}
258
259
261{
262 // create track
263 G4Track* aTrack = new G4Track(aParticle, currentTrack->GetGlobalTime(),
264 currentTrack->GetPosition());
265
266 // Touchable handle is copied to keep the pointer
267 aTrack->SetTouchableHandle(currentTrack->GetTouchableHandle());
268
269 // add a secondary
271}
272
274{
275 lowEnergyLimit = elimit;
276}
277
278#endif
279
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
void setY(double)
void setZ(double)
void setX(double)
G4double GetCharge() const
void InitializeForPostStep(const G4Track &)
G4Step * UpdateStepForPostStep(G4Step *Step)
void InitializeForAlongStep(const G4Track &)
void SetLowEnergyLimit(G4double elimit)
G4double GetProposedKineticEnergy() const
virtual G4bool CheckIt(const G4Track &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
const G4ThreeVector & GetProposedMomentumDirection() const
const G4Track * GetCurrentTrack() const
void SetProposedCharge(G4double theCharge)
void ProposeCharge(G4double finalCharge)
void AddSecondary(G4DynamicParticle *aParticle)
void ProposePolarization(const G4ThreeVector &dir)
G4ParticleChangeForLoss & operator=(const G4ParticleChangeForLoss &right)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4Step * UpdateStepForAlongStep(G4Step *Step)
const G4ThreeVector & GetProposedPolarization() const
const G4ThreeVector & GetMomentumDirection() const
Definition: G4Step.hh:78
G4TrackStatus GetTrackStatus() const
G4double GetWeight() const
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4TrackStatus theStatusChange
G4double theNonIonizingEnergyDeposit
void AddSecondary(G4Track *aSecondary)
void InitializeSecondaries(const G4Track &)