Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
+65 -117
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4StepPoint.hh,v 1.4 1999/11/07 16:32:02 kurasige Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4StepPoint.hh,v 1.6 2000/06/01 02:28:57 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -24,6 +24,7 @@
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
// ---------------------------------------------------------------
// Added fpMaterial 16 FEb. 2000 H.Kurahige
#ifndef G4StepPoint_h
#define G4StepPoint_h 1
@@ -50,90 +51,51 @@ class G4StepPoint
// Constructor/Destructor
G4StepPoint();
~G4StepPoint();
~G4StepPoint(){};
//--------
public: // with description
public: // with description
// Get/Set functions
inline const G4ThreeVector& GetPosition() const
{ return fPosition; }
inline void SetPosition(const G4ThreeVector& aValue)
{ fPosition = aValue; }
inline void AddPosition(const G4ThreeVector& aValue)
{ fPosition += aValue; }
// Position where the track locates
inline G4double GetLocalTime() const
{ return fLocalTime; }
inline void SetLocalTime(const G4double aValue)
{ fLocalTime = aValue; }
inline void AddLocalTime(const G4double aValue)
{ fLocalTime += aValue; }
const G4ThreeVector& GetPosition() const;
void SetPosition(const G4ThreeVector& aValue);
void AddPosition(const G4ThreeVector& aValue);
G4double GetLocalTime() const;
void SetLocalTime(const G4double aValue);
void AddLocalTime(const G4double aValue);
// Time since the track is created.
inline G4double GetGlobalTime() const
{ return fGlobalTime; }
inline void SetGlobalTime(const G4double aValue)
{ fGlobalTime = aValue; }
inline void AddGlobalTime(const G4double aValue)
{ fGlobalTime += aValue; }
G4double GetGlobalTime() const;
void SetGlobalTime(const G4double aValue);
void AddGlobalTime(const G4double aValue);
// Time since the event in which the track belongs is created.
inline G4double GetProperTime() const
{ return fProperTime; }
inline void SetProperTime(const G4double aValue)
{ fProperTime = aValue; }
inline void AddProperTime(const G4double aValue)
{ fProperTime += aValue; }
G4double GetProperTime() const;
void SetProperTime(const G4double aValue);
void AddProperTime(const G4double aValue);
// Proper time of the particle.
inline const G4ThreeVector& GetMomentumDirection() const
{ return fMomentumDirection; }
inline void SetMomentumDirection(const G4ThreeVector& aValue)
{ fMomentumDirection = aValue;
}
inline void AddMomentumDirection(const G4ThreeVector& aValue)
{ fMomentumDirection += aValue;
}
const G4ThreeVector& GetMomentumDirection() const;
void SetMomentumDirection(const G4ThreeVector& aValue);
void AddMomentumDirection(const G4ThreeVector& aValue);
// Direction of momentum (should be an unit vector)
inline G4ThreeVector GetMomentum() const
{
G4double tMomentum = sqrt(fKineticEnergy*fKineticEnergy +
2*fKineticEnergy*fMass);
return G4ThreeVector(fMomentumDirection.x()*tMomentum,
fMomentumDirection.y()*tMomentum,
fMomentumDirection.z()*tMomentum);
}
// Total momentum of the track
G4ThreeVector GetMomentum() const;
// Total momentum of the track
inline G4double GetTotalEnergy() const
{
return fKineticEnergy + fMass;
}
G4double GetTotalEnergy() const;
// Total energy of the track
inline G4double GetKineticEnergy() const
{ return fKineticEnergy; }
inline void SetKineticEnergy(const G4double aValue)
{ fKineticEnergy = aValue; }
inline void AddKineticEnergy(const G4double aValue)
{ fKineticEnergy += aValue; }
G4double GetKineticEnergy() const;
void SetKineticEnergy(const G4double aValue);
void AddKineticEnergy(const G4double aValue);
// Kinetic Energy of the track
inline G4double GetVelocity() const
{
if(fMass==0.){
return c_light;
}
else{
G4double tMomentum = sqrt(fKineticEnergy*fKineticEnergy +
2.0*fKineticEnergy*fMass);
G4double tTotalEnergy = fKineticEnergy + fMass;
return tMomentum/tTotalEnergy*c_light;
}
}
G4double GetVelocity() const;
// This velocity is the velocity as if in vacuum.
// (So it is not corrected for the refraction index
// in the case of photons - optical or X-rays.)
@@ -141,68 +103,51 @@ class G4StepPoint
// GetVelocity of G4Track.
//
inline G4double GetBeta() const
{ return (fMass==0.) ?
1.0 :
sqrt(fKineticEnergy*fKineticEnergy + 2.0*fKineticEnergy*fMass)
/(fKineticEnergy+fMass); }
G4double GetBeta() const;
// Velocity of the track in unit of c(light velocity)
inline G4double GetGamma() const
{ return (fMass==0.) ? DBL_MAX : (fKineticEnergy+fMass)/fMass; }
G4double GetGamma() const;
// Gamma factor (1/sqrt[1-beta*beta]) of the track
inline G4VPhysicalVolume* GetPhysicalVolume()
{ return fpTouchable->GetVolume(); }
G4VPhysicalVolume* GetPhysicalVolume() const;
inline G4VTouchable* GetTouchable() const
{ return fpTouchable; }
inline void SetTouchable(G4VTouchable* apValue)
{ fpTouchable = apValue; }
const G4VTouchable* GetTouchable() const;
void SetTouchable(const G4VTouchable* apValue);
inline G4double GetSafety() const
{ return fSafety; }
inline void SetSafety(const G4double aValue)
{ fSafety = aValue; }
G4Material* GetMaterial() const;
void SetMaterial(G4Material*);
inline const G4ThreeVector& GetPolarization() const
{ return fPolarization; }
inline void SetPolarization(const G4ThreeVector& aValue)
{ fPolarization = aValue; }
inline void AddPolarization(const G4ThreeVector& aValue)
{ fPolarization += aValue; }
G4double GetSafety() const;
void SetSafety(const G4double aValue);
inline G4StepStatus GetStepStatus() const
{ return fStepStatus; }
inline void SetStepStatus(const G4StepStatus aValue)
{ fStepStatus = aValue; }
const G4ThreeVector& GetPolarization() const;
void SetPolarization(const G4ThreeVector& aValue);
void AddPolarization(const G4ThreeVector& aValue);
inline const G4VProcess* GetProcessDefinedStep() const
{ return fpProcessDefinedStep; }
G4StepStatus GetStepStatus() const;
void SetStepStatus(const G4StepStatus aValue);
const G4VProcess* GetProcessDefinedStep() const;
// If the pointer is 0, this means the Step is defined
// by the user defined limit in the current volume.
inline void SetProcessDefinedStep(G4VProcess* aValue)
{ fpProcessDefinedStep = aValue; }
void SetProcessDefinedStep(G4VProcess* aValue);
inline G4double GetMass() const
{ return fMass; }
inline void SetMass(G4double value)
{ fMass = value; }
G4double GetMass() const;
void SetMass(G4double value);
inline G4double GetCharge() const
{ return fCharge; }
inline void SetCharge(G4double value)
{ fCharge = value; }
G4double GetCharge() const;
void SetCharge(G4double value);
inline G4Material* GetMaterial()
{ return fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial(); }
inline void SetWeight(G4double aValue)
{ fWeight = aValue; }
inline G4double GetWeight() const
{ return fWeight; }
void SetWeight(G4double aValue);
G4double GetWeight() const;
public:
// copy constructor and assignment operaor as protected
G4StepPoint(const G4StepPoint &right);
G4StepPoint & operator=(const G4StepPoint &right);
//---------
private:
@@ -218,7 +163,9 @@ class G4StepPoint
// Time since track is created (in rest frame of particle)
G4ThreeVector fMomentumDirection;
G4double fKineticEnergy;
G4VTouchable* fpTouchable;
const G4VTouchable* fpTouchable;
G4Material* fpMaterial;
// Material of the volmue
G4double fSafety;
G4ThreeVector fPolarization;
G4StepStatus fStepStatus;
@@ -230,8 +177,9 @@ class G4StepPoint
G4double fCharge;
// Dynamical Charge of the particle
G4double fWeight;
// Track Weight
};
#include "G4StepPoint.icc"
#endif