47 #ifndef G4VITProcess_H
48 #define G4VITProcess_H
77 #define InitProcessState(destinationType,source) \
78 reference_cast<destinationType>(source)
80 #define DowncastProcessState(destinationType) \
81 G4dynamic_pointer_cast<destinationType>(G4VITProcess::fpState)
83 #define UpcastProcessState(destinationType) \
84 G4dynamic_pointer_cast<destinationType>(G4VITProcess::fpState)
86 #define DowncastState(destinationType,source) \
87 G4dynamic_pointer_cast<destinationType>(source)
89 #define UpcastState(destinationType,source) \
90 G4dynamic_pointer_cast<destinationType>(source)
184 return "G4ProcessState";
200 return dynamic_cast<T*
>(
this);
218 return typeid(T).
name();
271 fpState->theInteractionTimeLeft = -1.0;
276 fpState->theNumberOfInteractionLengthLeft = -1.0;
305 if (
fpState->currentInteractionLength > 0.0)
307 fpState->theNumberOfInteractionLengthLeft -= previousStepSize
308 /
fpState->currentInteractionLength;
309 if (
fpState->theNumberOfInteractionLengthLeft < 0.)
320 G4cerr <<
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()";
322 G4cerr <<
" currentInteractionLength = "
323 <<
fpState->currentInteractionLength <<
" [mm]";
324 G4cerr <<
" previousStepSize = " << previousStepSize <<
" [mm]";
328 G4String msg =
"Negative currentInteractionLength for ";
330 G4Exception(
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()",
335 #endif // G4VITProcess_H
virtual ~G4ProcessStateBase()
#define DowncastState(destinationType, source)
virtual void SubtractNumberOfInteractionLengthLeft(G4double previousStepSize)
G4double theInteractionTimeLeft
G4double * theInteractionTimeLeft
G4double * currentInteractionLength
G4int operator!=(const G4VITProcess &right) const
void SetInstantiateProcessState(G4bool flag)
G4double theNumberOfInteractionLengthLeft
G4double * theNumberOfInteractionLengthLeft
G4shared_ptr< G4ProcessState > fpState
virtual ~G4ProcessState_Lock()
virtual G4String GetType()
G4double GetInteractionTimeLeft()
G4VITProcess(const G4String &name, G4ProcessType type=fNotDefined)
virtual void ResetNumberOfInteractionLengthLeft()
G4bool InstantiateProcessState()
virtual G4String GetType()
G4bool ProposesTimeStep() const
G4bool fInstantiateProcessState
static size_t * fNbProcess
virtual void ClearInteractionTimeLeft()
virtual ~G4ProcessState()
#define G4IT_TO_BE_CLONED(parent_class)
#define UpcastProcessState(destinationType)
G4int operator==(const G4VITProcess &right) const
static constexpr double perMillion
G4shared_ptr< G4ProcessState_Lock > GetProcessState()
G4GLOB_DLL std::ostream G4cerr
virtual void StartTracking(G4Track *)
static const size_t & GetMaxProcessIndex()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void ClearNumberOfInteractionLengthLeft()
G4VITProcess & operator=(const G4VITProcess &other)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
size_t GetProcessID() const
void RetrieveProcessInfo()
G4double currentInteractionLength
void SetProcessState(G4shared_ptr< G4ProcessState_Lock > aProcInfo)