Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
G4ParticleChangeForGamma Class Reference

#include <G4ParticleChangeForGamma.hh>

Inheritance diagram for G4ParticleChangeForGamma:
G4VParticleChange

Public Member Functions

 G4ParticleChangeForGamma ()
 
virtual ~G4ParticleChangeForGamma ()
 
G4StepUpdateStepForAtRest (G4Step *pStep)
 
G4StepUpdateStepForPostStep (G4Step *Step)
 
void InitializeForPostStep (const G4Track &)
 
void AddSecondary (G4DynamicParticle *aParticle)
 
G4double GetProposedKineticEnergy () const
 
void SetProposedKineticEnergy (G4double proposedKinEnergy)
 
const G4ThreeVectorGetProposedMomentumDirection () const
 
void ProposeMomentumDirection (G4double Px, G4double Py, G4double Pz)
 
void ProposeMomentumDirection (const G4ThreeVector &Pfinal)
 
const G4ThreeVectorGetProposedPolarization () const
 
void ProposePolarization (const G4ThreeVector &dir)
 
void ProposePolarization (G4double Px, G4double Py, G4double Pz)
 
const G4TrackGetCurrentTrack () const
 
virtual void DumpInfo () const
 
virtual G4bool CheckIt (const G4Track &)
 
- Public Member Functions inherited from G4VParticleChange
 G4VParticleChange ()
 
virtual ~G4VParticleChange ()
 
G4bool operator== (const G4VParticleChange &right) const
 
G4bool operator!= (const G4VParticleChange &right) const
 
virtual G4StepUpdateStepForAlongStep (G4Step *Step)
 
virtual void Initialize (const G4Track &)
 
G4double GetTrueStepLength () const
 
void ProposeTrueStepLength (G4double truePathLength)
 
G4double GetLocalEnergyDeposit () const
 
void ProposeLocalEnergyDeposit (G4double anEnergyPart)
 
G4double GetNonIonizingEnergyDeposit () const
 
void ProposeNonIonizingEnergyDeposit (G4double anEnergyPart)
 
G4TrackStatus GetTrackStatus () const
 
void ProposeTrackStatus (G4TrackStatus status)
 
G4SteppingControl GetSteppingControl () const
 
void ProposeSteppingControl (G4SteppingControl StepControlFlag)
 
G4bool GetFirstStepInVolume () const
 
G4bool GetLastStepInVolume () const
 
void ProposeFirstStepInVolume (G4bool flag)
 
void ProposeLastStepInVolume (G4bool flag)
 
void Clear ()
 
void SetNumberOfSecondaries (G4int totSecondaries)
 
G4int GetNumberOfSecondaries () const
 
G4TrackGetSecondary (G4int anIndex) const
 
void AddSecondary (G4Track *aSecondary)
 
G4double GetWeight () const
 
G4double GetParentWeight () const
 
void ProposeWeight (G4double finalWeight)
 
void ProposeParentWeight (G4double finalWeight)
 
void SetSecondaryWeightByProcess (G4bool)
 
G4bool IsSecondaryWeightSetByProcess () const
 
void SetParentWeightByProcess (G4bool)
 
G4bool IsParentWeightSetByProcess () const
 
void SetVerboseLevel (G4int vLevel)
 
G4int GetVerboseLevel () const
 
void ClearDebugFlag ()
 
void SetDebugFlag ()
 
G4bool GetDebugFlag () const
 

Protected Member Functions

 G4ParticleChangeForGamma (const G4ParticleChangeForGamma &right)
 
G4ParticleChangeForGammaoperator= (const G4ParticleChangeForGamma &right)
 
- Protected Member Functions inherited from G4VParticleChange
 G4VParticleChange (const G4VParticleChange &right)
 
G4VParticleChangeoperator= (const G4VParticleChange &right)
 
G4StepUpdateStepInfo (G4Step *Step)
 
void InitializeTrueStepLength (const G4Track &)
 
void InitializeLocalEnergyDeposit (const G4Track &)
 
void InitializeSteppingControl (const G4Track &)
 
void InitializeParentWeight (const G4Track &)
 
void InitializeParentGlobalTime (const G4Track &)
 
void InitializeStatusChange (const G4Track &)
 
void InitializeSecondaries (const G4Track &)
 
void InitializeStepInVolumeFlags (const G4Track &)
 
G4bool CheckSecondary (G4Track &)
 
G4double GetAccuracyForWarning () const
 
G4double GetAccuracyForException () const
 

Additional Inherited Members

- Protected Attributes inherited from G4VParticleChange
G4TrackFastVectortheListOfSecondaries
 
G4int theNumberOfSecondaries
 
