Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleChangeForGamma.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// 15 April 2005 V.Ivanchenko for gamma EM processes
36//
37// Modified:
38// 30.05.05 : add UpdateStepForAtRest (V.Ivanchenko)
39// 04.12.05 : apply UpdateStepForPostStep in any case (mma)
40// 26.08.06 : Add->Set polarization;
41// add const method to access track;
42// add weight modification (V.Ivanchenko)
43//
44// ------------------------------------------------------------
45//
46// Class Description
47// This class is a concrete class for ParticleChange for gamma processes
48//
49#ifndef G4ParticleChangeForGamma_h
50#define G4ParticleChangeForGamma_h 1
51
52#include "globals.hh"
53#include "G4ios.hh"
54#include "G4VParticleChange.hh"
55
57
59{
60public:
61 // default constructor
63
64 // destructor
66
67 // with description
68 // ----------------------------------------------------
69 // --- the following methods are for updating G4Step -----
70
73 // A physics process gives the final state of the particle
74 // based on information of G4Track
75
76 void InitializeForPostStep(const G4Track&);
77 //Initialize all propoerties by using G4Track information
78
79 void AddSecondary(G4DynamicParticle* aParticle);
80 // Add next secondary
81
83 void SetProposedKineticEnergy(G4double proposedKinEnergy);
84 // Get/Set the final kinetic energy of the current particle.
85
88 void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
89 // Get/Propose the MomentumDirection vector: it is the final momentum direction.
90
92 void ProposePolarization(const G4ThreeVector& dir);
94
95 const G4Track* GetCurrentTrack() const;
96
97 virtual void DumpInfo() const;
98
99 // for Debug
100 virtual G4bool CheckIt(const G4Track&);
101
102protected:
103 // hide copy constructor and assignment operaor as protected
106
107private:
108
109 const G4Track* currentTrack;
110 // The pointer to G4Track
111
112 G4double proposedKinEnergy;
113 // The final kinetic energy of the current particle.
114
115 G4ThreeVector proposedMomentumDirection;
116 // The final momentum direction of the current particle.
117
118 G4ThreeVector proposedPolarization;
119 // The final polarization of the current particle.
120};
121
122// ------------------------------------------------------------
123
125{
126 return proposedKinEnergy;
127}
128
130{
131 proposedKinEnergy = energy;
132}
133
134inline
136{
137 return proposedMomentumDirection;
138}
139
140inline
142{
143 proposedMomentumDirection = dir;
144}
145
146inline
148{
149 proposedMomentumDirection.setX(Px);
150 proposedMomentumDirection.setY(Py);
151 proposedMomentumDirection.setZ(Pz);
152}
153
155{
156 return currentTrack;
157}
158
159inline
161{
162 return proposedPolarization;
163}
164
165inline
167{
168 proposedPolarization = dir;
169}
170
171inline
173{
174 proposedPolarization.setX(Px);
175 proposedPolarization.setY(Py);
176 proposedPolarization.setZ(Pz);
177}
178
180{
185 theParentWeight = track.GetWeight();
187 proposedKinEnergy = track.GetKineticEnergy();
188 proposedMomentumDirection = track.GetMomentumDirection();
189 proposedPolarization = track.GetPolarization();
190 currentTrack = &track;
191}
192
193#endif
194
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
void setY(double)
void setZ(double)
void setX(double)
const G4Track * GetCurrentTrack() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void InitializeForPostStep(const G4Track &)
void ProposePolarization(const G4ThreeVector &dir)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4Step * UpdateStepForAtRest(G4Step *pStep)
const G4ThreeVector & GetProposedMomentumDirection() const
G4ParticleChangeForGamma & operator=(const G4ParticleChangeForGamma &right)
virtual G4bool CheckIt(const G4Track &)
void AddSecondary(G4DynamicParticle *aParticle)
G4Step * UpdateStepForPostStep(G4Step *Step)
const G4ThreeVector & GetProposedPolarization() const
Definition: G4Step.hh:78
G4TrackStatus GetTrackStatus() const
G4double GetWeight() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4TrackStatus theStatusChange
G4double theNonIonizingEnergyDeposit
void InitializeSecondaries(const G4Track &)