57 : theStepLength(0.), theInitialTrajState(0), theStepN(0), theG4Track(0)
61 if(verbose >= 5) {
G4cout <<
"G4ErrorPropagator " <<
this <<
G4endl; }
66 thePropIsInitialized =
false;
85 std::ostringstream message;
86 message <<
"Energy too low to be propagated: "
88 G4Exception(
"G4ErrorPropagator::Propagate()",
"GEANT4e-Notification",
98 G4cout <<
" =====> starting GEANT4E tracking for "
109 G4cout <<
" G4ErrorPropagator::Propagate initialTS ";
119 if( theG4Track != 0 ) {
delete theG4Track; }
128 ierr = MakeSteps( currentTS_FREE );
143 *currentTS = *currentTS_FREE;
146 std::ostringstream message;
147 message <<
"Particle does not reach target: " << *currentTS;
148 G4Exception(
"G4ErrorPropagator::Propagate()",
"GEANT4e-Notification",
160 G4cout <<
" G4ErrorPropagator: propagation ended " <<
G4endl;
190 std::ostringstream message;
191 message <<
"Called before initialization is done for this track!";
192 G4Exception(
"G4ErrorPropagator::PropagateOneStep()",
194 "Please call G4ErrorPropagatorManager::InitGeant4e().");
205 std::ostringstream message;
206 message <<
"Energy too low to be propagated: "
208 G4Exception(
"G4ErrorPropagator::PropagateOneStep()",
216 G4cout <<
" =====> starting GEANT4E tracking for "
222 G4cout <<
" G4ErrorPropagator::Propagate initialTS ";
231 if( theG4Track != 0 ) {
delete theG4Track; }
256 if( verbose >= 5 ) {
G4cout <<
"InitG4Track " <<
G4endl; }
265 std::ostringstream message;
266 message <<
"Particle type not defined: " << partType;
267 G4Exception(
"G4ErrorPropagator::InitG4Track()",
"InvalidSetup",
295 G4cout <<
" G4ErrorPropagator new track of energy: "
303 if( fpSteppingManager == 0 )
305 G4Exception(
"G4ErrorPropagator::InitG4Track()",
"InvalidSetup",
344 if( ierr != 0 ) {
break; }
369 <<
"@@@@@@@@@@@@@@@@@@@@@@@@@ NEW STEP " <<
G4endl;
393 G4cout <<
" transportation determined by geant4e " <<
G4endl;
420 G4cout <<
" propagating error " << *currentTS_FREE <<
G4endl;
433 currentTS_FREE->
Update( cTrack );
439 std::ostringstream message;
440 message <<
"Error returned: " << ierr;
443 "Geant4 tracking will be stopped !");
470 std::ostringstream message;
471 message <<
"Wrong trajectory state: " << currentTS->
GetTSType();
472 G4Exception(
"G4ErrorPropagator::InitFreeTrajState()",
"InvalidState",
475 return currentTS_FREE;
490 G4cout <<
" G4ErrorPropagator::Propagate: final state "
499 currentTS = currentTS_FREE;
505 G4Exception(
"G4ErrorPropagator:GetFinalTrajState()",
507 "Using a G4ErrorSurfaceTrajState with wrong target");
517 G4cout << currentTS <<
" returning tssd " << *currentTS <<
G4endl;
520 delete currentTS_FREE;
528 G4bool lastG4eStep =
false;
535 G4cout <<
" G4ErrorPropagator::CheckIfLastStep G4ErrorState= "
549 G4cout <<
" G4ErrorPropagator::CheckIfLastStep " << lastG4eStep
562 std::ostringstream message;
563 message <<
"Track extrapolated until end of World" <<
G4endl
564 <<
"without finding the defined target.";
565 G4Exception(
"G4ErrorPropagator::CheckIfLastStep()",
573 std::ostringstream message;
574 message <<
"Track extrapolated until energy is exhausted" <<
G4endl
575 <<
"without finding the defined target.";
576 G4Exception(
"G4ErrorPropagator::CheckIfLastStep()",
585 G4cout <<
" return CheckIfLastStep " << lastG4eStep <<
G4endl;
598 if( fpUserTrackingAction != 0 )
601 ->PreUserTrackingAction((fpTrack) );
611 if( fpUserTrackingAction != 0 )
614 ->PostUserTrackingAction((fpTrack) );
@ G4ErrorState_TargetCloserThanBoundary
@ G4ErrorState_StoppedAtTarget
@ G4ErrorTarget_GeomVolume
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
void SetPolarization(const G4ThreeVector &)
void SetCharge(G4double charge)
virtual G4int Update(const G4Track *aTrack)
virtual G4int PropagateError(const G4Track *aTrack)
G4ErrorState GetState() const
static G4ErrorPropagatorData * GetErrorPropagatorData()
void SetMode(G4ErrorMode mode)
const G4ErrorTarget * GetTarget(G4bool mustExist=false) const
void SetState(G4ErrorState sta)
void SetTarget(const G4ErrorTarget *target)
G4ErrorMode GetMode() const
G4Track * InitG4Track(G4ErrorTrajState &initialTS)
void InvokePostUserTrackingAction(G4Track *fpTrack)
void InvokePreUserTrackingAction(G4Track *fpTrack)
void GetFinalTrajState(G4ErrorTrajState *currentTS, G4ErrorFreeTrajState *currentTS_FREE, const G4ErrorTarget *target)
G4int PropagateOneStep(G4ErrorTrajState *currentTS)
G4bool CheckIfLastStep(G4Track *aTrack)
G4ErrorFreeTrajState * InitFreeTrajState(G4ErrorTrajState *currentTS)
G4int MakeOneStep(G4ErrorFreeTrajState *currentTS_FREE)
G4int Propagate(G4ErrorTrajState *currentTS, const G4ErrorTarget *target, G4ErrorMode mode=G4ErrorMode_PropForwards)
virtual G4Plane3D GetTangentPlane(const G4ThreeVector &point) const =0
virtual void Dump(const G4String &msg) const =0
G4ErrorTargetType GetType() const
void SetG4Track(G4Track *trk)
G4Vector3D GetMomentum() const
const G4String & GetParticleType() const
virtual G4eTSType GetTSType() const
G4Point3D GetPosition() const
G4UserTrackingAction * GetUserTrackingAction()
static G4EventManager * GetEventManager()
G4TrackingManager * GetTrackingManager() const
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void StartTracking(G4Track *aTrack=nullptr)
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
const G4VProcess * GetProcessDefinedStep() const
G4StepPoint * GetPostStepPoint() const
void SetInitialStep(G4Track *valueTrack)
G4TrackStatus GetTrackStatus() const
void SetStep(const G4Step *aValue)
G4VPhysicalVolume * GetNextVolume() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetStepLength() const
void IncrementCurrentStepNumber()
const G4Step * GetStep() const
void SetParentID(const G4int aValue)
G4SteppingManager * GetSteppingManager() const
const G4String & GetProcessName() const