ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticleChangeForLoss.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 //
28 //
29 // ------------------------------------------------------------
30 // GEANT 4 class header file
31 //
32 //
33 // ------------------------------------------------------------
34 // Implemented for the new scheme 23 Mar. 1998 H.Kurahige
35 //
36 // Modified:
37 // 16.01.04 V.Ivanchenko update for model variant of energy loss
38 // 15.04.05 V.Ivanchenko inline update methods
39 // 30.01.06 V.Ivanchenko add ProposedMomentumDirection for AlongStep
40 // and ProposeWeight for PostStep
41 // 07.06.06 V.Ivanchenko RemoveProposedMomentumDirection from AlongStep
42 // 28.08.06 V.Ivanchenko Added access to current track and polarizaion
43 // 17.06.09 V.Ivanchenko Added SetLowEnergyLimit method
44 //
45 // ------------------------------------------------------------
46 //
47 // Class Description
48 // This class is a concrete class for ParticleChange for EnergyLoss
49 //
50 #ifndef G4ParticleChangeForLoss_h
51 #define G4ParticleChangeForLoss_h 1
52 
53 #include "globals.hh"
54 #include "G4ios.hh"
55 #include "G4VParticleChange.hh"
56 
57 class G4DynamicParticle;
58 
60 {
61 public:
62  // default constructor
64 
65  // destructor
66  virtual ~G4ParticleChangeForLoss();
67 
68  // with description
69  // ----------------------------------------------------
70  // --- the following methods are for updating G4Step -----
71 
74  // A physics process gives the final state of the particle
75  // based on information of G4Track
76 
77  void InitializeForAlongStep(const G4Track&);
78  void InitializeForPostStep(const G4Track&);
79  //Initialize all propoerties by using G4Track information
80 
81  // void AddSecondary(G4DynamicParticle* aParticle);
82  // Add next secondary
83 
84  inline G4double GetProposedCharge() const;
85  inline void SetProposedCharge(G4double theCharge);
86  // Get/Set theCharge
87 
88  inline G4double GetCharge() const;
89  inline void ProposeCharge(G4double finalCharge);
90  // Get/Propose the final dynamical Charge in G4DynamicParticle
91 
92  inline G4double GetProposedKineticEnergy() const;
94  // Get/Set the final kinetic energy of the current particle.
95 
96  inline const G4ThreeVector& GetProposedMomentumDirection() const;
98  inline const G4ThreeVector& GetMomentumDirection() const;
99  inline void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
100  inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
101  // Get/Propose the MomentumDirection vector: it is the final momentum direction.
102 
103  inline const G4ThreeVector& GetProposedPolarization() const;
104  inline void ProposePolarization(const G4ThreeVector& dir);
105  inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
106 
107  inline const G4Track* GetCurrentTrack() const;
108 
109  inline void SetLowEnergyLimit(G4double elimit);
110 
111  virtual void DumpInfo() const;
112 
113  // for Debug
114  virtual G4bool CheckIt(const G4Track&);
115 
116 protected:
117  // hide copy constructor and assignment operaor as protected
120 
121 private:
122 
124  // The pointer to G4Track
125 
127  // The final kinetic energy of the current particle.
128 
130  // The limit kinetic energy below which particle is stopped
131 
133  // The final charge of the current particle.
134 
136  // The final momentum direction of the current particle.
137 
139  // The final polarization of the current particle.
140 };
141 
142 // ------------------------------------------------------------
143 
145 {
146  return proposedKinEnergy;
147 }
148 
150 {
152 }
153 
155 {
156  return currentCharge;
157 }
158 
160 {
161  return currentCharge;
162 }
163 
165 {
166  currentCharge = theCharge;
167 }
168 
170 {
171  currentCharge = theCharge;
172 }
173 
174 inline
176 {
178 }
179 
180 inline
182 {
184 }
185 
186 inline
188 {
190 }
191 
192 inline
194 {
196 }
197 
198 inline
200 {
204 }
205 
207 {
208  return currentTrack;
209 }
210 
211 inline
213 {
214  return proposedPolarization;
215 }
216 
217 inline
219 {
221 }
222 
223 inline
225 {
229 }
230 
232 {
234  theLocalEnergyDeposit = 0.0;
236  InitializeSecondaries(track);
237  theParentWeight = track.GetWeight();
238  // isParentWeightProposed = false;
241 }
242 
244 {
246  theLocalEnergyDeposit = 0.0;
248  InitializeSecondaries(track);
249  theParentWeight = track.GetWeight();
250  // isParentWeightProposed = false;
255  currentTrack = &track;
256 }
257 
258 /*
259 inline void G4ParticleChangeForLoss::AddSecondary(G4DynamicParticle* aParticle)
260 {
261  // create track
262  G4Track* aTrack = new G4Track(aParticle, currentTrack->GetGlobalTime(),
263  currentTrack->GetPosition());
264 
265  // Touchable handle is copied to keep the pointer
266  aTrack->SetTouchableHandle(currentTrack->GetTouchableHandle());
267 
268  // add a secondary
269  G4VParticleChange::AddSecondary(aTrack);
270 }
271 */
273 {
274  lowEnergyLimit = elimit;
275 }
276 
277 #endif
278