ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4ParticleChangeForGamma.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ParticleChangeForGamma.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
// 15 April 2005 V.Ivanchenko for gamma EM processes
35
//
36
// Modified:
37
// 30.05.05 : add UpdateStepForAtRest (V.Ivanchenko)
38
// 04.12.05 : apply UpdateStepForPostStep in any case (mma)
39
// 26.08.06 : Add->Set polarization;
40
// add const method to access track;
41
// add weight modification (V.Ivanchenko)
42
//
43
// ------------------------------------------------------------
44
//
45
// Class Description
46
// This class is a concrete class for ParticleChange for gamma processes
47
//
48
#ifndef G4ParticleChangeForGamma_h
49
#define G4ParticleChangeForGamma_h 1
50
51
#include "
globals.hh
"
52
#include "
G4ios.hh
"
53
#include "
G4VParticleChange.hh
"
54
55
class
G4DynamicParticle
;
56
57
class
G4ParticleChangeForGamma
:
public
G4VParticleChange
58
{
59
public
:
60
// default constructor
61
G4ParticleChangeForGamma
();
62
63
// destructor
64
virtual
~G4ParticleChangeForGamma
();
65
66
// with description
67
// ----------------------------------------------------
68
// --- the following methods are for updating G4Step -----
69
70
G4Step
*
UpdateStepForAtRest
(
G4Step
* pStep);
71
G4Step
*
UpdateStepForPostStep
(
G4Step
* Step);
72
// A physics process gives the final state of the particle
73
// based on information of G4Track
74
75
inline
void
InitializeForPostStep
(
const
G4Track
&);
76
//Initialize all propoerties by using G4Track information
77
78
void
AddSecondary
(
G4DynamicParticle
* aParticle);
79
// Add next secondary
80
81
inline
G4double
GetProposedKineticEnergy
()
const
;
82
inline
void
SetProposedKineticEnergy
(
G4double
proposedKinEnergy
);
83
// Get/Set the final kinetic energy of the current particle.
84
85
inline
const
G4ThreeVector
&
GetProposedMomentumDirection
()
const
;
86
inline
void
ProposeMomentumDirection
(
G4double
Px,
G4double
Py,
G4double
Pz);
87
inline
void
ProposeMomentumDirection
(
const
G4ThreeVector
& Pfinal);
88
// Get/Propose the MomentumDirection vector: it is the final momentum direction.
89
90
inline
const
G4ThreeVector
&
GetProposedPolarization
()
const
;
91
inline
void
ProposePolarization
(
const
G4ThreeVector
&
dir
);
92
inline
void
ProposePolarization
(
G4double
Px,
G4double
Py,
G4double
Pz);
93
94
inline
const
G4Track
*
GetCurrentTrack
()
const
;
95
96
virtual
void
DumpInfo
()
const
;
97
98
// for Debug
99
virtual
G4bool
CheckIt
(
const
G4Track
&);
100
101
protected
:
102
// hide copy constructor and assignment operaor as protected
103
G4ParticleChangeForGamma
(
const
G4ParticleChangeForGamma
&
right
);
104
G4ParticleChangeForGamma
&
operator=
(
const
G4ParticleChangeForGamma
&right);
105
106
private
:
107
108
const
G4Track
*
currentTrack
;
109
// The pointer to G4Track
110
111
G4double
proposedKinEnergy
;
112
// The final kinetic energy of the current particle.
113
114
G4ThreeVector
proposedMomentumDirection
;
115
// The final momentum direction of the current particle.
116
117
G4ThreeVector
proposedPolarization
;
118
// The final polarization of the current particle.
119
};
120
121
// ------------------------------------------------------------
122
123
inline
G4double
G4ParticleChangeForGamma::GetProposedKineticEnergy
()
const
124
{
125
return
proposedKinEnergy
;
126
}
127
128
inline
void
G4ParticleChangeForGamma::SetProposedKineticEnergy
(
G4double
energy
)
129
{
130
proposedKinEnergy
=
energy
;
131
}
132
133
inline
134
const
G4ThreeVector
&
G4ParticleChangeForGamma::GetProposedMomentumDirection
()
const
135
{
136
return
proposedMomentumDirection
;
137
}
138
139
inline
140
void
G4ParticleChangeForGamma::ProposeMomentumDirection
(
const
G4ThreeVector
&
dir
)
141
{
142
proposedMomentumDirection
=
dir
;
143
}
144
145
inline
146
void
G4ParticleChangeForGamma::ProposeMomentumDirection
(
G4double
Px,
G4double
Py,
G4double
Pz)
147
{
148
proposedMomentumDirection
.
setX
(Px);
149
proposedMomentumDirection
.
setY
(Py);
150
proposedMomentumDirection
.
setZ
(Pz);
151
}
152
153
inline
const
G4Track
*
G4ParticleChangeForGamma::GetCurrentTrack
()
const
154
{
155
return
currentTrack
;
156
}
157
158
inline
159
const
G4ThreeVector
&
G4ParticleChangeForGamma::GetProposedPolarization
()
const
160
{
161
return
proposedPolarization
;
162
}
163
164
inline
165
void
G4ParticleChangeForGamma::ProposePolarization
(
const
G4ThreeVector
&
dir
)
166
{
167
proposedPolarization
=
dir
;
168
}
169
170
inline
171
void
G4ParticleChangeForGamma::ProposePolarization
(
G4double
Px,
G4double
Py,
G4double
Pz)
172
{
173
proposedPolarization
.
setX
(Px);
174
proposedPolarization
.
setY
(Py);
175
proposedPolarization
.
setZ
(Pz);
176
}
177
178
inline
void
G4ParticleChangeForGamma::InitializeForPostStep
(
const
G4Track
&
track
)
179
{
180
theStatusChange
= track.
GetTrackStatus
();
181
theLocalEnergyDeposit
= 0.0;
182
theNonIonizingEnergyDeposit
= 0.0;
183
InitializeSecondaries
(track);
184
theParentWeight
= track.
GetWeight
();
185
isParentWeightProposed
=
false
;
186
proposedKinEnergy
= track.
GetKineticEnergy
();
187
proposedMomentumDirection
= track.
GetMomentumDirection
();
188
proposedPolarization
= track.
GetPolarization
();
189
currentTrack
= &
track
;
190
}
191
192
#endif
193
geant4
tree
geant4-10.6-release
source
track
include
G4ParticleChangeForGamma.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:53
using
1.8.2 with
ECCE GitHub integration