76#define InitProcessState(destinationType,source) \
77 reference_cast<destinationType>(source)
79#define DowncastProcessState(destinationType) \
80 G4dynamic_pointer_cast<destinationType>(G4VITProcess::fpState)
82#define UpcastProcessState(destinationType) \
83 G4dynamic_pointer_cast<destinationType>(G4VITProcess::fpState)
85#define DowncastState(destinationType,source) \
86 G4dynamic_pointer_cast<destinationType>(source)
88#define UpcastState(destinationType,source) \
89 G4dynamic_pointer_cast<destinationType>(source)
173 return "G4ProcessState";
189 return dynamic_cast<T*
>(
this);
206 return typeid(T).name();
230 fInstantiateProcessState = flag;
235 return fInstantiateProcessState;
247 staticsize_t *fNbProcess;
249 G4bool fInstantiateProcessState;
252 G4double* theNumberOfInteractionLengthLeft;
259 fpState->theInteractionTimeLeft = -1.0;
264 fpState->theNumberOfInteractionLengthLeft = -1.0;
286 if (fNbProcess ==
nullptr) fNbProcess =
new size_t(0);
293 if (
fpState->currentInteractionLength > 0.0)
295 fpState->theNumberOfInteractionLengthLeft -= previousStepSize
296 /
fpState->currentInteractionLength;
297 if (
fpState->theNumberOfInteractionLengthLeft < 0.)
299 fpState->theNumberOfInteractionLengthLeft = CLHEP::perMillion;
308 G4cerr <<
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()";
310 G4cerr <<
" currentInteractionLength = "
311 <<
fpState->currentInteractionLength <<
" [mm]";
312 G4cerr <<
" previousStepSize = " << previousStepSize <<
" [mm]";
316 G4String msg =
"Negative currentInteractionLength for ";
318 G4Exception(
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()",
#define G4IT_TO_BE_CLONED(parent_class)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define DowncastState(destinationType, source)
#define UpcastProcessState(destinationType)
G4GLOB_DLL std::ostream G4cerr
~G4ProcessStateBase() override=default
G4String GetType() override
G4bool ProposesTimeStep() const
G4bool operator!=(const G4VITProcess &right) const
void SetInstantiateProcessState(G4bool flag)
size_t GetProcessID() const
virtual void SubtractNumberOfInteractionLengthLeft(G4double previousStepSize)
void BuildPhysicsTable(const G4ParticleDefinition &) override
G4shared_ptr< G4ProcessState > fpState
G4bool operator==(const G4VITProcess &right) const
G4shared_ptr< G4ProcessState_Lock > GetProcessState()
virtual void ClearInteractionTimeLeft()
void SetProcessState(G4shared_ptr< G4ProcessState_Lock > aProcInfo)
G4VITProcess & operator=(const G4VITProcess &other)
void RetrieveProcessInfo()
void StartTracking(G4Track *) override
G4VITProcess(const G4String &name, G4ProcessType type=fNotDefined)
G4bool InstantiateProcessState()
G4double GetInteractionTimeLeft()
static const size_t & GetMaxProcessIndex()
virtual void ClearNumberOfInteractionLengthLeft()
void ResetNumberOfInteractionLengthLeft() override
virtual ~G4ProcessState_Lock()
~G4ProcessState() override
G4double currentInteractionLength
G4double theNumberOfInteractionLengthLeft
virtual G4String GetType()
G4double theInteractionTimeLeft