Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -25,7 +25,7 @@
//
//
// $Id: G4IVContinuousDiscreteProcess.hh,v 1.8 2006/06/29 21:07:14 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// $Id:
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4IVRestDiscreteProcess.hh,v 1.8 2006/06/29 21:07:16 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// $Id:
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ParticleTypes.hh,v 1.6 2006/06/29 21:07:18 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcTblElement.hh,v 1.11 2006/06/29 21:07:20 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcTblElement.icc,v 1.8 2006/06/29 21:07:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessAttribute.hh,v 1.5 2006/06/29 21:07:24 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProcessManager.hh,v 1.14 2007/03/30 01:02:28 kurasige Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4ProcessManager.hh,v 1.16 2007/10/02 08:23:20 kurasige Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -64,6 +64,7 @@
// Add GetProcessActivation 3 May. 1999 H.Kurashige
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
// Modify G4ProcessVectorOrdering to fix FindInsedrtPosition 15 Feb. 2005
// Add
// ------------------------------------------------------------
#ifndef G4ProcessManager_h
@@ -201,8 +202,11 @@ class G4ProcessManager
// AtRestProcess has only AtRestDoIt
// ContinuousProcess has only AlongStepDoIt
// DiscreteProcess has only PostStepDoIt
// if ord is not specified, the process is
// added at the end of List of processvectors
// If the ording parameter is not specified, the process is
// added at the end of List of process vectors
// If a process with same ordering parameter exists,
// this new process will be added just after processes
// with same ordering parameter
// (except for processes assigned to LAST explicitly )
// for both DoIt and GetPhysicalInteractionLength
//
@@ -211,8 +215,10 @@ class G4ProcessManager
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord = ordDefault);
G4int AddContinuousProcess(G4VProcess *aProcess, G4int ord = ordDefault);
///////////////////////////////////////////////
// Methods for setting ordering parameters
// Altanative methods for setting ordering parameters
// Altanative methods for setting ordering parameters
// Note: AddProcess method should precede these methods
G4int GetProcessOrdering(
@@ -226,8 +232,13 @@ class G4ProcessManager
G4int ordDoIt = ordDefault
);
// Set ordering parameter for DoIt specified by typeDoIt.
void SetProcessOrderingToFirst(
// If a process with same ordering parameter exists,
// this new process will be added just after processes
// with same ordering parameter
// Note: Ordering parameter will bet set to non-zero
// even if you set ordDoIt = 0
void SetProcessOrderingToFirst(
G4VProcess *aProcess,
G4ProcessVectorDoItIndex idDoIt
);
@@ -236,14 +247,24 @@ class G4ProcessManager
// Note: If you use this method for two processes,
// a process called later will be first.
void SetProcessOrderingToLast(
void SetProcessOrderingToSecond(
G4VProcess *aProcess,
G4ProcessVectorDoItIndex idDoIt
);
// Set ordering parameter to 1 for DoIt specified by idDoIt
// and the rpocess will be added just after
// the processes with ordering parameter equal to zero
// Note: If you use this method for two processes,
// a process called later will be .
void SetProcessOrderingToLast(
G4VProcess *aProcess,
G4ProcessVectorDoItIndex idDoIt
);
// Set ordering parameter to the last of all processes
// for DoIt specified by idDoIt.
// Note: If you use this method for two processes,
// a process called later will be the last one.
// a process called later will precede.
G4VProcess* RemoveProcess(G4VProcess *aProcess);
G4VProcess* RemoveProcess(G4int index);
@@ -296,7 +317,11 @@ class G4ProcessManager
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx,
G4ProcessVectorTypeIndex typ = typeGPIL) const;
void CheckOrderingParameters(G4VProcess*) const;
// check consistencies between ordering parameters and
// validity of DoIt of the Process
private:
G4ProcessAttribute* GetAttribute(G4int index) const;
G4ProcessAttribute* GetAttribute(G4VProcess *aProcess) const;
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessManager.icc,v 1.6 2007/03/30 01:02:28 kurasige Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessManagerMessenger.hh,v 1.7 2006/06/29 21:07:30 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
//---------------------------------------------------------------
@@ -26,7 +26,7 @@
//
// $Id: G4ProcessTable.hh,v 1.10 2006/06/29 21:07:32 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessTable.icc,v 1.5 2006/06/29 21:07:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// History:
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessTableMessenger.hh,v 1.7 2006/06/29 21:07:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
//---------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessType.hh,v 1.5 2006/06/29 21:07:38 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
//---------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessVector.hh,v 1.10 2006/06/29 21:07:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4ProcessVector.icc,v 1.5 2006/06/29 21:07:42 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
inline G4bool G4ProcessVector::operator==(const G4ProcessVector &right) const
{
@@ -25,7 +25,7 @@
//
//
// $Id: G4VContinuousDiscreteProcess.hh,v 1.8 2006/06/29 21:07:44 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4VContinuousProcess.hh,v 1.6 2006/06/29 21:07:46 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -26,7 +26,7 @@
//
// $Id: G4VDiscreteProcess.hh,v 1.8 2006/06/29 21:07:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VProcess.hh,v 1.23 2006/06/29 21:07:50 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4VProcess.hh,v 1.24 2007/10/02 08:23:20 kurasige Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -51,6 +51,7 @@
// Add Store/RetrievePhysicsTable 8 Nov. 2000 H.Kurashige
// Modify Store/RetrievePhysicsTable methods 9 Mar. 2001 H.Kurashige
// Added PreparePhysicsTable 20 Aug. 2004 H.Kurashige
// Added isXXXXDoItIsEnabled 2 Oct. 2007 H.Kurashige
#ifndef G4VProcess_h
#define G4VProcess_h 1
@@ -310,6 +311,14 @@ class G4VProcess
// !!! This method should be at the end of PostStepDoIt()
// !!! and AtRestDoIt
public: // with description
// These methods indicate which DoIt is enabled
// These methods are used by G4ProcessManager to check
// that ordering parameters are set properly
G4bool isAtRestDoItIsEnabled() const;
G4bool isAlongStepDoItIsEnabled() const;
G4bool isPostStepDoItIsEnabled() const;
protected:
G4String theProcessName;
// The name of the process
@@ -322,6 +331,10 @@ class G4VProcess
G4double thePILfactor;
// factor for PhysicsInteractionLength
// which is passed to G4SteppingManager
G4bool enableAtRestDoIt;
G4bool enableAlongStepDoIt;
G4bool enablePostStepDoIt;
public: // with description
virtual void DumpInfo() const;
@@ -441,6 +454,25 @@ inline
{
return aProcessManager;
}
inline
G4bool G4VProcess::isAtRestDoItIsEnabled() const
{
return enableAtRestDoIt;
}
inline
G4bool G4VProcess::isAlongStepDoItIsEnabled() const
{
return enableAlongStepDoIt;
}
inline
G4bool G4VProcess::isPostStepDoItIsEnabled() const
{
return enablePostStepDoIt;
}
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4VRestContinuousDiscreteProcess.hh,v 1.8 2006/06/29 21:07:52 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4VRestContinuousProcess.hh,v 1.6 2006/06/29 21:07:54 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4VRestDiscreteProcess.hh,v 1.8 2006/06/29 21:07:56 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4VRestProcess.hh,v 1.6 2006/06/29 21:07:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
@@ -24,19 +24,17 @@
// ********************************************************************
//
//
// $Id: G4WrapperProcess.hh,v 1.7 2007/03/25 23:20:03 kurasige Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4WrapperProcess.hh,v 1.9 2007/12/12 10:09:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// GEANT 4 class header file
//
// Class Description
// This class is the virtual class for wrapper process objects.
//
// This class is the virtual class for wrapper process objects.
// ------------------------------------------------------------
// New Physics scheme 18 Dec. 1996 H.Kurahige
// ------------------------------------------------------------
@@ -46,23 +44,21 @@
#include "globals.hh"
#include "G4ios.hh"
#include "G4VProcess.hh"
class G4WrapperProcess :public G4VProcess
class G4WrapperProcess : public G4VProcess
{
// A virtual class for wrapper process objects.
private:
// hide default constructor and assignment operator as private
// do not hide default constructor for alpha version
G4WrapperProcess & operator=(const G4WrapperProcess &right);
inline G4WrapperProcess & operator=(const G4WrapperProcess &right);
public: // with description
// constructor requires the process name and type
G4WrapperProcess(const G4String& aName = "Wrapped",
G4ProcessType aType = fNotDefined );
G4ProcessType aType = fNotDefined );
// copy constructor copys the name but does not copy the
// physics table (0 pointer is assigned)
@@ -72,9 +68,9 @@ class G4WrapperProcess :public G4VProcess
// destructor
virtual ~G4WrapperProcess();
// equal opperators
G4int operator==(const G4WrapperProcess &right) const;
G4int operator!=(const G4WrapperProcess &right) const;
// equality opperators
inline G4int operator==(const G4WrapperProcess &right) const;
inline G4int operator!=(const G4WrapperProcess &right) const;
public: // with description
virtual void RegisterProcess(G4VProcess*);
@@ -88,38 +84,38 @@ class G4WrapperProcess :public G4VProcess
// DoIt /////////////////
///////////////////////////
virtual G4VParticleChange* PostStepDoIt(
const G4Track& track,
const G4Step& stepData
);
const G4Track& track,
const G4Step& stepData
);
virtual G4VParticleChange* AlongStepDoIt(
const G4Track& track,
const G4Step& stepData
);
const G4Track& track,
const G4Step& stepData
);
virtual G4VParticleChange* AtRestDoIt(
const G4Track& track,
const G4Step& stepData
);
const G4Track& track,
const G4Step& stepData
);
//////////////////////////
// GPIL //////////////
/////////////////////////
virtual G4double AlongStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& proposedSafety,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& proposedSafety,
G4GPILSelection* selection);
virtual G4double AtRestGetPhysicalInteractionLength(
const G4Track& track,
G4ForceCondition* condition
);
G4ForceCondition* condition
);
virtual G4double PostStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
) ;
G4double previousStepSize,
G4ForceCondition* condition
) ;
//////////////////////
virtual G4bool IsApplicable(const G4ParticleDefinition&);
@@ -140,7 +136,7 @@ class G4WrapperProcess :public G4VProcess
// private void BuildThePhysicsTable()
// function. Not another BuildPhysicsTable, please.
virtual void PreparePhysicsTable(const G4ParticleDefinition&){};
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
// Messaged by the Particle definition (via the Process manager)
// whenever cross section tables have to be prepare for rebuilt
// (i.e. if new materials have been defined).
@@ -155,14 +151,14 @@ class G4WrapperProcess :public G4VProcess
virtual G4bool StorePhysicsTable(const G4ParticleDefinition* ,
const G4String& directory,
G4bool ascii = false);
const G4String& directory,
G4bool ascii = false);
// Store PhysicsTable in a file.
// (return false in case of failure at I/O )
virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* ,
const G4String& directory,
G4bool ascii = false);
const G4String& directory,
G4bool ascii = false);
// Retrieve Physics from a file.
// (return true if the Physics Table can be build by using file)
// (return false if the process has no functionality or in case of failure)
@@ -181,174 +177,16 @@ class G4WrapperProcess :public G4VProcess
// Get the process manager which the process belongs to
public:
virtual void ResetNumberOfInteractionLengthLeft();
// reset (determine the value of)NumberOfInteractionLengthLeft
virtual void ResetNumberOfInteractionLengthLeft();
// reset (determine the value of)NumberOfInteractionLengthLeft
};
inline
void G4WrapperProcess::ResetNumberOfInteractionLengthLeft()
{
pRegProcess->ResetNumberOfInteractionLengthLeft();
}
inline
G4double G4WrapperProcess::AlongStepGetPhysicalInteractionLength( const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& proposedSafety,
G4GPILSelection* selection )
{
return pRegProcess->AlongStepGetPhysicalInteractionLength( track,
previousStepSize,
currentMinimumStep,
proposedSafety,
selection );
}
inline
G4double G4WrapperProcess::AtRestGetPhysicalInteractionLength( const G4Track& track,
G4ForceCondition* condition )
{
return pRegProcess->AtRestGetPhysicalInteractionLength( track,
condition );
}
inline
G4double G4WrapperProcess::PostStepGetPhysicalInteractionLength( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition )
{
return pRegProcess->PostStepGetPhysicalInteractionLength( track,
previousStepSize,
condition );
}
inline
void G4WrapperProcess::SetProcessManager(const G4ProcessManager* procMan)
{
pRegProcess->SetProcessManager(procMan);
}
inline
const G4ProcessManager* G4WrapperProcess::GetProcessManager()
{
return pRegProcess->GetProcessManager();
}
inline
G4VParticleChange* G4WrapperProcess::PostStepDoIt(
const G4Track& track,
const G4Step& stepData
)
{
return pRegProcess->PostStepDoIt( track, stepData );
}
inline
G4VParticleChange* G4WrapperProcess::AlongStepDoIt(
const G4Track& track,
const G4Step& stepData
)
{
return pRegProcess->AlongStepDoIt( track, stepData );
}
inline
G4VParticleChange* G4WrapperProcess::AtRestDoIt(
const G4Track& track,
const G4Step& stepData
)
{
return pRegProcess->AtRestDoIt( track, stepData );
}
inline
G4bool G4WrapperProcess::IsApplicable(const G4ParticleDefinition& particle)
{
return pRegProcess->IsApplicable(particle);
}
inline
void G4WrapperProcess::BuildPhysicsTable(const G4ParticleDefinition& particle)
{
return pRegProcess->BuildPhysicsTable(particle);
}
inline
void G4WrapperProcess::PreparePhysicsTable(const G4ParticleDefinition& particle)
{
return pRegProcess->PreparePhysicsTable(particle);
}
inline
G4bool G4WrapperProcess::StorePhysicsTable(const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
return pRegProcess->StorePhysicsTable(particle, directory, ascii);
}
inline
G4bool G4WrapperProcess::RetrievePhysicsTable( const G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
return pRegProcess->RetrievePhysicsTable(particle, directory, ascii);
}
inline
void G4WrapperProcess::StartTracking(G4Track* track)
{
pRegProcess->StartTracking(track);
}
inline
void G4WrapperProcess::EndTracking()
{
pRegProcess->EndTracking();
}
inline
void G4WrapperProcess::RegisterProcess(G4VProcess* process)
{
pRegProcess=process;
theProcessName += process->GetProcessName();
theProcessType = process->GetProcessType();
}
inline
const G4VProcess* G4WrapperProcess::GetRegisteredProcess() const
{
return pRegProcess;
}
inline
G4WrapperProcess::G4WrapperProcess(const G4String& aName,
G4ProcessType aType)
: G4VProcess(aName,aType), pRegProcess((G4VProcess*)(0))
{
}
inline
G4WrapperProcess::G4WrapperProcess(const G4WrapperProcess& right)
: G4VProcess(*((G4VProcess*)(&right))), pRegProcess(right.pRegProcess)
{
}
inline
G4WrapperProcess::~G4WrapperProcess()
{
if (pRegProcess!=0) delete pRegProcess;
}
inline
G4WrapperProcess & G4WrapperProcess::operator=(const G4WrapperProcess &)
{
G4Exception("G4WrapperProcess::operator=","Illegal operation",
JustWarning,"Assignment operator is called");
JustWarning,"Assignment operator is called");
return *this;
}
@@ -364,25 +202,4 @@ inline
return (this != &right);
}
#endif