Files
geant4/source/track/include/G4ParticleChangeForTransport.icc
2022-12-09 14:43:28 +01:00

121 lines
4.2 KiB
Plaintext

//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4ParticleChangeForTransport inline methods implementation
//
// Author: Hisaya Kurashige, 10 May 1998
// --------------------------------------------------------------------
inline void G4ParticleChangeForTransport::SetTouchableHandle(
const G4TouchableHandle& fTouchable)
{
theTouchableHandle = fTouchable;
}
inline const G4TouchableHandle&
G4ParticleChangeForTransport::GetTouchableHandle() const
{
return theTouchableHandle;
}
inline void G4ParticleChangeForTransport::SetMaterialInTouchable(
G4Material* fMaterial)
{
theMaterialChange = fMaterial;
}
inline G4Material* G4ParticleChangeForTransport::GetMaterialInTouchable() const
{
return theMaterialChange;
}
inline void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable(
const G4MaterialCutsCouple* fMaterialCutsCouple)
{
theMaterialCutsCoupleChange = fMaterialCutsCouple;
}
inline const G4MaterialCutsCouple*
G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable() const
{
return theMaterialCutsCoupleChange;
}
inline void G4ParticleChangeForTransport::SetSensitiveDetectorInTouchable(
G4VSensitiveDetector* fSensitiveDetector)
{
theSensitiveDetectorChange = fSensitiveDetector;
}
inline G4VSensitiveDetector*
G4ParticleChangeForTransport::GetSensitiveDetectorInTouchable() const
{
return theSensitiveDetectorChange;
}
inline G4bool G4ParticleChangeForTransport::GetMomentumChanged() const
{
return isMomentumChanged;
}
inline void G4ParticleChangeForTransport::SetMomentumChanged(G4bool b)
{
isMomentumChanged = b;
}
//----------------------------------------------------------------
// functions for Initialization
//
inline void G4ParticleChangeForTransport::Initialize(const G4Track& track)
{
// use base class's method at first
InitializeStatusChange(track);
InitializeSteppingControl();
// set Energy/Momentum etc. equal to those of the parent particle
const G4DynamicParticle* pParticle = track.GetDynamicParticle();
theVelocityChange = track.GetVelocity();
isVelocityChanged = false;
thePolarizationChange = pParticle->GetPolarization();
// set TimeChange equal to local time of the parent track
theLocalTime0 = theTimeChange = track.GetLocalTime();
// set initial Global time of the parent track
theGlobalTime0 = track.GetGlobalTime();
}
inline void G4ParticleChangeForTransport::SetPointerToVectorOfAuxiliaryPoints(
std::vector<G4ThreeVector>* theNewVectorPointer)
{
fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
}
inline std::vector<G4ThreeVector>*
G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
{
return fpVectorOfAuxiliaryPointsPointer;
}