Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4SteppingManager Class Reference

#include <G4SteppingManager.hh>

Public Member Functions

 G4SteppingManager ()
 
 ~G4SteppingManager ()
 
const G4TrackVectorGetSecondary () const
 
void SetUserAction (G4UserSteppingAction *apAction)
 
G4TrackGetTrack () const
 
void SetVerboseLevel (G4int vLevel)
 
void SetVerbose (G4VSteppingVerbose *)
 
G4StepGetStep () const
 
void SetNavigator (G4Navigator *value)
 
G4StepStatus Stepping ()
 
void SetInitialStep (G4Track *valueTrack)
 
void GetProcessNumber ()
 
G4double GetPhysicalStep ()
 
G4double GetGeometricalStep ()
 
G4double GetCorrectedStep ()
 
G4bool GetPreStepPointIsGeom ()
 
G4bool GetFirstStep ()
 
G4StepStatus GetfStepStatus ()
 
G4double GetTempInitVelocity ()
 
G4double GetTempVelocity ()
 
G4double GetMass ()
 
G4double GetsumEnergyChange ()
 
G4VParticleChangeGetfParticleChange ()
 
G4TrackGetfTrack ()
 
G4TrackVectorGetfSecondary ()
 
G4StepGetfStep ()
 
G4StepPointGetfPreStepPoint ()
 
G4StepPointGetfPostStepPoint ()
 
G4VPhysicalVolumeGetfCurrentVolume ()
 
G4VSensitiveDetectorGetfSensitive ()
 
G4VProcessGetfCurrentProcess ()
 
G4ProcessVectorGetfAtRestDoItVector ()
 
G4ProcessVectorGetfAlongStepDoItVector ()
 
G4ProcessVectorGetfPostStepDoItVector ()
 
G4ProcessVectorGetfAlongStepGetPhysIntVector ()
 
G4ProcessVectorGetfPostStepGetPhysIntVector ()
 
G4ProcessVectorGetfAtRestGetPhysIntVector ()
 
G4double GetcurrentMinimumStep ()
 
G4double GetnumberOfInteractionLengthLeft ()
 
size_t GetfAtRestDoItProcTriggered ()
 
size_t GetfAlongStepDoItProcTriggered ()
 
size_t GetfPostStepDoItProcTriggered ()
 
G4int GetfN2ndariesAtRestDoIt ()
 
G4int GetfN2ndariesAlongStepDoIt ()
 
G4int GetfN2ndariesPostStepDoIt ()
 
G4NavigatorGetfNavigator ()
 
G4int GetverboseLevel ()
 
size_t GetMAXofAtRestLoops ()
 
size_t GetMAXofAlongStepLoops ()
 
size_t GetMAXofPostStepLoops ()
 
G4SelectedAtRestDoItVectorGetfSelectedAtRestDoItVector ()
 
G4SelectedAlongStepDoItVectorGetfSelectedAlongStepDoItVector ()
 
G4SelectedPostStepDoItVectorGetfSelectedPostStepDoItVector ()
 
G4double GetfPreviousStepSize ()
 
const G4TouchableHandleGetTouchableHandle ()
 
G4SteppingControl GetStepControlFlag ()
 
G4UserSteppingActionGetUserAction ()
 
G4double GetphysIntLength ()
 
G4ForceCondition GetfCondition ()
 
G4GPILSelection GetfGPILSelection ()
 

Public Attributes

G4bool KillVerbose
 

Detailed Description

Definition at line 92 of file G4SteppingManager.hh.

Constructor & Destructor Documentation

G4SteppingManager::G4SteppingManager ( )

Definition at line 56 of file G4SteppingManager.cc.

