Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VITProcess Class Reference

#include <G4VITProcess.hh>

+ Inheritance diagram for G4VITProcess:

Classes

struct  G4ProcessState
 
class  G4ProcessStateBase
 

Public Member Functions

 G4VITProcess (const G4String &name, G4ProcessType type=fNotDefined)
 
virtual ~G4VITProcess ()
 
 G4VITProcess (const G4VITProcess &other)
 
G4VITProcessoperator= (const G4VITProcess &other)
 
G4bool operator== (const G4VITProcess &right) const
 
G4bool operator!= (const G4VITProcess &right) const
 
size_t GetProcessID () const
 
G4shared_ptr< G4ProcessState_LockGetProcessState ()
 
void SetProcessState (G4shared_ptr< G4ProcessState_Lock > aProcInfo)
 
void ResetProcessState ()
 
virtual void StartTracking (G4Track *)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
G4double GetInteractionTimeLeft ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4bool ProposesTimeStep () const
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool operator!= (const G4VProcess &right) const
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)=0
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
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 &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual const G4VProcessGetCreatorProcess () const
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
virtual void ProcessDescription (std::ostream &outfile) const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Static Public Member Functions

static const size_t & GetMaxProcessIndex ()
 
- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 

Protected Member Functions

void RetrieveProcessInfo ()
 
void CreateInfo ()
 
template<typename T >
T * GetState ()
 
virtual void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
virtual void ClearInteractionTimeLeft ()
 
virtual void ClearNumberOfInteractionLengthLeft ()
 
void SetInstantiateProcessState (G4bool flag)
 
G4bool InstantiateProcessState ()
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4shared_ptr< G4ProcessStatefpState
 
G4bool fProposesTimeStep
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Detailed Description

G4VITProcess inherits from G4VProcess. A G4VITProcess is able to save its current state for a given track into G4IT. This state may be retrieve latter on to be used by the G4VITProcess. Each G4VITProcess is tagged.

Definition at line 98 of file G4VITProcess.hh.

Constructor & Destructor Documentation

◆ G4VITProcess() [1/2]

G4VITProcess::G4VITProcess ( const G4String name,
G4ProcessType  type = fNotDefined 
)

Definition at line 34 of file G4VITProcess.cc.

34 :
35 G4VProcess(name, type)
36// fpState (0)//,
37//fProcessID(fNbProcess)
38{
39 fpState.reset();
40 if(!fNbProcess) fNbProcess = new size_t(0);
41 fProcessID = *fNbProcess;
42 (*fNbProcess)++;
44 currentInteractionLength = 0;
45 theInteractionTimeLeft = 0;
46 theNumberOfInteractionLengthLeft = 0;
47 fProposesTimeStep = false;
48}
void SetInstantiateProcessState(G4bool flag)
G4shared_ptr< G4ProcessState > fpState
G4bool fProposesTimeStep

◆ ~G4VITProcess()

G4VITProcess::~G4VITProcess ( )
virtual

Definition at line 60 of file G4VITProcess.cc.

61{
62 //dtor
63 // As the owner, G4IT should delete fProcessState
64}

◆ G4VITProcess() [2/2]

G4VITProcess::G4VITProcess ( const G4VITProcess other)

Definition at line 66 of file G4VITProcess.cc.

66 :
67 G4VProcess(other), fProcessID(other.fProcessID)
68{
69 //copy ctor
70 //fpState = 0 ;
71 currentInteractionLength = 0;
72 theInteractionTimeLeft = 0;
73 theNumberOfInteractionLengthLeft = 0;
74 fInstantiateProcessState = other.fInstantiateProcessState;
76}

Member Function Documentation

◆ BuildPhysicsTable()

virtual void G4VITProcess::BuildPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

◆ ClearInteractionTimeLeft()

void G4VITProcess::ClearInteractionTimeLeft ( )
inlineprotectedvirtual

Definition at line 258 of file G4VITProcess.hh.

259{
260 fpState->theInteractionTimeLeft = -1.0;
261}

Referenced by G4VITRestProcess::AtRestDoIt(), G4DNAElectronHoleRecombination::AtRestDoIt(), and G4DNAMolecularDissociation::AtRestDoIt().

◆ ClearNumberOfInteractionLengthLeft()

void G4VITProcess::ClearNumberOfInteractionLengthLeft ( )
inlineprotectedvirtual

◆ CreateInfo()

void G4VITProcess::CreateInfo ( )
protected

◆ GetInteractionTimeLeft()

G4double G4VITProcess::GetInteractionTimeLeft ( )
inline

Definition at line 273 of file G4VITProcess.hh.

274{
275 if (fpState) return fpState->theInteractionTimeLeft;
276
277 return -1;
278}

Referenced by G4ITStepProcessor::DoDefinePhysicalStepLength().

◆ GetMaxProcessIndex()

const size_t & G4VITProcess::GetMaxProcessIndex ( )
inlinestatic

Definition at line 285 of file G4VITProcess.hh.

286{
287 if (!fNbProcess) fNbProcess = new size_t(0);
288 return *fNbProcess;
289}

Referenced by G4TrackingInformation::GetProcessState().

◆ GetProcessID()

◆ GetProcessState()

G4shared_ptr< G4ProcessState_Lock > G4VITProcess::GetProcessState ( )
inline

