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)
175 :verboseLevel(right.verboseLevel),
176 defaultCutValue(right.defaultCutValue),
177 isSetDefaultCutValue(right.isSetDefaultCutValue),
178 fRetrievePhysicsTable(right.fRetrievePhysicsTable),
179 fStoredInAscii(right.fStoredInAscii),
180 fIsCheckedForRetrievePhysicsTable(right.fIsCheckedForRetrievePhysicsTable),
181 fIsRestoredCutValues(right.fIsRestoredCutValues),
182 directoryPhysicsTable(right.directoryPhysicsTable),
185 fDisableCheckParticleList(right.fDisableCheckParticleList)
212 if (
this != &right) {
234 if (newParticle == 0)
return;
235 G4Exception(
"G4VUserPhysicsList::AddProcessManager",
237 "This method is obsolete");
246 #ifdef G4MULTITHREADED
247 G4MUTEXLOCK(&G4ParticleTable::particleTableMutex());
248 G4ParticleTable::lockCount()++;
265 G4cout <<
"G4VUserPhysicsList::InitializeProcessManager: creating ProcessManager to "
284 G4cout <<
"G4VUserPhysicsList::InitializeProcessManager: copying ProcessManager to "
293 #ifdef G4MULTITHREADED
305 #ifdef G4MULTITHREADED
306 G4MUTEXLOCK(&G4ParticleTable::particleTableMutex());
307 G4ParticleTable::lockCount()++;
320 if (pmanager!=0)
delete pmanager;
323 G4cout <<
"G4VUserPhysicsList::RemoveProcessManager: ";
324 G4cout <<
"remove ProcessManager from ";
334 #ifdef G4MULTITHREADED
375 G4cout <<
"G4VUserPhysicsList::SetDefaultCutValue: negative cut values"
376 <<
" :" << value/
mm <<
"[mm]" <<
G4endl;
393 G4cout <<
"G4VUserPhysicsList::SetDefaultCutValue:"
394 <<
"default cut value is changed to :"
408 G4cout <<
"G4VUserPhysicsList::GetCutValue "
409 <<
" : No Default Region " <<
G4endl;
414 "No Default Region");
438 G4cout <<
"G4VUserPhysicsList::SetCutValue "
439 <<
" : No Region of " << rname <<
G4endl;
477 G4cout <<
"G4VUserPhysicsList::SetParticleCuts: negative cut values"
478 <<
" :" << cut/
mm <<
"[mm]"
479 <<
" for "<< particleName <<
G4endl;
491 G4cout <<
"G4VUserPhysicsList::SetParticleCuts "
492 <<
" : No Default Region " <<
G4endl;
495 G4Exception(
"G4VUserPhysicsList::SetParticleCuts ",
497 "No Default Region");
500 region = world_region;
508 if(region != world_region &&
519 G4cout <<
"G4VUserPhysicsList::SetParticleCuts: "
520 <<
" :" << cut/
mm <<
"[mm]"
521 <<
" for "<< particleName <<
G4endl;
543 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
544 <<
" Retrieve Cut Table failed !!" <<
G4endl;
547 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
549 "Fail to retrieve Production Cut Table");
553 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
554 <<
" Retrieve Cut Table successfully " <<
G4endl;
561 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable"
562 <<
" does not retrieve Cut Table but calculate " <<
G4endl;
582 if( particle!=GammaP &&
599 G4cout <<
"#### G4VUserPhysicsList::BuildPhysicsTable() - BuildPhysicsTable("
608 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
609 <<
"Physics table can not be retreived and will be calculated "
618 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
619 <<
" Retrieve Physics Table for "
630 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
631 <<
"Calculate Physics Table for "
642 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
643 <<
" : No Process Manager for "
646 <<
" should be created in your PhysicsList" <<
G4endl;
649 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
651 "No process manager");
662 G4cout <<
"G4VUserPhysicsList::BuildPhysicsTable "
663 <<
" : No Process Vector for "
667 G4Exception(
"G4VUserPhysicsList::BuildPhysicsTable",
669 "No process Vector");
675 G4cout <<
" ProcessManager : " << pManager <<
" ProcessManagerShadow : " << pManagerShadow <<
G4endl;
676 for(
G4int iv1=0;iv1<pVector->
size();iv1++)
677 {
G4cout <<
" " << iv1 <<
" - " << (*pVector)[iv1]->GetProcessName() <<
G4endl; }
678 G4cout <<
"--------------------------------------------------------------" <<
G4endl;
681 for(
G4int iv2=0;iv2<pVectorShadow->
size();iv2++)
682 {
G4cout <<
" " << iv2 <<
" - " << (*pVectorShadow)[iv2]->GetProcessName() <<
G4endl; }
685 for (
G4int j=0; j < pVector->
size(); ++j) {
690 if ( pManagerShadow == pManager )
692 (*pVector)[j]->BuildPhysicsTable(*particle);
696 (*pVector)[j]->BuildWorkerPhysicsTable(*particle);
718 G4cout<<
"G4VUserPhysicsList::PreparePhysicsTable "
719 <<
": No Process Manager for "
722 <<
" should be created in your PhysicsList" <<
G4endl;
725 G4Exception(
"G4VUserPhysicsList::PreparePhysicsTable",
727 "No process manager");
740 G4cout <<
"G4VUserPhysicsList::PreparePhysicsTable "
741 <<
": No Process Vector for "
745 G4Exception(
"G4VUserPhysicsList::PreparePhysicsTable",
747 "No process Vector");
750 for (
G4int j=0; j < pVector->
size(); ++j) {
756 if ( pManagerShadow == pManager )
758 (*pVector)[j]->PreparePhysicsTable(*particle);
762 (*pVector)[j]->PrepareWorkerPhysicsTable(*particle);
788 G4cout <<
"G4VUserPhysicsList::BuildIntegralPhysicsTable "
789 <<
" BuildPhysicsTable is invoked for "
806 if ((idx++ % 4) == 3) {
841 G4Exception(
"G4VUserPhysicsList::StorePhysicsTable",
843 "Fail to store Cut Table");
848 G4cout <<
"G4VUserPhysicsList::StorePhysicsTable "
849 <<
" Store material and cut values successfully" <<
G4endl;
862 for ( j=0; j < pVector->
size(); ++j) {
863 if (!(*pVector)[j]->StorePhysicsTable(particle,dir,ascii)){
864 G4String comment =
"Fail to store physics table for ";
865 comment += (*pVector)[j]->GetProcessName();
867 G4Exception(
"G4VUserPhysicsList::StorePhysicsTable",
901 for ( j=0; j < pVector->
size(); ++j) {
903 (*pVector)[j]->RetrievePhysicsTable(particle,directory,ascii);
908 G4cout <<
"G4VUserPhysicsList::RetrievePhysicsTable "
909 <<
" Fail to retrieve Physics Table for "
910 << (*pVector)[j]->GetProcessName() <<
G4endl;
911 G4cout <<
"Calculate Physics Table for "
915 (*pVector)[j]->BuildPhysicsTable(*particle);
918 for ( j=0; j < pVector->
size(); ++j) {
930 G4cout <<
"G4VUserPhysicsList::SetApplyCuts for " << name <<
G4endl;
994 G4cout <<
"G4VUserPhysicsList::SetVerboseLevel :"
1009 G4cout <<
"G4VUserPhysicsList::ResetCuts() is obsolete."
1010 <<
" This method gives no effect and you can remove it. "<<
G4endl;
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetCutsForRegion(G4double aCut, const G4String &rname)
void SetProductionCut(G4double cut, G4int index=-1)
G4ProcessManager * GetMasterProcessManager() const
void RemoveProcessManager()
G4ParticleTable::G4PTblDicIterator * _theParticleIterator
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
void SetMasterProcessManager(G4ProcessManager *aNewPM)
void SetPhysicsTableRetrieved(const G4String &directory="")
static G4PART_DLL G4int & slavetotalspace()
G4bool IsGeneralIon() const
static G4ParticleTable * GetParticleTable()
G4bool fIsRestoredCutValues
void AddProcessManager(G4ParticleDefinition *newParticle, G4ProcessManager *newManager=0)
#define theParticleIterator
static constexpr double keV
static constexpr double mm
G4RUN_DLL G4ThreadLocalStatic T * offset
const G4String & GetParticleSubType() const
const G4String & GetParticleName() const
void SetEnergyRange(G4double lowedge, G4double highedge)
void SetProductionCuts(G4ProductionCuts *cut)
G4ProcessVector * GetProcessList() const
G4PTblDicIterator * GetIterator() const
static G4RUN_DLL G4VUPLManager subInstanceManager
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4double GetProductionCut(G4int index) const
void BuildIntegralPhysicsTable(G4VProcess *, G4ParticleDefinition *)
G4PhysicsListHelper * _thePLHelper
static constexpr double TeV
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetProcessManager(G4ProcessManager *aProcessManager)
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
const XML_Char int const XML_Char * value
void ResetCuts()
obsolete methods
void PreparePhysicsTable(G4ParticleDefinition *)
G4bool GetApplyCuts(const G4String &name) const
virtual ~G4VUserPhysicsList()
G4int CreateSubInstance()
G4ParticleTable * theParticleTable
void UseCoupledTransportation(G4bool vl=true)
G4bool StoreCutsTable(const G4String &directory, G4bool ascii=false)
const G4String & GetProcessName() const
G4ParticleDefinition * GetGenericIon() const
G4ProductionCutsTable * fCutsTable
G4String directoryPhysicsTable
G4int GetInstanceID() const
void SetCutsWithDefault()
G4bool fRetrievePhysicsTable
G4bool fIsCheckedForRetrievePhysicsTable
G4bool RetrieveCutsTable(const G4String &directory, G4bool ascii=false)
void DeleteAllParticles()
#define G4MUTEXUNLOCK(mutex)
void SetDefaultCutValue(G4double newCutValue)
G4ProductionCuts * GetProductionCuts() const
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void InitializeProcessManager()
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4RegionStore * GetInstance()
static const G4VUPLManager & GetSubInstanceManager()
void SetApplyCuts(G4bool value, const G4String &name)
G4ProcessManager * GetProcessManager() const
#define fIsPhysicsTableBuilt
G4int GetInstanceID() const
virtual void RetrievePhysicsTable(G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
void DumpCutValuesTableIfRequested()
#define G4MUTEXLOCK(mutex)
G4bool StorePhysicsTable(const G4String &directory=".")
void SetApplyCutsFlag(G4bool)
G4GLOB_DLL std::ostream G4cout
G4bool _fIsPhysicsTableBuilt
G4double GetCutValue(const G4String &pname) const
virtual void TerminateWorker()
void SetCutValue(G4double aCut, const G4String &pname)
G4bool fDisableCheckParticleList
G4bool GetApplyCutsFlag() const
G4bool IsShortLived() const
#define fDisplayThreshold
void SetVerboseLevel(G4int value)
void DumpCutValuesTable(G4int flag=1)
virtual void InitializeWorker()
G4bool isSetDefaultCutValue
#define G4MT_theMessenger
G4VUserPhysicsList & operator=(const G4VUserPhysicsList &)
void SetVerboseLevel(G4int value)
G4UserPhysicsListMessenger * _theMessenger