58  : fUserSteppingAction(0), verboseLevel(0)
59 {
60 
61 // Construct simple 'has-a' related objects
62  fStep = new G4Step();
63  fSecondary = fStep->NewSecondaryVector();
64  fPreStepPoint = fStep->GetPreStepPoint();
65  fPostStepPoint = fStep->GetPostStepPoint();
66 #ifdef G4VERBOSE
68  fVerbose = new G4SteppingVerbose();
70  fVerbose -> SetManager(this);
71  KillVerbose = true;
72  }
73  else {
75  fVerbose -> SetManager(this);
76  KillVerbose = false;
77  }
78 #endif
80  ->GetNavigatorForTracking());
81 
82  fSelectedAtRestDoItVector
84  fSelectedAlongStepDoItVector
86  fSelectedPostStepDoItVector
88 
90  ->GetNavigatorForTracking());
91 
92  physIntLength = DBL_MAX;
94 }
static G4VSteppingVerbose * GetInstance()
void SetNavigator(G4Navigator *value)
class std::vector< int, std::allocator< int > > G4SelectedAtRestDoItVector
class std::vector< int, std::allocator< int > > G4SelectedAlongStepDoItVector
G4double GetSurfaceTolerance() const
G4StepPoint * GetPreStepPoint() const
class std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
G4TrackVector * NewSecondaryVector()
Definition: G4Step.hh:76
static G4TransportationManager * GetTransportationManager()
static void SetInstance(G4VSteppingVerbose *Instance)
G4StepPoint * GetPostStepPoint() const
#define DBL_MAX
Definition: templates.hh:83
static G4GeometryTolerance * GetInstance()
static const size_t SizeOfSelectedDoItVector

Here is the call graph for this function:

G4SteppingManager::~G4SteppingManager ( )

Definition at line 97 of file G4SteppingManager.cc.

99 {
100  fTouchableHandle = 0;
101 // Destruct simple 'has-a' objects
102  fStep->DeleteSecondaryVector();
104  delete fStep;
105  delete fSelectedAtRestDoItVector;
106  delete fSelectedAlongStepDoItVector;
107  delete fSelectedPostStepDoItVector;
108  if (fUserSteppingAction) delete fUserSteppingAction;
109 #ifdef G4VERBOSE
110  if(KillVerbose) delete fVerbose;
111 #endif
112 }
void DeleteSecondaryVector()

Here is the call graph for this function:

Member Function Documentation

G4double G4SteppingManager::GetCorrectedStep ( )
inline

Definition at line 307 of file G4SteppingManager.hh.

