////////////////////////////////////////////
| 372 | |
| 373 | ///////////////////////////////////////////////// |
| 374 | void G4SteppingManager::GetProcessNumber() |
| 375 | ///////////////////////////////////////////////// |
| 376 | { |
| 377 | #ifdef debug |
| 378 | G4cout << "G4SteppingManager::GetProcessNumber: is called track=" << fTrack << G4endl; |
| 379 | #endif |
| 380 | |
| 381 | G4ProcessManager* pm = fTrack->GetDefinition()->GetProcessManager(); |
| 382 | if (pm == nullptr) { |
| 383 | G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl |
| 384 | << " ProcessManager is NULL for particle = " |
| 385 | << fTrack->GetDefinition()->GetParticleName() |
| 386 | << ", PDG_code = " << fTrack->GetDefinition()->GetPDGEncoding() << G4endl; |
| 387 | G4Exception("G4SteppingManager::GetProcessNumber()", "Tracking0011", FatalException, |
| 388 | "Process Manager is not found."); |
| 389 | return; |
| 390 | } |
| 391 | |
| 392 | // AtRestDoits |
| 393 | // |
| 394 | MAXofAtRestLoops = pm->GetAtRestProcessVector()->entries(); |
| 395 | fAtRestDoItVector = pm->GetAtRestProcessVector(typeDoIt); |
| 396 | fAtRestGetPhysIntVector = pm->GetAtRestProcessVector(typeGPIL); |
| 397 | |
| 398 | #ifdef debug |
| 399 | G4cout << "G4SteppingManager::GetProcessNumber: #ofAtRest=" << MAXofAtRestLoops << G4endl; |
| 400 | #endif |
| 401 | |
| 402 | // AlongStepDoits |
| 403 | // |
| 404 | MAXofAlongStepLoops = pm->GetAlongStepProcessVector()->entries(); |
| 405 | fAlongStepDoItVector = pm->GetAlongStepProcessVector(typeDoIt); |
| 406 | fAlongStepGetPhysIntVector = pm->GetAlongStepProcessVector(typeGPIL); |
| 407 | |
| 408 | #ifdef debug |
| 409 | G4cout << "G4SteppingManager::GetProcessNumber:#ofAlongStp=" << MAXofAlongStepLoops << G4endl; |
| 410 | #endif |
| 411 | |
| 412 | // PostStepDoits |
| 413 | // |
| 414 | MAXofPostStepLoops = pm->GetPostStepProcessVector()->entries(); |
| 415 | fPostStepDoItVector = pm->GetPostStepProcessVector(typeDoIt); |
| 416 | fPostStepGetPhysIntVector = pm->GetPostStepProcessVector(typeGPIL); |
| 417 | |
| 418 | #ifdef debug |
| 419 | G4cout << "G4SteppingManager::GetProcessNumber: #ofPostStep=" << MAXofPostStepLoops << G4endl; |
| 420 | #endif |
| 421 | |
| 422 | if (SizeOfSelectedDoItVector < MAXofAtRestLoops || |
| 423 | SizeOfSelectedDoItVector < MAXofAlongStepLoops || |
| 424 | SizeOfSelectedDoItVector < MAXofPostStepLoops) |
| 425 | { |
| 426 | G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl |
| 427 | << " SizeOfSelectedDoItVector= " << SizeOfSelectedDoItVector |
| 428 | << " ; is smaller then one of MAXofAtRestLoops= " << MAXofAtRestLoops << G4endl |
| 429 | << " or MAXofAlongStepLoops= " << MAXofAlongStepLoops |
| 430 | << " or MAXofPostStepLoops= " << MAXofPostStepLoops << G4endl; |
| 431 | G4Exception("G4SteppingManager::GetProcessNumber()", "Tracking0012", FatalException, |