//
// ********************************************************************
// * DISCLAIMER                                                       *
// *                                                                  *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in:                      *
// *   http://cern.ch/geant4/license                                  *
// *                                                                  *
// * 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.                                                             *
// *                                                                  *
// * This  code  implementation is the  intellectual property  of the *
// * GEANT4 collaboration.                                            *
// * By copying,  distributing  or modifying the Program (or any work *
// * based  on  the Program)  you indicate  your  acceptance of  this *
// * statement, and all its terms.                                    *
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.icc,v 1.10 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02-ref-01 $
//
// 
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
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);
//  InitializeLocalEnergyDeposit(track);
  InitializeSteppingControl(track);
//  InitializeTrueStepLength(track);
//  InitializeSecondaries(track);

  // set Energy/Momentum etc. equal to those of the parent particle
  const G4DynamicParticle*  pParticle = track.GetDynamicParticle();
//  theEnergyChange          = pParticle->GetKineticEnergy();
//  theMomentumChange        = pParticle->GetMomentumDirection();
    thePolarizationChange    = pParticle->GetPolarization();
//  theProperTimeChange      = pParticle->GetProperTime();

  // set Position/Time etc. equal to those of the parent track
//  thePositionChange      = track.GetPosition();
//  theTimeChange          = track.GetGlobalTime();

  // set touchable equal to the next touchable of the parent track
  // not set as for now
  //theTouchableChange     = track.GetNextTouchable();

// So almost nothing is initialized here.
// theMomentumChange, theProperTimeChange, thePositionChange and theTimeChange
// are set by G4Transportation::AlongStepDoIt;
// the others are not needed.
// Take care when implementing the PostStep related things!
// (P. Urban)
}

// Prototype implementation of smooth representation of curved trajectories.

inline void
G4ParticleChangeForTransport::
SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>*
                                     theNewVectorPointer )
{
  fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
}

inline std::vector<G4ThreeVector>*
G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
{
  return fpVectorOfAuxiliaryPointsPointer;
}


// Following methods will be removed in release 7.0
inline 
 void G4ParticleChangeForTransport::SetMaterialChange(G4Material* fMaterial)
{
  theMaterialChange =   fMaterial;
}

inline 
 G4Material* G4ParticleChangeForTransport::GetMaterialChange() const
{
  return theMaterialChange;
}

inline 
 void G4ParticleChangeForTransport::SetMaterialCutsCoupleChange(const G4MaterialCutsCouple* fMaterialCutsCouple)
{
  theMaterialCutsCoupleChange =   fMaterialCutsCouple;
}

inline 
 const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleChange() const
{
  return theMaterialCutsCoupleChange;
}