G4int theSizeOftheListOfSecondaries
 
G4TrackStatus theStatusChange
 
G4SteppingControl theSteppingControlFlag
 
G4double theLocalEnergyDeposit
 
G4double theNonIonizingEnergyDeposit
 
G4double theTrueStepLength
 
G4bool theFirstStepInVolume
 
G4bool theLastStepInVolume
 
G4double theParentWeight
 
G4bool isParentWeightProposed
 
G4bool fSetSecondaryWeightByProcess
 
G4double theParentGlobalTime
 
G4int verboseLevel
 
G4bool debugFlag
 
- Static Protected Attributes inherited from G4VParticleChange
static const G4double accuracyForWarning = 1.0e-9
 
static const G4double accuracyForException = 0.001
 

Detailed Description

Definition at line 58 of file G4ParticleChangeForGamma.hh.

Constructor & Destructor Documentation

G4ParticleChangeForGamma::G4ParticleChangeForGamma ( )

Definition at line 49 of file G4ParticleChangeForGamma.cc.

References G4VParticleChange::debugFlag, G4cout, G4endl, NormalCondition, G4VParticleChange::theSteppingControlFlag, and G4VParticleChange::verboseLevel.

50  : G4VParticleChange(), currentTrack(0), proposedKinEnergy(0.)
51 {
53  debugFlag = false;
54 #ifdef G4VERBOSE
55  if (verboseLevel>2) {
56  G4cout << "G4ParticleChangeForGamma::G4ParticleChangeForGamma() " << G4endl;
57  }
58 #endif
59 }
G4GLOB_DLL std::ostream G4cout
G4SteppingControl theSteppingControlFlag
#define G4endl
Definition: G4ios.hh:61
G4ParticleChangeForGamma::~G4ParticleChangeForGamma ( )
virtual

Definition at line 61 of file G4ParticleChangeForGamma.cc.

References G4cout, G4endl, and G4VParticleChange::verboseLevel.

