Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:51

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4ParticleChangeForTransport inline methods implementation
0027 //
0028 // Author: Hisaya Kurashige, 10 May 1998
0029 // --------------------------------------------------------------------
0030 
0031 inline void G4ParticleChangeForTransport::SetTouchableHandle(
0032   const G4TouchableHandle& fTouchable)
0033 {
0034   theTouchableHandle = fTouchable;
0035 }
0036 
0037 inline const G4TouchableHandle&
0038 G4ParticleChangeForTransport::GetTouchableHandle() const
0039 {
0040   return theTouchableHandle;
0041 }
0042 
0043 inline void G4ParticleChangeForTransport::SetMaterialInTouchable(
0044   G4Material* fMaterial)
0045 {
0046   theMaterialChange = fMaterial;
0047 }
0048 
0049 inline G4Material* G4ParticleChangeForTransport::GetMaterialInTouchable() const
0050 {
0051   return theMaterialChange;
0052 }
0053 
0054 inline void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable(
0055   const G4MaterialCutsCouple* fMaterialCutsCouple)
0056 {
0057   theMaterialCutsCoupleChange = fMaterialCutsCouple;
0058 }
0059 
0060 inline const G4MaterialCutsCouple*
0061 G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable() const
0062 {
0063   return theMaterialCutsCoupleChange;
0064 }
0065 
0066 inline void G4ParticleChangeForTransport::SetSensitiveDetectorInTouchable(
0067   G4VSensitiveDetector* fSensitiveDetector)
0068 {
0069   theSensitiveDetectorChange = fSensitiveDetector;
0070 }
0071 
0072 inline G4VSensitiveDetector*
0073 G4ParticleChangeForTransport::GetSensitiveDetectorInTouchable() const
0074 {
0075   return theSensitiveDetectorChange;
0076 }
0077 
0078 inline G4bool G4ParticleChangeForTransport::GetMomentumChanged() const
0079 {
0080   return isMomentumChanged;
0081 }
0082 
0083 inline void G4ParticleChangeForTransport::SetMomentumChanged(G4bool b)
0084 {
0085   isMomentumChanged = b;
0086 }
0087 
0088 //----------------------------------------------------------------
0089 // functions for Initialization
0090 //
0091 
0092 inline void G4ParticleChangeForTransport::Initialize(const G4Track& track)
0093 {
0094   // use base class's method at first
0095   InitializeStatusChange(track);
0096   InitializeSteppingControl();
0097 
0098   // set Energy/Momentum etc. equal to those of the parent particle
0099   const G4DynamicParticle* pParticle = track.GetDynamicParticle();
0100   theVelocityChange     = track.GetVelocity();
0101   isVelocityChanged     = false;
0102   thePolarizationChange = pParticle->GetPolarization();
0103 
0104   // set TimeChange equal to local time of the parent track
0105   theLocalTime0 = theTimeChange = track.GetLocalTime();
0106   // set initial Global time of the parent track
0107   theGlobalTime0 = track.GetGlobalTime();
0108 }
0109 
0110 inline void G4ParticleChangeForTransport::SetPointerToVectorOfAuxiliaryPoints(
0111   std::vector<G4ThreeVector>* theNewVectorPointer)
0112 {
0113   fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
0114 }
0115 
0116 inline std::vector<G4ThreeVector>*
0117 G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
0118 {
0119   return fpVectorOfAuxiliaryPointsPointer;
0120 }