Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -16,6 +16,18 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
- Jul. 10th, 2012 G.Cosmo (procman-V09-05-02)
|
||||
- Explicitly use inclusion of headers for system of units and physical
|
||||
constants, in plan to remove implicit inclusion from globals.hh.
|
||||
|
||||
- Jun. 7th, 2012 G.Cosmo (procman-V09-05-01)
|
||||
- Fixed trivial case of variable shadowing in G4ProcessVector.
|
||||
|
||||
- May 16th, 2012 H.Kurashige (procman-V09-05-00)
|
||||
- Add GetTotalNumberOfInteractionLengthTraversed to G4VProcess
|
||||
- Move 'virtual inlined' methods to cc files
|
||||
|
||||
- Nov. 9th, 2011 H.Kurashige (procman-V09-04-07)
|
||||
- Fix Coverity defects
|
||||
- Fix bugs in copy constructor and assignment operator of G4ProcessVector
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.hh,v 1.8 2006-06-29 21:07:14 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -48,10 +47,15 @@
|
||||
#ifndef G4IVContinuousDiscreteProcess_h
|
||||
#define G4IVContinuousDiscreteProcess_h 1
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
class G4IVContinuousDiscreteProcess : public G4VProcess
|
||||
{
|
||||
@@ -134,13 +138,10 @@ class G4IVContinuousDiscreteProcess : public G4VProcess
|
||||
G4PhysicsTable* theInverseNlambdaTable ;
|
||||
const G4double BIGSTEP ;
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
|
||||
inline void G4IVContinuousDiscreteProcess::
|
||||
SubtractNumberOfInteractionLengthLeft(
|
||||
@@ -194,15 +195,9 @@ inline G4double G4IVContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLe
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/CLHEP::cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.hh,v 1.8 2006-06-29 21:07:16 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -44,11 +43,18 @@
|
||||
#ifndef G4IVRestDiscreteProcess_h
|
||||
#define G4IVRestDiscreteProcess_h 1
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
class G4IVRestDiscreteProcess : public G4VProcess
|
||||
{
|
||||
@@ -130,11 +136,6 @@ class G4IVRestDiscreteProcess : public G4VProcess
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "Randomize.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline
|
||||
void G4IVRestDiscreteProcess::SubtractNumberOfInteractionLengthLeft(
|
||||
@@ -175,7 +176,7 @@ inline G4double G4IVRestDiscreteProcess::AtRestGetPhysicalInteractionLength(
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/CLHEP::ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -194,19 +195,4 @@ inline G4VParticleChange* G4IVRestDiscreteProcess::AtRestDoIt(
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleTypes.hh,v 1.6 2006-06-29 21:07:18 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcTblElement.hh,v 1.11 2006-06-29 21:07:20 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcTblElement.icc,v 1.8 2006-06-29 21:07:22 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessAttribute.hh,v 1.6 2010-10-07 13:59:21 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.hh,v 1.16 2007-10-02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.icc,v 1.6 2007-03-30 01:02:28 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.hh,v 1.7 2006-06-29 21:07:30 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
// $Id: G4ProcessTable.hh,v 1.10 2006-06-29 21:07:32 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTable.icc,v 1.5 2006-06-29 21:07:34 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// History:
|
||||
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.hh,v 1.7 2006-06-29 21:07:36 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessType.hh,v 1.5 2006-06-29 21:07:38 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessVector.hh,v 1.10 2006-06-29 21:07:40 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessVector.icc,v 1.5 2006-06-29 21:07:42 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
inline G4bool G4ProcessVector::operator==(const G4ProcessVector &right) const
|
||||
{
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.hh,v 1.9 2007-11-15 04:10:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -134,104 +133,6 @@ class G4VContinuousDiscreteProcess : public G4VProcess
|
||||
G4VContinuousDiscreteProcess & operator=(const G4VContinuousDiscreteProcess &right);
|
||||
|
||||
};
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline G4double G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4VContinuousDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VContinuousDiscreteProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4double G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousProcess.hh,v 1.6 2006-06-29 21:07:46 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -135,51 +134,6 @@ class G4VContinuousProcess : public G4VProcess
|
||||
G4VContinuousProcess & operator=(const G4VContinuousProcess &right);
|
||||
|
||||
};
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline G4double G4VContinuousProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VContinuousProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.hh,v 1.9 2007-11-15 04:10:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -120,67 +119,6 @@ class G4VDiscreteProcess : public G4VProcess
|
||||
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline G4double G4VDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcess.hh,v 1.25 2007-11-15 04:09:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -298,18 +297,28 @@ class G4VProcess
|
||||
G4double currentInteractionLength;
|
||||
// The InteractionLength in the current material
|
||||
|
||||
G4double theInitialNumberOfInteractionLength;
|
||||
// The initial value when ResetNumberOfInteractionLengthLeft is invoked
|
||||
|
||||
public: // with description
|
||||
virtual void ResetNumberOfInteractionLengthLeft();
|
||||
// reset (determine the value of)NumberOfInteractionLengthLeft
|
||||
|
||||
|
||||
G4double GetNumberOfInteractionLengthLeft() const;
|
||||
// get NumberOfInteractionLengthLeft
|
||||
|
||||
G4double GetTotalNumberOfInteractionLengthTraversed() const;
|
||||
// get NumberOfInteractionLength
|
||||
// after ResetNumberOfInteractionLengthLeft is invoked
|
||||
|
||||
protected: // with description
|
||||
virtual void SubtractNumberOfInteractionLengthLeft(
|
||||
void SubtractNumberOfInteractionLengthLeft(
|
||||
G4double previousStepSize
|
||||
);
|
||||
// subtract NumberOfInteractionLengthLeft by the value corresponding to
|
||||
// previousStepSize
|
||||
|
||||
virtual void ClearNumberOfInteractionLengthLeft();
|
||||
void ClearNumberOfInteractionLengthLeft();
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
// !!! This method should be at the end of PostStepDoIt()
|
||||
// !!! and AtRestDoIt
|
||||
@@ -406,16 +415,21 @@ inline G4int G4VProcess::GetVerboseLevel() const
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
inline void G4VProcess::ResetNumberOfInteractionLengthLeft()
|
||||
{
|
||||
theNumberOfInteractionLengthLeft = -std::log( G4UniformRand() );
|
||||
}
|
||||
|
||||
inline void G4VProcess::ClearNumberOfInteractionLengthLeft()
|
||||
{
|
||||
theInitialNumberOfInteractionLength = -1.0;
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::GetNumberOfInteractionLengthLeft() const
|
||||
{
|
||||
return theNumberOfInteractionLengthLeft;
|
||||
}
|
||||
|
||||
inline G4double G4VProcess::GetTotalNumberOfInteractionLengthTraversed() const
|
||||
{
|
||||
return theInitialNumberOfInteractionLength - theNumberOfInteractionLengthLeft;}
|
||||
|
||||
inline G4double G4VProcess::GetCurrentInteractionLength() const
|
||||
{
|
||||
return currentInteractionLength;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.hh,v 1.9 2007-11-15 04:10:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -141,143 +140,6 @@ class G4VRestContinuousDiscreteProcess : public G4VProcess
|
||||
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline G4double G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4VRestContinuousDiscreteProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4double G4VRestContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VRestContinuousDiscreteProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4double G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VRestContinuousDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.hh,v 1.6 2006-06-29 21:07:54 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -141,88 +140,6 @@ class G4VRestContinuousProcess : public G4VProcess
|
||||
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
inline G4double G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
inline G4double G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4VRestContinuousProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VRestContinuousProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.hh,v 1.9 2007-11-15 04:10:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -124,107 +123,6 @@ class G4VRestDiscreteProcess : public G4VProcess
|
||||
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "Randomize.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline
|
||||
G4double G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4VRestDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// reset NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
inline G4double G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4VRestDiscreteProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestProcess.hh,v 1.6 2006-06-29 21:07:58 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -122,52 +121,6 @@ class G4VRestProcess : public G4VProcess
|
||||
G4VRestProcess & operator=(const G4VRestProcess &right);
|
||||
};
|
||||
|
||||
// -----------------------------------------
|
||||
// inlined function members implementation
|
||||
// -----------------------------------------
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
inline G4double G4VRestProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
inline G4VParticleChange* G4VRestProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WrapperProcess.hh,v 1.9 2007-12-12 10:09:49 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.12 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.cc,v 1.12 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcTblElement.cc,v 1.7 2006-06-29 21:08:06 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessAttribute.cc,v 1.6 2010-10-30 07:51:23 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.cc,v 1.38 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 1.10 2006-06-29 21:08:12 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTable.cc,v 1.15 2010-10-30 07:51:23 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.cc,v 1.19 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessVector.cc,v 1.5 2008-06-23 08:58:26 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -44,9 +43,9 @@ G4ProcessVector::G4ProcessVector()
|
||||
pProcVector = new G4ProcVector();
|
||||
}
|
||||
|
||||
G4ProcessVector::G4ProcessVector(size_t s)
|
||||
G4ProcessVector::G4ProcessVector(size_t siz)
|
||||
{
|
||||
pProcVector = new G4ProcVector(s);
|
||||
pProcVector = new G4ProcVector(siz);
|
||||
}
|
||||
|
||||
G4ProcessVector::G4ProcessVector(const G4ProcessVector& right)
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 1.8 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VContinuousDiscreteProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VContinuousDiscreteProcess::G4VContinuousDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process"),
|
||||
valueGPILSelection(CandidateForSelection)
|
||||
@@ -63,12 +69,93 @@ G4VContinuousDiscreteProcess::G4VContinuousDiscreteProcess(G4VContinuousDiscrete
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4VContinuousDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4VContinuousDiscreteProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousProcess.cc,v 1.7 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VContinuousProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VContinuousProcess::G4VContinuousProcess()
|
||||
:G4VProcess("No Name Continuous Process"),
|
||||
valueGPILSelection(CandidateForSelection)
|
||||
@@ -64,13 +70,40 @@ G4VContinuousProcess::G4VContinuousProcess(G4VContinuousProcess& right)
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VContinuousProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VContinuousProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
G4VParticleChange* G4VContinuousProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.cc,v 1.7 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VDiscreteProcess::G4VDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process")
|
||||
{
|
||||
@@ -62,13 +68,54 @@ G4VDiscreteProcess::G4VDiscreteProcess(G4VDiscreteProcess& right)
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4VDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcess.cc,v 1.18 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -39,17 +38,22 @@
|
||||
// removed thePhysicsTable 02 Aug. 1998 H.Kurashige
|
||||
// Modified DumpInfo 15 Aug. 1998 H.Kurashige
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4ElementVector.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
G4VProcess::G4VProcess(const G4String& aName, G4ProcessType aType )
|
||||
: aProcessManager(0),
|
||||
pParticleChange(0),
|
||||
theNumberOfInteractionLengthLeft(-1.0),
|
||||
currentInteractionLength(-1.0),
|
||||
theInitialNumberOfInteractionLength(-1.0),
|
||||
theProcessName(aName),
|
||||
theProcessType(aType),
|
||||
theProcessSubType(-1),
|
||||
@@ -72,6 +76,7 @@ G4VProcess::G4VProcess(const G4VProcess& right)
|
||||
pParticleChange(0),
|
||||
theNumberOfInteractionLengthLeft(-1.0),
|
||||
currentInteractionLength(-1.0),
|
||||
theInitialNumberOfInteractionLength(-1.0),
|
||||
theProcessName(right.theProcessName),
|
||||
theProcessType(right.theProcessType),
|
||||
theProcessSubType(right.theProcessSubType),
|
||||
@@ -84,6 +89,12 @@ G4VProcess::G4VProcess(const G4VProcess& right)
|
||||
}
|
||||
|
||||
|
||||
void G4VProcess::ResetNumberOfInteractionLengthLeft()
|
||||
{
|
||||
theNumberOfInteractionLengthLeft = -std::log( G4UniformRand() );
|
||||
theInitialNumberOfInteractionLength = theNumberOfInteractionLengthLeft;
|
||||
}
|
||||
|
||||
void G4VProcess::SubtractNumberOfInteractionLengthLeft(
|
||||
G4double previousStepSize )
|
||||
{
|
||||
@@ -115,6 +126,7 @@ void G4VProcess::StartTracking(G4Track*)
|
||||
{
|
||||
currentInteractionLength = -1.0;
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
theInitialNumberOfInteractionLength=-1.0;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cout << "G4VProcess::StartTracking() [" << theProcessName << "]" <<G4endl;
|
||||
@@ -131,6 +143,7 @@ void G4VProcess::EndTracking()
|
||||
#endif
|
||||
theNumberOfInteractionLengthLeft = -1.0;
|
||||
currentInteractionLength = -1.0;
|
||||
theInitialNumberOfInteractionLength=-1.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,14 +226,3 @@ const G4String& G4VProcess::GetPhysicsTableFileName(const G4ParticleDefinition*
|
||||
|
||||
return thePhysicsTableFileName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.8 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VRestContinuousDiscreteProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VRestContinuousDiscreteProcess::G4VRestContinuousDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process"),
|
||||
valueGPILSelection(CandidateForSelection)
|
||||
@@ -62,13 +68,131 @@ G4VRestContinuousDiscreteProcess::G4VRestContinuousDiscreteProcess(G4VRestContin
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4VRestContinuousDiscreteProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4VRestContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4VRestContinuousDiscreteProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4VRestContinuousDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.cc,v 1.8 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VRestContinuousProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VRestContinuousProcess::G4VRestContinuousProcess()
|
||||
:G4VProcess("No Name Discrete Process") ,
|
||||
valueGPILSelection(CandidateForSelection)
|
||||
@@ -63,13 +69,77 @@ G4VRestContinuousProcess::G4VRestContinuousProcess(G4VRestContinuousProcess& rig
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
)
|
||||
{
|
||||
// GPILSelection is set to defaule value of CandidateForSelection
|
||||
valueGPILSelection = CandidateForSelection;
|
||||
|
||||
// get Step limit proposed by the process
|
||||
G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
|
||||
|
||||
// set return value for G4GPILSelection
|
||||
*selection = valueGPILSelection;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return steplength ;
|
||||
}
|
||||
|
||||
G4double G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4VRestContinuousProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
G4VParticleChange* G4VRestContinuousProcess::AlongStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 1.7 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,14 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VRestDiscreteProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VRestDiscreteProcess::G4VRestDiscreteProcess()
|
||||
:G4VProcess("No Name Discrete Process")
|
||||
{
|
||||
@@ -60,13 +67,93 @@ G4VRestDiscreteProcess::G4VRestDiscreteProcess(G4VRestDiscreteProcess& right)
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else if ( previousStepSize > 0.0) {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
SubtractNumberOfInteractionLengthLeft(previousStepSize);
|
||||
} else {
|
||||
// zero step
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean free path
|
||||
currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
|
||||
|
||||
G4double value;
|
||||
if (currentInteractionLength <DBL_MAX) {
|
||||
value = theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
} else {
|
||||
value = DBL_MAX;
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cout << "G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
|
||||
}
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4VRestDiscreteProcess::PostStepDoIt(
|
||||
const G4Track& ,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// reset NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
G4double G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4VRestDiscreteProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestProcess.cc,v 1.7 2010-12-22 09:14:54 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -38,6 +37,13 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VRestProcess.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
G4VRestProcess::G4VRestProcess()
|
||||
:G4VProcess("No Name Rest Process")
|
||||
{
|
||||
@@ -61,13 +67,41 @@ G4VRestProcess::G4VRestProcess(G4VRestProcess& right)
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4VRestProcess::AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
// beggining of tracking
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
// get mean life time
|
||||
currentInteractionLength = GetMeanLifeTime(track, condition);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ((currentInteractionLength <0.0) || (verboseLevel>2)){
|
||||
G4cout << "G4VRestProcess::AtRestGetPhysicalInteractionLength ";
|
||||
G4cout << "[ " << GetProcessName() << "]" <<G4endl;
|
||||
track.GetDynamicParticle()->DumpInfo();
|
||||
G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
|
||||
G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return theNumberOfInteractionLengthLeft * currentInteractionLength;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4VRestProcess::AtRestDoIt(
|
||||
const G4Track&,
|
||||
const G4Step&
|
||||
)
|
||||
{
|
||||
// clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return pParticleChange;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WrapperProcess.cc,v 1.1 2007-12-12 10:09:49 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user