Changeset 1340 for trunk/source/tracking/src/G4SteppingManager2.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/tracking/src/G4SteppingManager2.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4SteppingManager2.cc,v 1.3 7 2009/09/25 00:23:41 gumExp $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 $ 29 29 // 30 30 //--------------------------------------------------------------- … … 50 50 #include "G4SteppingControl.hh" 51 51 #include "G4TransportationManager.hh" 52 //#include "G4UserLimits.hh"53 52 #include "G4SteppingManager.hh" 54 53 #include "G4LossTableManager.hh" … … 59 58 { 60 59 #ifdef debug 61 G4cout<<"G4SteppingManager::GetProcessNumber: is called track="<<fTrack<<G4endl; 60 G4cout<<"G4SteppingManager::GetProcessNumber: is called track=" 61 <<fTrack<<G4endl; 62 62 #endif 63 63 64 64 G4ProcessManager* pm= fTrack->GetDefinition()->GetProcessManager(); 65 65 if(!pm) 66 66 { 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; 71 74 } 72 75 … … 76 79 fAtRestGetPhysIntVector = pm->GetAtRestProcessVector(typeGPIL); 77 80 #ifdef debug 78 G4cout<<"G4SteppingManager::GetProcessNumber: #ofAtRest="<<MAXofAtRestLoops<<G4endl; 81 G4cout << "G4SteppingManager::GetProcessNumber: #ofAtRest=" 82 << MAXofAtRestLoops << G4endl; 79 83 #endif 80 84 … … 84 88 fAlongStepGetPhysIntVector = pm->GetAlongStepProcessVector(typeGPIL); 85 89 #ifdef debug 86 G4cout<<"G4SteppingManager::GetProcessNumber:#ofAlongStp="<<MAXofAlongStepLoops<<G4endl; 90 G4cout << "G4SteppingManager::GetProcessNumber:#ofAlongStp=" 91 << MAXofAlongStepLoops << G4endl; 87 92 #endif 88 93 … … 92 97 fPostStepGetPhysIntVector = pm->GetPostStepProcessVector(typeGPIL); 93 98 #ifdef debug 94 G4cout<<"G4SteppingManager::GetProcessNumber: #ofPostStep="<<MAXofPostStepLoops<<G4endl; 99 G4cout << "G4SteppingManager::GetProcessNumber: #ofPostStep=" 100 << MAXofPostStepLoops << G4endl; 95 101 #endif 96 102 … … 98 104 SizeOfSelectedDoItVector<MAXofAlongStepLoops || 99 105 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."); 106 116 } 107 117 } … … 144 154 // fStepStatus = fUserDefinedLimit; 145 155 // fStep->GetPostStepPoint() 146 // ->SetProcessDefinedStep( NULL);156 // ->SetProcessDefinedStep(0); 147 157 // // Take note that the process pointer is 'NULL' if the Step 148 158 // // is defined by the user defined limit. … … 155 165 for(size_t np=0; np < MAXofPostStepLoops; np++){ 156 166 fCurrentProcess = (*fPostStepGetPhysIntVector)(np); 157 if (fCurrentProcess== NULL) {167 if (fCurrentProcess== 0) { 158 168 (*fSelectedPostStepDoItVector)[np] = InActivated; 159 169 continue; … … 225 235 for(size_t kp=0; kp < MAXofAlongStepLoops; kp++){ 226 236 fCurrentProcess = (*fAlongStepGetPhysIntVector)[kp]; 227 if (fCurrentProcess== NULL) continue;237 if (fCurrentProcess== 0) continue; 228 238 // NULL means the process is inactivated by a user on fly. 229 239 230 240 physIntLength = fCurrentProcess-> 231 AlongStepGPIL( *fTrack, 232 fPreviousStepSize, 233 PhysicalStep, 234 safetyProposedToAndByProcess, 235 &fGPILSelection ); 241 AlongStepGPIL( *fTrack, fPreviousStepSize, 242 PhysicalStep, 243 safetyProposedToAndByProcess, 244 &fGPILSelection ); 236 245 #ifdef G4VERBOSE 237 246 // !!!!! Verbose … … 287 296 for( size_t ri=0 ; ri < MAXofAtRestLoops ; ri++ ){ 288 297 fCurrentProcess = (*fAtRestGetPhysIntVector)[ri]; 289 if (fCurrentProcess== NULL) {298 if (fCurrentProcess== 0) { 290 299 (*fSelectedAtRestDoItVector)[ri] = InActivated; 291 300 NofInactiveProc++; … … 294 303 295 304 lifeTime = 296 fCurrentProcess->AtRestGPIL( 297 *fTrack, 298 &fCondition ); 305 fCurrentProcess->AtRestGPIL( *fTrack, &fCondition ); 299 306 300 307 if(fCondition==Forced && fCurrentProcess){ … … 305 312 if(lifeTime < shortestLifeTime ){ 306 313 shortestLifeTime = lifeTime; 307 fAtRestDoItProcTriggered = G4int( int(ri));314 fAtRestDoItProcTriggered = G4int(ri); 308 315 (*fSelectedAtRestDoItVector)[fAtRestDoItProcTriggered] = NotForced; 309 316 } … … 311 318 } 312 319 313 // at least one process is necessary to dest ory the particle320 // at least one process is necessary to destroy the particle 314 321 // exit with warning 315 322 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." ); 318 327 } 319 328 … … 401 410 for( size_t ci=0 ; ci<MAXofAlongStepLoops ; ci++ ){ 402 411 fCurrentProcess = (*fAlongStepDoItVector)[ci]; 403 if (fCurrentProcess== NULL) continue;412 if (fCurrentProcess== 0) continue; 404 413 // NULL means the process is inactivated by a user on fly. 405 414 … … 577 586 G4int tPtclIdx 578 587 = G4ProductionCuts::GetIndex(aSecondary->GetDefinition()); 588 if (tPtclIdx<0) { return; } 579 589 G4ProductionCutsTable* tCutsTbl 580 590 = G4ProductionCutsTable::GetProductionCutsTable();
Note: See TracChangeset
for help on using the changeset viewer.