Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -31,94 +31,67 @@
|
||||
|
||||
// Author: Hisaya Kurashige, 23 March 1998
|
||||
// Revision: Vladimir Ivantchenko, 16 January 2004
|
||||
// 24 August 2022
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ParticleChangeForLoss_hh
|
||||
#define G4ParticleChangeForLoss_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
|
||||
class G4DynamicParticle;
|
||||
|
||||
class G4ParticleChangeForLoss : public G4VParticleChange
|
||||
class G4ParticleChangeForLoss final : public G4VParticleChange
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
G4ParticleChangeForLoss();
|
||||
// Default constructor
|
||||
G4ParticleChangeForLoss();
|
||||
|
||||
virtual ~G4ParticleChangeForLoss();
|
||||
// Destructor
|
||||
~G4ParticleChangeForLoss() override = default;
|
||||
|
||||
G4ParticleChangeForLoss(const G4ParticleChangeForLoss& right) = delete;
|
||||
G4ParticleChangeForLoss& operator=(const G4ParticleChangeForLoss& right) = delete;
|
||||
|
||||
// --- the following methods are for updating G4Step -----
|
||||
|
||||
G4Step* UpdateStepForAlongStep(G4Step* Step);
|
||||
G4Step* UpdateStepForPostStep(G4Step* Step);
|
||||
// A physics process gives the final state of the particle
|
||||
// based on information of G4Track
|
||||
G4Step* UpdateStepForAlongStep(G4Step* step) final;
|
||||
G4Step* UpdateStepForPostStep(G4Step* step) final;
|
||||
|
||||
void InitializeForAlongStep(const G4Track&);
|
||||
void InitializeForPostStep(const G4Track&);
|
||||
// Initialize all properties by using G4Track information
|
||||
// Initialize all used properties
|
||||
inline void InitializeForAlongStep(const G4Track&);
|
||||
inline void InitializeForPostStep(const G4Track&);
|
||||
|
||||
inline G4double GetProposedCharge() const;
|
||||
inline void SetProposedCharge(G4double theCharge);
|
||||
// Get/Set theCharge
|
||||
// Get/Set dynamic charge
|
||||
inline G4double GetProposedCharge() const;
|
||||
inline void SetProposedCharge(G4double theCharge);
|
||||
|
||||
inline G4double GetCharge() const;
|
||||
inline void ProposeCharge(G4double finalCharge);
|
||||
// Get/Propose the final dynamical charge in G4DynamicParticle
|
||||
// Get/Set the final kinetic energy of the current particle
|
||||
inline G4double GetProposedKineticEnergy() const;
|
||||
inline void SetProposedKineticEnergy(G4double proposedKinEnergy);
|
||||
|
||||
inline G4double GetProposedKineticEnergy() const;
|
||||
inline void SetProposedKineticEnergy(G4double proposedKinEnergy);
|
||||
// Get/Set the final kinetic energy of the current particle
|
||||
// Get/Propose the MomentumDirection vector: it is the final momentum
|
||||
// direction
|
||||
inline const G4ThreeVector& GetProposedMomentumDirection() const;
|
||||
inline void SetProposedMomentumDirection(const G4ThreeVector& dir);
|
||||
inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
|
||||
|
||||
inline const G4ThreeVector& GetProposedMomentumDirection() const;
|
||||
inline void SetProposedMomentumDirection(const G4ThreeVector& dir);
|
||||
inline const G4ThreeVector& GetMomentumDirection() const;
|
||||
inline void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
|
||||
inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
|
||||
// Get/Propose the MomentumDirection vector: it is the final momentum
|
||||
// direction
|
||||
inline const G4ThreeVector& GetProposedPolarization() const;
|
||||
inline void ProposePolarization(const G4ThreeVector& dir);
|
||||
inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
|
||||
|
||||
inline const G4ThreeVector& GetProposedPolarization() const;
|
||||
inline void ProposePolarization(const G4ThreeVector& dir);
|
||||
inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
|
||||
void DumpInfo() const final;
|
||||
|
||||
inline const G4Track* GetCurrentTrack() const;
|
||||
private:
|
||||
|
||||
inline void SetLowEnergyLimit(G4double elimit);
|
||||
G4double proposedKinEnergy = 0.0;
|
||||
// The final kinetic energy of the current particle
|
||||
|
||||
virtual void DumpInfo() const;
|
||||
|
||||
virtual G4bool CheckIt(const G4Track&);
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForLoss(const G4ParticleChangeForLoss& right);
|
||||
G4ParticleChangeForLoss& operator=(const G4ParticleChangeForLoss& right);
|
||||
// Hidden copy constructor and assignment operator
|
||||
|
||||
private:
|
||||
|
||||
const G4Track* currentTrack = nullptr;
|
||||
// The pointer to G4Track
|
||||
|
||||
G4double proposedKinEnergy = 0.0;
|
||||
// The final kinetic energy of the current particle
|
||||
|
||||
G4double lowEnergyLimit = 0.0;
|
||||
// The limit kinetic energy below which particle is stopped
|
||||
|
||||
G4double currentCharge = 0.0;
|
||||
G4double currentCharge = 0.0;
|
||||
// The final charge of the current particle
|
||||
|
||||
G4ThreeVector proposedMomentumDirection;
|
||||
// The final momentum direction of the current particle
|
||||
G4ThreeVector proposedMomentumDirection;
|
||||
// The final momentum direction of the current particle
|
||||
|
||||
G4ThreeVector proposedPolarization;
|
||||
// The final polarization of the current particle
|
||||
G4ThreeVector proposedPolarization;
|
||||
// The final polarization of the current particle
|
||||
};
|
||||
|
||||
// ----------------------
|
||||
@@ -137,14 +110,7 @@ void G4ParticleChangeForLoss::SetProposedKineticEnergy(G4double energy)
|
||||
proposedKinEnergy = energy;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4ParticleChangeForLoss::GetProposedCharge() const
|
||||
{
|
||||
return currentCharge;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4ParticleChangeForLoss::GetCharge() const
|
||||
inline G4double G4ParticleChangeForLoss::GetProposedCharge() const
|
||||
{
|
||||
return currentCharge;
|
||||
}
|
||||
@@ -155,12 +121,6 @@ void G4ParticleChangeForLoss::SetProposedCharge(G4double theCharge)
|
||||
currentCharge = theCharge;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::ProposeCharge(G4double theCharge)
|
||||
{
|
||||
currentCharge = theCharge;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4ThreeVector&
|
||||
G4ParticleChangeForLoss::GetProposedMomentumDirection() const
|
||||
@@ -168,12 +128,6 @@ G4ParticleChangeForLoss::GetProposedMomentumDirection() const
|
||||
return proposedMomentumDirection;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4ThreeVector& G4ParticleChangeForLoss::GetMomentumDirection() const
|
||||
{
|
||||
return proposedMomentumDirection;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::ProposeMomentumDirection(const G4ThreeVector& dir)
|
||||
{
|
||||
@@ -187,22 +141,6 @@ G4ParticleChangeForLoss::SetProposedMomentumDirection(const G4ThreeVector& dir)
|
||||
proposedMomentumDirection = dir;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::ProposeMomentumDirection(G4double Px,
|
||||
G4double Py,
|
||||
G4double Pz)
|
||||
{
|
||||
proposedMomentumDirection.setX(Px);
|
||||
proposedMomentumDirection.setY(Py);
|
||||
proposedMomentumDirection.setZ(Pz);
|
||||
}
|
||||
|
||||
inline
|
||||
const G4Track* G4ParticleChangeForLoss::GetCurrentTrack() const
|
||||
{
|
||||
return currentTrack;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4ThreeVector& G4ParticleChangeForLoss::GetProposedPolarization() const
|
||||
{
|
||||
@@ -215,49 +153,30 @@ void G4ParticleChangeForLoss::ProposePolarization(const G4ThreeVector& dir)
|
||||
proposedPolarization = dir;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::ProposePolarization(G4double Px,
|
||||
G4double Py,
|
||||
G4double Pz)
|
||||
inline void G4ParticleChangeForLoss::ProposePolarization(G4double Px,
|
||||
G4double Py,
|
||||
G4double Pz)
|
||||
{
|
||||
proposedPolarization.setX(Px);
|
||||
proposedPolarization.setY(Py);
|
||||
proposedPolarization.setZ(Pz);
|
||||
proposedPolarization.set(Px, Py, Pz);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::InitializeForAlongStep(const G4Track& track)
|
||||
{
|
||||
theStatusChange = track.GetTrackStatus();
|
||||
theLocalEnergyDeposit = 0.0;
|
||||
theNonIonizingEnergyDeposit = 0.0;
|
||||
InitializeSecondaries(track);
|
||||
theParentWeight = track.GetWeight();
|
||||
// isParentWeightProposed = false;
|
||||
InitializeSecondaries();
|
||||
InitializeLocalEnergyDeposit();
|
||||
InitializeParentWeight(track);
|
||||
InitializeStatusChange(track);
|
||||
proposedKinEnergy = track.GetKineticEnergy();
|
||||
currentCharge = track.GetDynamicParticle()->GetCharge();
|
||||
currentCharge = track.GetDynamicParticle()->GetCharge();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::InitializeForPostStep(const G4Track& track)
|
||||
{
|
||||
theStatusChange = track.GetTrackStatus();
|
||||
theLocalEnergyDeposit = 0.0;
|
||||
theNonIonizingEnergyDeposit = 0.0;
|
||||
InitializeSecondaries(track);
|
||||
theParentWeight = track.GetWeight();
|
||||
// isParentWeightProposed = false;
|
||||
proposedKinEnergy = track.GetKineticEnergy();
|
||||
currentCharge = track.GetDynamicParticle()->GetCharge();
|
||||
InitializeForAlongStep(track);
|
||||
proposedMomentumDirection = track.GetMomentumDirection();
|
||||
proposedPolarization = track.GetPolarization();
|
||||
currentTrack = &track;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleChangeForLoss::SetLowEnergyLimit(G4double elimit)
|
||||
{
|
||||
lowEnergyLimit = elimit;
|
||||
proposedPolarization = track.GetPolarization();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user