Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleChangeForTransport Class Referencefinal

#include <G4ParticleChangeForTransport.hh>

+ Inheritance diagram for G4ParticleChangeForTransport:

Public Member Functions

 G4ParticleChangeForTransport ()
 
 ~G4ParticleChangeForTransport () override=default
 
 G4ParticleChangeForTransport (const G4ParticleChangeForTransport &right)=delete
 
G4ParticleChangeForTransportoperator= (const G4ParticleChangeForTransport &right)=delete
 
G4StepUpdateStepForAlongStep (G4Step *Step) final
 
G4StepUpdateStepForAtRest (G4Step *Step) final
 
G4StepUpdateStepForPostStep (G4Step *Step) final
 
void Initialize (const G4Track &) final
 
const G4TouchableHandleGetTouchableHandle () const
 
void SetTouchableHandle (const G4TouchableHandle &fTouchable)
 
G4MaterialGetMaterialInTouchable () const
 
void SetMaterialInTouchable (G4Material *fMaterial)
 
const G4MaterialCutsCoupleGetMaterialCutsCoupleInTouchable () const
 
void SetMaterialCutsCoupleInTouchable (const G4MaterialCutsCouple *fMaterialCutsCouple)
 
G4VSensitiveDetectorGetSensitiveDetectorInTouchable () const
 
void SetSensitiveDetectorInTouchable (G4VSensitiveDetector *fSensitiveDetector)
 
G4bool GetMomentumChanged () const
 
void SetMomentumChanged (G4bool b)
 
void SetPointerToVectorOfAuxiliaryPoints (std::vector< G4ThreeVector > *vec)
 
std::vector< G4ThreeVector > * GetPointerToVectorOfAuxiliaryPoints () const
 
void DumpInfo () const final
 
- Public Member Functions inherited from G4ParticleChange
 G4ParticleChange ()
 
 ~G4ParticleChange () override=default
 
 G4ParticleChange (const G4ParticleChange &right)=delete
 
G4ParticleChangeoperator= (const G4ParticleChange &right)=delete
 
G4StepUpdateStepForAlongStep (G4Step *Step) override
 
G4StepUpdateStepForAtRest (G4Step *Step) override
 
G4StepUpdateStepForPostStep (G4Step *Step) override
 
void Initialize (const G4Track &) override
 
const G4ThreeVectorGetMomentumDirection () const
 
void ProposeMomentumDirection (G4double Px, G4double Py, G4double Pz)
 
void ProposeMomentumDirection (const G4ThreeVector &Pfinal)
 
const G4ThreeVectorGetPolarization () const
 
void ProposePolarization (G4double Px, G4double Py, G4double Pz)
 
void ProposePolarization (const G4ThreeVector &finalPoralization)
 
G4double GetEnergy () const
 
void ProposeEnergy (G4double finalEnergy)
 
G4double GetVelocity () const
 
void ProposeVelocity (G4double finalVelocity)
 
G4double GetProperTime () const
 
void ProposeProperTime (G4double finalProperTime)
 
const G4ThreeVectorGetPosition () const
 
void ProposePosition (G4double x, G4double y, G4double z)
 
void ProposePosition (const G4ThreeVector &finalPosition)
 
void ProposeGlobalTime (G4double t)
 
void ProposeLocalTime (G4double t)
 
G4double GetGlobalTime (G4double timeDelay=0.0) const
 
G4double GetLocalTime (G4double timeDelay=0.0) const
 
G4double GetMass () const
 
void ProposeMass (G4double finalMass)
 
G4double GetCharge () const
 
void ProposeCharge (G4double finalCharge)
 
G4double GetMagneticMoment () const
 
void ProposeMagneticMoment (G4double finalMagneticMoment)
 
G4ThreeVector GetGlobalPosition (const G4ThreeVector &displacement) const
 
G4ThreeVector CalcMomentum (G4double energy, G4ThreeVector direction, G4double mass) const
 
