Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -154,45 +154,53 @@ inline void G4Step::SetTrack(G4Track* value)
|
||||
|
||||
inline void G4Step::InitializeStep(G4Track* aValue)
|
||||
{
|
||||
fpTrack = aValue;
|
||||
fpTrack->SetStepLength(0.);
|
||||
|
||||
// Initialize G4Step attributes
|
||||
fStepLength = 0.;
|
||||
fTotalEnergyDeposit = 0.;
|
||||
fNonIonizingEnergyDeposit = 0.;
|
||||
fpTrack = aValue;
|
||||
fpTrack->SetStepLength(0.);
|
||||
|
||||
nSecondaryByLastStep = 0;
|
||||
|
||||
// Initialize G4StepPoint attributes.
|
||||
// To avoid the circular dependency between G4Track, G4Step
|
||||
// and G4StepPoint, G4Step has to manage the copy actions.
|
||||
fpPreStepPoint->SetPosition(fpTrack->GetPosition());
|
||||
fpPreStepPoint->SetGlobalTime(fpTrack->GetGlobalTime());
|
||||
fpPreStepPoint->SetLocalTime(fpTrack->GetLocalTime());
|
||||
fpPreStepPoint->SetProperTime(fpTrack->GetProperTime());
|
||||
fpPreStepPoint->SetMomentumDirection(fpTrack->GetMomentumDirection());
|
||||
fpPreStepPoint->SetKineticEnergy(fpTrack->GetKineticEnergy());
|
||||
fpPreStepPoint->SetTouchableHandle(fpTrack->GetTouchableHandle());
|
||||
fpPreStepPoint->SetMaterial(
|
||||
fpTrack->GetTouchable()->GetVolume()->GetLogicalVolume()->GetMaterial());
|
||||
fpPreStepPoint->SetMaterialCutsCouple(fpTrack->GetTouchable()
|
||||
->GetVolume()
|
||||
->GetLogicalVolume()
|
||||
->GetMaterialCutsCouple());
|
||||
fpPreStepPoint->SetSensitiveDetector(fpTrack->GetTouchable()
|
||||
->GetVolume()
|
||||
->GetLogicalVolume()
|
||||
->GetSensitiveDetector());
|
||||
fpPreStepPoint->SetPolarization(fpTrack->GetPolarization());
|
||||
fpPreStepPoint->SetSafety(0.);
|
||||
fpPreStepPoint->SetStepStatus(fUndefined);
|
||||
//
|
||||
fpPreStepPoint->SetSafety(0.0);
|
||||
fpPreStepPoint->SetProcessDefinedStep(0);
|
||||
fpPreStepPoint->SetMass(fpTrack->GetDynamicParticle()->GetMass());
|
||||
fpPreStepPoint->SetCharge(fpTrack->GetDynamicParticle()->GetCharge());
|
||||
fpPreStepPoint->SetWeight(fpTrack->GetWeight());
|
||||
fpPreStepPoint->SetStepStatus(fUndefined);
|
||||
|
||||
// Set Velocity
|
||||
// should be placed after SetMaterial for preStep point
|
||||
// G4Track properties
|
||||
|
||||
fpPreStepPoint->SetWeight(fpTrack->GetWeight());
|
||||
fpPreStepPoint->SetPosition(fpTrack->GetPosition());
|
||||
fpPreStepPoint->SetLocalTime(fpTrack->GetLocalTime());
|
||||
fpPreStepPoint->SetGlobalTime(fpTrack->GetGlobalTime());
|
||||
|
||||
// G4Track properties (via G4DynamicParticle)
|
||||
|
||||
auto pParticle = fpTrack->GetDynamicParticle();
|
||||
|
||||
fpPreStepPoint->SetMass(pParticle->GetMass());
|
||||
fpPreStepPoint->SetCharge(pParticle->GetCharge());
|
||||
fpPreStepPoint->SetProperTime(pParticle->GetProperTime());
|
||||
fpPreStepPoint->SetKineticEnergy(pParticle->GetKineticEnergy());
|
||||
fpPreStepPoint->SetMomentumDirection(pParticle->GetMomentumDirection());
|
||||
fpPreStepPoint->SetPolarization(pParticle->GetPolarization());
|
||||
|
||||
// G4Track properties (via G4LogicalVolume)
|
||||
|
||||
auto lvol = fpTrack->GetTouchable()->GetVolume()->GetLogicalVolume();
|
||||
|
||||
fpPreStepPoint->SetTouchableHandle(fpTrack->GetTouchableHandle());
|
||||
|
||||
fpPreStepPoint->SetMaterial(lvol->GetMaterial());
|
||||
fpPreStepPoint->SetMaterialCutsCouple(lvol->GetMaterialCutsCouple());
|
||||
fpPreStepPoint->SetSensitiveDetector(lvol->GetSensitiveDetector());
|
||||
|
||||
// SetVelocity() must be called after SetMaterial() for fpPreStepPoint.
|
||||
fpPreStepPoint->SetVelocity(fpTrack->CalculateVelocity());
|
||||
|
||||
(*fpPostStepPoint) = (*fpPreStepPoint);
|
||||
@@ -206,16 +214,16 @@ inline void G4Step::UpdateTrack()
|
||||
fpTrack->SetPosition(fpPostStepPoint->GetPosition());
|
||||
fpTrack->SetGlobalTime(fpPostStepPoint->GetGlobalTime());
|
||||
fpTrack->SetLocalTime(fpPostStepPoint->GetLocalTime());
|
||||
fpTrack->SetProperTime(fpPostStepPoint->GetProperTime());
|
||||
// energy, momentum, polarization
|
||||
fpTrack->SetMomentumDirection(fpPostStepPoint->GetMomentumDirection());
|
||||
fpTrack->SetKineticEnergy(fpPostStepPoint->GetKineticEnergy());
|
||||
fpTrack->SetPolarization(fpPostStepPoint->GetPolarization());
|
||||
// mass charge
|
||||
// mass, charge, proper time
|
||||
G4DynamicParticle* pParticle =
|
||||
(G4DynamicParticle*) (fpTrack->GetDynamicParticle());
|
||||
pParticle->SetMass(fpPostStepPoint->GetMass());
|
||||
pParticle->SetCharge(fpPostStepPoint->GetCharge());
|
||||
pParticle->SetProperTime(fpPostStepPoint->GetProperTime());
|
||||
// energy, momentum, polarization
|
||||
pParticle->SetMomentumDirection(fpPostStepPoint->GetMomentumDirection());
|
||||
pParticle->SetKineticEnergy(fpPostStepPoint->GetKineticEnergy());
|
||||
pParticle->SetPolarization(fpPostStepPoint->GetPolarization());
|
||||
// step length
|
||||
fpTrack->SetStepLength(fStepLength);
|
||||
// NextTouchable is updated
|
||||
|
||||
@@ -226,11 +226,14 @@ class G4Track
|
||||
const G4VProcess* GetCreatorProcess() const;
|
||||
void SetCreatorProcess(const G4VProcess* aValue);
|
||||
|
||||
inline void SetCreatorModelIndex(G4int idx);
|
||||
|
||||
inline const G4String& GetCreatorModelName() const;
|
||||
|
||||
inline G4int GetCreatorModelID() const;
|
||||
inline void SetCreatorModelID(const G4int id);
|
||||
inline G4int GetCreatorModelID() const;
|
||||
inline G4int GetCreatorModelIndex() const;
|
||||
inline const G4String GetCreatorModelName() const;
|
||||
// Identification of the physics model that created the track:
|
||||
// each of the three information (ID, index, name) is unique
|
||||
// (the model ID and its name are supposed to be used in Geant4
|
||||
// code, whereas the index is meant for plotting in user code)
|
||||
|
||||
G4double GetWeight() const;
|
||||
void SetWeight(G4double aValue);
|
||||
@@ -240,13 +243,13 @@ class G4Track
|
||||
void SetUserInformation(G4VUserTrackInformation* aValue) const;
|
||||
// User information
|
||||
|
||||
void SetAuxiliaryTrackInformation(G4int idx,
|
||||
void SetAuxiliaryTrackInformation(G4int id,
|
||||
G4VAuxiliaryTrackInformation* info) const;
|
||||
G4VAuxiliaryTrackInformation* GetAuxiliaryTrackInformation(G4int idx) const;
|
||||
G4VAuxiliaryTrackInformation* GetAuxiliaryTrackInformation(G4int id) const;
|
||||
inline std::map<G4int, G4VAuxiliaryTrackInformation*>*
|
||||
GetAuxiliaryTrackInformationMap() const;
|
||||
|
||||
void RemoveAuxiliaryTrackInformation(G4int idx);
|
||||
void RemoveAuxiliaryTrackInformation(G4int id);
|
||||
void RemoveAuxiliaryTrackInformation(G4String& name);
|
||||
// Note: G4VAuxiliaryTrackInformation object itself is *NOT* deleted
|
||||
|
||||
@@ -311,8 +314,8 @@ class G4Track
|
||||
G4int fCurrentStepNumber = 0;
|
||||
// Total steps number up to now
|
||||
|
||||
G4int fCreatorModelIndex = -1;
|
||||
// Index of the physics model which created the track
|
||||
G4int fCreatorModelID = -1;
|
||||
// ID of the physics model which created the track
|
||||
|
||||
G4int fParentID = 0;
|
||||
G4int fTrackID = 0;
|
||||
|
||||
@@ -398,19 +398,24 @@ inline void G4Track::SetCreatorProcess(const G4VProcess* aValue)
|
||||
fpCreatorProcess = aValue;
|
||||
}
|
||||
|
||||
inline void G4Track::SetCreatorModelIndex(G4int idx)
|
||||
inline void G4Track::SetCreatorModelID(const G4int id)
|
||||
{
|
||||
fCreatorModelIndex = idx;
|
||||
}
|
||||
|
||||
inline const G4String& G4Track::GetCreatorModelName() const
|
||||
{
|
||||
return G4PhysicsModelCatalog::GetModelName(fCreatorModelIndex);
|
||||
fCreatorModelID = id;
|
||||
}
|
||||
|
||||
inline G4int G4Track::GetCreatorModelID() const
|
||||
{
|
||||
return fCreatorModelIndex;
|
||||
return fCreatorModelID;
|
||||
}
|
||||
|
||||
inline G4int G4Track::GetCreatorModelIndex() const
|
||||
{
|
||||
return G4PhysicsModelCatalog::GetModelIndex(fCreatorModelID);
|
||||
}
|
||||
|
||||
inline const G4String G4Track::GetCreatorModelName() const
|
||||
{
|
||||
return G4PhysicsModelCatalog::GetModelNameFromID(fCreatorModelID);
|
||||
}
|
||||
|
||||
// flag for "Below Threshold"
|
||||
|
||||
Reference in New Issue
Block a user