Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
+51 -50
View File
@@ -23,22 +23,17 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
//---------------------------------------------------------------
//
// G4Step.hh
// G4Step
//
// Class Description:
// This class represents the Step of a particle tracked.
// This class represents the Step of a particle being tracked.
// It includes information of
// 1) List of Step points which compose the Step,
// 2) static information of particle which generated the
// Step,
// 3) trackID and parent particle ID of the Step,
// 4) termination condition of the Step,
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
@@ -52,11 +47,9 @@
// Separate implementation of inline functions inti G4Step.icc
// Add updating mass/charge 6 Oct. 1999 H.Kurashige
// add nonIonizingEnergyLoss 26 Mar. 2007 H.Kurashige
//
// Repository test - Dennis Wright
//
#ifndef G4Step_h
#define G4Step_h 1
// ---------------------------------------------------------------
#ifndef G4Step_hh
#define G4Step_hh 1
#include <stdlib.h> // Include from 'system'
#include <cmath> // Include from 'system'
@@ -79,19 +72,20 @@ class G4Step
//--------
public:
// Constructor/Destrcutor
// Constructor/Destrcutor
G4Step();
~G4Step();
// Copy Counstructor and assignment operator
// Copy Counstructor and assignment operator
G4Step(const G4Step& );
G4Step & operator=(const G4Step &);
//--------
public: // WIth description
public: // with description
// Get/Set functions
// currnet track
// Get/Set functions
// current track
G4Track* GetTrack() const;
void SetTrack(G4Track* value);
@@ -118,7 +112,7 @@ class G4Step
G4double GetNonIonizingEnergyDeposit() const;
void SetNonIonizingEnergyDeposit(G4double value);
// cotrole flag for stepping
// control flag for stepping
G4SteppingControl GetControlFlag() const;
void SetControlFlag(G4SteppingControl StepControlFlag);
@@ -126,14 +120,13 @@ class G4Step
void AddTotalEnergyDeposit(G4double value);
void ResetTotalEnergyDeposit();
// manipulation of non-ionizng energy deposit
// manipulation of non-ionizing energy deposit
void AddNonIonizingEnergyDeposit(G4double value);
void ResetNonIonizingEnergyDeposit();
// Get/Set/Clear flag for initial/last step
// Get/Set/Clear flag for initial/last step
// NOTE: following flags are not used
// will be ready in later release
G4bool IsFirstStepInVolume() const;
G4bool IsLastStepInVolume() const;
@@ -142,7 +135,7 @@ class G4Step
void SetLastStepFlag();
void ClearLastStepFlag();
// difference of position, time, momentum and energy
// difference of position, time, momentum and energy
G4ThreeVector GetDeltaPosition() const;
G4double GetDeltaTime() const;
@@ -153,10 +146,10 @@ class G4Step
G4ThreeVector GetDeltaMomentum() const;
G4double GetDeltaEnergy() const;
// Other member functions
// Other member functions
void InitializeStep( G4Track* aValue );
// initiaize contents of G4Step
// initialize contents of G4Step
void UpdateTrack( );
// update track by using G4Step information
@@ -171,18 +164,20 @@ class G4Step
protected:
//-----------
// Member data
// Member data
G4double fTotalEnergyDeposit;
// Accummulated total energy desposit in the current Step
// Accumulated total energy deposit in the current Step
G4double fNonIonizingEnergyDeposit;
// Accummulated non-ionizing energy desposit in the current Step
// Accumulated non-ionizing energy deposit in the current Step
//---------
private:
//---------
// Member data
// Member data
G4StepPoint* fpPreStepPoint;
G4StepPoint* fpPostStepPoint;
G4double fStepLength;
@@ -191,16 +186,18 @@ class G4Step
G4Track* fpTrack;
//
G4SteppingControl fpSteppingControlFlag;
// A flag to control SteppingManager behavier from process
// A flag to control SteppingManager behavior from process
// flag for initial/last step
G4bool fFirstStepInVolume;
G4bool fLastStepInVolume;
// Secondary buckets
public:
// secodaries in the current step
G4int GetNumberOfSecondariesInCurrentStep() const;
// Secondary buckets
public:
// secondaries in the current step
size_t GetNumberOfSecondariesInCurrentStep() const;
const std::vector<const G4Track*>* GetSecondaryInCurrentStep() const;
@@ -220,32 +217,36 @@ public:
// Add secondary tracks to the bucket
void SetSecondary( G4TrackVector* value);
private:
// Secondaty bucket implemented by using std::vector of G4Track*
private:
// Secondary bucket implemented by using std::vector of G4Track*
G4TrackVector* fSecondary;
// number of secondaries which have been created by the last step
G4int nSecondaryByLastStep;
size_t nSecondaryByLastStep;
typedef const G4Track* CT;
std::vector<CT>* secondaryInCurrentStep;
// Prototyping implementation of smooth representation of curved
// trajectories. (jacek 30/10/2002)
public:
// Auxiliary points are ThreeVectors for now; change to
// G4VAuxiliaryPoints or some such (jacek 30/10/2002)
void SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>* theNewVectorPointer ) {
fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
}
std::vector<G4ThreeVector>* GetPointerToVectorOfAuxiliaryPoints() const {
return fpVectorOfAuxiliaryPointsPointer;
}
private:
// Explicity including the word "Pointer" in the name as I keep
// forgetting the * (jacek 30/10/2002)
std::vector<G4ThreeVector>* fpVectorOfAuxiliaryPointsPointer;
public:
// Auxiliary points are ThreeVectors for now; change to
// G4VAuxiliaryPoints or some such (jacek 30/10/2002)
void SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>* theNewVectorPointer )
{
fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
}
std::vector<G4ThreeVector>* GetPointerToVectorOfAuxiliaryPoints() const
{
return fpVectorOfAuxiliaryPointsPointer;
}
private:
// Explicity including the word "Pointer" in the name as I keep
// forgetting the * (jacek 30/10/2002)
std::vector<G4ThreeVector>* fpVectorOfAuxiliaryPointsPointer;
};
#include "G4Step.icc"
+11 -20
View File
@@ -23,13 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
//---------------------------------------------------------------
//
//-----------------------------------------------------------------
// In-line definitions
// G4Step inline definitions
//-----------------------------------------------------------------
// Get/Set functions
@@ -150,7 +144,7 @@ inline
inline
void G4Step::CopyPostToPreStepPoint( )
{
//This method is called at the beggining of each step
// This method is called at the beginning of each step
*(fpPreStepPoint) = *(fpPostStepPoint);
fpPostStepPoint->SetStepStatus(fUndefined);
@@ -214,7 +208,7 @@ inline
fpPreStepPoint->SetWeight(fpTrack->GetWeight());
// Set Velocity
// should be placed after SetMaterial for preStep point
// should be placed after SetMaterial for preStep point
fpPreStepPoint->SetVelocity(fpTrack->CalculateVelocity());
(*fpPostStepPoint) = (*fpPreStepPoint);
@@ -225,7 +219,7 @@ inline
{
// To avoid the circular dependency between G4Track, G4Step
// and G4StepPoint, G4Step has to manage the update actions.
// position, time
// position, time
fpTrack->SetPosition(fpPostStepPoint->GetPosition());
fpTrack->SetGlobalTime(fpPostStepPoint->GetGlobalTime());
fpTrack->SetLocalTime(fpPostStepPoint->GetLocalTime());
@@ -245,17 +239,15 @@ inline
fpTrack->SetNextTouchableHandle(fpPostStepPoint->GetTouchableHandle());
fpTrack->SetWeight(fpPostStepPoint->GetWeight());
// set velocity
fpTrack->SetVelocity(fpPostStepPoint->GetVelocity());
}
inline G4int G4Step::GetNumberOfSecondariesInCurrentStep() const
inline size_t G4Step::GetNumberOfSecondariesInCurrentStep() const
{
return fSecondary->size() - nSecondaryByLastStep;
}
inline const G4TrackVector* G4Step::GetSecondary() const
{
return fSecondary;
@@ -280,7 +272,8 @@ inline
inline void G4Step::DeleteSecondaryVector()
{
if (fSecondary !=0) {
if (fSecondary !=0)
{
fSecondary->clear();
delete fSecondary;
fSecondary = 0;
@@ -297,24 +290,22 @@ inline G4bool G4Step::IsLastStepInVolume() const
return fLastStepInVolume;
}
inline void G4Step::SetFirstStepFlag()
inline void G4Step::SetFirstStepFlag()
{
fFirstStepInVolume = true;
}
inline void G4Step::ClearFirstStepFlag()
inline void G4Step::ClearFirstStepFlag()
{
fFirstStepInVolume = false;
}
inline void G4Step::SetLastStepFlag()
inline void G4Step::SetLastStepFlag()
{
fLastStepInVolume = true;
}
inline void G4Step::ClearLastStepFlag()
inline void G4Step::ClearLastStepFlag()
{
fLastStepInVolume = false;
}