355{
356 if (theTable == nullptr) {
357#ifdef G4VERBOSE
358 if (verboseLevel > 0) {
359 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
360 <<
" No ordering parameter table : " << ordParamFileName <<
G4endl;
361 }
362#endif
364 "No Ordering Parameter Table");
365 return false;
366 }
367
371
372#ifdef G4VERBOSE
373 if (verboseLevel > 2) {
374 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" Process Type = " << pType
376 }
377#endif
378
379
380 if ((pType < 1) || (pSubType < 1)) {
381#ifdef G4VERBOSE
382 if (verboseLevel > 0) {
383 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
384 << particle->
GetParticleName() <<
" has illegal Process Type = " << pType
385 <<
" SubType = " << pSubType <<
G4endl;
386 }
387#endif
389 "No Matching process Type/SubType");
390 return false;
391 }
392
395 G4bool duplicable =
false;
396 for (
G4int i = 0; i < sizeOfTable; ++i) {
397 G4PhysicsListOrderingParameter* tmp = &(theTable->at(i));
398 if ((tmp->processType == pType) && (tmp->processSubType == pSubType)) {
399 ord[0] = tmp->ordering[0];
400 ord[1] = tmp->ordering[1];
401 ord[2] = tmp->ordering[2];
402 duplicable = tmp->isDuplicable;
403 isFound = true;
404 break;
405 }
406 }
407 if (!isFound) {
408#ifdef G4VERBOSE
409 if (verboseLevel > 0) {
410 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
411 << particle->
GetParticleName() <<
" with type/subtype =" << pType <<
"/" << pSubType
412 <<
" is not registered in OrdingParameterTable " <<
G4endl;
413 }
414#endif
416 "No Matching process Type/SubType");
417 return false;
418 }
419
420
422 if (pManager == nullptr) {
423
424#ifdef G4VERBOSE
425 if (verboseLevel > 0) {
426 G4cout <<
"G4PhysicsListHelper::RegisterProcess "
428 }
429#endif
431 "No process manager");
432 return false;
433 }
434
435
436 if (!duplicable) {
437 G4bool duplicated =
false;
440 const G4VProcess* p = (*pList)[idx];
442 duplicated = true;
443#ifdef G4VERBOSE
444 if (verboseLevel > 0) {
445 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
446 << particle->
GetParticleName() <<
" with type/subtype =" << pType <<
"/"
447 << pSubType <<
" is has same subType as " << p->
GetProcessName() <<
" for "
450 }
451#endif
453 "Duplication of processes");
454 }
455 }
456 if (duplicated) return false;
457 }
458
459
461 if (code < 0) return false;
462
463
464 for (
G4int idx = 0; idx < 3; ++idx) {
466 if (ord[idx] < 0) {
467
468 }
469 else if (ord[idx] == 0) {
471 }
472 else if (ord[idx] < 9999) {
474 }
475 else {
477 }
478 }
479#ifdef G4VERBOSE
480 if (verboseLevel > 1) {
481 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
482 << particle->
GetParticleName() <<
" with type/subtype =" << pType <<
"/" << pSubType
483 << " is successfully registered with ordering parameters " << ord[0] << ":" << ord[1]
484 <<
":" << ord[2] <<
G4endl;
485 }
486#endif
487 return true;
488}
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4ProcessType GetProcessType() const
G4int GetProcessSubType() const
const G4String & GetProcessName() const