Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ParticleChangeForLoss.hh
이 파일의 문서화 페이지로 가기
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: G4ParticleChangeForLoss.hh 68795 2013-04-05 13:24:46Z gcosmo $
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 
58 class G4DynamicParticle;
59 
61 {
62 public:
63  // default constructor
65 
66  // destructor
67  virtual ~G4ParticleChangeForLoss();
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 
78  void InitializeForAlongStep(const G4Track&);
79  void InitializeForPostStep(const G4Track&);
80  //Initialize all propoerties by using G4Track information
81 
82  // void AddSecondary(G4DynamicParticle* aParticle);
83  // Add next secondary
84 
85  inline G4double GetProposedCharge() const;
86  inline void SetProposedCharge(G4double theCharge);
87  // Get/Set theCharge
88 
89  inline G4double GetCharge() const;
90  inline void ProposeCharge(G4double finalCharge);
91  // Get/Propose the final dynamical Charge in G4DynamicParticle
92 
93  inline G4double GetProposedKineticEnergy() const;
95  // Get/Set the final kinetic energy of the current particle.
96 
97  inline const G4ThreeVector& GetProposedMomentumDirection() const;
99  inline const G4ThreeVector& GetMomentumDirection() const;
100  inline void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
101  inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
102  // Get/Propose the MomentumDirection vector: it is the final momentum direction.
103 
104  inline const G4ThreeVector& GetProposedPolarization() const;
105  inline void ProposePolarization(const G4ThreeVector& dir);
106  inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
107 
108  inline const G4Track* GetCurrentTrack() const;
109 
110  inline void SetLowEnergyLimit(G4double elimit);
111 
112  virtual void DumpInfo() const;
113 
114  // for Debug
115  virtual G4bool CheckIt(const G4Track&);
116 
117 protected:
118  // hide copy constructor and assignment operaor as protected
121 
122 private:
123 
125  // The pointer to G4Track
126 
128  // The final kinetic energy of the current particle.
129 
131  // The limit kinetic energy below which particle is stopped
132 
134  // The final charge of the current particle.
135 
137  // The final momentum direction of the current particle.
138 
140  // The final polarization of the current particle.
141 };
142 
143 // ------------------------------------------------------------
144 
146 {
147  return proposedKinEnergy;
148 }
149 
151 {
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 
175 inline
177 {
179 }
180 
181 inline
183 {
185 }
186 
187 inline
189 {
191 }
192 
193 inline
195 {
197 }
198 
199 inline
201 {
205 }
206 
208 {
209  return currentTrack;
210 }
211 
212 inline
214 {
215  return proposedPolarization;
216 }
217 
218 inline
220 {
222 }
223 
224 inline
226 {
230 }
231 
233 {
235  theLocalEnergyDeposit = 0.0;
237  InitializeSecondaries(track);
238  theParentWeight = track.GetWeight();
239  // isParentWeightProposed = false;
242 }
243 
245 {
247  theLocalEnergyDeposit = 0.0;
249  InitializeSecondaries(track);
250  theParentWeight = track.GetWeight();
251  // isParentWeightProposed = false;
256  currentTrack = &track;
257 }
258 
259 /*
260 inline void G4ParticleChangeForLoss::AddSecondary(G4DynamicParticle* aParticle)
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
270  G4VParticleChange::AddSecondary(aTrack);
271 }
272 */
274 {
275  lowEnergyLimit = elimit;
276 }
277 
278 #endif
279 
G4double GetKineticEnergy() const
G4Step * UpdateStepForAlongStep(G4Step *Step)
const G4ThreeVector & GetProposedMomentumDirection() const
void InitializeForAlongStep(const G4Track &)
const G4ThreeVector & GetPolarization() const
void SetProposedMomentumDirection(const G4ThreeVector &dir)
virtual G4bool CheckIt(const G4Track &)
void SetProposedCharge(G4double theCharge)
void setX(double)
virtual void DumpInfo() const
G4double GetWeight() const
void ProposePolarization(const G4ThreeVector &dir)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double theNonIonizingEnergyDeposit
G4TrackStatus theStatusChange
void setZ(double)
double energy
Definition: plottest35.C:25
G4double GetCharge() const
G4double GetProposedKineticEnergy() const
void InitializeSecondaries(const G4Track &)
Definition: G4Step.hh:76
const G4Track * GetCurrentTrack() const
G4Step * UpdateStepForPostStep(G4Step *Step)
void InitializeForPostStep(const G4Track &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
TDirectory * dir
G4ParticleChangeForLoss & operator=(const G4ParticleChangeForLoss &right)
G4TrackStatus GetTrackStatus() const
const G4ThreeVector & GetMomentumDirection() const
void ProposeCharge(G4double finalCharge)
const G4DynamicParticle * GetDynamicParticle() const
Definition: Step.hh:41
void setY(double)
const G4ThreeVector & GetMomentumDirection() const
void SetLowEnergyLimit(G4double elimit)
const G4ThreeVector & GetProposedPolarization() const