#include <G4ErrorPropagator.hh>
Definition at line 53 of file G4ErrorPropagator.hh.
◆ G4ErrorPropagator()
G4ErrorPropagator::G4ErrorPropagator |
( |
| ) |
|
Definition at line 55 of file G4ErrorPropagator.cc.
56 : theStepLength(0.)
57 , theInitialTrajState(0)
58 , theStepN(0)
59 , theG4Track(0)
60{
62#ifdef G4EVERBOSE
63 if(verbose >= 5)
64 {
66 }
67#endif
68
72 thePropIsInitialized = false;
73}
G4GLOB_DLL std::ostream G4cout
static G4EventManager * GetEventManager()
G4TrackingManager * GetTrackingManager() const
G4SteppingManager * GetSteppingManager() const
◆ ~G4ErrorPropagator()
G4ErrorPropagator::~G4ErrorPropagator |
( |
| ) |
|
|
inline |
◆ CheckIfLastStep()
Definition at line 539 of file G4ErrorPropagator.cc.
540{
541 G4bool lastG4eStep =
false;
544
545#ifdef G4EVERBOSE
546 if(verbose >= 4)
547 {
548 G4cout <<
" G4ErrorPropagator::CheckIfLastStep G4ErrorState= "
550 }
551#endif
552
553
554
555
557 {
558 lastG4eStep = true;
559#ifdef G4EVERBOSE
560 if(verbose >= 5)
561 {
562 G4cout <<
" G4ErrorPropagator::CheckIfLastStep " << lastG4eStep <<
" "
564 }
565#endif
566 }
568 {
569
570
571
572 lastG4eStep = true;
573 if(verbose >= 1)
574 {
575 std::ostringstream message;
576 message <<
"Track extrapolated until end of World" <<
G4endl
577 << "without finding the defined target.";
578 G4Exception(
"G4ErrorPropagator::CheckIfLastStep()",
580 }
581 }
583 {
584 if(verbose >= 1)
585 {
586 std::ostringstream message;
587 message <<
"Track extrapolated until energy is exhausted" <<
G4endl
588 << "without finding the defined target.";
589 G4Exception(
"G4ErrorPropagator::CheckIfLastStep()",
591 }
592 lastG4eStep = 1;
593 }
594
595#ifdef G4EVERBOSE
596 if(verbose >= 5)
597 {
598 G4cout <<
" return CheckIfLastStep " << lastG4eStep <<
G4endl;
599 }
600#endif
601
602 return lastG4eStep;
603}
@ G4ErrorState_StoppedAtTarget
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ErrorState GetState() const
static G4ErrorPropagatorData * GetErrorPropagatorData()
G4TrackStatus GetTrackStatus() const
G4VPhysicalVolume * GetNextVolume() const
◆ GetFinalTrajState()
Definition at line 494 of file G4ErrorPropagator.cc.
497{
500
501#ifdef G4EVERBOSE
502 if(verbose >= 1)
503 {
504 G4cout <<
" G4ErrorPropagator::Propagate: final state "
507 }
508#endif
509
512 {
513 currentTS = currentTS_FREE;
514 }
516 {
518 {
519 G4Exception(
"G4ErrorPropagator:GetFinalTrajState()",
"InvalidSetup",
521 "Using a G4ErrorSurfaceTrajState with wrong target");
522 }
528#ifdef G4EVERBOSE
529 if(verbose >= 1)
530 {
531 G4cout << currentTS <<
" returning tssd " << *currentTS <<
G4endl;
532 }
533#endif
534 delete currentTS_FREE;
535 }
536}
virtual G4Plane3D GetTangentPlane(const G4ThreeVector &point) const =0
G4ErrorTargetType GetType() const
virtual G4eTSType GetTSType() const
G4Point3D GetPosition() const
Referenced by Propagate(), and PropagateOneStep().
◆ GetInitialTrajState()
◆ GetStepLength()
G4double G4ErrorPropagator::GetStepLength |
( |
| ) |
const |
|
inline |
◆ InitFreeTrajState()
Definition at line 466 of file G4ErrorPropagator.cc.
468{
470
471
472
474 {
478 }
480 {
482 }
483 else
484 {
485 std::ostringstream message;
486 message <<
"Wrong trajectory state: " << currentTS->
GetTSType();
487 G4Exception(
"G4ErrorPropagator::InitFreeTrajState()",
"InvalidState",
489 }
490 return currentTS_FREE;
491}
Referenced by Propagate(), and PropagateOneStep().
◆ InitG4Track()
Definition at line 264 of file G4ErrorPropagator.cc.
265{
266 if(verbose >= 5)
267 {
269 }
270
271
272
276 if(particle == 0)
277 {
278 std::ostringstream message;
279 message << "Particle type not defined: " << partType;
280 G4Exception(
"G4ErrorPropagator::InitG4Track()",
"InvalidSetup",
282 }
283
286
288
289
290
292 {
294 }
295 else
296 {
298 }
299
300
301
304
305#ifdef G4EVERBOSE
306 if(verbose >= 3)
307 {
308 G4cout <<
" G4ErrorPropagator new track of energy: "
310 }
311#endif
312
313
315
316 if(fpSteppingManager == 0)
317 {
318 G4Exception(
"G4ErrorPropagator::InitG4Track()",
"InvalidSetup",
320 }
321 else
322 {
324 }
325
326
327
329
330
331
333
334
335
337
339
340 return theG4Track;
341}
void SetPolarization(const G4ThreeVector &)
void SetCharge(G4double charge)
void InvokePreUserTrackingAction(G4Track *fpTrack)
void SetG4Track(G4Track *trk)
G4Vector3D GetMomentum() const
const G4String & GetParticleType() const
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void StartTracking(G4Track *aTrack=nullptr)
void SetInitialStep(G4Track *valueTrack)
void SetStep(const G4Step *aValue)
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
void SetParentID(const G4int aValue)
Referenced by Propagate(), and PropagateOneStep().
◆ InvokePostUserTrackingAction()
void G4ErrorPropagator::InvokePostUserTrackingAction |
( |
G4Track * | fpTrack | ) |
|
Definition at line 618 of file G4ErrorPropagator.cc.
619{
622 if(fpUserTrackingAction != 0)
623 {
625 ->PostUserTrackingAction((fpTrack));
626 }
627}
G4UserTrackingAction * GetUserTrackingAction()
Referenced by Propagate().
◆ InvokePreUserTrackingAction()
void G4ErrorPropagator::InvokePreUserTrackingAction |
( |
G4Track * | fpTrack | ) |
|
◆ MakeOneStep()
Definition at line 372 of file G4ErrorPropagator.cc.
373{
377
378
379#ifdef G4EVERBOSE
380 if(verbose >= 2)
381 {
383 }
384#endif
385
387
389
390
391
392
393
394
395
400 {
403 {
404
405#ifdef G4EVERBOSE
406 if(verbose >= 5)
407 {
408 G4cout <<
" transportation determined by geant4e " <<
G4endl;
409 }
410#endif
412 }
414 {
419 {
421 }
422 }
423 }
428 {
430 }
431
432
433
434#ifdef G4EVERBOSE
435 if(verbose >= 2)
436 {
437 G4cout <<
" propagating error " << *currentTS_FREE <<
G4endl;
438 }
439#endif
442
443#ifdef G4EVERBOSE
444 if(verbose >= 3)
445 {
447 }
448#endif
449
450 currentTS_FREE->
Update(cTrack);
451
453
454 if(ierr != 0)
455 {
456 std::ostringstream message;
457 message << "Error returned: " << ierr;
458 G4Exception(
"G4ErrorPropagator::MakeOneStep()",
"GEANT4e-Notification",
459 JustWarning, message,
"Geant4 tracking will be stopped !");
460 }
461
462 return ierr;
463}
@ G4ErrorState_TargetCloserThanBoundary
@ G4ErrorTarget_GeomVolume
virtual G4int Update(const G4Track *aTrack)
virtual G4int PropagateError(const G4Track *aTrack)
const G4ErrorTarget * GetTarget(G4bool mustExist=false) const
void SetState(G4ErrorState sta)
const G4VProcess * GetProcessDefinedStep() const
G4StepPoint * GetPostStepPoint() const
G4double GetStepLength() const
void IncrementCurrentStepNumber()
const G4Step * GetStep() const
const G4String & GetProcessName() const
Referenced by PropagateOneStep().
◆ Propagate()
Definition at line 76 of file G4ErrorPropagator.cc.
79{
80
81
83
86
87
88
90 {
91 std::ostringstream message;
92 message << "Energy too low to be propagated: "
94 G4Exception(
"G4ErrorPropagator::Propagate()",
"GEANT4e-Notification",
96 return -3;
97 }
98
100
101#ifdef G4EVERBOSE
102 if(verbose >= 1)
103 {
104 G4cout <<
" =====> starting GEANT4E tracking for "
107 }
108 if(verbose >= 1)
109 {
111 }
112
113 if(verbose >= 3)
114 {
115 G4cout <<
" G4ErrorPropagator::Propagate initialTS ";
118 }
119#endif
120
122
123
124
125 if(theG4Track != 0)
126 {
127 delete theG4Track;
128 }
130
131
132
134
135
136
137 ierr = MakeSteps(currentTS_FREE);
138
139
140
141
143 {
145 {
146 ierr = -ierr - 10;
147 }
148 else
149 {
150 ierr = -ierr - 20;
151 }
152 *currentTS = *currentTS_FREE;
153 if(verbose >= 0)
154 {
155 std::ostringstream message;
156 message << "Particle does not reach target: " << *currentTS;
157 G4Exception(
"G4ErrorPropagator::Propagate()",
"GEANT4e-Notification",
159 }
160 }
161 else
162 {
164 }
165
166#ifdef G4EVERBOSE
167 if(verbose >= 1)
168 {
169 G4cout <<
" G4ErrorPropagator: propagation ended " <<
G4endl;
170 }
171 if(verbose >= 2)
172 {
174 }
175#endif
176
177
178
180
182
183
184
185 return ierr;
186}
void SetMode(G4ErrorMode mode)
void SetTarget(const G4ErrorTarget *target)
G4ErrorMode GetMode() const
G4Track * InitG4Track(G4ErrorTrajState &initialTS)
void InvokePostUserTrackingAction(G4Track *fpTrack)
void GetFinalTrajState(G4ErrorTrajState *currentTS, G4ErrorFreeTrajState *currentTS_FREE, const G4ErrorTarget *target)
G4ErrorFreeTrajState * InitFreeTrajState(G4ErrorTrajState *currentTS)
virtual void Dump(const G4String &msg) const =0
Referenced by G4ErrorPropagatorManager::Propagate().
◆ PropagateOneStep()
Definition at line 189 of file G4ErrorPropagator.cc.
190{
193
197 {
198 std::ostringstream message;
199 message << "Called before initialization is done for this track!";
200 G4Exception(
"G4ErrorPropagator::PropagateOneStep()",
"InvalidCall",
202 "Please call G4ErrorPropagatorManager::InitGeant4e().");
203 }
204
205
206
208
209
210
212 {
213 std::ostringstream message;
214 message << "Energy too low to be propagated: "
216 G4Exception(
"G4ErrorPropagator::PropagateOneStep()",
"GEANT4e-Notification",
218 return -3;
219 }
220
221#ifdef G4EVERBOSE
222 if(verbose >= 1)
223 {
224 G4cout <<
" =====> starting GEANT4E tracking for "
227 }
228 if(verbose >= 3)
229 {
230 G4cout <<
" G4ErrorPropagator::Propagate initialTS ";
232 }
233#endif
234
235
236
237 if(theStepN == 0)
238 {
239 if(theG4Track != 0)
240 {
241 delete theG4Track;
242 }
244 }
245
246 theStepN++;
247
248
249
251
252
253
255
256
257
259
260 return ierr;
261}
G4int MakeOneStep(G4ErrorFreeTrajState *currentTS_FREE)
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
Referenced by G4ErrorPropagatorManager::PropagateOneStep().
◆ SetStepLength()
void G4ErrorPropagator::SetStepLength |
( |
const G4double | sl | ) |
|
|
inline |
◆ SetStepN()
void G4ErrorPropagator::SetStepN |
( |
const G4int | sn | ) |
|
|
inline |
The documentation for this class was generated from the following files: