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 ()

Data Fields

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.

References DBL_MAX, G4GeometryTolerance::GetInstance(), G4VSteppingVerbose::GetInstance(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4GeometryTolerance::GetSurfaceTolerance(), G4TransportationManager::GetTransportationManager(), KillVerbose, G4Step::NewSecondaryVector(), G4VSteppingVerbose::SetInstance(), and SetNavigator().

00058   : fUserSteppingAction(0), verboseLevel(0)
00059 {
00060 
00061 // Construct simple 'has-a' related objects
00062    fStep = new G4Step();
00063    fSecondary = fStep->NewSecondaryVector();
00064    fPreStepPoint  = fStep->GetPreStepPoint();
00065    fPostStepPoint = fStep->GetPostStepPoint();
00066 #ifdef G4VERBOSE
00067    if(G4VSteppingVerbose::GetInstance()==0) {
00068      fVerbose =  new G4SteppingVerbose();
00069      G4VSteppingVerbose::SetInstance(fVerbose);
00070      fVerbose -> SetManager(this);
00071      KillVerbose = true;
00072    }
00073    else { 
00074       fVerbose = G4VSteppingVerbose::GetInstance();
00075       fVerbose -> SetManager(this);
00076       KillVerbose = false;
00077    }
00078 #endif
00079    SetNavigator(G4TransportationManager::GetTransportationManager()
00080                    ->GetNavigatorForTracking());
00081 
00082    fSelectedAtRestDoItVector
00083       = new G4SelectedAtRestDoItVector(SizeOfSelectedDoItVector,0);
00084    fSelectedAlongStepDoItVector
00085       = new G4SelectedAlongStepDoItVector(SizeOfSelectedDoItVector,0);
00086    fSelectedPostStepDoItVector
00087       = new G4SelectedPostStepDoItVector(SizeOfSelectedDoItVector,0);
00088 
00089    SetNavigator(G4TransportationManager::GetTransportationManager()
00090      ->GetNavigatorForTracking());
00091 
00092    physIntLength = DBL_MAX; 
00093    kCarTolerance = 0.5*G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
00094 }

G4SteppingManager::~G4SteppingManager (  ) 

Definition at line 97 of file G4SteppingManager.cc.

References G4Step::DeleteSecondaryVector(), and KillVerbose.

00099 {
00100 
00101 // Destruct simple 'has-a' objects
00102    fStep->DeleteSecondaryVector();
00104    delete fStep;
00105    delete fSelectedAtRestDoItVector;
00106    delete fSelectedAlongStepDoItVector;
00107    delete fSelectedPostStepDoItVector;
00108    if (fUserSteppingAction) delete fUserSteppingAction;
00109 #ifdef G4VERBOSE
00110    if(KillVerbose) delete fVerbose;
00111 #endif
00112 }


Member Function Documentation

G4double G4SteppingManager::GetCorrectedStep (  )  [inline]

Definition at line 307 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00307                                                       {
00308     return CorrectedStep;
00309   }

G4double G4SteppingManager::GetcurrentMinimumStep (  ) 

size_t G4SteppingManager::GetfAlongStepDoItProcTriggered (  )  [inline]

Definition at line 403 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00403                                                                  {
00404    return fAtRestDoItProcTriggered;
00405   }

G4ProcessVector * G4SteppingManager::GetfAlongStepDoItVector (  )  [inline]

Definition at line 371 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00371                                                                     {
00372    return fAlongStepDoItVector;
00373   }

G4ProcessVector * G4SteppingManager::GetfAlongStepGetPhysIntVector (  )  [inline]

Definition at line 382 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00382                                                                           {
00383    return fAlongStepGetPhysIntVector;
00384   }

size_t G4SteppingManager::GetfAtRestDoItProcTriggered (  )  [inline]

Definition at line 400 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00400                                                               {
00401    return fAtRestDoItProcTriggered;
00402   }

G4ProcessVector * G4SteppingManager::GetfAtRestDoItVector (  )  [inline]

Definition at line 368 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00368                                                                  {
00369    return fAtRestDoItVector;
00370   }

G4ProcessVector * G4SteppingManager::GetfAtRestGetPhysIntVector (  )  [inline]

Definition at line 378 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00378                                                                        {
00379    return fAtRestGetPhysIntVector;
00380   }

G4ForceCondition G4SteppingManager::GetfCondition (  )  [inline]

Definition at line 452 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00452                                                           {
00453    return fCondition;
00454   }

G4VProcess * G4SteppingManager::GetfCurrentProcess (  )  [inline]

Definition at line 364 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00364                                                           {
00365    return fCurrentProcess;
00366   }

G4VPhysicalVolume * G4SteppingManager::GetfCurrentVolume (  )  [inline]

Definition at line 358 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00358                                                                 {
00359    return fCurrentVolume;
00360   }

G4GPILSelection G4SteppingManager::GetfGPILSelection (  )  [inline]

Definition at line 455 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00455                                                               {
00456    return fGPILSelection;
00457   }

G4bool G4SteppingManager::GetFirstStep (  )  [inline]

Definition at line 315 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00315                                                {
00316    return FirstStep;
00317   }

G4int G4SteppingManager::GetfN2ndariesAlongStepDoIt (  )  [inline]

Definition at line 412 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00412                                                             {
00413    return fN2ndariesAlongStepDoIt;
00414   }

G4int G4SteppingManager::GetfN2ndariesAtRestDoIt (  )  [inline]

Definition at line 409 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00409                                                          {
00410    return fN2ndariesAtRestDoIt;
00411   }

G4int G4SteppingManager::GetfN2ndariesPostStepDoIt (  )  [inline]

Definition at line 415 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00415                                                            {
00416    return fN2ndariesPostStepDoIt;
00417   }

G4Navigator * G4SteppingManager::GetfNavigator (  )  [inline]

Definition at line 419 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00419                                                       {
00420    return fNavigator;
00421   }

G4VParticleChange * G4SteppingManager::GetfParticleChange (  )  [inline]

Definition at line 337 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00337                                                                  {
00338    return fParticleChange;
00339   }

size_t G4SteppingManager::GetfPostStepDoItProcTriggered (  )  [inline]

Definition at line 406 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00406                                                                 {
00407    return fPostStepDoItProcTriggered;
00408   }

G4ProcessVector * G4SteppingManager::GetfPostStepDoItVector (  )  [inline]

Definition at line 374 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00374                                                                    {
00375    return fPostStepDoItVector;
00376   }

G4ProcessVector * G4SteppingManager::GetfPostStepGetPhysIntVector (  )  [inline]

Definition at line 386 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00386                                                                          {
00387    return fPostStepGetPhysIntVector;
00388   }

G4StepPoint * G4SteppingManager::GetfPostStepPoint (  )  [inline]

Definition at line 354 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00354                                                           {
00355    return fPostStepPoint;
00356   }

G4StepPoint * G4SteppingManager::GetfPreStepPoint (  )  [inline]

Definition at line 351 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00351                                                          {
00352    return fPreStepPoint;
00353   }

G4double G4SteppingManager::GetfPreviousStepSize (  )  [inline]

Definition at line 438 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00438                                                            {
00439    return fPreviousStepSize;
00440   }

G4TrackVector * G4SteppingManager::GetfSecondary (  )  [inline]

Definition at line 345 of file G4SteppingManager.hh.

References G4Step::GetfSecondary().

Referenced by G4VSteppingVerbose::CopyState(), and G4TrackingManager::GimmeSecondaries().

00345                                                         {
00346    return fStep->GetfSecondary();
00347   }

G4SelectedAlongStepDoItVector * G4SteppingManager::GetfSelectedAlongStepDoItVector (  )  [inline]

Definition at line 430 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00430                                                                                           {
00431    return fSelectedAlongStepDoItVector;
00432   }

G4SelectedAtRestDoItVector * G4SteppingManager::GetfSelectedAtRestDoItVector (  )  [inline]

Definition at line 426 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00426                                                                                     {
00427    return fSelectedAtRestDoItVector;
00428   }

G4SelectedPostStepDoItVector * G4SteppingManager::GetfSelectedPostStepDoItVector (  )  [inline]

Definition at line 434 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00434                                                                                         {
00435    return fSelectedPostStepDoItVector;
00436   }

G4VSensitiveDetector * G4SteppingManager::GetfSensitive (  )  [inline]

Definition at line 361 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00361                                                                {
00362    return fSensitive;
00363   }

G4Step * G4SteppingManager::GetfStep (  )  [inline]

Definition at line 348 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00348                                             {
00349    return fStep;
00350   }

G4StepStatus G4SteppingManager::GetfStepStatus (  )  [inline]

Definition at line 319 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00319                                                        {
00320    return fStepStatus;
00321   }

G4Track * G4SteppingManager::GetfTrack (  )  [inline]

Definition at line 341 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00341                                               {
00342    return fTrack;
00343   }

G4double G4SteppingManager::GetGeometricalStep (  )  [inline]

Definition at line 303 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00303                                                         {
00304     return GeometricalStep;
00305   }

G4double G4SteppingManager::GetMass (  )  [inline]

Definition at line 329 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00329                                             {
00330    return Mass;
00331   }

size_t G4SteppingManager::GetMAXofAlongStepLoops (  )  [inline]

Definition at line 393 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00393                                                          {
00394    return MAXofAlongStepLoops;
00395   }

size_t G4SteppingManager::GetMAXofAtRestLoops (  )  [inline]

Definition at line 390 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00390                                                       {
00391    return MAXofAtRestLoops;
00392   }

size_t G4SteppingManager::GetMAXofPostStepLoops (  )  [inline]

Definition at line 396 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00396                                                         {
00397    return MAXofPostStepLoops;
00398   }

G4double G4SteppingManager::GetnumberOfInteractionLengthLeft (  ) 

G4double G4SteppingManager::GetPhysicalStep (  )  [inline]

Definition at line 299 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00299                                                     {
00300     return PhysicalStep;
00301   }

G4double G4SteppingManager::GetphysIntLength (  )  [inline]

Definition at line 449 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00449                                                      {
00450    return physIntLength;
00451   }

G4bool G4SteppingManager::GetPreStepPointIsGeom (  )  [inline]

Definition at line 311 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00311                                                         {
00312    return PreStepPointIsGeom;
00313   }

void G4SteppingManager::GetProcessNumber (  ) 

Definition at line 55 of file G4SteppingManager2.cc.

References G4ProcessVector::entries(), FatalException, G4cerr, G4cout, G4endl, G4Exception(), G4ProcessManager::GetAlongStepProcessVector(), G4ProcessManager::GetAtRestProcessVector(), G4Track::GetDefinition(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGEncoding(), G4ProcessManager::GetPostStepProcessVector(), G4ParticleDefinition::GetProcessManager(), typeDoIt, and typeGPIL.

Referenced by G4ErrorPropagator::InitG4Track(), and G4TrackingManager::ProcessOneTrack().

00057 {
00058 #ifdef debug
00059   G4cout<<"G4SteppingManager::GetProcessNumber: is called track="
00060         <<fTrack<<G4endl;
00061 #endif
00062 
00063   G4ProcessManager* pm= fTrack->GetDefinition()->GetProcessManager();
00064   if(!pm)
00065   {
00066     G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl
00067            << "        ProcessManager is NULL for particle = "
00068            << fTrack->GetDefinition()->GetParticleName() << ", PDG_code = "
00069            << fTrack->GetDefinition()->GetPDGEncoding() << G4endl;
00070     G4Exception("G4SteppingManager::GetProcessNumber()", "Tracking0011",
00071                 FatalException, "Process Manager is not found.");
00072     return;
00073   }
00074 
00075 // AtRestDoits
00076    MAXofAtRestLoops =        pm->GetAtRestProcessVector()->entries();
00077    fAtRestDoItVector =       pm->GetAtRestProcessVector(typeDoIt);
00078    fAtRestGetPhysIntVector = pm->GetAtRestProcessVector(typeGPIL);
00079 #ifdef debug
00080    G4cout << "G4SteppingManager::GetProcessNumber: #ofAtRest="
00081           << MAXofAtRestLoops << G4endl;
00082 #endif
00083 
00084 // AlongStepDoits
00085    MAXofAlongStepLoops = pm->GetAlongStepProcessVector()->entries();
00086    fAlongStepDoItVector = pm->GetAlongStepProcessVector(typeDoIt);
00087    fAlongStepGetPhysIntVector = pm->GetAlongStepProcessVector(typeGPIL);
00088 #ifdef debug
00089    G4cout << "G4SteppingManager::GetProcessNumber:#ofAlongStp="
00090           << MAXofAlongStepLoops << G4endl;
00091 #endif
00092 
00093 // PostStepDoits
00094    MAXofPostStepLoops = pm->GetPostStepProcessVector()->entries();
00095    fPostStepDoItVector = pm->GetPostStepProcessVector(typeDoIt);
00096    fPostStepGetPhysIntVector = pm->GetPostStepProcessVector(typeGPIL);
00097 #ifdef debug
00098    G4cout << "G4SteppingManager::GetProcessNumber: #ofPostStep="
00099           << MAXofPostStepLoops << G4endl;
00100 #endif
00101 
00102    if (SizeOfSelectedDoItVector<MAXofAtRestLoops    ||
00103        SizeOfSelectedDoItVector<MAXofAlongStepLoops ||
00104        SizeOfSelectedDoItVector<MAXofPostStepLoops  )
00105    {
00106      G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl
00107             << "        SizeOfSelectedDoItVector= " << SizeOfSelectedDoItVector
00108             << " ; is smaller then one of MAXofAtRestLoops= "
00109             << MAXofAtRestLoops << G4endl
00110             << "        or MAXofAlongStepLoops= " << MAXofAlongStepLoops
00111             << " or MAXofPostStepLoops= " << MAXofPostStepLoops << G4endl;
00112      G4Exception("G4SteppingManager::GetProcessNumber()",
00113                  "Tracking0012", FatalException,
00114                  "The array size is smaller than the actual No of processes.");
00115    }
00116 }

const G4TrackVector * G4SteppingManager::GetSecondary (  )  const [inline]

Definition at line 459 of file G4SteppingManager.hh.

References G4Step::GetSecondary().

00459                                                                     {
00460     return fStep->GetSecondary(); 
00461   }

G4Step * G4SteppingManager::GetStep (  )  const [inline]

Definition at line 486 of file G4SteppingManager.hh.

Referenced by G4ErrorPropagator::InitG4Track(), and G4TrackingManager::ProcessOneTrack().

00486                                                   {
00487     return fStep;
00488   }

G4SteppingControl G4SteppingManager::GetStepControlFlag (  )  [inline]

Definition at line 446 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00446                                                                 {
00447    return StepControlFlag;
00448   }

G4double G4SteppingManager::GetsumEnergyChange (  )  [inline]

Definition at line 333 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00333                                                        {
00334    return sumEnergyChange;
00335   }

G4double G4SteppingManager::GetTempInitVelocity (  )  [inline]

Definition at line 323 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00323                                                         {
00324    return TempInitVelocity;
00325   }

G4double G4SteppingManager::GetTempVelocity (  )  [inline]

Definition at line 326 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00326                                                     {
00327    return TempVelocity;
00328   }

const G4TouchableHandle & G4SteppingManager::GetTouchableHandle (  )  [inline]

Definition at line 442 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00442                                                                         {
00443    return fTouchableHandle;
00444   }

G4Track * G4SteppingManager::GetTrack (  )  const [inline]

Definition at line 474 of file G4SteppingManager.hh.

Referenced by G4TrackingMessenger::SetNewValue().

00474                                                     {
00475     return fTrack; 
00476   }

G4UserSteppingAction * G4SteppingManager::GetUserAction (  )  [inline]

Definition at line 470 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00470                                                                {
00471     return fUserSteppingAction;
00472   }

G4int G4SteppingManager::GetverboseLevel (  )  [inline]

Definition at line 422 of file G4SteppingManager.hh.

Referenced by G4VSteppingVerbose::CopyState().

00422                                                  {
00423    return verboseLevel;
00424   }

void G4SteppingManager::SetInitialStep ( G4Track valueTrack  ) 

Definition at line 256 of file G4SteppingManager.cc.

References G4Navigator::CreateTouchableHistory(), fAlive, FatalException, fPostponeToNextEvent, fStopAndKill, fStopButAlive, fSuspend, fUndefined, G4cerr, G4cout, G4endl, G4Exception(), G4Track::GetCurrentStepNumber(), G4Track::GetDynamicParticle(), G4Track::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4DynamicParticle::GetMass(), G4Track::GetMomentumDirection(), G4Track::GetParentID(), G4Track::GetPosition(), G4VPhysicalVolume::GetRegularStructureId(), G4Track::GetTouchableHandle(), G4Track::GetTrackStatus(), G4Track::GetVolume(), G4Step::InitializeStep(), G4Navigator::LocateGlobalPointAndSetup(), G4Navigator::ResetHierarchyAndLocate(), G4Track::SetLogicalVolumeAtVertex(), G4Track::SetNextTouchableHandle(), G4Track::SetTouchableHandle(), G4Track::SetTrackStatus(), G4Track::SetVertexKineticEnergy(), G4Track::SetVertexMomentumDirection(), G4Track::SetVertexPosition(), and G4VSteppingVerbose::TrackingStarted().

Referenced by G4ErrorPropagator::InitG4Track(), and G4TrackingManager::ProcessOneTrack().

00258 {
00259 
00260 // Set up several local variables.
00261    PreStepPointIsGeom = false;
00262    FirstStep = true;
00263    fParticleChange = 0;
00264    fPreviousStepSize = 0.;
00265    fStepStatus = fUndefined;
00266 
00267    fTrack = valueTrack;
00268    Mass = fTrack->GetDynamicParticle()->GetMass();
00269 
00270    PhysicalStep = 0.;
00271    GeometricalStep = 0.;
00272    CorrectedStep = 0.;
00273    PreStepPointIsGeom = false;
00274    FirstStep = false;
00275    fStepStatus = fUndefined;
00276 
00277    TempInitVelocity = 0.;
00278    TempVelocity = 0.;
00279    sumEnergyChange = 0.;
00280 
00281 
00282 // If the primary track has 'Suspend' or 'PostponeToNextEvent' state,
00283 // set the track state to 'Alive'.
00284    if( (fTrack->GetTrackStatus()==fSuspend) ||
00285        (fTrack->GetTrackStatus()==fPostponeToNextEvent) ){ 
00286       fTrack->SetTrackStatus(fAlive);
00287    }
00288 
00289 // If the primary track has 'zero' kinetic energy, set the track
00290 // state to 'StopButAlive'.
00291    if(fTrack->GetKineticEnergy() <= 0.0){
00292       fTrack->SetTrackStatus( fStopButAlive );
00293    }
00294 
00295 
00296 // Set Touchable to track and a private attribute of G4SteppingManager
00297  
00298 
00299   if ( ! fTrack->GetTouchableHandle() ) {
00300      G4ThreeVector direction= fTrack->GetMomentumDirection();
00301      fNavigator->LocateGlobalPointAndSetup( fTrack->GetPosition(),
00302                                             &direction, false, false );
00303      fTouchableHandle = fNavigator->CreateTouchableHistory();
00304 
00305      fTrack->SetTouchableHandle( fTouchableHandle );
00306      fTrack->SetNextTouchableHandle( fTouchableHandle );
00307   }else{
00308      fTrack->SetNextTouchableHandle( fTouchableHandle = fTrack->GetTouchableHandle() );
00309      G4VPhysicalVolume* oldTopVolume= fTrack->GetTouchableHandle()->GetVolume();
00310      G4VPhysicalVolume* newTopVolume=
00311      fNavigator->ResetHierarchyAndLocate( fTrack->GetPosition(), 
00312         fTrack->GetMomentumDirection(),
00313         *((G4TouchableHistory*)fTrack->GetTouchableHandle()()) );
00314 //     if(newTopVolume != oldTopVolume ){
00315      if(newTopVolume != oldTopVolume || oldTopVolume->GetRegularStructureId() == 1 ) { 
00316         fTouchableHandle = fNavigator->CreateTouchableHistory();
00317         fTrack->SetTouchableHandle( fTouchableHandle );
00318         fTrack->SetNextTouchableHandle( fTouchableHandle );
00319      }
00320   }
00321 // Set vertex information of G4Track at here
00322    if ( fTrack->GetCurrentStepNumber() == 0 ) {
00323      fTrack->SetVertexPosition( fTrack->GetPosition() );
00324      fTrack->SetVertexMomentumDirection( fTrack->GetMomentumDirection() );
00325      fTrack->SetVertexKineticEnergy( fTrack->GetKineticEnergy() );
00326      fTrack->SetLogicalVolumeAtVertex( fTrack->GetVolume()->GetLogicalVolume() );
00327    }
00328 // Initial set up for attributes of 'G4SteppingManager'
00329    fCurrentVolume = fTouchableHandle->GetVolume();
00330 
00331 // If track is already outside the world boundary, kill it
00332    if( fCurrentVolume==0 ){
00333        // If the track is a primary, stop processing
00334        if(fTrack->GetParentID()==0)
00335        {
00336          G4cerr << "ERROR - G4SteppingManager::SetInitialStep()" << G4endl
00337                 << "        Primary particle starting at - "
00338                 << fTrack->GetPosition()
00339                 << " - is outside of the world volume." << G4endl;
00340          G4Exception("G4SteppingManager::SetInitialStep()", "Tracking0010",
00341                      FatalException, "Primary vertex outside of the world!");
00342        }
00343 
00344        fTrack->SetTrackStatus( fStopAndKill );
00345        G4cout << "WARNING - G4SteppingManager::SetInitialStep()" << G4endl
00346               << "          Initial track position is outside world! - "
00347               << fTrack->GetPosition() << G4endl;
00348    }
00349    else {
00350 // Initial set up for attribues of 'Step'
00351        fStep->InitializeStep( fTrack );
00352    }
00353 #ifdef G4VERBOSE
00354                          // !!!!! Verbose
00355    if(verboseLevel>0) fVerbose->TrackingStarted();
00356 #endif
00357 }

void G4SteppingManager::SetNavigator ( G4Navigator value  )  [inline]

Definition at line 463 of file G4SteppingManager.hh.

Referenced by G4SteppingManager().

00463                                                                {
00464     fNavigator = value; 
00465   }

void G4SteppingManager::SetUserAction ( G4UserSteppingAction apAction  )  [inline]

Definition at line 467 of file G4SteppingManager.hh.

Referenced by G4TrackingManager::SetUserAction().

00467                                                                             {
00468     fUserSteppingAction = apAction;
00469   }

void G4SteppingManager::SetVerbose ( G4VSteppingVerbose  )  [inline]

Definition at line 482 of file G4SteppingManager.hh.

00482                                                                           {
00483      fVerbose = yourVerbose;
00484   }

void G4SteppingManager::SetVerboseLevel ( G4int  vLevel  )  [inline]

Definition at line 478 of file G4SteppingManager.hh.

Referenced by G4ErrorPropagatorManager::SetSteppingManagerVerboseLevel().

00478                                                             {
00479     verboseLevel = vLevel; 
00480   }

G4StepStatus G4SteppingManager::Stepping (  ) 

Definition at line 116 of file G4SteppingManager.cc.

References G4Track::AddTrackLength(), G4VSteppingVerbose::AlongStepDoItAllDone(), G4VSteppingVerbose::AtRestDoItInvoked(), AvoidHitInvocation, G4Step::CopyPostToPreStepPoint(), fAtRestDoItProc, fStopAndKill, fStopButAlive, G4Step::GetControlFlag(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetNextTouchableHandle(), G4StepPoint::GetPhysicalVolume(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4LogicalVolume::GetRegion(), G4Region::GetRegionalSteppingAction(), G4Step::GetStepLength(), G4Track::GetTrackStatus(), G4VSensitiveDetector::Hit(), G4VSteppingVerbose::NewStep(), G4VSteppingVerbose::PostStepDoItAllDone(), G4Step::ResetTotalEnergyDeposit(), G4Step::SetPointerToVectorOfAuxiliaryPoints(), G4StepPoint::SetSafety(), G4VSteppingVerbose::SetSilent(), G4Track::SetStepLength(), G4Step::SetStepLength(), G4StepPoint::SetStepStatus(), G4Track::SetTouchableHandle(), G4Step::SetTrack(), G4Track::SetTrackStatus(), G4VSteppingVerbose::StepInfo(), G4Step::UpdateTrack(), and G4UserSteppingAction::UserSteppingAction().

Referenced by G4ErrorPropagator::MakeOneStep(), and G4TrackingManager::ProcessOneTrack().

00118 {
00119 
00120 //--------
00121 // Prelude
00122 //--------
00123 #ifdef G4VERBOSE
00124             // !!!!! Verbose
00125              if(verboseLevel>0) fVerbose->NewStep();
00126              else 
00127              if(verboseLevel==-1) { 
00128                  G4VSteppingVerbose::SetSilent(1);
00129              }
00130              else
00131                  G4VSteppingVerbose::SetSilent(0);
00132 #endif 
00133 
00134 // Store last PostStepPoint to PreStepPoint, and swap current and nex
00135 // volume information of G4Track. Reset total energy deposit in one Step. 
00136    fStep->CopyPostToPreStepPoint();
00137    fStep->ResetTotalEnergyDeposit();
00138 
00139 // Switch next touchable in track to current one
00140    fTrack->SetTouchableHandle(fTrack->GetNextTouchableHandle());
00141 
00142 // Reset the secondary particles
00143    fN2ndariesAtRestDoIt = 0;
00144    fN2ndariesAlongStepDoIt = 0;
00145    fN2ndariesPostStepDoIt = 0;
00146 
00147 //JA Set the volume before it is used (in DefineStepLength() for User Limit) 
00148    fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
00149 
00150 // Reset the step's auxiliary points vector pointer
00151    fStep->SetPointerToVectorOfAuxiliaryPoints(0);
00152 
00153 //-----------------
00154 // AtRest Processes
00155 //-----------------
00156 
00157    if( fTrack->GetTrackStatus() == fStopButAlive ){
00158      if( MAXofAtRestLoops>0 ){
00159         InvokeAtRestDoItProcs();
00160         fStepStatus = fAtRestDoItProc;
00161         fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
00162        
00163 #ifdef G4VERBOSE
00164             // !!!!! Verbose
00165              if(verboseLevel>0) fVerbose->AtRestDoItInvoked();
00166 #endif 
00167 
00168      }
00169      // Make sure the track is killed
00170      fTrack->SetTrackStatus( fStopAndKill );
00171    }
00172 
00173 //---------------------------------
00174 // AlongStep and PostStep Processes
00175 //---------------------------------
00176 
00177 
00178    else{
00179      // Find minimum Step length demanded by active disc./cont. processes
00180      DefinePhysicalStepLength();
00181 
00182      // Store the Step length (geometrical length) to G4Step and G4Track
00183      fStep->SetStepLength( PhysicalStep );
00184      fTrack->SetStepLength( PhysicalStep );
00185      G4double GeomStepLength = PhysicalStep;
00186 
00187      // Store StepStatus to PostStepPoint
00188      fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
00189 
00190      // Invoke AlongStepDoIt 
00191      InvokeAlongStepDoItProcs();
00192 
00193      // Update track by taking into account all changes by AlongStepDoIt
00194      fStep->UpdateTrack();
00195 
00196      // Update safety after invocation of all AlongStepDoIts
00197      endpointSafOrigin= fPostStepPoint->GetPosition();
00198 //     endpointSafety=  std::max( proposedSafety - GeomStepLength, 0.);
00199      endpointSafety=  std::max( proposedSafety - GeomStepLength, kCarTolerance);
00200 
00201      fStep->GetPostStepPoint()->SetSafety( endpointSafety );
00202 
00203 #ifdef G4VERBOSE
00204                          // !!!!! Verbose
00205            if(verboseLevel>0) fVerbose->AlongStepDoItAllDone();
00206 #endif
00207 
00208      // Invoke PostStepDoIt
00209      InvokePostStepDoItProcs();
00210 
00211 #ifdef G4VERBOSE
00212                  // !!!!! Verbose
00213      if(verboseLevel>0) fVerbose->PostStepDoItAllDone();
00214 #endif
00215    }
00216 
00217 //-------
00218 // Finale
00219 //-------
00220 
00221 // Update 'TrackLength' and remeber the Step length of the current Step
00222    fTrack->AddTrackLength(fStep->GetStepLength());
00223    fPreviousStepSize = fStep->GetStepLength();
00224    fStep->SetTrack(fTrack);
00225 #ifdef G4VERBOSE
00226                          // !!!!! Verbose
00227 
00228            if(verboseLevel>0) fVerbose->StepInfo();
00229 #endif
00230 // Send G4Step information to Hit/Dig if the volume is sensitive
00231    fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
00232    StepControlFlag =  fStep->GetControlFlag();
00233    if( fCurrentVolume != 0 && StepControlFlag != AvoidHitInvocation) {
00234       fSensitive = fStep->GetPreStepPoint()->
00235                                    GetSensitiveDetector();
00236       if( fSensitive != 0 ) {
00237         fSensitive->Hit(fStep);
00238       }
00239    }
00240 
00241 // User intervention process.
00242    if( fUserSteppingAction != 0 ) {
00243       fUserSteppingAction->UserSteppingAction(fStep);
00244    }
00245    G4UserSteppingAction* regionalAction
00246     = fStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()
00247       ->GetRegionalSteppingAction();
00248    if( regionalAction ) regionalAction->UserSteppingAction(fStep);
00249 
00250 // Stepping process finish. Return the value of the StepStatus.
00251    return fStepStatus;
00252 
00253 }


Field Documentation

G4bool G4SteppingManager::KillVerbose

Definition at line 186 of file G4SteppingManager.hh.

Referenced by G4SteppingManager(), and ~G4SteppingManager().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:27 2013 for Geant4 by  doxygen 1.4.7