84 #define G4MT_theMessenger ((this->subInstanceManager.offset[this->g4vuplInstanceID])._theMessenger)
85 #define G4MT_thePLHelper ((this->subInstanceManager.offset[this->g4vuplInstanceID])._thePLHelper)
86 #define fIsPhysicsTableBuilt ((this->subInstanceManager.offset[this->g4vuplInstanceID])._fIsPhysicsTableBuilt)
87 #define fDisplayThreshold ((this->subInstanceManager.offset[this->g4vuplInstanceID])._fDisplayThreshold)
88 #define theParticleIterator ((this->subInstanceManager.offset[this->g4vuplInstanceID])._theParticleIterator)
106 defaultCutValue(1.0 *
mm),
107 isSetDefaultCutValue(false),
108 fRetrievePhysicsTable(false),
109 fStoredInAscii(true),
110 fIsCheckedForRetrievePhysicsTable(false),
111 fIsRestoredCutValues(false),
112 directoryPhysicsTable(
"."),
115 fDisableCheckParticleList(false)
169 :verboseLevel(right.verboseLevel),
170 defaultCutValue(right.defaultCutValue),
171 isSetDefaultCutValue(right.isSetDefaultCutValue),
172 fRetrievePhysicsTable(right.fRetrievePhysicsTable),
173 fStoredInAscii(right.fStoredInAscii),
174 fIsCheckedForRetrievePhysicsTable(right.fIsCheckedForRetrievePhysicsTable),
175 fIsRestoredCutValues(right.fIsRestoredCutValues),
176 directoryPhysicsTable(right.directoryPhysicsTable),
179 fDisableCheckParticleList(right.fDisableCheckParticleList)
206 if (
this != &right) {
228 if (newParticle == 0)
return;
229 G4Exception(
"G4VUserPhysicsList::AddProcessManager",
231 "This method is obsolete");
240 #ifdef G4MULTITHREADED
242 G4ParticleTable::lockCount++;
259 G4cout <<
"G4VUserPhysicsList::InitializeProcessManager: creating ProcessManager to "
278 G4cout <<
"G4VUserPhysicsList::InitializeProcessManager: copying ProcessManager to "
287 #ifdef G4MULTITHREADED
299 #ifdef G4MULTITHREADED
301 G4ParticleTable::lockCount++;
314 if (pmanager!=0)
delete pmanager;
317 G4cout <<
"G4VUserPhysicsList::RemoveProcessManager: ";
318 G4cout <<
"remove ProcessManager from ";
328 #ifdef G4MULTITHREADED
369 G4cout <<
"G4VUserPhysicsList::SetDefaultCutValue: negative cut values"
370 <<
" :" << value/
mm <<
"[mm]" <<
G4endl;
387 G4cout <<
"G4VUserPhysicsList::SetDefaultCutValue:"
388 <<
"default cut value is changed to :"
402 G4cout <<
"G4VUserPhysicsList::GetCutValue "
403 <<
" : No Default Region " <<
G4endl;
408 "No Default Region");
432 G4cout <<
"G4VUserPhysicsList::SetCutValue "
433 <<
" : No Region of " << rname <<
G4endl;
471 G4cout <<
"G4VUserPhysicsList::SetParticleCuts: negative cut values"
472 <<
" :" << cut/
mm <<
"[mm]"
473 <<
" for "<< particleName <<
G4endl;
485 G4cout <<
"G4VUserPhysicsList::SetParticleCuts "
486 <<
" : No Default Region " <<
G4endl;
489 G4Exception(
"G4VUserPhysicsList::SetParticleCuts ",
491 "No Default Region");
494 region = world_region;
502 if(region != world_region &&
513 G4cout <<
"G4VUserPhysicsList::SetParticleCuts: "
514 <<
" :" << cut/
mm <<
"[mm]"
515 <<
" for "<< particleName <<
G4endl;
537 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
538 <<
" Retrieve Cut Table failed !!" <<
G4endl;
541 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
543 "Fail to retrieve Production Cut Table");
547 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
548 <<
" Retrieve Cut Table successfully " <<
G4endl;
555 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
556 <<
" does not retrieve Cut Table but calculate " <<
G4endl;
576 if( particle!=GammaP &&
593 G4cout <<
"#### G4VUserPhysicsList::BuildPhysicsTable() - BuildPhysicsTable("
602 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
603 <<
"Physics table can not be retreived and will be calculated "
612 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
613 <<
" Retrieve Physics Table for "
624 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
625 <<
"Calculate Physics Table for "
636 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
637 <<
" : No Process Manager for "
640 <<
" should be created in your PhysicsList" <<
G4endl;
643 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
645 "No process manager");
656 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
657 <<
" : No Process Vector for "
661 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
663 "No process Vector");
669 G4cout <<
" ProcessManager : " << pManager <<
" ProcessManagerShadow : " << pManagerShadow <<
G4endl;
670 for(
G4int iv1=0;iv1<pVector->
size();iv1++)
671 {
G4cout <<
" " << iv1 <<
" - " << (*pVector)[iv1]->GetProcessName() <<
G4endl; }
672 G4cout <<
"--------------------------------------------------------------" <<
G4endl;
675 for(
G4int iv2=0;iv2<pVectorShadow->
size();iv2++)
676 {
G4cout <<
" " << iv2 <<
" - " << (*pVectorShadow)[iv2]->GetProcessName() <<
G4endl; }
679 for (
G4int j=0; j < pVector->
size(); ++j) {
684 if ( pManagerShadow == pManager )
686 (*pVector)[j]->BuildPhysicsTable(*particle);
690 (*pVector)[j]->BuildWorkerPhysicsTable(*particle);
712 G4cout<<
"G4VUserPhysicsList::PreparePhysicsTable "
713 <<
": No Process Manager for "
716 <<
" should be created in your PhysicsList" <<
G4endl;
719 G4Exception(
"G4VUserPhysicsList::PreparePhysicsTable",
721 "No process manager");
734 G4cout <<
"G4VUserPhysicsList::PreparePhysicsTable "
735 <<
": No Process Vector for "
739 G4Exception(
"G4VUserPhysicsList::PreparePhysicsTable",
741 "No process Vector");
744 for (
G4int j=0; j < pVector->
size(); ++j) {
750 if ( pManagerShadow == pManager )
752 (*pVector)[j]->PreparePhysicsTable(*particle);
756 (*pVector)[j]->PrepareWorkerPhysicsTable(*particle);
782 G4cout <<
"G4VUserPhysicsList::BuildIntegralPhysicsTable "
783 <<
" BuildPhysicsTable is invoked for "
800 if ((idx++ % 4) == 3) {
835 G4Exception(
"G4VUserPhysicsList::StorePhysicsTable",
837 "Fail to store Cut Table");
842 G4cout <<
"G4VUserPhysicsList::StorePhysicsTable "
843 <<
" Store material and cut values successfully" <<
G4endl;
856 for ( j=0; j < pVector->
size(); ++j) {
857 if (!(*pVector)[j]->StorePhysicsTable(particle,dir,ascii)){
858 G4String comment =
"Fail to store physics table for ";
859 comment += (*pVector)[j]->GetProcessName();
861 G4Exception(
"G4VUserPhysicsList::StorePhysicsTable",
895 for ( j=0; j < pVector->
size(); ++j) {
897 (*pVector)[j]->RetrievePhysicsTable(particle,directory,ascii);
902 G4cout <<
"G4VUserPhysicsList::RetrievePhysicsTable "
903 <<
" Fail to retrieve Physics Table for "
904 << (*pVector)[j]->GetProcessName() <<
G4endl;
905 G4cout <<
"Calculate Physics Table for "
909 (*pVector)[j]->BuildPhysicsTable(*particle);
912 for ( j=0; j < pVector->
size(); ++j) {
924 G4cout <<
"G4VUserPhysicsList::SetApplyCuts for " << name <<
G4endl;
988 G4cout <<
"G4VUserPhysicsList::SetVerboseLevel :"
1003 G4cout <<
"G4VUserPhysicsList::ResetCuts() is obsolete."
1004 <<
" This method gives no effect and you can remove it. "<<
G4endl;
G4double GetCutValue(const G4String &pname) const
void SetDefaultCutValue(G4double newCutValue)
void BuildIntegralPhysicsTable(G4VProcess *, G4ParticleDefinition *)
G4ProductionCuts * GetProductionCuts() const
void SetApplyCuts(G4bool value, const G4String &name)
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void DumpCutValuesTableIfRequested()
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void RemoveProcessManager()
G4PhysicsListHelper * _thePLHelper
static constexpr double mm
void SetProcessManager(G4ProcessManager *aProcessManager)
void SetCutValue(G4double aCut, const G4String &pname)
G4bool fIsRestoredCutValues
void SetEnergyRange(G4double lowedge, G4double highedge)
void PreparePhysicsTable(G4ParticleDefinition *)
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
G4ProductionCutsTable * fCutsTable
G4double GetProductionCut(G4int index) const
G4bool fRetrievePhysicsTable
G4bool fIsCheckedForRetrievePhysicsTable
void SetProductionCut(G4double cut, G4int index=-1)
G4bool GetApplyCuts(const G4String &name) const
void SetCutsForRegion(G4double aCut, const G4String &rname)
G4ParticleTable * theParticleTable
const G4String & GetParticleSubType() const
G4ParticleDefinition * GetGenericIon() const
G4UserPhysicsListMessenger * _theMessenger
G4int GetInstanceID() const
void InitializeProcessManager()
const G4String & GetParticleName() const
G4bool IsGeneralIon() const
G4RUN_DLL G4ThreadLocalStatic T * offset
static constexpr double TeV
static G4RegionStore * GetInstance()
G4bool _fIsPhysicsTableBuilt
#define fDisplayThreshold
void SetPhysicsTableRetrieved(const G4String &directory="")
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
void DumpCutValuesTable(G4int flag=1)
void AddProcessManager(G4ParticleDefinition *newParticle, G4ProcessManager *newManager=0)
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetMasterProcessManager() const
const XML_Char int const XML_Char * value
void SetVerboseLevel(G4int value)
G4bool RetrieveCutsTable(const G4String &directory, G4bool ascii=false)
G4int GetInstanceID() const
void SetVerboseLevel(G4int value)
#define theParticleIterator
G4ParticleTable::G4PTblDicIterator * _theParticleIterator
G4VUserPhysicsList & operator=(const G4VUserPhysicsList &)
const G4String & GetProcessName() const
G4bool StorePhysicsTable(const G4String &directory=".")
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool isSetDefaultCutValue
G4bool IsShortLived() const
static G4ProductionCutsTable * GetProductionCutsTable()
void UseCoupledTransportation(G4bool vl=true)
void SetApplyCutsFlag(G4bool)
G4PART_DLL G4ThreadLocalStatic G4int slavetotalspace
void SetCutsWithDefault()
void DeleteAllParticles()
static G4ParticleTable * GetParticleTable()
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
G4ProcessManager * GetProcessManager() const
static G4PhysicsListHelper * GetPhysicsListHelper()
G4bool StoreCutsTable(const G4String &directory, G4bool ascii=false)
static G4RUN_DLL G4VUPLManager subInstanceManager
static const G4VUPLManager & GetSubInstanceManager()
void ResetCuts()
obsolete methods
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4bool GetApplyCutsFlag() const
#define G4MT_theMessenger
void SetProductionCuts(G4ProductionCuts *cut)
G4int CreateSubInstance()
G4bool fDisableCheckParticleList
#define fIsPhysicsTableBuilt
G4String directoryPhysicsTable
virtual void RetrievePhysicsTable(G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
static constexpr double keV
virtual ~G4VUserPhysicsList()
G4PTblDicIterator * GetIterator() const
void SetMasterProcessManager(G4ProcessManager *aNewPM)
G4ProcessVector * GetProcessList() const