void AddSecondary (G4Track *aSecondary)
 
void AddSecondary (G4DynamicParticle *aSecondary, G4bool IsGoodForTracking=false)
 
void AddSecondary (G4DynamicParticle *aSecondary, G4ThreeVector position, G4bool IsGoodForTracking=false)
 
void AddSecondary (G4DynamicParticle *aSecondary, G4double time, G4bool IsGoodForTracking=false)
 
void DumpInfo () const override
 
- Public Member Functions inherited from G4VParticleChange
 G4VParticleChange ()
 
virtual ~G4VParticleChange ()=default
 
 G4VParticleChange (const G4VParticleChange &right)=delete
 
G4VParticleChangeoperator= (const G4VParticleChange &right)=delete
 
virtual G4StepUpdateStepForAtRest (G4Step *Step)
 
virtual G4StepUpdateStepForAlongStep (G4Step *Step)
 
virtual G4StepUpdateStepForPostStep (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)
 
const G4TrackGetCurrentTrack () const
 
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
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int vLevel)
 
G4int GetVerboseLevel () const
 
virtual G4bool CheckIt (const G4Track &)
 
void ClearDebugFlag ()
 
void SetDebugFlag ()
 
G4bool GetDebugFlag () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4ParticleChange
G4StepUpdateStepInfo (G4Step *Step)
 
- Protected Member Functions inherited from G4VParticleChange
G4StepUpdateStepInfo (G4Step *Step)
 
void InitializeLocalEnergyDeposit ()
 
void InitializeSteppingControl ()
 
void InitializeParentWeight (const G4Track &)
 
void InitializeStatusChange (const G4Track &)
 
void InitializeSecondaries ()
 
void InitializeFromStep (const G4Step *)
 
G4double ComputeBeta (G4double kinEnergy)
 
G4bool CheckSecondary (G4Track &)
 
G4double GetAccuracyForWarning () const
 
G4double GetAccuracyForException () const
 
- Protected Attributes inherited from G4ParticleChange
G4ThreeVector theMomentumDirectionChange
 
G4ThreeVector thePolarizationChange
 
G4double theEnergyChange = 0.0
 
G4double theVelocityChange = 0.0
 
G4bool isVelocityChanged = false
 
G4ThreeVector thePositionChange
 
G4double theGlobalTime0 = 0.0
 
G4double theLocalTime0 = 0.0
 
G4double theTimeChange = 0.0
 
G4double theProperTimeChange = 0.0
 
G4double theMassChange = 0.0
 
G4double theChargeChange = 0.0
 
G4double theMagneticMomentChange = 0.0
 
- Protected Attributes inherited from G4VParticleChange
const G4TracktheCurrentTrack = nullptr
 
std::vector< G4Track * > theListOfSecondaries
 
G4TrackStatus theStatusChange = fAlive
 
G4SteppingControl theSteppingControlFlag = NormalCondition
 
G4double theLocalEnergyDeposit = 0.0
 
G4double theNonIonizingEnergyDeposit = 0.0
 
G4double theTrueStepLength = 0.0
 
G4double theParentWeight = 1.0
 
G4double theParentGlobalTime = 0.0
 
G4int theNumberOfSecondaries = 0
 
G4int theSizeOftheListOfSecondaries = 0
 
G4int verboseLevel = 1
 
G4int nError = 0
 
G4bool theFirstStepInVolume = false
 
G4bool theLastStepInVolume = false
 
G4bool isParentWeightProposed = false
 
G4bool fSetSecondaryWeightByProcess = false
 
G4bool debugFlag = false
 
- Static Protected Attributes inherited from G4VParticleChange
static const G4double accuracyForWarning = 1.0e-9
 
static const G4double accuracyForException = 0.001
 
static const G4int maxError = 10
 

Detailed Description

Definition at line 45 of file G4ParticleChangeForTransport.hh.

Constructor & Destructor Documentation

