Geant4 11.1.1
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// G4ParticleChangeForGamma
27//
28// Class description:
29//
30// Concrete class for ParticleChange for gamma processes.
31
32// Author: Hisaya Kurashige, 23 March 1998
33// Revision: Vladimir Ivantchenko, 15 April 2005
34// 24 August 2022
35// --------------------------------------------------------------------
36#ifndef G4ParticleChangeForGamma_hh
37#define G4ParticleChangeForGamma_hh 1
38
39#include "globals.hh"
40#include "G4ios.hh"
41#include "G4VParticleChange.hh"
42
44
46{
47public:
48
50
51 ~G4ParticleChangeForGamma() override = default;
52
55
56 // --- the following methods are for updating G4Step -----
57
58 G4Step* UpdateStepForAtRest(G4Step* pStep) final;
60 // A physics process gives the final state of the particle
61 // based on information of G4Track
62
63 inline void InitializeForPostStep(const G4Track&);
64 // Initialize all properties by using G4Track information
65
66 void AddSecondary(G4DynamicParticle* aParticle);
67 // Add next secondary
68
70 inline void SetProposedKineticEnergy(G4double proposedKinEnergy);
71 // Get/Set the final kinetic energy of the current particle
72
73 inline const G4ThreeVector& GetProposedMomentumDirection() const;
74 inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
75 // Get/Set the final momentum direction
76
77 inline const G4ThreeVector& GetProposedPolarization() const;
78 inline void ProposePolarization(const G4ThreeVector& dir);
79 inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
80
81 void DumpInfo() const override;
82
83private:
84
85 G4double proposedKinEnergy = 0.0;
86 // The final kinetic energy of the current particle
87
88 G4ThreeVector proposedMomentumDirection;
89 // The final momentum direction of the current particle
90
91 G4ThreeVector proposedPolarization;
92 // The final polarization of the current particle
93};
94
95// ----------------------
96// Inline methods
97// ----------------------
98
99inline
101{
102 return proposedKinEnergy;
103}
104
105inline
107{
108 proposedKinEnergy = energy;
109}
110
111inline
114{
115 return proposedMomentumDirection;
116}
117
118inline
121{
122 proposedMomentumDirection = dir;
123}
124
125inline
127{
128 return proposedPolarization;
129}
130
131inline
133{
134 proposedPolarization = dir;
135}
136
137inline
139 G4double Py,
140 G4double Pz)
141{
142 proposedPolarization.setX(Px);
143 proposedPolarization.setY(Py);
144 proposedPolarization.setZ(Pz);
145}
146
147inline
149{
154 proposedKinEnergy = track.GetKineticEnergy();
155 proposedMomentumDirection = track.GetMomentumDirection();
156 proposedPolarization = track.GetPolarization();
157}
158
159#endif
double G4double
Definition: G4Types.hh:83
void setY(double)
void setZ(double)
void setX(double)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void InitializeForPostStep(const G4Track &)
void ProposePolarization(const G4ThreeVector &dir)
G4ParticleChangeForGamma(const G4ParticleChangeForGamma &right)=delete
G4Step * UpdateStepForPostStep(G4Step *Step) final
G4ParticleChangeForGamma & operator=(const G4ParticleChangeForGamma &right)=delete
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4Step * UpdateStepForAtRest(G4Step *pStep) final
const G4ThreeVector & GetProposedMomentumDirection() const
~G4ParticleChangeForGamma() override=default
void AddSecondary(G4DynamicParticle *aParticle)
const G4ThreeVector & GetProposedPolarization() const
Definition: G4Step.hh:62
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
void InitializeLocalEnergyDeposit()
void InitializeStatusChange(const G4Track &)
void InitializeSecondaries()
void InitializeParentWeight(const G4Track &)