103 G4bool isPositron =
false;
106 G4bool isGenericIon =
false;
108 G4bool isAnyChargedBaryon =
false;
121 for(std::size_t idx = 0; idx < list->
size(); ++idx)
131 else if(
name ==
"e+")
133 else if(
name ==
"gamma")
135 else if(
name ==
"GenericIon")
137 else if(
name ==
"proton")
144 isAnyChargedBaryon =
true;
156 if(isEmBasic && isMissingEmBasic)
160 missingName +=
"e- ";
162 missingName +=
"e+ ";
164 missingName +=
"gamma ";
169 G4cout <<
"G4PhysicsListHelper::CheckParticleList: " << missingName
170 <<
" do not exist " <<
G4endl;
171 G4cout <<
" These particle are necessary for basic EM processes"
175 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
"Run0101",
182 if(!isProton && isAnyChargedBaryon)
189 G4cout <<
"G4PhysicsListHelper::CheckParticleList: " << missingName
190 <<
" does not exist " <<
G4endl;
191 G4cout <<
" Proton is necessary for EM baryon processes" <<
G4endl;
194 missingName +=
" should be created ";
195 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
"Run0102",
202 if(!isGenericIon && isAnyIon)
204 G4String missingName =
"GenericIon ";
209 G4cout <<
"G4PhysicsListHelper::CheckParticleList: " << missingName
210 <<
" does not exist " <<
G4endl;
211 G4cout <<
" GenericIon should be created if any ion is necessary"
215 G4Exception(
"G4PhysicsListHelper::CheckParticleList",
"Run0103",
223 G4int verboseLevelTransport = 0;
228 G4cout <<
"G4PhysicsListHelper::AddTransportation() " <<
G4endl;
240 coupledTransport->SetLowLooperThresholds();
242 coupledTransport->SetHighLooperThresholds();
247 G4cout <<
"--- G4CoupledTransportation is used " <<
G4endl;
254 simpleTransport->SetLowLooperThresholds();
256 simpleTransport->SetHighLooperThresholds();
273 G4cout <<
"G4PhysicsListHelper::AddTransportation "
278 G4Exception(
"G4PhysicsListHelper::AddTransportation",
"Run0104",
296 G4bool readInFile =
false;
299 if(std::getenv(
"G4ORDPARAMTABLE"))
305 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable :"
318 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable "
322 G4Exception(
"G4PhysicsListHelper::ReadOrdingParameterTable",
"Run0105",
323 JustWarning,
"Fail to open ordering parameter table ");
367 G4cout <<
"G4PhysicsListHelper::ReadOrdingParameterTable "
371 G4Exception(
"G4PhysicsListHelper::ReadOrdingParameterTable",
"Run0106",
372 JustWarning,
"The ordering parameter table is empty ");
387 G4cout <<
"G4PhysicsListHelper::DumpOrdingParameterTable "
394 G4cout <<
"G4PhysicsListHelper::DumpOrdingParameterTable : "
402 <<
" Duplicable" <<
G4endl;
410 << std::setw(15) << tmp->
ordering[0] << std::setw(15)
435 G4cout <<
"G4PhysicsListHelper::GetOrderingParameter : "
469 G4cout <<
"G4PhysicsListHelper::RegisterProcess :"
474 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
"Run0107",
486 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName
487 <<
" Process Type = " << pType <<
" SubType = " << pSubType <<
" to "
493 if((pType < 1) || (pSubType < 1))
498 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
500 <<
" has illegal Process Type = " << pType
501 <<
" SubType = " << pSubType <<
G4endl;
504 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
"Run0108",
511 G4bool duplicable =
false;
530 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
533 <<
" is not registered in OrdingParameterTable " <<
G4endl;
536 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
"Run0109",
543 if(pManager ==
nullptr)
549 G4cout <<
"G4PhysicsListHelper::RegisterProcess "
554 G4Exception(
"G4PhysicsListHelper::RegisterProcess ",
"Riun0110",
562 G4bool duplicated =
false;
564 for(std::size_t idx = 0; idx < pList->
size(); ++idx)
573 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
575 <<
" with type/subtype =" << pType <<
"/" << pSubType
581 G4Exception(
"G4PhysicsListHelper::RegisterProcess",
"Run0111",
595 for(
G4int idx = 0; idx < 3; ++idx)
603 else if(ord[idx] == 0)
607 else if(ord[idx] < 9999)
619 G4cout <<
"G4PhysicsListHelper::RegisterProcess :" << pName <<
" for "
622 <<
" is successfully registered with ordering parameters " << ord[0]
623 <<
":" << ord[1] <<
":" << ord[2] <<
G4endl;
@ fPositronGeneralProcess
@ fElectronGeneralProcess
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
@ fLowEnergyBrownianTransportation
@ fLowEnergyDoubleIonisation
@ fLowEnergyChargeIncrease
@ fLowEnergyMolecularDecay
@ fLowEnergyVibrationalExcitation
@ fLowEnergyElectronSolvation
@ fLowEnergyTransportation
@ fLowEnergyChargeDecrease
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void reset(G4bool ifSkipIon=true)
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
G4bool useCoupledTransportation
void CheckParticleList() const
G4VProcess * theTransportationProcess
static G4ThreadLocal G4PhysicsListHelper * pPLHelper
static G4PhysicsListHelper * GetPhysicsListHelper()
void ReadInDefaultOrderingParameter()
G4ParticleTable::G4PTblDicIterator * aParticleIterator
void DumpOrdingParameterTable(G4int subType=-1) const
G4String ordParamFileName
std::vector< G4PhysicsListOrderingParameter > G4OrdParamTable
void ReadOrdingParameterTable()
G4ParticleTable * theParticleTable
G4PhysicsListOrderingParameter GetOrdingParameter(G4int subType) const
G4int theLooperThresholds
G4OrdParamTable * theTable
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4ProcessVector * GetProcessList() const
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetProcessOrderingToFirst(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
static G4RunManagerKernel * GetRunManagerKernel()
G4int GetNumberOfParallelWorld() const
static G4ScoringManager * GetScoringManagerIfExist()
G4ProcessType GetProcessType() const
G4int GetProcessSubType() const
const G4String & GetProcessName() const
G4bool isElectron(G4int ityp)
const char * name(G4int ptype)