◆ G4ParticleChangeForTransport() [1/2]

G4ParticleChangeForTransport::G4ParticleChangeForTransport ( )

Definition at line 39 of file G4ParticleChangeForTransport.cc.

40{
41 // Disable flag that is enabled in G4VParticleChange if G4VERBOSE.
42 debugFlag = false;
43}

◆ ~G4ParticleChangeForTransport()

G4ParticleChangeForTransport::~G4ParticleChangeForTransport ( )
overridedefault

◆ G4ParticleChangeForTransport() [2/2]

G4ParticleChangeForTransport::G4ParticleChangeForTransport ( const G4ParticleChangeForTransport right)
delete

Member Function Documentation

◆ DumpInfo()

void G4ParticleChangeForTransport::DumpInfo ( ) const
finalvirtual

Reimplemented from G4ParticleChange.

Definition at line 138 of file G4ParticleChangeForTransport.cc.

139{
140 // use base-class DumpInfo
142 G4cout << " Touchable (pointer) : " << std::setw(20)
143 << theTouchableHandle() << G4endl;
144}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void DumpInfo() const override

◆ GetMaterialCutsCoupleInTouchable()

const G4MaterialCutsCouple * G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable ( ) const
inline

◆ GetMaterialInTouchable()

G4Material * G4ParticleChangeForTransport::GetMaterialInTouchable ( ) const
inline

◆ GetMomentumChanged()

G4bool G4ParticleChangeForTransport::GetMomentumChanged ( ) const
inline

◆ GetPointerToVectorOfAuxiliaryPoints()

std::vector< G4ThreeVector > * G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints ( ) const
inline

◆ GetSensitiveDetectorInTouchable()

G4VSensitiveDetector * G4ParticleChangeForTransport::GetSensitiveDetectorInTouchable ( ) const
inline

◆ GetTouchableHandle()

const G4TouchableHandle & G4ParticleChangeForTransport::GetTouchableHandle ( ) const
inline

◆ Initialize()

void G4ParticleChangeForTransport::Initialize ( const G4Track )
finalvirtual

◆ operator=()

G4ParticleChangeForTransport & G4ParticleChangeForTransport::operator= ( const G4ParticleChangeForTransport right)
delete

◆ SetMaterialCutsCoupleInTouchable()

void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable ( const G4MaterialCutsCouple fMaterialCutsCouple)
inline

◆ SetMaterialInTouchable()

void G4ParticleChangeForTransport::SetMaterialInTouchable ( G4Material fMaterial)
inline

◆ SetMomentumChanged()

void G4ParticleChangeForTransport::SetMomentumChanged ( G4bool  b)
inline

◆ SetPointerToVectorOfAuxiliaryPoints()

void G4ParticleChangeForTransport::SetPointerToVectorOfAuxiliaryPoints ( std::vector< G4ThreeVector > *  vec)
inline

◆ SetSensitiveDetectorInTouchable()

void G4ParticleChangeForTransport::SetSensitiveDetectorInTouchable ( G4VSensitiveDetector fSensitiveDetector)
inline

◆ SetTouchableHandle()

void G4ParticleChangeForTransport::SetTouchableHandle ( const G4TouchableHandle fTouchable)
inline

◆ UpdateStepForAlongStep()

G4Step * G4ParticleChangeForTransport::UpdateStepForAlongStep ( G4Step Step)
finalvirtual

Reimplemented from G4ParticleChange.

Definition at line 53 of file G4ParticleChangeForTransport.cc.

