Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VITProcess Class Reference

#include <G4VITProcess.hh>

Inheritance diagram for G4VITProcess:
Collaboration 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)
 
G4int operator== (const G4VITProcess &right) const
 
G4int 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 ()
 
G4int operator== (const G4VProcess &right) const
 
G4int 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 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 void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () 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 previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

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

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 99 of file G4VITProcess.hh.

Constructor & Destructor Documentation

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

Definition at line 35 of file G4VITProcess.cc.

35  :
36  G4VProcess(name, type)
37 // fpState (0)//,
38 //fProcessID(fNbProcess)
39 {
40  fpState.reset();
41  if(!fNbProcess) fNbProcess = new size_t(0);
42  fProcessID = *fNbProcess;
43  (*fNbProcess)++;
45  currentInteractionLength = 0;
46  theInteractionTimeLeft = 0;
47  theNumberOfInteractionLengthLeft = 0;
48  fProposesTimeStep = false;
49 }
G4VProcess(const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
Definition: G4VProcess.cc:52
void SetInstantiateProcessState(G4bool flag)
G4shared_ptr< G4ProcessState > fpState
G4bool fProposesTimeStep

Here is the call graph for this function:

G4VITProcess::~G4VITProcess ( )
virtual

Definition at line 61 of file G4VITProcess.cc.

62 {
63  //dtor
64  // As the owner, G4IT should delete fProcessState
65 }
G4VITProcess::G4VITProcess ( const G4VITProcess other)

Definition at line 67 of file G4VITProcess.cc.

67  :
68  G4VProcess(other), fProcessID(other.fProcessID)
69 {
70  //copy ctor
71  //fpState = 0 ;
72  currentInteractionLength = 0;
73  theInteractionTimeLeft = 0;
74  theNumberOfInteractionLengthLeft = 0;
75  fInstantiateProcessState = other.fInstantiateProcessState;
77 }
G4VProcess(const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
Definition: G4VProcess.cc:52
G4bool fProposesTimeStep

Member Function Documentation

virtual void G4VITProcess::BuildPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

Reimplemented from G4VProcess.

Reimplemented in G4DNABrownianTransportation, G4ITTransportation, G4DNASecondOrderReaction, and G4DNAElectronHoleRecombination.

Definition at line 151 of file G4VITProcess.hh.

152  {
153  }
void G4VITProcess::ClearInteractionTimeLeft ( )
inlineprotectedvirtual

Definition at line 269 of file G4VITProcess.hh.

270 {
271  fpState->theInteractionTimeLeft = -1.0;
272 }
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

void G4VITProcess::ClearNumberOfInteractionLengthLeft ( )
inlineprotectedvirtual

Definition at line 274 of file G4VITProcess.hh.

275 {
276  fpState->theNumberOfInteractionLengthLeft = -1.0;
277 }
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

void G4VITProcess::CreateInfo ( )
protected
G4double G4VITProcess::GetInteractionTimeLeft ( )
inline

Definition at line 284 of file G4VITProcess.hh.

285 {
286  if (fpState) return fpState->theInteractionTimeLeft;
287 
288  return -1;
289 }
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

const size_t & G4VITProcess::GetMaxProcessIndex ( )
inlinestatic

Definition at line 296 of file G4VITProcess.hh.

297 {
298  if (!fNbProcess) fNbProcess = new size_t(0);
299  return *fNbProcess;
300 }

Here is the caller graph for this function:

size_t G4VITProcess::GetProcessID ( ) const
inline

Definition at line 116 of file G4VITProcess.hh.

117  {
118  return fProcessID;
119  }

Here is the caller graph for this function:

G4shared_ptr<G4ProcessState_Lock> G4VITProcess::GetProcessState ( )
inline

Definition at line 131 of file G4VITProcess.hh.

132  {
134  }
#define UpcastProcessState(destinationType)
Definition: G4VITProcess.hh:83
template<typename T >
T* G4VITProcess::GetState ( )
inlineprotected

Definition at line 223 of file G4VITProcess.hh.

224  {
225  return fpState->GetState<T>();
226  }
G4shared_ptr< G4ProcessState > fpState
G4bool G4VITProcess::InstantiateProcessState ( )
inlineprotected

Definition at line 245 of file G4VITProcess.hh.

246  {
247  return fInstantiateProcessState;
248  }

Here is the caller graph for this function:

G4int G4VITProcess::operator!= ( const G4VITProcess right) const
G4VITProcess & G4VITProcess::operator= ( const G4VITProcess other)

Definition at line 79 of file G4VITProcess.cc.

80 {
81  if (this == &rhs) return *this; // handle self assignment
82  //assignment operator
83  return *this;
84 }
G4int G4VITProcess::operator== ( const G4VITProcess right) const
G4bool G4VITProcess::ProposesTimeStep ( ) const
inline

Definition at line 291 of file G4VITProcess.hh.

292 {
293  return fProposesTimeStep;
294 }
G4bool fProposesTimeStep

Here is the caller graph for this function:

void G4VITProcess::ResetNumberOfInteractionLengthLeft ( )
inlinevirtual

WARNING : Redefine the method of G4VProcess reset (determine the value of)NumberOfInteractionLengthLeft

Reimplemented from G4VProcess.

Definition at line 279 of file G4VITProcess.hh.

280 {
281  fpState->theNumberOfInteractionLengthLeft = -std::log( G4UniformRand());
282 }
#define G4UniformRand()
Definition: Randomize.hh:97
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

void G4VITProcess::ResetProcessState ( )
inline

Definition at line 141 of file G4VITProcess.hh.

142  {
143  fpState.reset();
144  }
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

void G4VITProcess::RetrieveProcessInfo ( )
protected
void G4VITProcess::SetInstantiateProcessState ( G4bool  flag)
inlineprotected

Definition at line 240 of file G4VITProcess.hh.

241  {
242  fInstantiateProcessState = flag;
243  }

Here is the caller graph for this function:

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

Definition at line 136 of file G4VITProcess.hh.

137  {
138  fpState = DowncastState(G4ProcessState, aProcInfo);
139  }
#define DowncastState(destinationType, source)
Definition: G4VITProcess.hh:86
G4shared_ptr< G4ProcessState > fpState

Here is the caller graph for this function:

void G4VITProcess::StartTracking ( G4Track track)
virtual

Reimplemented from G4VProcess.

Reimplemented in G4DNABrownianTransportation, G4ITTransportation, G4DNASecondOrderReaction, and G4DNAElectronHoleRecombination.

Definition at line 86 of file G4VITProcess.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VITProcess::SubtractNumberOfInteractionLengthLeft ( G4double  previousStepSize)
inlineprotectedvirtual

Definition at line 303 of file G4VITProcess.hh.

304 {
305  if (fpState->currentInteractionLength > 0.0)
306  {
307  fpState->theNumberOfInteractionLengthLeft -= previousStepSize
308  / fpState->currentInteractionLength;
309  if (fpState->theNumberOfInteractionLengthLeft < 0.)
310  {
311  fpState->theNumberOfInteractionLengthLeft = CLHEP::perMillion;
312  }
313 
314  }
315  else
316  {
317 #ifdef G4VERBOSE
318  if (verboseLevel > 0)
319  {
320  G4cerr << "G4VITProcess::SubtractNumberOfInteractionLengthLeft()";
321  G4cerr << " [" << theProcessName << "]" << G4endl;
322  G4cerr << " currentInteractionLength = "
323  << fpState->currentInteractionLength << " [mm]";
324  G4cerr << " previousStepSize = " << previousStepSize << " [mm]";
325  G4cerr << G4endl;
326  }
327 #endif
328  G4String msg = "Negative currentInteractionLength for ";
329  msg += theProcessName;
330  G4Exception("G4VITProcess::SubtractNumberOfInteractionLengthLeft()",
331  "ProcMan201",EventMustBeAborted,
332  msg);
333  }
334 }
G4int verboseLevel
Definition: G4VProcess.hh:368
G4shared_ptr< G4ProcessState > fpState
static constexpr double perMillion
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4String theProcessName
Definition: G4VProcess.hh:335
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4bool G4VITProcess::fProposesTimeStep
protected

Definition at line 250 of file G4VITProcess.hh.

G4shared_ptr<G4ProcessState> G4VITProcess::fpState
protected

Definition at line 228 of file G4VITProcess.hh.


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