Definition at line 120 of file G4VITProcess.hh.

121 {
123 }
#define UpcastProcessState(destinationType)
Definition: G4VITProcess.hh:82

◆ GetState()

template<typename T >
T * G4VITProcess::GetState ( )
inlineprotected

Definition at line 212 of file G4VITProcess.hh.

213 {
214 return fpState->GetState<T>();
215 }

◆ InstantiateProcessState()

G4bool G4VITProcess::InstantiateProcessState ( )
inlineprotected

Definition at line 234 of file G4VITProcess.hh.

235 {
236 return fInstantiateProcessState;
237 }

Referenced by StartTracking().

◆ operator!=()

G4bool G4VITProcess::operator!= ( const G4VITProcess right) const

◆ operator=()

G4VITProcess & G4VITProcess::operator= ( const G4VITProcess other)

Definition at line 78 of file G4VITProcess.cc.

79{
80 if (this == &rhs) return *this; // handle self assignment
81 //assignment operator
82 return *this;
83}

◆ operator==()

G4bool G4VITProcess::operator== ( const G4VITProcess right) const

◆ ProposesTimeStep()

G4bool G4VITProcess::ProposesTimeStep ( ) const
inline

◆ ResetNumberOfInteractionLengthLeft()

void G4VITProcess::ResetNumberOfInteractionLengthLeft ( )
inlinevirtual

◆ ResetProcessState()

◆ RetrieveProcessInfo()

void G4VITProcess::RetrieveProcessInfo ( )
protected

◆ SetInstantiateProcessState()

void G4VITProcess::SetInstantiateProcessState ( G4bool  flag)
inlineprotected

◆ SetProcessState()

void G4VITProcess::SetProcessState ( G4shared_ptr< G4ProcessState_Lock aProcInfo)
inline

◆ StartTracking()

void G4VITProcess::StartTracking ( G4Track track)
virtual

Reimplemented from G4VProcess.

Reimplemented in G4DNASecondOrderReaction, G4DNAElectronHoleRecombination, G4DNAScavengerProcess, G4ITTransportation, G4DNABrownianTransportation, and G4DNAPolyNucleotideReactionProcess.

Definition at line 85 of file G4VITProcess.cc.

86{
87 G4TrackingInformation* trackingInfo = GetIT(track)->GetTrackingInfo();
89 {
90 // fpState = new G4ProcessState();
91 fpState.reset(new G4ProcessState());
92 }
93
94 theNumberOfInteractionLengthLeft = &(fpState->theNumberOfInteractionLengthLeft );
95 theInteractionTimeLeft = &(fpState->theInteractionTimeLeft );
96 currentInteractionLength = &(fpState->currentInteractionLength );
97 trackingInfo->RecordProcessState(fpState,fProcessID);
98 // fpState = 0;
99 fpState.reset();
100}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
G4TrackingInformation * GetTrackingInfo()
Definition: G4IT.hh:143
void RecordProcessState(G4shared_ptr< G4ProcessState_Lock >, size_t index)
G4bool InstantiateProcessState()

Referenced by G4DNASecondOrderReaction::StartTracking(), G4DNAElectronHoleRecombination::StartTracking(), G4DNAScavengerProcess::StartTracking(), G4ITTransportation::StartTracking(), and G4DNAPolyNucleotideReactionProcess::StartTracking().

◆ SubtractNumberOfInteractionLengthLeft()

void G4VITProcess::SubtractNumberOfInteractionLengthLeft ( G4double  previousStepSize)
inlineprotectedvirtual

Definition at line 292 of file G4VITProcess.hh.

293{
294 if (fpState->currentInteractionLength > 0.0)
295 {
296 fpState->theNumberOfInteractionLengthLeft -= previousStepSize
297 / fpState->currentInteractionLength;
298 if (fpState->theNumberOfInteractionLengthLeft < 0.)
299 {
300 fpState->theNumberOfInteractionLengthLeft = CLHEP::perMillion;
301 }
302
303 }
304 else
305 {
306#ifdef G4VERBOSE
307 if (verboseLevel > 0)
308 {
309 G4cerr << "G4VITProcess::SubtractNumberOfInteractionLengthLeft()";
310 G4cerr << " [" << theProcessName << "]" << G4endl;
311 G4cerr << " currentInteractionLength = "
312 << fpState->currentInteractionLength << " [mm]";
313 G4cerr << " previousStepSize = " << previousStepSize << " [mm]";
314 G4cerr << G4endl;
315 }
316#endif
317 G4String msg = "Negative currentInteractionLength for ";
318 msg += theProcessName;
319 G4Exception("G4VITProcess::SubtractNumberOfInteractionLengthLeft()",
320 "ProcMan201",EventMustBeAborted,
321 msg);
322 }
323}
@ EventMustBeAborted
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4int verboseLevel
Definition: G4VProcess.hh:360
G4String theProcessName
Definition: G4VProcess.hh:345

Referenced by G4DNAPolyNucleotideReactionProcess::PostStepGetPhysicalInteractionLength(), G4VITDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4DNASecondOrderReaction::PostStepGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), and G4DNAScavengerProcess::PostStepGetPhysicalInteractionLength().

Member Data Documentation

◆ fProposesTimeStep

◆ fpState


The documentation for this class was generated from the following files: