Geant4-11
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// G4ParticleChangeForLoss
27//
28// Class description:
29//
30// Concrete class for ParticleChange for EnergyLoss.
31
32// Author: Hisaya Kurashige, 23 March 1998
33// Revision: Vladimir Ivantchenko, 16 January 2004
34// --------------------------------------------------------------------
35#ifndef G4ParticleChangeForLoss_hh
36#define G4ParticleChangeForLoss_hh 1
37
38#include "globals.hh"
39#include "G4ios.hh"
40#include "G4VParticleChange.hh"
41
43
45{
46 public:
47
49 // Default constructor
50
52 // Destructor
53
54 // --- the following methods are for updating G4Step -----
55
58 // A physics process gives the final state of the particle
59 // based on information of G4Track
60
62 void InitializeForPostStep(const G4Track&);
63 // Initialize all properties by using G4Track information
64
65 inline G4double GetProposedCharge() const;
66 inline void SetProposedCharge(G4double theCharge);
67 // Get/Set theCharge
68
69 inline G4double GetCharge() const;
70 inline void ProposeCharge(G4double finalCharge);
71 // Get/Propose the final dynamical charge in G4DynamicParticle
72
75 // Get/Set the final kinetic energy of the current particle
76
77 inline const G4ThreeVector& GetProposedMomentumDirection() const;
78 inline void SetProposedMomentumDirection(const G4ThreeVector& dir);
79 inline const G4ThreeVector& GetMomentumDirection() const;
80 inline void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
81 inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
82 // Get/Propose the MomentumDirection vector: it is the final momentum
83 // direction
84
85 inline const G4ThreeVector& GetProposedPolarization() const;
86 inline void ProposePolarization(const G4ThreeVector& dir);
87 inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
88
89 inline const G4Track* GetCurrentTrack() const;
90
91 inline void SetLowEnergyLimit(G4double elimit);
92
93 virtual void DumpInfo() const;
94
95 virtual G4bool CheckIt(const G4Track&);
96
97 protected:
98
101 // Hidden copy constructor and assignment operator
102
103 private:
104
105 const G4Track* currentTrack = nullptr;
106 // The pointer to G4Track
107
109 // The final kinetic energy of the current particle
110
112 // The limit kinetic energy below which particle is stopped
113
115 // The final charge of the current particle
116
118 // The final momentum direction of the current particle
119
121 // The final polarization of the current particle
122};
123
124// ----------------------
125// Inline methods
126// ----------------------
127
128inline
130{
131 return proposedKinEnergy;
132}
133
134inline
136{
138}
139
140inline
142{
143 return currentCharge;
144}
145
146inline
148{
149 return currentCharge;
150}
151
152inline
154{
155 currentCharge = theCharge;
156}
157
158inline
160{
161 currentCharge = theCharge;
162}
163
164inline
165const G4ThreeVector&
167{
169}
170
171inline
173{
175}
176
177inline
179{
181}
182
183inline
184void
186{
188}
189
190inline
192 G4double Py,
193 G4double Pz)
194{
198}
199
200inline
202{
203 return currentTrack;
204}
205
206inline
208{
210}
211
212inline
214{
216}
217
218inline
220 G4double Py,
221 G4double Pz)
222{
226}
227
228inline
230{
235 theParentWeight = track.GetWeight();
236 // isParentWeightProposed = false;
239}
240
241inline
243{
248 theParentWeight = track.GetWeight();
249 // isParentWeightProposed = false;
254 currentTrack = &track;
255}
256
257inline
259{
260 lowEnergyLimit = elimit;
261}
262
263#endif
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
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 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:62
G4TrackStatus GetTrackStatus() const
G4double GetWeight() const
const G4DynamicParticle * GetDynamicParticle() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4TrackStatus theStatusChange
G4double theNonIonizingEnergyDeposit
void InitializeSecondaries(const G4Track &)
G4double energy(const ThreeVector &p, const G4double m)