62 {
63 #ifdef G4VERBOSE
64  if (verboseLevel>2) {
65  G4cout << "G4ParticleChangeForGamma::~G4ParticleChangeForGamma() " << G4endl;
66  }
67 #endif
68 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4ParticleChangeForGamma::G4ParticleChangeForGamma ( const G4ParticleChangeForGamma right)
protected

Definition at line 70 of file G4ParticleChangeForGamma.cc.

References G4cout, G4endl, and G4VParticleChange::verboseLevel.

71  : G4VParticleChange(right)
72 {
73  if (verboseLevel>1)
74  G4cout << "G4ParticleChangeForGamma:: copy constructor is called " << G4endl;
75 
76  currentTrack = right.currentTrack;
77  proposedKinEnergy = right.proposedKinEnergy;
78  proposedMomentumDirection = right.proposedMomentumDirection;
79  proposedPolarization = right.proposedPolarization;
80 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

void G4ParticleChangeForGamma::AddSecondary ( G4DynamicParticle aParticle)

Definition at line 123 of file G4ParticleChangeForGamma.cc.

References G4VParticleChange::AddSecondary(), G4Track::GetGlobalTime(), G4Track::GetPosition(), G4Track::GetTouchableHandle(), and G4Track::SetTouchableHandle().

Referenced by G4eplusPolarizedAnnihilation::AtRestDoIt().

124 {
125  // create track
126  G4Track* aTrack = new G4Track(aParticle, currentTrack->GetGlobalTime(),
127  currentTrack->GetPosition());
128 
129  // Touchable handle is copied to keep the pointer
130  aTrack->SetTouchableHandle(currentTrack->GetTouchableHandle());
131 
132  // add a secondary
134 }
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
void AddSecondary(G4Track *aSecondary)
const G4TouchableHandle & GetTouchableHandle() const
G4bool G4ParticleChangeForGamma::CheckIt ( const G4Track aTrack)
virtual

Reimplemented from G4VParticleChange.

Definition at line 199 of file G4ParticleChangeForGamma.cc.

References G4VParticleChange::accuracyForException, G4VParticleChange::accuracyForWarning, G4VParticleChange::CheckIt(), DumpInfo(), EventMustBeAborted, G4cout, G4endl, G4Exception(), G4Track::GetDefinition(), G4Track::GetKineticEnergy(), G4ParticleDefinition::GetParticleName(), G4Track::GetPosition(), python.hepunit::m, python.hepunit::MeV, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

200 {
201  G4bool itsOK = true;
202  G4bool exitWithError = false;
203 
204  G4double accuracy;
205 
206  // Energy should not be lager than initial value
207  accuracy = ( proposedKinEnergy - aTrack.GetKineticEnergy())/MeV;
208  if (accuracy > accuracyForWarning) {
209  itsOK = false;
210  exitWithError = (accuracy > accuracyForException);
211 #ifdef G4VERBOSE
212  G4cout << "G4ParticleChangeForGamma::CheckIt: ";
213  G4cout << "KinEnergy become larger than the initial value!"
214  << " Difference: " << accuracy << "[MeV] " <<G4endl;
215  G4cout << aTrack.GetDefinition()->GetParticleName()
216  << " E=" << aTrack.GetKineticEnergy()/MeV
217  << " pos=" << aTrack.GetPosition().x()/m
218  << ", " << aTrack.GetPosition().y()/m
219  << ", " << aTrack.GetPosition().z()/m
220  << G4endl;
221 #endif
222  }
223 
224  // dump out information of this particle change
225 #ifdef G4VERBOSE
226  if (!itsOK) DumpInfo();
227 #endif
228 
229  // Exit with error
230  if (exitWithError) {
231  G4Exception("G4ParticleChangeForGamma::CheckIt",
232  "TRACK004",EventMustBeAborted,
233  "energy was illegal");
234  }
235 
236  //correction
237  if (!itsOK) {
238  proposedKinEnergy = aTrack.GetKineticEnergy();
239  }
240 
241  itsOK = (itsOK) && G4VParticleChange::CheckIt(aTrack);
242  return itsOK;
243 }
G4ParticleDefinition * GetDefinition() const
double x() const
const G4ThreeVector & GetPosition() const
const G4String & GetParticleName() const
double z() const
static const G4double accuracyForException
virtual G4bool CheckIt(const G4Track &)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
double y() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const G4double accuracyForWarning
void G4ParticleChangeForGamma::DumpInfo ( ) const
virtual

Reimplemented from G4VParticleChange.

Definition at line 181 of file G4ParticleChangeForGamma.cc.

References G4VParticleChange::DumpInfo(), G4cout, G4endl, and python.hepunit::MeV.

Referenced by CheckIt().

182 {
183 // use base-class DumpInfo
185 
186  G4int oldprc = G4cout.precision(3);
187  G4cout << " Kinetic Energy (MeV): "
188  << std::setw(20) << proposedKinEnergy/MeV
189  << G4endl;
190  G4cout << " Momentum Direction: "
191  << std::setw(20) << proposedMomentumDirection
192  << G4endl;
193  G4cout << " Polarization: "
194  << std::setw(20) << proposedPolarization
195  << G4endl;
196  G4cout.precision(oldprc);
197 }
virtual void DumpInfo() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4Track * G4ParticleChangeForGamma::GetCurrentTrack ( ) const
inline
G4double G4ParticleChangeForGamma::GetProposedKineticEnergy ( ) const
inline

Definition at line 124 of file G4ParticleChangeForGamma.hh.

Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), and G4VEmProcess::PostStepDoIt().

125 {
126  return proposedKinEnergy;
127 }
const G4ThreeVector & G4ParticleChangeForGamma::GetProposedMomentumDirection ( ) const
inline

Definition at line 135 of file G4ParticleChangeForGamma.hh.

Referenced by G4EmBiasingManager::ApplySecondaryBiasing().

136 {
137  return proposedMomentumDirection;
138 }
const G4ThreeVector & G4ParticleChangeForGamma::GetProposedPolarization ( ) const
inline

Definition at line 160 of file G4ParticleChangeForGamma.hh.

161 {
162  return proposedPolarization;
163 }
void G4ParticleChangeForGamma::InitializeForPostStep ( const G4Track track)
inline

Definition at line 179 of file G4ParticleChangeForGamma.hh.

References G4Track::GetKineticEnergy(), G4Track::GetMomentumDirection(), G4Track::GetPolarization(), G4Track::GetTrackStatus(), G4Track::GetWeight(), G4VParticleChange::InitializeSecondaries(), G4VParticleChange::isParentWeightProposed, G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNonIonizingEnergyDeposit, G4VParticleChange::theParentWeight, and G4VParticleChange::theStatusChange.

Referenced by G4eplusPolarizedAnnihilation::AtRestDoIt(), G4eplusAnnihilation::AtRestDoIt(), and G4VEmProcess::PostStepDoIt().

180 {
182  theLocalEnergyDeposit = 0.0;
184  InitializeSecondaries(track);
185  theParentWeight = track.GetWeight();
186  isParentWeightProposed = false;
187  proposedKinEnergy = track.GetKineticEnergy();
188  proposedMomentumDirection = track.GetMomentumDirection();
189  proposedPolarization = track.GetPolarization();
190  currentTrack = &track;
191 }
const G4ThreeVector & GetPolarization() const
G4TrackStatus GetTrackStatus() const
G4double GetKineticEnergy() const
void InitializeSecondaries(const G4Track &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetWeight() const
G4TrackStatus theStatusChange
G4double theNonIonizingEnergyDeposit
G4ParticleChangeForGamma & G4ParticleChangeForGamma::operator= ( const G4ParticleChangeForGamma right)
protected

Definition at line 83 of file G4ParticleChangeForGamma.cc.

References G4cout, G4endl, G4FastVector< Type, N >::SetElement(), G4VParticleChange::theListOfSecondaries, G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNumberOfSecondaries, G4VParticleChange::theParentWeight, G4VParticleChange::theStatusChange, G4VParticleChange::theSteppingControlFlag, and G4VParticleChange::verboseLevel.

85 {
86 #ifdef G4VERBOSE
87  if (verboseLevel>1)
88  G4cout << "G4ParticleChangeForGamma:: assignment operator is called " << G4endl;
89 #endif
90 
91  if (this != &right) {
92  if (theNumberOfSecondaries>0) {
93 #ifdef G4VERBOSE
94  if (verboseLevel>0) {
95  G4cout << "G4ParticleChangeForGamma: assignment operator Warning ";
96  G4cout << "theListOfSecondaries is not empty ";
97  }
98 #endif
99  for (G4int index= 0; index<theNumberOfSecondaries; index++){
100  if ( (*theListOfSecondaries)[index] ) delete (*theListOfSecondaries)[index] ;
101  }
102  }
103  delete theListOfSecondaries;
105  theNumberOfSecondaries = right.theNumberOfSecondaries;
106  for (G4int index = 0; index<theNumberOfSecondaries; index++){
107  G4Track* newTrack = new G4Track(*((*right.theListOfSecondaries)[index] ));
108  theListOfSecondaries->SetElement(index, newTrack); }
109 
114 
115  currentTrack = right.currentTrack;
116  proposedKinEnergy = right.proposedKinEnergy;
117  proposedMomentumDirection = right.proposedMomentumDirection;
118  proposedPolarization = right.proposedPolarization;
119  }
120  return *this;
121 }
void SetElement(G4int anIndex, Type *anElement)
Definition: G4FastVector.hh:76
G4TrackFastVector * theListOfSecondaries
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4SteppingControl theSteppingControlFlag
G4FastVector< G4Track, G4TrackFastVectorSize > G4TrackFastVector
#define G4endl
Definition: G4ios.hh:61
G4TrackStatus theStatusChange
void G4ParticleChangeForGamma::ProposeMomentumDirection ( G4double  Px,
G4double  Py,
G4double  Pz 
)
inline

Definition at line 147 of file G4ParticleChangeForGamma.hh.

References CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), G4DNAChampionElasticModel::SampleSecondaries(), G4DNAEmfietzoglouExcitationModel::SampleSecondaries(), MyKleinNishinaCompton::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), G4DNABornExcitationModel::SampleSecondaries(), G4XrayRayleighModel::SampleSecondaries(), G4DNASancheExcitationModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermorePolarizedGammaConversionModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4MicroElecElasticModel::SampleSecondaries(), G4MuElecElasticModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4PenelopeRayleighModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4HeatedKleinNishinaCompton::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4MicroElecInelasticModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4eSingleCoulombScatteringModel::SampleSecondaries(), G4IonCoulombScatteringModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), and G4eCoulombScatteringModel::SampleSecondaries().

