Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.hh,v 1.6 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.hh,v 1.6 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleTypes.hh,v 1.4 2000/02/25 10:11:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcTblElement.hh,v 1.7 2000/03/02 01:45:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4ProcTblElement.hh,v 1.8 2000/11/03 03:44:51 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -49,7 +49,7 @@ class G4ProcTblElement
|
||||
~G4ProcTblElement();
|
||||
// Destructor
|
||||
|
||||
G4ProcTblElement & operator=(G4ProcTblElement &right);
|
||||
G4ProcTblElement & operator=(const G4ProcTblElement &right);
|
||||
// Assignment operator
|
||||
|
||||
G4int operator==(const G4ProcTblElement &right) const;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcTblElement.icc,v 1.5 2000/03/02 01:45:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessAttribute.hh,v 1.3 1999/11/07 17:11:43 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManager.hh,v 1.7 2000/03/02 01:16:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManager.icc,v 1.2 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.hh,v 1.4 1999/11/07 17:11:44 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTable.hh,v 1.6 2000/03/02 01:16:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTable.icc,v 1.3 2000/03/02 01:16:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// History:
|
||||
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.hh,v 1.3 1999/11/07 17:11:45 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessType.hh,v 1.3 1999/11/07 17:11:45 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,21 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessVector.hh,v 1.5 1999/11/15 10:39:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4ProcessVector.hh,v 1.6 2000/11/03 03:44:51 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
//
|
||||
// Class Description
|
||||
// This class is a container for pointers to physics process objects. Its
|
||||
// functionality is derived from G4RWTPtrOrderedVector<T>.
|
||||
// This class is a container for pointers to physics process objects.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4ProcessVector_h
|
||||
@@ -27,29 +21,84 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
class G4VProcess;
|
||||
|
||||
class G4ProcessVector : public G4RWTPtrOrderedVector<G4VProcess>
|
||||
class G4ProcessVector
|
||||
{
|
||||
// Is a container for pointers to physics process objects. Its
|
||||
// functionality is derived from G4RWTPtrOrderedVector<T>.
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
G4ProcessVector(size_t dummy=0);
|
||||
G4ProcessVector(const G4ProcessVector &);
|
||||
|
||||
G4ProcessVector(size_t capac=G4RWDEFAULT_CAPACITY)
|
||||
: G4RWTPtrOrderedVector<G4VProcess>(capac) {;}
|
||||
// Constructor.
|
||||
// Destructor.
|
||||
virtual ~G4ProcessVector();
|
||||
|
||||
virtual ~G4ProcessVector() {;}
|
||||
// Destructor.
|
||||
//assignment operator
|
||||
G4ProcessVector & operator=(G4ProcessVector &right);
|
||||
|
||||
// equal operator
|
||||
G4bool operator==(const G4ProcessVector &right) const;
|
||||
|
||||
G4bool operator==(const G4ProcessVector &right) const
|
||||
{
|
||||
return (this == (G4ProcessVector *) &right);
|
||||
}
|
||||
public: // With Description
|
||||
// Returns the number of items
|
||||
G4int entries() const;
|
||||
G4int length() const;
|
||||
|
||||
// Returns the position of the element
|
||||
G4int index(G4VProcess* aProcess) const;
|
||||
|
||||
// Returns "true" if the element exists
|
||||
G4bool contains(G4VProcess* aProcess) const;
|
||||
|
||||
// Insert an element
|
||||
G4bool insert(G4VProcess* aProcess);
|
||||
|
||||
// Insert an element at i-th position
|
||||
G4bool insertAt(G4int i, G4VProcess* aProcess);
|
||||
|
||||
// Remove and returns the i-th element
|
||||
G4VProcess* removeAt(G4int i);
|
||||
|
||||
// Remove and returns the last element
|
||||
G4VProcess* removeLast();
|
||||
|
||||
// Clear the collection by removing all items
|
||||
void clear();
|
||||
|
||||
// returns const reference to the i-th item
|
||||
G4VProcess* const& operator[](G4int i) const;
|
||||
G4VProcess* const& operator()(G4int i) const;
|
||||
|
||||
// returns reference to the i-th item
|
||||
G4VProcess* & operator[](G4int i);
|
||||
G4VProcess* & operator()(G4int i);
|
||||
|
||||
protected:
|
||||
// Use STL Vector
|
||||
typedef G4std::vector<G4VProcess*> G4ProcVector;
|
||||
|
||||
G4ProcVector * pProcVector;
|
||||
};
|
||||
|
||||
|
||||
#include "G4ProcessVector.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
// 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: G4ProcessVector.icc,v 1.1 2000/11/03 03:44:52 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
inline G4bool G4ProcessVector::operator==(const G4ProcessVector &right) const
|
||||
{
|
||||
return (this == (G4ProcessVector *) &right);
|
||||
}
|
||||
|
||||
inline G4int G4ProcessVector::entries() const
|
||||
{
|
||||
return pProcVector->size();
|
||||
}
|
||||
|
||||
inline G4int G4ProcessVector::length() const
|
||||
{
|
||||
return pProcVector->size();
|
||||
}
|
||||
|
||||
inline G4int G4ProcessVector::index(G4VProcess* aProcess) const
|
||||
{
|
||||
G4ProcVector::iterator it;
|
||||
size_t j=0;
|
||||
for (it=pProcVector->begin();it!=pProcVector->end(); ++j,it++) {
|
||||
if (*(*it)==*aProcess) return j;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
inline G4bool G4ProcessVector::contains(G4VProcess* aProcess) const
|
||||
{
|
||||
G4ProcVector::iterator it;
|
||||
for (it=pProcVector->begin();it!=pProcVector->end(); it++) {
|
||||
if (*(*it)==*aProcess) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline G4bool G4ProcessVector::insert(G4VProcess* aProcess)
|
||||
{
|
||||
pProcVector->push_back(aProcess);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline G4bool G4ProcessVector::insertAt(G4int i,G4VProcess* aProcess)
|
||||
{
|
||||
if ( (i<0) || (i>pProcVector->size()) ) return false;
|
||||
if (i==pProcVector->size()) {
|
||||
pProcVector->push_back(aProcess);
|
||||
} else {
|
||||
G4ProcVector::iterator it=pProcVector->begin();
|
||||
int j;
|
||||
for(j=0;j!=i;++j) it++;
|
||||
pProcVector->insert(it, aProcess);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline G4VProcess* G4ProcessVector::removeAt(G4int i)
|
||||
{
|
||||
G4ProcVector::iterator it=pProcVector->begin();
|
||||
int j;
|
||||
for(j=0;j<pProcVector->size() && j<i;++j) it++;
|
||||
G4VProcess* rValue = *it;
|
||||
pProcVector->erase(it);
|
||||
return rValue;
|
||||
}
|
||||
|
||||
inline G4VProcess* G4ProcessVector::removeLast()
|
||||
{
|
||||
G4VProcess* rValue = pProcVector->back();
|
||||
pProcVector->pop_back();
|
||||
return rValue;
|
||||
}
|
||||
|
||||
inline void G4ProcessVector::clear()
|
||||
{
|
||||
pProcVector->clear();
|
||||
}
|
||||
|
||||
inline G4VProcess* const& G4ProcessVector::operator[](G4int i) const
|
||||
{
|
||||
return (*pProcVector)[i];
|
||||
}
|
||||
|
||||
inline G4VProcess* const& G4ProcessVector::operator()(G4int i) const
|
||||
{
|
||||
return (*pProcVector)[i];
|
||||
}
|
||||
|
||||
inline G4VProcess* & G4ProcessVector::operator[](G4int i)
|
||||
{
|
||||
return (*pProcVector)[i];
|
||||
}
|
||||
|
||||
inline G4VProcess* & G4ProcessVector::operator()(G4int i)
|
||||
{
|
||||
return (*pProcVector)[i];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VContinuousProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VProcess.hh,v 1.5 1999/11/07 17:11:47 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4VProcess.hh,v 1.7 2000/11/08 00:47:23 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -30,7 +30,8 @@
|
||||
// modified for new ParticleChange 12 Mar. 1998 H.Kurashige
|
||||
// Add process trype 27 Mar. 1998 H.Kurashige
|
||||
// Remove thePhysicsTable 2 Aug. 1998 H.Kurashige
|
||||
|
||||
// Add PILfactor and GPIL 3 Nov. 2000 H.Kurashige
|
||||
// Add Store/RetrievePhysicsTable 8 Nov. 2000 H.Kurashige
|
||||
#ifndef G4VProcess_h
|
||||
#define G4VProcess_h 1
|
||||
|
||||
@@ -152,6 +153,28 @@ class G4VProcess
|
||||
// this value is used for transformation of
|
||||
// true path length to geometrical path length
|
||||
|
||||
////////// PIL factor ////////
|
||||
void SetPILfactor(G4double value);
|
||||
G4double GetPILfactor() const;
|
||||
// Set/Get factor for PhysicsInteractionLength
|
||||
// which is passed to G4SteppingManager for both AtRest and PostStep
|
||||
|
||||
// These three GPIL methods are used by Stepping Manager.
|
||||
// They invoke virtual GPIL methods listed above.
|
||||
// As for AtRest and PostStep the returned value is multipled by thePILfactor
|
||||
//
|
||||
G4double AlongStepGPIL( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& proposedSafety,
|
||||
G4GPILSelection* selection );
|
||||
|
||||
G4double AtRestGPIL( const G4Track& track,
|
||||
G4ForceCondition* condition );
|
||||
|
||||
G4double PostStepGPIL( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
|
||||
//////////////////////
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&){return true;};
|
||||
@@ -172,6 +195,18 @@ class G4VProcess
|
||||
// private void BuildThePhysicsTable()
|
||||
// function. Not another BuildPhysicsTable, please.
|
||||
|
||||
|
||||
virtual G4bool StorePhysicsTable(const G4String& directory){return true;}
|
||||
// Store PhysicsTable in a file.
|
||||
// (return false in caase of failure at I/O )
|
||||
|
||||
virtual G4bool RetrievePhysicsTable(const G4String& directory){return 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)
|
||||
// File name should be defined by each process
|
||||
// and the file should be placed under the directory specifed by the argument.
|
||||
|
||||
////////////////////////////
|
||||
const G4String& GetProcessName() const;
|
||||
// Returns the name of the process.
|
||||
@@ -231,6 +266,10 @@ class G4VProcess
|
||||
G4ProcessType theProcessType;
|
||||
// The type of the process
|
||||
|
||||
G4double thePILfactor;
|
||||
// factor for PhysicsInteractionLength
|
||||
// which is passed to G4SteppingManager
|
||||
|
||||
public: // with description
|
||||
virtual void DumpInfo() const;
|
||||
// dump out process information
|
||||
@@ -293,6 +332,45 @@ inline void G4VProcess::ClearNumberOfInteractionLengthLeft()
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
}
|
||||
|
||||
inline void G4VProcess::SetPILfactor(G4double value)
|
||||
{
|
||||
if (value>0.) {
|
||||
thePILfactor = value;
|
||||
}
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::GetPILfactor() const
|
||||
{
|
||||
return thePILfactor;
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::AlongStepGPIL( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& proposedSafety,
|
||||
G4GPILSelection* selection )
|
||||
{
|
||||
G4double value
|
||||
=AlongStepGetPhysicalInteractionLength(track, previousStepSize, currentMinimumStep, proposedSafety, selection);
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::AtRestGPIL( const G4Track& track,
|
||||
G4ForceCondition* condition )
|
||||
{
|
||||
G4double value
|
||||
=AtRestGetPhysicalInteractionLength(track, condition);
|
||||
return thePILfactor*value;
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::PostStepGPIL( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition )
|
||||
{
|
||||
G4double value
|
||||
=PostStepGetPhysicalInteractionLength(track, previousStepSize, condition);
|
||||
return thePILfactor*value;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRestProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user