52 : useCoupledTransportation(
false),
53 theTransportationProcess(nullptr),
104 G4bool isPositron =
false;
107 G4bool isGenericIon =
false;
109 G4bool isAnyChargedBaryon =
false;
126 if ( name ==
"e-") isElectron =
true;
127 else if ( name ==
"e+") isPositron =
true;
128 else if ( name ==
"gamma") isGamma =
true;
129 else if ( name ==
"GenericIon") isGenericIon =
true;
130 else if ( name ==
"proton") isProton =
true;
133 if ( particle->
GetPDGCharge() != 0.0 ) isAnyChargedBaryon =
true;
137 if (!isEmProc)
return;
142 G4bool isEmBasic = isElectron || isPositron || isGamma;
143 G4bool isMissingEmBasic = !isElectron || !isPositron || !isGamma;
144 if (isEmBasic && isMissingEmBasic) {
146 if (!isElectron) missingName +=
"e- ";
147 if (!isPositron) missingName +=
"e+ ";
148 if (!isGamma) missingName +=
"gamma ";
152 G4cout <<
"G4PhysicsListHelper::CheckParticleList: "
153 << missingName <<
" do not exist " <<
G4endl;
154 G4cout <<
" These particle are necessary for basic EM processes"
158 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
160 "Missing EM basic particle");
166 if (!isProton && isAnyChargedBaryon) {
171 G4cout <<
"G4PhysicsListHelper::CheckParticleList: "
172 << missingName <<
" does not exist "<<
G4endl;
173 G4cout <<
" Proton is necessary for EM baryon processes" <<
G4endl;
176 missingName +=
" should be created ";
177 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
185 if (!isGenericIon && isAnyIon) {
190 G4cout <<
"G4PhysicsListHelper::CheckParticleList: "
191 << missingName <<
" does not exist "<<
G4endl;
192 G4cout <<
" GenericIon should be created if any ion is necessary" <<
G4endl;
195 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
197 "Missing GenericIon");
211 G4int verboseLevelTransport = 0;
215 G4cout <<
"G4PhysicsListHelper::AddTransportation() "<<
G4endl;
232 G4cout <<
"--- G4CoupledTransportation is used " <<
G4endl;
247 if ( pmanager == 0) {
251 G4cout <<
"G4PhysicsListHelper::AddTransportation "
252 <<
" : No Process Manager for "
256 G4Exception(
"G4PhysicsListHelper::AddTransportation",
258 "No process manager");
276 G4bool readInFile =
false;
279 if( std::getenv(
"G4ORDPARAMTABLE") ){
283 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable :"
294 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable "
298 G4Exception(
"G4PhysicsListHelper::ReadOrdingParameterTable",
300 "Fail to open ordering paramter table ");
336 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable "
340 G4Exception(
"G4PhysicsListHelper::ReadOrdingParameterTable",
342 "The ordering parameter table is empty ");
355 G4cout <<
"G4PhysicsListHelper::DumpOrdingParameterTable "
362 G4cout <<
"G4PhysicsListHelper::DumpOrdingParameterTable : "
365 <<
" ProcessType" <<
" SubType"
366 <<
" AtRest" <<
" AlongStep" <<
" PostStep"
367 <<
" Duplicable" <<
G4endl;
374 << std::setw(15) << tmp->
ordering[0]
375 << std::setw(15) << tmp->
ordering[1]
376 << std::setw(15) << tmp->
ordering[2];
394 G4cout <<
"G4PhysicsListHelper::GetOrderingParameter : "
424 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
429 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
431 "No Ordering Parameter Table");
441 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
442 << pName <<
" Process Type = " << pType
443 <<
" SubType = "<< pSubType
450 if ((pType <1)||(pSubType<1)) {
453 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
455 <<
" has illegal Process Type = " << pType
456 <<
" SubType = "<< pSubType <<
G4endl;
459 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
461 "No Matching process Type/SubType");
467 G4bool duplicable =
false;
482 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
484 <<
" with type/subtype ="
485 << pType <<
"/" << pSubType
486 <<
" is not reigstered in OrdingParameterTable "
490 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
492 "No Matching process Type/SubType");
498 if ( pManager == 0) {
502 G4cout <<
"G4PhysicsListHelper::RegisterProcess "
503 <<
" : No Process Manager for "
507 G4Exception(
"G4PhysicsListHelper::RegisterProcess ",
509 "No process manager");
515 G4bool duplicated =
false;
524 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
526 <<
" with type/subtype ="
527 << pType <<
"/" << pSubType
528 <<
" is has same subType as "
535 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
537 "Duplication of processes");
540 if (duplicated)
return false;
545 if (code <0)
return false;
552 }
else if (ord[
idx]==0) {
554 }
else if (ord[
idx]<9999) {
562 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
564 <<
" with type/subtype ="
565 << pType <<
"/" << pSubType
566 <<
" is sucessfully registered with ordering parameters "
567 << ord[0] <<
":" << ord[1] <<
":" << ord[2]