148 {
149  proposedMomentumDirection.setX(Px);
150  proposedMomentumDirection.setY(Py);
151  proposedMomentumDirection.setZ(Pz);
152 }
void setY(double)
void setZ(double)
void setX(double)
void G4ParticleChangeForGamma::ProposeMomentumDirection ( const G4ThreeVector Pfinal)
inline

Definition at line 141 of file G4ParticleChangeForGamma.hh.

142 {
143  proposedMomentumDirection = dir;
144 }
void G4ParticleChangeForGamma::ProposePolarization ( const G4ThreeVector dir)
inline
void G4ParticleChangeForGamma::ProposePolarization ( G4double  Px,
G4double  Py,
G4double  Pz 
)
inline

Definition at line 172 of file G4ParticleChangeForGamma.hh.

References CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

173 {
174  proposedPolarization.setX(Px);
175  proposedPolarization.setY(Py);
176  proposedPolarization.setZ(Pz);
177 }
void setY(double)
void setZ(double)
void setX(double)
void G4ParticleChangeForGamma::SetProposedKineticEnergy ( G4double  proposedKinEnergy)
inline

Definition at line 129 of file G4ParticleChangeForGamma.hh.

References energy().

Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), G4ElectronCapture::PostStepDoIt(), G4DNAChampionElasticModel::SampleSecondaries(), G4DNAEmfietzoglouExcitationModel::SampleSecondaries(), G4DNABornExcitationModel::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), MyKleinNishinaCompton::SampleSecondaries(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4XrayRayleighModel::SampleSecondaries(), G4BoldyshevTripletModel::SampleSecondaries(), G4DNAMeltonAttachmentModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4DNASancheExcitationModel::SampleSecondaries(), G4LivermoreNuclearGammaConversionModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4LivermoreGammaConversionModelRC::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermorePolarizedGammaConversionModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4MicroElecElasticModel::SampleSecondaries(), G4DNAOneStepSolvatationModel::SampleSecondaries(), G4MuElecElasticModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4PenelopeAnnihilationModel::SampleSecondaries(), G4PenelopeGammaConversionModel::SampleSecondaries(), G4PenelopeRayleighModel::SampleSecondaries(), G4HeatedKleinNishinaCompton::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4MicroElecInelasticModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4BetheHeitlerModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4PairProductionRelModel::SampleSecondaries(), G4PolarizedAnnihilationModel::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4eSingleCoulombScatteringModel::SampleSecondaries(), G4IonCoulombScatteringModel::SampleSecondaries(), G4eeToTwoGammaModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), and G4eCoulombScatteringModel::SampleSecondaries().

