48 fForceCollisionModelID(-1),
49 fCurrentTrack(nullptr),
50 fCurrentTrackData(nullptr),
51 fInitialTrackWeight(-1.0),
58 if ( fParticleToBias == 0 )
61 ed <<
" Particle `" << particleName <<
"' not found !" <<
G4endl;
62 G4Exception(
" G4BOptrForceCollision::G4BOptrForceCollision(...)",
72 fForceCollisionModelID(-1),
73 fCurrentTrack(nullptr),
74 fCurrentTrackData(nullptr),
75 fInitialTrackWeight(-1.0),
80 fParticleToBias = particle;
86 for ( std::map< const G4BiasingProcessInterface*, G4BOptnForceFreeFlight* >::iterator it = fFreeFlightOperations.begin() ;
87 it != fFreeFlightOperations.end() ;
88 it++ )
delete (*it).second;
89 delete fSharedForceInteractionOperation;
90 delete fCloningOperation;
114 if ( interfaceProcessSharedData )
141 if ( fCurrentTrackData ==
nullptr )
145 if ( fCurrentTrackData ==
nullptr )
return nullptr;
184 G4bool isFirstPhysGPIL = callingProcess-> GetIsFirstPostStepGPILInterface();
187 if ( isFirstPhysGPIL )
198 fSharedForceInteractionOperation->
Initialize( track );
216 fCurrentTrackData->Reset();
222 if ( isFirstPhysGPIL )
234 if ( interactionLength <
DBL_MAX/10. )
244 return operationToReturn;
260 if ( track->
GetDefinition() != fParticleToBias )
return nullptr;
272 if ( fCurrentTrackData !=
nullptr )
277 fCurrentTrackData->fForceCollisionOperator = this ;
290 fInitialTrackWeight = track->
GetWeight();
292 return fCloningOperation;
311 fCurrentTrack = track;
312 fCurrentTrackData =
nullptr;
319 if ( fCurrentTrackData !=
nullptr )
326 ed <<
"Current track deleted while under biasing by " <<
GetName() <<
". Will result in inconsistencies.";
327 G4Exception(
" G4BOptrForceCollision::EndTracking()",
343 if ( fCurrentTrackData ==
nullptr )
348 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
349 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
366 if ( fFreeFlightOperations[callingProcess]->OperationComplete() ) fCurrentTrackData->Reset();
370 if ( operationApplied != fSharedForceInteractionOperation )
373 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
374 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
381 if ( operationApplied != fSharedForceInteractionOperation )
384 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
385 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
397 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
398 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
414 if ( finalStateOperationApplied != fSharedForceInteractionOperation )
417 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
418 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
428 ed <<
" Internal inconsistency : please submit bug report. " <<
G4endl;
429 G4Exception(
" G4BOptrForceCollision::OperationApplied(...)",
G4ParticleDefinition * GetDefinition() const
G4VBiasingOperation * GetCurrentOccurenceBiasingOperation() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
std::ostringstream G4ExceptionDescription
void UpdateForStep(const G4Step *)
void Initialize(const G4Track *)
G4Track * GetCloneTrack() const
void SetAuxiliaryTrackInformation(G4int idx, G4VAuxiliaryTrackInformation *info) const
G4StepStatus GetStepStatus() const
void AddCrossSection(const G4VProcess *, G4double)
G4TrackStatus GetTrackStatus() const
const std::vector< const G4BiasingProcessInterface * > & GetPhysicsBiasingProcessInterfaces() const
G4double GetMaximumDistance() const
virtual void EndTracking() final
const G4ThreeVector & GetInitialMomentum() const
const G4Step * GetStep() const
G4BOptrForceCollision(G4String particleToForce, G4String name="ForceCollision")
G4VProcess * GetWrappedProcess() const
void OperationApplied(const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced) final
G4StepPoint * GetPreStepPoint() const
size_t GetNumberOfSharing() const
void ResetInitialTrackWeight(G4double w)
G4int GetCurrentStepNumber() const
virtual void StartRun() final
G4double GetCurrentInteractionLength() const
virtual void StartTracking(const G4Track *track) final
virtual void Configure() final
G4bool GetInteractionOccured() const
const G4String & GetProcessName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VAuxiliaryTrackInformation * GetAuxiliaryTrackInformation(G4int idx) const
void SetCloneWeights(G4double clone1Weight, G4double clone2Weight)
G4ThreeVector GetMomentum() const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
static G4int Register(const G4String &)
G4double GetWeight() const
virtual void ConfigureForWorker() final
const G4String GetName() const
G4bool IsFreeFromBiasing() const
const G4BiasingProcessSharedData * GetSharedData() const