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) 116 size_t GetProcessID()
const 149 virtual void StartTracking(G4Track*);
155 inline G4double GetInteractionTimeLeft();
160 virtual void ResetNumberOfInteractionLengthLeft();
162 inline G4bool ProposesTimeStep()
const;
164 inline static const size_t& GetMaxProcessIndex();
169 void RetrieveProcessInfo();
184 return "G4ProcessState";
200 return dynamic_cast<T*
>(
this);
218 return typeid(T).
name();
225 return fpState->GetState<T>();
230 void virtual SubtractNumberOfInteractionLengthLeft(
G4double previousStepSize);
232 inline virtual void ClearInteractionTimeLeft();
234 inline virtual void ClearNumberOfInteractionLengthLeft();
242 fInstantiateProcessState = flag;
247 return fInstantiateProcessState;
271 fpState->theInteractionTimeLeft = -1.0;
276 fpState->theNumberOfInteractionLengthLeft = -1.0;
281 fpState->theNumberOfInteractionLengthLeft = -std::log(
G4UniformRand());
286 if (fpState)
return fpState->theInteractionTimeLeft;
293 return fProposesTimeStep;
298 if (!fNbProcess) fNbProcess =
new size_t(0);
305 if (fpState->currentInteractionLength > 0.0)
307 fpState->theNumberOfInteractionLengthLeft -= previousStepSize
308 / fpState->currentInteractionLength;
309 if (fpState->theNumberOfInteractionLengthLeft < 0.)
318 if (verboseLevel > 0)
320 G4cerr <<
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()";
322 G4cerr <<
" currentInteractionLength = " 323 << fpState->currentInteractionLength <<
" [mm]";
324 G4cerr <<
" previousStepSize = " << previousStepSize <<
" [mm]";
328 G4String msg =
"Negative currentInteractionLength for ";
329 msg += theProcessName;
330 G4Exception(
"G4VITProcess::SubtractNumberOfInteractionLengthLeft()",
335 #endif // G4VITProcess_H bool operator==(const HepRotation &r, const HepLorentzRotation <)
#define DowncastState(destinationType, source)
virtual void ClearNumberOfInteractionLengthLeft()
virtual ~G4ProcessStateBase()
static const size_t & GetMaxProcessIndex()
G4double currentInteractionLength
#define G4IT_TO_BE_CLONED(parent_class)
virtual G4String GetType()
virtual void ResetNumberOfInteractionLengthLeft()
#define UpcastProcessState(destinationType)
G4bool ProposesTimeStep() const
G4double theInteractionTimeLeft
void SetInstantiateProcessState(G4bool flag)
virtual void SubtractNumberOfInteractionLengthLeft(G4double previousStepSize)
virtual void ClearInteractionTimeLeft()
G4shared_ptr< G4ProcessState_Lock > GetProcessState()
virtual ~G4ProcessState_Lock()
G4shared_ptr< G4ProcessState > fpState
G4double GetInteractionTimeLeft()
bool operator!=(const HepRotation &r, const HepLorentzRotation <)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetProcessState(G4shared_ptr< G4ProcessState_Lock > aProcInfo)
static const double perMillion
G4double * theNumberOfInteractionLengthLeft
G4bool fInstantiateProcessState
G4bool InstantiateProcessState()
static size_t * fNbProcess
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
G4double * currentInteractionLength
virtual G4String GetType()
G4double * theInteractionTimeLeft
G4double theNumberOfInteractionLengthLeft
G4GLOB_DLL std::ostream G4cerr