130 {
131  proposedKinEnergy = energy;
132 }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4Step * G4ParticleChangeForGamma::UpdateStepForAtRest ( G4Step pStep)
virtual

Reimplemented from G4VParticleChange.

Definition at line 140 of file G4ParticleChangeForGamma.cc.

References G4Step::AddTotalEnergyDeposit(), G4Step::GetPostStepPoint(), G4VParticleChange::isParentWeightProposed, G4Step::SetStepLength(), G4StepPoint::SetWeight(), G4VParticleChange::theLocalEnergyDeposit, and G4VParticleChange::theParentWeight.

141 {
143  pStep->SetStepLength( 0.0 );
144 
147  }
148 
149  return pStep;
150 }
void SetStepLength(G4double value)
void SetWeight(G4double aValue)
G4StepPoint * GetPostStepPoint() const
void AddTotalEnergyDeposit(G4double value)
G4Step * G4ParticleChangeForGamma::UpdateStepForPostStep ( G4Step Step)
virtual

Reimplemented from G4VParticleChange.

Definition at line 152 of file G4ParticleChangeForGamma.cc.

References G4Step::AddNonIonizingEnergyDeposit(), G4Step::AddTotalEnergyDeposit(), G4Track::CalculateVelocity(), G4Track::GetParticleDefinition(), G4ParticleDefinition::GetPDGMass(), G4Step::GetPostStepPoint(), G4Step::GetTrack(), G4VParticleChange::isParentWeightProposed, G4StepPoint::SetKineticEnergy(), G4StepPoint::SetMomentumDirection(), G4StepPoint::SetPolarization(), G4StepPoint::SetVelocity(), G4StepPoint::SetWeight(), G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNonIonizingEnergyDeposit, and G4VParticleChange::theParentWeight.

153 {
154  G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
155  G4Track* pTrack = pStep->GetTrack();
156 
157  pPostStepPoint->SetKineticEnergy( proposedKinEnergy );
158  pPostStepPoint->SetMomentumDirection( proposedMomentumDirection );
159  pPostStepPoint->SetPolarization( proposedPolarization );
160 
161  // update velocity for scattering process and particles with mass
162  if(proposedKinEnergy > 0.0) {
163  if(pTrack->GetParticleDefinition()->GetPDGMass() > 0.0) {
164  pPostStepPoint->SetVelocity(pTrack->CalculateVelocity());
165  }
166  }
167 
169  pPostStepPoint->SetWeight( theParentWeight );
170  }
171 
172  pStep->AddTotalEnergyDeposit( theLocalEnergyDeposit );
173  pStep->AddNonIonizingEnergyDeposit( theNonIonizingEnergyDeposit );
174  return pStep;
175 }
void SetWeight(G4double aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
void SetPolarization(const G4ThreeVector &aValue)
const G4ParticleDefinition * GetParticleDefinition() const
G4double CalculateVelocity() const
Definition: G4Track.cc:214
G4double GetPDGMass() const
void SetVelocity(G4double v)
void SetKineticEnergy(const G4double aValue)
G4double theNonIonizingEnergyDeposit

The documentation for this class was generated from the following files: