Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/tracking/src/G4SteppingManager2.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4SteppingManager2.cc,v 1.37 2009/09/25 00:23:41 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4SteppingManager2.cc,v 1.38 2010/07/19 13:41:21 gcosmo Exp $
     28// GEANT4 tag $Name: tracking-V09-03-08 $
    2929//
    3030//---------------------------------------------------------------
     
    5050#include "G4SteppingControl.hh"
    5151#include "G4TransportationManager.hh"
    52 //#include "G4UserLimits.hh"
    5352#include "G4SteppingManager.hh"
    5453#include "G4LossTableManager.hh"
     
    5958{
    6059#ifdef debug
    61   G4cout<<"G4SteppingManager::GetProcessNumber: is called track="<<fTrack<<G4endl;
     60  G4cout<<"G4SteppingManager::GetProcessNumber: is called track="
     61        <<fTrack<<G4endl;
    6262#endif
    6363
    6464  G4ProcessManager* pm= fTrack->GetDefinition()->GetProcessManager();
    65                 if(!pm)
     65  if(!pm)
    6666  {
    67     G4cout<<"G4SteppingManager::GetProcessNumber: ProcessManager=0 for particle="
    68           <<fTrack->GetDefinition()->GetParticleName()<<", PDG_code="
    69           <<fTrack->GetDefinition()->GetPDGEncoding()<<G4endl;
    70                                 G4Exception("G4SteppingManager::GetProcessNumber: Process Manager is not found.");
     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;
    7174  }
    7275
     
    7679   fAtRestGetPhysIntVector = pm->GetAtRestProcessVector(typeGPIL);
    7780#ifdef debug
    78   G4cout<<"G4SteppingManager::GetProcessNumber: #ofAtRest="<<MAXofAtRestLoops<<G4endl;
     81   G4cout << "G4SteppingManager::GetProcessNumber: #ofAtRest="
     82          << MAXofAtRestLoops << G4endl;
    7983#endif
    8084
     
    8488   fAlongStepGetPhysIntVector = pm->GetAlongStepProcessVector(typeGPIL);
    8589#ifdef debug
    86                         G4cout<<"G4SteppingManager::GetProcessNumber:#ofAlongStp="<<MAXofAlongStepLoops<<G4endl;
     90   G4cout << "G4SteppingManager::GetProcessNumber:#ofAlongStp="
     91          << MAXofAlongStepLoops << G4endl;
    8792#endif
    8893
     
    9297   fPostStepGetPhysIntVector = pm->GetPostStepProcessVector(typeGPIL);
    9398#ifdef debug
    94                         G4cout<<"G4SteppingManager::GetProcessNumber: #ofPostStep="<<MAXofPostStepLoops<<G4endl;
     99   G4cout << "G4SteppingManager::GetProcessNumber: #ofPostStep="
     100          << MAXofPostStepLoops << G4endl;
    95101#endif
    96102
     
    98104       SizeOfSelectedDoItVector<MAXofAlongStepLoops ||
    99105       SizeOfSelectedDoItVector<MAXofPostStepLoops  )
    100                         {
    101                           G4cout<<"G4SteppingManager::GetProcessNumber: SizeOfSelectedDoItVector="
    102            <<SizeOfSelectedDoItVector<<" is smaller then one of MAXofAtRestLoops="
    103            <<MAXofAtRestLoops<<" or MAXofAlongStepLoops="<<MAXofAlongStepLoops
    104            <<" or MAXofPostStepLoops="<<MAXofPostStepLoops<<G4endl;
    105                                         G4Exception("G4SteppingManager::GetProcessNumber: The array size is smaller than the actutal number of processes. Chnage G4SteppingManager.hh and recompile is needed.");
     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.");
    106116   }
    107117}
     
    144154//      fStepStatus = fUserDefinedLimit;
    145155//      fStep->GetPostStepPoint()
    146 //           ->SetProcessDefinedStep(NULL);
     156//           ->SetProcessDefinedStep(0);
    147157//      // Take note that the process pointer is 'NULL' if the Step
    148158//      // is defined by the user defined limit.
     
    155165   for(size_t np=0; np < MAXofPostStepLoops; np++){
    156166     fCurrentProcess = (*fPostStepGetPhysIntVector)(np);
    157      if (fCurrentProcess== NULL) {
     167     if (fCurrentProcess== 0) {
    158168       (*fSelectedPostStepDoItVector)[np] = InActivated;
    159169       continue;
     
    225235   for(size_t kp=0; kp < MAXofAlongStepLoops; kp++){
    226236     fCurrentProcess = (*fAlongStepGetPhysIntVector)[kp];
    227      if (fCurrentProcess== NULL) continue;
     237     if (fCurrentProcess== 0) continue;
    228238         // NULL means the process is inactivated by a user on fly.
    229239
    230240     physIntLength = fCurrentProcess->
    231                      AlongStepGPIL( *fTrack,
    232                                                   fPreviousStepSize,
    233                                                        PhysicalStep,
    234                                        safetyProposedToAndByProcess,
    235                                                     &fGPILSelection );
     241                     AlongStepGPIL( *fTrack, fPreviousStepSize,
     242                                     PhysicalStep,
     243                                     safetyProposedToAndByProcess,
     244                                    &fGPILSelection );
    236245#ifdef G4VERBOSE
    237246                         // !!!!! Verbose
     
    287296   for( size_t ri=0 ; ri < MAXofAtRestLoops ; ri++ ){
    288297     fCurrentProcess = (*fAtRestGetPhysIntVector)[ri];
    289      if (fCurrentProcess== NULL) {
     298     if (fCurrentProcess== 0) {
    290299       (*fSelectedAtRestDoItVector)[ri] = InActivated;
    291300       NofInactiveProc++;
     
    294303
    295304     lifeTime =
    296        fCurrentProcess->AtRestGPIL(
    297                                                      *fTrack,
    298                                                 &fCondition );
     305       fCurrentProcess->AtRestGPIL( *fTrack, &fCondition );
    299306
    300307     if(fCondition==Forced && fCurrentProcess){
     
    305312       if(lifeTime < shortestLifeTime ){
    306313          shortestLifeTime = lifeTime;
    307           fAtRestDoItProcTriggered =  G4int(int(ri));
     314          fAtRestDoItProcTriggered =  G4int(ri);
    308315          (*fSelectedAtRestDoItVector)[fAtRestDoItProcTriggered] = NotForced;
    309316       }
     
    311318   }
    312319
    313 // at least one process is necessary to destory the particle 
     320// at least one process is necessary to destroy the particle 
    314321// exit with warning
    315322   if(NofInactiveProc==MAXofAtRestLoops){
    316      //     G4Exception("G4SteppingManager::InvokeAtRestDoItProcs: No AtRestDoIt process is active. " );
    317      G4cerr << "G4SteppingManager::InvokeAtRestDoItProcs: No AtRestDoIt process is active. " << G4endl;
     323     G4cerr << "ERROR - G4SteppingManager::InvokeAtRestDoItProcs()" << G4endl
     324            << "        No AtRestDoIt process is active!" << G4endl;
     325     // G4Exception("G4SteppingManager::InvokeAtRestDoItProcs", "Tracking0013",
     326     //             FatalException, "No AtRestDoIt process is active." );
    318327   }
    319328
     
    401410   for( size_t ci=0 ; ci<MAXofAlongStepLoops ; ci++ ){
    402411     fCurrentProcess = (*fAlongStepDoItVector)[ci];
    403      if (fCurrentProcess== NULL) continue;
     412     if (fCurrentProcess== 0) continue;
    404413         // NULL means the process is inactivated by a user on fly.
    405414
     
    577586  G4int tPtclIdx
    578587    = G4ProductionCuts::GetIndex(aSecondary->GetDefinition());
     588  if (tPtclIdx<0)  { return; }
    579589  G4ProductionCutsTable* tCutsTbl
    580590    = G4ProductionCutsTable::GetProductionCutsTable();
Note: See TracChangeset for help on using the changeset viewer.