54{
55 // Smooth curved tajectory representation: let the Step know about
56 // the auxiliary trajectory points (jacek 30/10/2002)
57 pStep->SetPointerToVectorOfAuxiliaryPoints(fpVectorOfAuxiliaryPointsPointer);
58
59 // Most of the code assumes that transportation is always the first process,
60 // so the pre- and post-step point are still equal.
61 G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
62 G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
63
64 // update momentum direction and energy
65 if(isMomentumChanged)
66 {
68 pPostStepPoint->SetKineticEnergy(theEnergyChange);
69 }
71 pPostStepPoint->SetVelocity(theVelocityChange);
72
73 // update polarization
75
76 // update position and time
77 pPostStepPoint->SetPosition(thePositionChange);
78 pPostStepPoint->AddGlobalTime(theTimeChange - pPreStepPoint->GetLocalTime());
79 pPostStepPoint->AddLocalTime(theTimeChange - pPreStepPoint->GetLocalTime());
80 pPostStepPoint->SetProperTime(theProperTimeChange);
81
82#ifdef G4VERBOSE
84#endif
85
86 // Update the G4Step specific attributes
87 pStep->SetStepLength( theTrueStepLength );
88 pStep->SetControlFlag(theSteppingControlFlag);
89
90 return pStep;
91}
G4ThreeVector thePositionChange
G4ThreeVector theMomentumDirectionChange
G4double theProperTimeChange
G4ThreeVector thePolarizationChange
void SetKineticEnergy(const G4double aValue)
void SetVelocity(G4double v)
void SetProperTime(const G4double aValue)
void AddGlobalTime(const G4double aValue)
G4double GetLocalTime() const
void SetPosition(const G4ThreeVector &aValue)
void AddLocalTime(const G4double aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
void SetPolarization(const G4ThreeVector &aValue)
virtual G4bool CheckIt(const G4Track &)
G4SteppingControl theSteppingControlFlag
const G4Track * theCurrentTrack

◆ UpdateStepForAtRest()

G4Step * G4ParticleChangeForTransport::UpdateStepForAtRest ( G4Step Step)
finalvirtual

Reimplemented from G4ParticleChange.

Definition at line 46 of file G4ParticleChangeForTransport.cc.

47{
48 // Update the G4Step specific attributes
49 return UpdateStepInfo(pStep);
50}
G4Step * UpdateStepInfo(G4Step *Step)

◆ UpdateStepForPostStep()

G4Step * G4ParticleChangeForTransport::UpdateStepForPostStep ( G4Step Step)
finalvirtual

Reimplemented from G4ParticleChange.

Definition at line 94 of file G4ParticleChangeForTransport.cc.

95{
96 // A physics process always calculates the final state of the particle
97
98 // Change volume only if some kinetic energy remains
99 G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
100 if(pPostStepPoint->GetKineticEnergy() > 0.0)
101 {
102 // update next touchable
103 // (touchable can be changed only at PostStepDoIt)
104 pPostStepPoint->SetTouchableHandle(theTouchableHandle);
105
106 pPostStepPoint->SetMaterial(theMaterialChange);
107 pPostStepPoint->SetMaterialCutsCouple(theMaterialCutsCoupleChange);
108 pPostStepPoint->SetSensitiveDetector(theSensitiveDetectorChange);
109 }
110 if(this->GetFirstStepInVolume())
111 {
112 pStep->SetFirstStepFlag();
113 }
114 else
115 {
116 pStep->ClearFirstStepFlag();
117 }
118 if(this->GetLastStepInVolume())
119 {
120 pStep->SetLastStepFlag();
121 }
122 else
123 {
124 pStep->ClearLastStepFlag();
125 }
126 // It used to call base class's method
127 // - but this would copy uninitialised data members
128 // return G4ParticleChange::UpdateStepForPostStep(pStep);
129
130 // Copying what the base class does would instead
131 // - also not useful
132 // return G4VParticleChange::UpdateStepInfo(pStep);
133
134 return pStep;
135}
void SetSensitiveDetector(G4VSensitiveDetector *)
void SetMaterial(G4Material *)
void SetTouchableHandle(const G4TouchableHandle &apValue)
void SetMaterialCutsCouple(const G4MaterialCutsCouple *)
G4double GetKineticEnergy() const
G4bool GetFirstStepInVolume() const
G4bool GetLastStepInVolume() const

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