307  {
308  return CorrectedStep;
309  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetcurrentMinimumStep ( )
size_t G4SteppingManager::GetfAlongStepDoItProcTriggered ( )
inline

Definition at line 403 of file G4SteppingManager.hh.

403  {
404  return fAtRestDoItProcTriggered;
405  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfAlongStepDoItVector ( )
inline

Definition at line 371 of file G4SteppingManager.hh.

371  {
372  return fAlongStepDoItVector;
373  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfAlongStepGetPhysIntVector ( )
inline

Definition at line 382 of file G4SteppingManager.hh.

382  {
383  return fAlongStepGetPhysIntVector;
384  }

Here is the caller graph for this function:

size_t G4SteppingManager::GetfAtRestDoItProcTriggered ( )
inline

Definition at line 400 of file G4SteppingManager.hh.

400  {
401  return fAtRestDoItProcTriggered;
402  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfAtRestDoItVector ( )
inline

Definition at line 368 of file G4SteppingManager.hh.

368  {
369  return fAtRestDoItVector;
370  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfAtRestGetPhysIntVector ( )
inline

Definition at line 378 of file G4SteppingManager.hh.

378  {
379  return fAtRestGetPhysIntVector;
380  }

Here is the caller graph for this function:

G4ForceCondition G4SteppingManager::GetfCondition ( )
inline

Definition at line 452 of file G4SteppingManager.hh.

452  {
453  return fCondition;
454  }

Here is the caller graph for this function:

G4VProcess * G4SteppingManager::GetfCurrentProcess ( )
inline

Definition at line 364 of file G4SteppingManager.hh.

364  {
365  return fCurrentProcess;
366  }

Here is the caller graph for this function:

G4VPhysicalVolume * G4SteppingManager::GetfCurrentVolume ( )
inline

Definition at line 358 of file G4SteppingManager.hh.

358  {
359  return fCurrentVolume;
360  }

Here is the caller graph for this function:

G4GPILSelection G4SteppingManager::GetfGPILSelection ( )
inline

Definition at line 455 of file G4SteppingManager.hh.

455  {
456  return fGPILSelection;
457  }

Here is the caller graph for this function:

G4bool G4SteppingManager::GetFirstStep ( )
inline

Definition at line 315 of file G4SteppingManager.hh.

315  {
316  return FirstStep;
317  }

Here is the caller graph for this function:

G4int G4SteppingManager::GetfN2ndariesAlongStepDoIt ( )
inline

Definition at line 412 of file G4SteppingManager.hh.

412  {
413  return fN2ndariesAlongStepDoIt;
414  }

Here is the caller graph for this function:

G4int G4SteppingManager::GetfN2ndariesAtRestDoIt ( )
inline

Definition at line 409 of file G4SteppingManager.hh.

409  {
410  return fN2ndariesAtRestDoIt;
411  }

Here is the caller graph for this function:

G4int G4SteppingManager::GetfN2ndariesPostStepDoIt ( )
inline

Definition at line 415 of file G4SteppingManager.hh.

415  {
416  return fN2ndariesPostStepDoIt;
417  }

Here is the caller graph for this function:

G4Navigator * G4SteppingManager::GetfNavigator ( )
inline

Definition at line 419 of file G4SteppingManager.hh.

419  {
420  return fNavigator;
421  }

Here is the caller graph for this function:

G4VParticleChange * G4SteppingManager::GetfParticleChange ( )
inline

Definition at line 337 of file G4SteppingManager.hh.

337  {
338  return fParticleChange;
339  }

Here is the caller graph for this function:

size_t G4SteppingManager::GetfPostStepDoItProcTriggered ( )
inline

Definition at line 406 of file G4SteppingManager.hh.

406  {
407  return fPostStepDoItProcTriggered;
408  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfPostStepDoItVector ( )
inline

Definition at line 374 of file G4SteppingManager.hh.

374  {
375  return fPostStepDoItVector;
376  }

Here is the caller graph for this function:

G4ProcessVector * G4SteppingManager::GetfPostStepGetPhysIntVector ( )
inline

Definition at line 386 of file G4SteppingManager.hh.

386  {
387  return fPostStepGetPhysIntVector;
388  }

Here is the caller graph for this function:

G4StepPoint * G4SteppingManager::GetfPostStepPoint ( )
inline

Definition at line 354 of file G4SteppingManager.hh.

354  {
355  return fPostStepPoint;
356  }

Here is the caller graph for this function:

G4StepPoint * G4SteppingManager::GetfPreStepPoint ( )
inline

Definition at line 351 of file G4SteppingManager.hh.

351  {
352  return fPreStepPoint;
353  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetfPreviousStepSize ( )
inline

Definition at line 438 of file G4SteppingManager.hh.

438  {
439  return fPreviousStepSize;
440  }

Here is the caller graph for this function:

G4TrackVector * G4SteppingManager::GetfSecondary ( )
inline

Definition at line 345 of file G4SteppingManager.hh.

345  {
346  return fStep->GetfSecondary();
347  }
G4TrackVector * GetfSecondary()

Here is the call graph for this function:

Here is the caller graph for this function:

G4SelectedAlongStepDoItVector * G4SteppingManager::GetfSelectedAlongStepDoItVector ( )
inline

Definition at line 430 of file G4SteppingManager.hh.

430  {
431  return fSelectedAlongStepDoItVector;
432  }

Here is the caller graph for this function:

G4SelectedAtRestDoItVector * G4SteppingManager::GetfSelectedAtRestDoItVector ( )
inline

Definition at line 426 of file G4SteppingManager.hh.

426  {
427  return fSelectedAtRestDoItVector;
428  }

Here is the caller graph for this function:

G4SelectedPostStepDoItVector * G4SteppingManager::GetfSelectedPostStepDoItVector ( )
inline

Definition at line 434 of file G4SteppingManager.hh.

434  {
435  return fSelectedPostStepDoItVector;
436  }

Here is the caller graph for this function:

G4VSensitiveDetector * G4SteppingManager::GetfSensitive ( )
inline

Definition at line 361 of file G4SteppingManager.hh.

361  {
362  return fSensitive;
363  }

Here is the caller graph for this function:

G4Step * G4SteppingManager::GetfStep ( )
inline

Definition at line 348 of file G4SteppingManager.hh.

348  {
349  return fStep;
350  }

Here is the caller graph for this function:

G4StepStatus G4SteppingManager::GetfStepStatus ( )
inline

Definition at line 319 of file G4SteppingManager.hh.

319  {
320  return fStepStatus;
321  }

Here is the caller graph for this function:

G4Track * G4SteppingManager::GetfTrack ( )
inline

Definition at line 341 of file G4SteppingManager.hh.

341  {
342  return fTrack;
343  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetGeometricalStep ( )
inline

Definition at line 303 of file G4SteppingManager.hh.

303  {
304  return GeometricalStep;
305  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetMass ( )
inline

Definition at line 329 of file G4SteppingManager.hh.

329  {
330  return Mass;
331  }

Here is the caller graph for this function:

size_t G4SteppingManager::GetMAXofAlongStepLoops ( )
inline

Definition at line 393 of file G4SteppingManager.hh.

393  {
394  return MAXofAlongStepLoops;
395  }

Here is the caller graph for this function:

size_t G4SteppingManager::GetMAXofAtRestLoops ( )
inline

Definition at line 390 of file G4SteppingManager.hh.

390  {
391  return MAXofAtRestLoops;
392  }

Here is the caller graph for this function:

size_t G4SteppingManager::GetMAXofPostStepLoops ( )
inline

Definition at line 396 of file G4SteppingManager.hh.

396  {
397  return MAXofPostStepLoops;
398  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetnumberOfInteractionLengthLeft ( )
G4double G4SteppingManager::GetPhysicalStep ( )
inline

Definition at line 299 of file G4SteppingManager.hh.

299  {
300  return PhysicalStep;
301  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetphysIntLength ( )
inline

Definition at line 449 of file G4SteppingManager.hh.

449  {
450  return physIntLength;
451  }

Here is the caller graph for this function:

G4bool G4SteppingManager::GetPreStepPointIsGeom ( )
inline

Definition at line 311 of file G4SteppingManager.hh.

311  {
312  return PreStepPointIsGeom;
313  }

Here is the caller graph for this function:

void G4SteppingManager::GetProcessNumber ( )

Definition at line 56 of file G4SteppingManager2.cc.

58 {
59 #ifdef debug
60  G4cout<<"G4SteppingManager::GetProcessNumber: is called track="
61  <<fTrack<<G4endl;
62 #endif
63 
65  if(!pm)
66  {
67  G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl
68  << " ProcessManager is NULL for particle = "
69  << fTrack->GetDefinition()->GetParticleName() << ", PDG_code = "
70  << fTrack->GetDefinition()->GetPDGEncoding() << G4endl;
71  G4Exception("G4SteppingManager::GetProcessNumber()", "Tracking0011",
72  FatalException, "Process Manager is not found.");
73  return;
74  }
75 
76 // AtRestDoits
77  MAXofAtRestLoops = pm->GetAtRestProcessVector()->entries();
78  fAtRestDoItVector = pm->GetAtRestProcessVector(typeDoIt);
79  fAtRestGetPhysIntVector = pm->GetAtRestProcessVector(typeGPIL);
80 #ifdef debug
81  G4cout << "G4SteppingManager::GetProcessNumber: #ofAtRest="
82  << MAXofAtRestLoops << G4endl;
83 #endif
84 
85 // AlongStepDoits
86  MAXofAlongStepLoops = pm->GetAlongStepProcessVector()->entries();
87  fAlongStepDoItVector = pm->GetAlongStepProcessVector(typeDoIt);
88  fAlongStepGetPhysIntVector = pm->GetAlongStepProcessVector(typeGPIL);
89 #ifdef debug
90  G4cout << "G4SteppingManager::GetProcessNumber:#ofAlongStp="
91  << MAXofAlongStepLoops << G4endl;
92 #endif
93 
94 // PostStepDoits
95  MAXofPostStepLoops = pm->GetPostStepProcessVector()->entries();
96  fPostStepDoItVector = pm->GetPostStepProcessVector(typeDoIt);
97  fPostStepGetPhysIntVector = pm->GetPostStepProcessVector(typeGPIL);
98 #ifdef debug
99  G4cout << "G4SteppingManager::GetProcessNumber: #ofPostStep="
100  << MAXofPostStepLoops << G4endl;
101 #endif
102 
103  if (SizeOfSelectedDoItVector<MAXofAtRestLoops ||
104  SizeOfSelectedDoItVector<MAXofAlongStepLoops ||
105  SizeOfSelectedDoItVector<MAXofPostStepLoops )
106  {
107  G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl
108  << " SizeOfSelectedDoItVector= " << SizeOfSelectedDoItVector
109  << " ; is smaller then one of MAXofAtRestLoops= "
110  << MAXofAtRestLoops << G4endl
111  << " or MAXofAlongStepLoops= " << MAXofAlongStepLoops
112  << " or MAXofPostStepLoops= " << MAXofPostStepLoops << G4endl;
113  G4Exception("G4SteppingManager::GetProcessNumber()",
114  "Tracking0012", FatalException,
115  "The array size is smaller than the actual No of processes.");
116  }
117 }
G4ParticleDefinition * GetDefinition() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int entries() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
static const size_t SizeOfSelectedDoItVector
G4GLOB_DLL std::ostream G4cerr
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const

Here is the call graph for this function:

Here is the caller graph for this function:

const G4TrackVector * G4SteppingManager::GetSecondary ( ) const
inline

Definition at line 459 of file G4SteppingManager.hh.

459  {
460  return fStep->GetSecondary();
461  }
const G4TrackVector * GetSecondary() const

Here is the call graph for this function:

G4Step * G4SteppingManager::GetStep ( ) const
inline

Definition at line 486 of file G4SteppingManager.hh.

486  {
487  return fStep;
488  }

Here is the caller graph for this function:

G4SteppingControl G4SteppingManager::GetStepControlFlag ( )
inline

Definition at line 446 of file G4SteppingManager.hh.

446  {
447  return StepControlFlag;
448  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetsumEnergyChange ( )
inline

Definition at line 333 of file G4SteppingManager.hh.

333  {
334  return sumEnergyChange;
335  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetTempInitVelocity ( )
inline

Definition at line 323 of file G4SteppingManager.hh.

323  {
324  return TempInitVelocity;
325  }

Here is the caller graph for this function:

G4double G4SteppingManager::GetTempVelocity ( )
inline

Definition at line 326 of file G4SteppingManager.hh.

326  {
327  return TempVelocity;
328  }

Here is the caller graph for this function:

const G4TouchableHandle & G4SteppingManager::GetTouchableHandle ( )
inline

Definition at line 442 of file G4SteppingManager.hh.

442  {
443  return fTouchableHandle;
444  }

Here is the caller graph for this function:

G4Track * G4SteppingManager::GetTrack ( ) const
inline

Definition at line 474 of file G4SteppingManager.hh.

474  {
475  return fTrack;
476  }

Here is the caller graph for this function:

G4UserSteppingAction * G4SteppingManager::GetUserAction ( )
inline

Definition at line 470 of file G4SteppingManager.hh.

470  {
471  return fUserSteppingAction;
472  }

Here is the caller graph for this function:

G4int G4SteppingManager::GetverboseLevel ( )
inline

Definition at line 422 of file G4SteppingManager.hh.

422  {
423  return verboseLevel;
424  }

Here is the caller graph for this function:

void G4SteppingManager::SetInitialStep ( G4Track valueTrack)

Definition at line 256 of file G4SteppingManager.cc.

258 {
259 
260 // Set up several local variables.
261  PreStepPointIsGeom = false;
262  FirstStep = true;
263  fParticleChange = 0;
264  fPreviousStepSize = 0.;
265  fStepStatus = fUndefined;
266 
267  fTrack = valueTrack;
268  Mass = fTrack->GetDynamicParticle()->GetMass();
269 
270  PhysicalStep = 0.;
271  GeometricalStep = 0.;
272  CorrectedStep = 0.;
273  PreStepPointIsGeom = false;
274  FirstStep = false;
275  fStepStatus = fUndefined;
276 
277  TempInitVelocity = 0.;
278  TempVelocity = 0.;
279  sumEnergyChange = 0.;
280 
281 
282 // If the primary track has 'Suspend' or 'PostponeToNextEvent' state,
283 // set the track state to 'Alive'.
284  if( (fTrack->GetTrackStatus()==fSuspend) ||
285  (fTrack->GetTrackStatus()==fPostponeToNextEvent) ){
286  fTrack->SetTrackStatus(fAlive);
287  }
288 
289 // If the primary track has 'zero' kinetic energy, set the track
290 // state to 'StopButAlive'.
291  if(fTrack->GetKineticEnergy() <= 0.0){
292  fTrack->SetTrackStatus( fStopButAlive );
293  }
294 
295 
296 // Set Touchable to track and a private attribute of G4SteppingManager
297 
298 
299  if ( ! fTrack->GetTouchableHandle() ) {
300  G4ThreeVector direction= fTrack->GetMomentumDirection();
301  fNavigator->LocateGlobalPointAndSetup( fTrack->GetPosition(),
302  &direction, false, false );
303  fTouchableHandle = fNavigator->CreateTouchableHistory();
304 
305  fTrack->SetTouchableHandle( fTouchableHandle );
306  fTrack->SetNextTouchableHandle( fTouchableHandle );
307  }else{
308  fTrack->SetNextTouchableHandle( fTouchableHandle = fTrack->GetTouchableHandle() );
309  G4VPhysicalVolume* oldTopVolume= fTrack->GetTouchableHandle()->GetVolume();
310  G4VPhysicalVolume* newTopVolume=
311  fNavigator->ResetHierarchyAndLocate( fTrack->GetPosition(),
312  fTrack->GetMomentumDirection(),
313  *((G4TouchableHistory*)fTrack->GetTouchableHandle()()) );
314 // if(newTopVolume != oldTopVolume ){
315  if(newTopVolume != oldTopVolume || oldTopVolume->GetRegularStructureId() == 1 ) {
316  fTouchableHandle = fNavigator->CreateTouchableHistory();
317  fTrack->SetTouchableHandle( fTouchableHandle );
318  fTrack->SetNextTouchableHandle( fTouchableHandle );
319  }
320  }
321 // Set OriginTouchableHandle for primary track
322  if(fTrack->GetParentID()==0){
323  fTrack->SetOriginTouchableHandle(fTrack->GetTouchableHandle());
324  }
325 
326 // Set vertex information of G4Track at here
327  if ( fTrack->GetCurrentStepNumber() == 0 ) {
328  fTrack->SetVertexPosition( fTrack->GetPosition() );
330  fTrack->SetVertexKineticEnergy( fTrack->GetKineticEnergy() );
331  fTrack->SetLogicalVolumeAtVertex( fTrack->GetVolume()->GetLogicalVolume() );
332  }
333 // Initial set up for attributes of 'G4SteppingManager'
334  fCurrentVolume = fTouchableHandle->GetVolume();
335 
336 // If track is already outside the world boundary, kill it
337  if( fCurrentVolume==0 ){
338  // If the track is a primary, stop processing
339  if(fTrack->GetParentID()==0)
340  {
341  G4cerr << "ERROR - G4SteppingManager::SetInitialStep()" << G4endl
342  << " Primary particle starting at - "
343  << fTrack->GetPosition()
344  << " - is outside of the world volume." << G4endl;
345  G4Exception("G4SteppingManager::SetInitialStep()", "Tracking0010",
346  FatalException, "Primary vertex outside of the world!");
347  }
348 
349  fTrack->SetTrackStatus( fStopAndKill );
350  G4cout << "WARNING - G4SteppingManager::SetInitialStep()" << G4endl
351  << " Initial track position is outside world! - "
352  << fTrack->GetPosition() << G4endl;
353  }
354  else {
355 // Initial set up for attribues of 'Step'
356  fStep->InitializeStep( fTrack );
357  }
358 #ifdef G4VERBOSE
359  // !!!!! Verbose
360  if(verboseLevel>0) fVerbose->TrackingStarted();
361 #endif
362 }
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4int GetParentID() const
void SetVertexMomentumDirection(const G4ThreeVector &aValue)
void SetOriginTouchableHandle(const G4TouchableHandle &apValue)
const G4DynamicParticle * GetDynamicParticle() const
const G4ThreeVector & GetPosition() const
G4TrackStatus GetTrackStatus() const
void SetNextTouchableHandle(const G4TouchableHandle &apValue)
void SetTouchableHandle(const G4TouchableHandle &apValue)
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
Definition: G4Navigator.cc:95
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4int GetCurrentStepNumber() const
G4double GetMass() const
virtual G4int GetRegularStructureId() const =0
void SetVertexKineticEnergy(const G4double aValue)
const G4TouchableHandle & GetTouchableHandle() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4TouchableHistory * CreateTouchableHistory() const
const G4ThreeVector & GetMomentumDirection() const
G4LogicalVolume * GetLogicalVolume() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
void SetVertexPosition(const G4ThreeVector &aValue)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
Definition: G4Navigator.cc:125
G4VPhysicalVolume * GetVolume() const
#define G4endl
Definition: G4ios.hh:61
void InitializeStep(G4Track *aValue)
G4GLOB_DLL std::ostream G4cerr
void SetLogicalVolumeAtVertex(const G4LogicalVolume *)
virtual void TrackingStarted()=0

Here is the call graph for this function:

Here is the caller graph for this function:

void G4SteppingManager::SetNavigator ( G4Navigator value)
inline

Definition at line 463 of file G4SteppingManager.hh.

463  {
464  fNavigator = value;
465  }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void G4SteppingManager::SetUserAction ( G4UserSteppingAction apAction)
inline

Definition at line 467 of file G4SteppingManager.hh.

467  {
468  fUserSteppingAction = apAction;
469  }

Here is the caller graph for this function:

void G4SteppingManager::SetVerbose ( G4VSteppingVerbose yourVerbose)
inline

Definition at line 482 of file G4SteppingManager.hh.

482  {
483  fVerbose = yourVerbose;
484  }
void G4SteppingManager::SetVerboseLevel ( G4int  vLevel)
inline

Definition at line 478 of file G4SteppingManager.hh.

478  {
479  verboseLevel = vLevel;
480  }

Here is the caller graph for this function:

G4StepStatus G4SteppingManager::Stepping ( )

Definition at line 116 of file G4SteppingManager.cc.

118 {
119 
120 //--------
121 // Prelude
122 //--------
123 #ifdef G4VERBOSE
124  // !!!!! Verbose
125  if(verboseLevel>0) fVerbose->NewStep();
126  else
127  if(verboseLevel==-1) {
129  }
130  else
132 #endif
133 
134 // Store last PostStepPoint to PreStepPoint, and swap current and nex
135 // volume information of G4Track. Reset total energy deposit in one Step.
136  fStep->CopyPostToPreStepPoint();
137  fStep->ResetTotalEnergyDeposit();
138 
139 // Switch next touchable in track to current one
140  fTrack->SetTouchableHandle(fTrack->GetNextTouchableHandle());
141 
142 // Reset the secondary particles
143  fN2ndariesAtRestDoIt = 0;
144  fN2ndariesAlongStepDoIt = 0;
145  fN2ndariesPostStepDoIt = 0;
146 
147 //JA Set the volume before it is used (in DefineStepLength() for User Limit)
148  fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
149 
150 // Reset the step's auxiliary points vector pointer
152 
153 //-----------------
154 // AtRest Processes
155 //-----------------
156 
157  if( fTrack->GetTrackStatus() == fStopButAlive ){
158  if( MAXofAtRestLoops>0 ){
159  InvokeAtRestDoItProcs();
160  fStepStatus = fAtRestDoItProc;
161  fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
162 
163 #ifdef G4VERBOSE
164  // !!!!! Verbose
165  if(verboseLevel>0) fVerbose->AtRestDoItInvoked();
166 #endif
167 
168  }
169  // Make sure the track is killed
170  fTrack->SetTrackStatus( fStopAndKill );
171  }
172 
173 //---------------------------------
174 // AlongStep and PostStep Processes
175 //---------------------------------
176 
177 
178  else{
179  // Find minimum Step length demanded by active disc./cont. processes
180  DefinePhysicalStepLength();
181 
182  // Store the Step length (geometrical length) to G4Step and G4Track
183  fStep->SetStepLength( PhysicalStep );
184  fTrack->SetStepLength( PhysicalStep );
185  G4double GeomStepLength = PhysicalStep;
186 
187  // Store StepStatus to PostStepPoint
188  fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
189 
190  // Invoke AlongStepDoIt
191  InvokeAlongStepDoItProcs();
192 
193  // Update track by taking into account all changes by AlongStepDoIt
194  fStep->UpdateTrack();
195 
196  // Update safety after invocation of all AlongStepDoIts
197  endpointSafOrigin= fPostStepPoint->GetPosition();
198 // endpointSafety= std::max( proposedSafety - GeomStepLength, 0.);
199  endpointSafety= std::max( proposedSafety - GeomStepLength, kCarTolerance);
200 
201  fStep->GetPostStepPoint()->SetSafety( endpointSafety );
202 
203 #ifdef G4VERBOSE
204  // !!!!! Verbose
205  if(verboseLevel>0) fVerbose->AlongStepDoItAllDone();
206 #endif
207 
208  // Invoke PostStepDoIt
209  InvokePostStepDoItProcs();
210 
211 #ifdef G4VERBOSE
212  // !!!!! Verbose
213  if(verboseLevel>0) fVerbose->PostStepDoItAllDone();
214 #endif
215  }
216 
217 //-------
218 // Finale
219 //-------
220 
221 // Update 'TrackLength' and remeber the Step length of the current Step
222  fTrack->AddTrackLength(fStep->GetStepLength());
223  fPreviousStepSize = fStep->GetStepLength();
224  fStep->SetTrack(fTrack);
225 #ifdef G4VERBOSE
226  // !!!!! Verbose
227 
228  if(verboseLevel>0) fVerbose->StepInfo();
229 #endif
230 // Send G4Step information to Hit/Dig if the volume is sensitive
231  fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
232  StepControlFlag = fStep->GetControlFlag();
233  if( fCurrentVolume != 0 && StepControlFlag != AvoidHitInvocation) {
234  fSensitive = fStep->GetPreStepPoint()->
235  GetSensitiveDetector();
236  if( fSensitive != 0 ) {
237  fSensitive->Hit(fStep);
238  }
239  }
240 
241 // User intervention process.
242  if( fUserSteppingAction != 0 ) {
243  fUserSteppingAction->UserSteppingAction(fStep);
244  }
245  G4UserSteppingAction* regionalAction
248  if( regionalAction ) regionalAction->UserSteppingAction(fStep);
249 
250 // Stepping process finish. Return the value of the StepStatus.
251  return fStepStatus;
252 
253 }
void SetTrackStatus(const G4TrackStatus aTrackStatus)
void SetStepLength(G4double value)
void SetTrack(G4Track *value)
G4UserSteppingAction * GetRegionalSteppingAction() const
Definition: G4Region.cc:155
G4double GetStepLength() const
static void SetSilent(G4int fSilent)
virtual void StepInfo()=0
virtual void PostStepDoItAllDone()=0
G4TrackStatus GetTrackStatus() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4SteppingControl GetControlFlag() const
void SetPointerToVectorOfAuxiliaryPoints(std::vector< G4ThreeVector > *theNewVectorPointer)
Definition: G4Step.hh:239
G4Region * GetRegion() const
virtual void UserSteppingAction(const G4Step *)
void SetStepStatus(const G4StepStatus aValue)
G4StepPoint * GetPreStepPoint() const
void UpdateTrack()
G4VPhysicalVolume * GetPhysicalVolume() const
const G4ThreeVector & GetPosition() const
void SetStepLength(G4double value)
void ResetTotalEnergyDeposit()
const G4TouchableHandle & GetNextTouchableHandle() const
G4bool Hit(G4Step *aStep)
G4LogicalVolume * GetLogicalVolume() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4StepPoint * GetPostStepPoint() const
virtual void AtRestDoItInvoked()=0
void AddTrackLength(const G4double aValue)
virtual void NewStep()=0
virtual void AlongStepDoItAllDone()=0
double G4double
Definition: G4Types.hh:76
void SetSafety(const G4double aValue)
void CopyPostToPreStepPoint()

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4bool G4SteppingManager::KillVerbose

Definition at line 186 of file G4SteppingManager.hh.


The documentation for this class was generated from the following files: