G4ParticleChangeForTransport.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 inline 
00031  void G4ParticleChangeForTransport::SetTouchableHandle(const G4TouchableHandle& 
00032 fTouchable)
00033 {
00034   theTouchableHandle =   fTouchable;
00035 }
00036 
00037 inline 
00038  const G4TouchableHandle& G4ParticleChangeForTransport::GetTouchableHandle() const
00039 {
00040   return theTouchableHandle;
00041 }
00042 
00043 
00044 inline 
00045  void G4ParticleChangeForTransport::SetMaterialInTouchable(G4Material* fMaterial)
00046 {
00047   theMaterialChange =   fMaterial;
00048 }
00049 
00050 inline 
00051  G4Material* G4ParticleChangeForTransport::GetMaterialInTouchable() const
00052 {
00053   return theMaterialChange;
00054 }
00055 
00056 inline 
00057  void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple* fMaterialCutsCouple)
00058 {
00059   theMaterialCutsCoupleChange =   fMaterialCutsCouple;
00060 }
00061 
00062 inline 
00063  const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable() const
00064 {
00065   return theMaterialCutsCoupleChange;
00066 }
00067 
00068 inline 
00069  void G4ParticleChangeForTransport::SetSensitiveDetectorInTouchable(G4VSensitiveDetector* fSensitiveDetector)
00070 {
00071   theSensitiveDetectorChange =   fSensitiveDetector;
00072 }
00073 
00074 inline 
00075  G4VSensitiveDetector* G4ParticleChangeForTransport::GetSensitiveDetectorInTouchable() const
00076 {
00077   return theSensitiveDetectorChange;
00078 }
00079 
00080 inline
00081 G4bool G4ParticleChangeForTransport::GetMomentumChanged() const 
00082 {
00083   return isMomentumChanged;
00084 }
00085 
00086 inline
00087 void G4ParticleChangeForTransport::SetMomentumChanged(G4bool b)
00088 {
00089   isMomentumChanged= b;
00090 }
00091 
00092 //----------------------------------------------------------------
00093 // functions for Initialization
00094 //
00095 
00096 inline void G4ParticleChangeForTransport::Initialize(const G4Track& track)
00097 {
00098   // use base class's method at first
00099   InitializeStatusChange(track);
00100 //  InitializeLocalEnergyDeposit(track);
00101   InitializeSteppingControl(track);
00102 //  InitializeTrueStepLength(track);
00103 //  InitializeSecondaries(track);
00104 
00105   // set Energy/Momentum etc. equal to those of the parent particle
00106   const G4DynamicParticle*  pParticle = track.GetDynamicParticle();
00107 //  theEnergyChange          = pParticle->GetKineticEnergy();
00108 //  theMomentumChange        = pParticle->GetMomentumDirection();
00109     theVelocityChange          = track.GetVelocity();
00110     isVelocityChanged          = false;
00111     thePolarizationChange    = pParticle->GetPolarization();
00112 //  theProperTimeChange      = pParticle->GetProperTime();
00113 
00114   // set Position/Time etc. equal to those of the parent track
00115   //  thePositionChange      = track.GetPosition();
00116   // set TimeChange equal to local time of the parent track
00117   theTimeChange                = track.GetLocalTime();
00118   // set initial Local/Global time of the parent track
00119   theLocalTime0           = track.GetLocalTime();
00120   theGlobalTime0          = track.GetGlobalTime();
00121 
00122   // set touchable equal to the next touchable of the parent track
00123   // not set as for now
00124   //theTouchableChange     = track.GetNextTouchable();
00125 
00126 // So almost nothing is initialized here.
00127 // theMomentumChange, theProperTimeChange, thePositionChange and theTimeChange
00128 // are set by G4Transportation::AlongStepDoIt;
00129 // the others are not needed.
00130 // Take care when implementing the PostStep related things!
00131 // (P. Urban)
00132 }
00133 
00134 // Prototype implementation of smooth representation of curved trajectories.
00135 
00136 inline void
00137 G4ParticleChangeForTransport::
00138 SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>*
00139                                      theNewVectorPointer )
00140 {
00141   fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
00142 }
00143 
00144 inline std::vector<G4ThreeVector>*
00145 G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
00146 {
00147   return fpVectorOfAuxiliaryPointsPointer;
00148 }
00149 
00150 
00151 
00152 
00153 
00154 

Generated on Mon May 27 17:49:16 2013 for Geant4 by  doxygen 1.4.7