Geant4  10.02.p03
G4VUserPhysicsList Class Referenceabstract

#include <G4VUserPhysicsList.hh>

Inheritance diagram for G4VUserPhysicsList:
Collaboration diagram for G4VUserPhysicsList:

Public Member Functions

 G4VUserPhysicsList ()
 
virtual ~G4VUserPhysicsList ()
 
 G4VUserPhysicsList (const G4VUserPhysicsList &)
 
G4VUserPhysicsListoperator= (const G4VUserPhysicsList &)
 
virtual void ConstructParticle ()=0
 
void Construct ()
 
virtual void ConstructProcess ()=0
 
void UseCoupledTransportation (G4bool vl=true)
 
virtual void SetCuts ()
 
void SetDefaultCutValue (G4double newCutValue)
 
G4double GetDefaultCutValue () const
 
void BuildPhysicsTable ()
 
void PreparePhysicsTable (G4ParticleDefinition *)
 
void BuildPhysicsTable (G4ParticleDefinition *)
 
G4bool StorePhysicsTable (const G4String &directory=".")
 
G4bool IsPhysicsTableRetrieved () const
 
G4bool IsStoredInAscii () const
 
const G4StringGetPhysicsTableDirectory () const
 
void SetPhysicsTableRetrieved (const G4String &directory="")
 
void SetStoredInAscii ()
 
void ResetPhysicsTableRetrieved ()
 
void ResetStoredInAscii ()
 
void DumpList () const
 
void DumpCutValuesTable (G4int flag=1)
 
void DumpCutValuesTableIfRequested ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void SetCutsWithDefault ()
 
void SetCutValue (G4double aCut, const G4String &pname)
 
G4double GetCutValue (const G4String &pname) const
 
void SetCutValue (G4double aCut, const G4String &pname, const G4String &rname)
 
void SetParticleCuts (G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
 
void SetParticleCuts (G4double cut, const G4String &particleName, G4Region *region=0)
 
void SetCutsForRegion (G4double aCut, const G4String &rname)
 
void ResetCuts ()
 obsolete methods More...
 
void SetApplyCuts (G4bool value, const G4String &name)
 
G4bool GetApplyCuts (const G4String &name) const
 
void RemoveProcessManager ()
 
void AddProcessManager (G4ParticleDefinition *newParticle, G4ProcessManager *newManager=0)
 
void CheckParticleList ()
 
void DisableCheckParticleList ()
 
G4int GetInstanceID () const
 
void InitializeWorker ()
 

Static Public Member Functions

static const G4VUPLManagerGetSubInstanceManager ()
 

Protected Member Functions

void AddTransportation ()
 
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
void BuildIntegralPhysicsTable (G4VProcess *, G4ParticleDefinition *)
 
virtual void RetrievePhysicsTable (G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
 
void InitializeProcessManager ()
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 

Protected Attributes

G4ParticleTabletheParticleTable
 
G4int verboseLevel
 
G4double defaultCutValue
 
G4bool isSetDefaultCutValue
 
G4ProductionCutsTablefCutsTable
 
G4bool fRetrievePhysicsTable
 
G4bool fStoredInAscii
 
G4bool fIsCheckedForRetrievePhysicsTable
 
G4bool fIsRestoredCutValues
 
G4String directoryPhysicsTable
 
G4bool fDisableCheckParticleList
 
G4int g4vuplInstanceID
 

Static Protected Attributes

static G4RUN_DLL G4VUPLManager subInstanceManager
 

Private Types

enum  { FixedStringLengthForStore = 32 }
 

Detailed Description

Definition at line 156 of file G4VUserPhysicsList.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
FixedStringLengthForStore 

Definition at line 389 of file G4VUserPhysicsList.hh.

Constructor & Destructor Documentation

◆ G4VUserPhysicsList() [1/2]

G4VUserPhysicsList::G4VUserPhysicsList ( )

Definition at line 103 of file G4VUserPhysicsList.cc.

104  :verboseLevel(1),
105  defaultCutValue(1.0 * mm),
106  isSetDefaultCutValue(false),
107  fRetrievePhysicsTable(false),
108  fStoredInAscii(true),
110  fIsRestoredCutValues(false),
112  //fDisplayThreshold(0),
113  //fIsPhysicsTableBuilt(false),
115 {
117  // default cut value (1.0mm)
118  defaultCutValue = 1.0*mm;
119 
120  // pointer to the particle table
122  //theParticleIterator = theParticleTable->GetIterator();
123 
124  // pointer to the cuts table
126 
127  // set energy range for SetCut calcuration
128  fCutsTable->SetEnergyRange(0.99*keV, 100*TeV);
129 
130  // UI Messenger
131  //theMessenger = new G4UserPhysicsListMessenger(this);
133 
134  // PhysicsListHelper
135  //thePLHelper = G4PhysicsListHelper::GetPhysicsListHelper();
136  //thePLHelper->SetVerboseLevel(verboseLevel);
137  //G4MT_thePLHelper = G4PhysicsListHelper::GetPhysicsListHelper(); //AND
138  G4MT_thePLHelper->SetVerboseLevel(verboseLevel); //AND
139 
140  fIsPhysicsTableBuilt = false;
141  fDisplayThreshold = 0;
142 
143 }
void SetEnergyRange(G4double lowedge, G4double highedge)
G4ProductionCutsTable * fCutsTable
G4bool fIsCheckedForRetrievePhysicsTable
G4ParticleTable * theParticleTable
#define fDisplayThreshold
static G4ProductionCutsTable * GetProductionCutsTable()
static G4ParticleTable * GetParticleTable()
static G4RUN_DLL G4VUPLManager subInstanceManager
#define G4MT_theMessenger
static const double TeV
Definition: G4SIunits.hh:215
G4int CreateSubInstance()
static const double keV
Definition: G4SIunits.hh:213
#define G4MT_thePLHelper
#define fIsPhysicsTableBuilt
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:

◆ ~G4VUserPhysicsList()

G4VUserPhysicsList::~G4VUserPhysicsList ( )
virtual

Definition at line 153 of file G4VUserPhysicsList.cc.

154 {
155  if (G4MT_theMessenger != 0) {
156  delete G4MT_theMessenger;
157  G4MT_theMessenger = 0;
158  }
160 
161  // invoke DeleteAllParticle
163 
164 }
G4ParticleTable * theParticleTable
#define G4MT_theMessenger
Here is the call graph for this function:

◆ G4VUserPhysicsList() [2/2]

G4VUserPhysicsList::G4VUserPhysicsList ( const G4VUserPhysicsList right)

Definition at line 167 of file G4VUserPhysicsList.cc.

168  :verboseLevel(right.verboseLevel),
176  //fDisplayThreshold(right.fDisplayThreshold),
177  //fIsPhysicsTableBuilt(right.fIsPhysicsTableBuilt),
179 {
181  // pointer to the particle table
184  // pointer to the cuts table
186 
187  // UI Messenger
188  //theMessenger = new G4UserPhysicsListMessenger(this);
190 
191  // PhysicsListHelper
192  //thePLHelper = G4PhysicsListHelper::GetPhysicsListHelper();
193  //thePLHelper->SetVerboseLevel(verboseLevel);
195  G4MT_thePLHelper->SetVerboseLevel(verboseLevel); //AND
196 
197  fIsPhysicsTableBuilt = right.GetSubInstanceManager().offset[right.GetInstanceID()]._fIsPhysicsTableBuilt;
198  fDisplayThreshold = right.GetSubInstanceManager().offset[right.GetInstanceID()]._fDisplayThreshold;
199 }
G4ProductionCutsTable * fCutsTable
G4bool fIsCheckedForRetrievePhysicsTable
G4ParticleTable * theParticleTable
G4RUN_DLL G4ThreadLocalStatic T * offset
#define fDisplayThreshold
G4int GetInstanceID() const
static G4ProductionCutsTable * GetProductionCutsTable()
static G4ParticleTable * GetParticleTable()
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4RUN_DLL G4VUPLManager subInstanceManager
static const G4VUPLManager & GetSubInstanceManager()
#define G4MT_theMessenger
G4int CreateSubInstance()
#define G4MT_thePLHelper
#define fIsPhysicsTableBuilt
G4PTblDicIterator * GetIterator() const
#define theParticleIterator
Here is the call graph for this function:

Member Function Documentation

◆ AddProcessManager()

void G4VUserPhysicsList::AddProcessManager ( G4ParticleDefinition newParticle,
G4ProcessManager newManager = 0 
)

Definition at line 224 of file G4VUserPhysicsList.cc.

226 {
227  if (newParticle == 0) return;
228  G4Exception("G4VUserPhysicsList::AddProcessManager",
229  "Run0252", JustWarning,
230  "This method is obsolete");
231 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddTransportation()

void G4VUserPhysicsList::AddTransportation ( )
protected

Definition at line 952 of file G4VUserPhysicsList.cc.

953 {
954  G4MT_thePLHelper->AddTransportation();
955 }
#define G4MT_thePLHelper
Here is the caller graph for this function:

◆ BuildIntegralPhysicsTable()

void G4VUserPhysicsList::BuildIntegralPhysicsTable ( G4VProcess process,
G4ParticleDefinition particle 
)
protected

Definition at line 763 of file G4VUserPhysicsList.cc.

765 {
766  //*********************************************************************
767  // temporary addition to make the integral schema of electromagnetic
768  // processes work.
769  //
770 
771  if ( (process->GetProcessName() == "Imsc") ||
772  (process->GetProcessName() == "IeIoni") ||
773  (process->GetProcessName() == "IeBrems") ||
774  (process->GetProcessName() == "Iannihil") ||
775  (process->GetProcessName() == "IhIoni") ||
776  (process->GetProcessName() == "IMuIoni") ||
777  (process->GetProcessName() == "IMuBrems") ||
778  (process->GetProcessName() == "IMuPairProd") ) {
779 #ifdef G4VERBOSE
780  if (verboseLevel>2){
781  G4cout << "G4VUserPhysicsList::BuildIntegralPhysicsTable "
782  << " BuildPhysicsTable is invoked for "
783  << process->GetProcessName()
784  << "(" << particle->GetParticleName() << ")" << G4endl;
785  }
786 #endif
787  process->BuildPhysicsTable(*particle);
788  }
789 }
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:210
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildPhysicsTable() [1/2]

void G4VUserPhysicsList::BuildPhysicsTable ( )

Definition at line 520 of file G4VUserPhysicsList.cc.

521 {
522  //Prepare Physics table for all particles
523  theParticleIterator->reset();
524  while( (*theParticleIterator)() ){
525  G4ParticleDefinition* particle = theParticleIterator->value();
526  PreparePhysicsTable(particle);
527  }
528 
529  // ask processes to prepare physics table
530  if (fRetrievePhysicsTable) {
532  // check if retrieve Cut Table successfully
533  if (!fIsRestoredCutValues) {
534 #ifdef G4VERBOSE
535  if (verboseLevel>0){
536  G4cout << "G4VUserPhysicsList::BuildPhysicsTable"
537  << " Retrieve Cut Table failed !!" << G4endl;
538  }
539 #endif
540  G4Exception("G4VUserPhysicsList::BuildPhysicsTable",
541  "Run0255", RunMustBeAborted,
542  "Fail to retrieve Production Cut Table");
543  } else {
544 #ifdef G4VERBOSE
545  if (verboseLevel>2){
546  G4cout << "G4VUserPhysicsList::BuildPhysicsTable"
547  << " Retrieve Cut Table successfully " << G4endl;
548  }
549 #endif
550  }
551  } else {
552 #ifdef G4VERBOSE
553  if (verboseLevel>2){
554  G4cout << "G4VUserPhysicsList::BuildPhysicsTable"
555  << " does not retrieve Cut Table but calculate " << G4endl;
556  }
557 #endif
558  }
559 
560  // Sets a value to particle
561  // set cut values for gamma at first and for e- and e+
562  G4String particleName;
564  if(GammaP) BuildPhysicsTable(GammaP);
566  if(EMinusP) BuildPhysicsTable(EMinusP);
568  if(EPlusP) BuildPhysicsTable(EPlusP);
569  G4ParticleDefinition* ProtonP = theParticleTable->FindParticle("proton");
570  if(ProtonP) BuildPhysicsTable(ProtonP);
571 
572  theParticleIterator->reset();
573  while( (*theParticleIterator)() ){
574  G4ParticleDefinition* particle = theParticleIterator->value();
575  if( particle!=GammaP &&
576  particle!=EMinusP &&
577  particle!=EPlusP &&
578  particle!=ProtonP ){
579  BuildPhysicsTable(particle);
580  }
581  }
582 
583  // Set flag
584  fIsPhysicsTableBuilt = true;
585 
586 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void PreparePhysicsTable(G4ParticleDefinition *)
G4ProductionCutsTable * fCutsTable
G4ParticleTable * theParticleTable
G4GLOB_DLL std::ostream G4cout
G4bool RetrieveCutsTable(const G4String &directory, G4bool ascii=false)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
#define fIsPhysicsTableBuilt
#define theParticleIterator
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildPhysicsTable() [2/2]

void G4VUserPhysicsList::BuildPhysicsTable ( G4ParticleDefinition particle)

Definition at line 589 of file G4VUserPhysicsList.cc.

590 {
591  if(!(particle->GetMasterProcessManager())) {
592  G4cout << "#### G4VUserPhysicsList::BuildPhysicsTable() - BuildPhysicsTable("
593  << particle->GetParticleName() << ") skipped..." << G4endl;
594  return;
595  }
596  if (fRetrievePhysicsTable) {
597  if ( !fIsRestoredCutValues){
598  // fail to retreive cut tables
599 #ifdef G4VERBOSE
600  if (verboseLevel>0){
601  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
602  << "Physics table can not be retreived and will be calculated "
603  << G4endl;
604  }
605 #endif
606  fRetrievePhysicsTable = false;
607 
608  } else {
609 #ifdef G4VERBOSE
610  if (verboseLevel>2){
611  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
612  << " Retrieve Physics Table for "
613  << particle->GetParticleName() << G4endl;
614  }
615 #endif
616  // Retrieve PhysicsTable from files for proccesses
618  }
619  }
620 
621 #ifdef G4VERBOSE
622  if (verboseLevel>2){
623  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
624  << "Calculate Physics Table for "
625  << particle->GetParticleName() << G4endl;
626  }
627 #endif
628  // Rebuild the physics tables for every process for this particle type
629  // if particle is not ShortLived
630  if(!particle->IsShortLived()) {
631  G4ProcessManager* pManager = particle->GetProcessManager();
632  if (!pManager) {
633 #ifdef G4VERBOSE
634  if (verboseLevel>0){
635  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
636  <<" : No Process Manager for "
637  << particle->GetParticleName() << G4endl;
638  G4cout << particle->GetParticleName()
639  << " should be created in your PhysicsList" <<G4endl;
640  }
641 #endif
642  G4Exception("G4VUserPhysicsList::BuildPhysicsTable",
643  "Run0271", FatalException,
644  "No process manager");
645  return;
646  }
647 
648  //Get processes from master thread;
649  G4ProcessManager* pManagerShadow = particle->GetMasterProcessManager();
650 
651  G4ProcessVector* pVector = pManager->GetProcessList();
652  if (!pVector) {
653 #ifdef G4VERBOSE
654  if (verboseLevel>0){
655  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
656  <<" : No Process Vector for "
657  << particle->GetParticleName() <<G4endl;
658  }
659 #endif
660  G4Exception("G4VUserPhysicsList::BuildPhysicsTable",
661  "Run0272", FatalException,
662  "No process Vector");
663  return;
664  }
665 #ifdef G4VERBOSE
666  if (verboseLevel>2){
667  G4cout << "G4VUserPhysicsList::BuildPhysicsTable %%%%%% " << particle->GetParticleName() << G4endl;
668  G4cout << " ProcessManager : " << pManager << " ProcessManagerShadow : " << pManagerShadow << G4endl;
669  for(G4int iv1=0;iv1<pVector->size();iv1++)
670  { G4cout << " " << iv1 << " - " << (*pVector)[iv1]->GetProcessName() << G4endl; }
671  G4cout << "--------------------------------------------------------------" << G4endl;
672  G4ProcessVector* pVectorShadow = pManagerShadow->GetProcessList();
673 
674  for(G4int iv2=0;iv2<pVectorShadow->size();iv2++)
675  { G4cout << " " << iv2 << " - " << (*pVectorShadow)[iv2]->GetProcessName() << G4endl; }
676  }
677 #endif
678  for (G4int j=0; j < pVector->size(); ++j) {
679  //Andrea July 16th 2013 : migration to new interface...
680  //Infer if we are in a worker thread or master thread
681  //Master thread is the one in which the process manager
682  // and process manager shadow pointers are the same
683  if ( pManagerShadow == pManager )
684  {
685  (*pVector)[j]->BuildPhysicsTable(*particle);
686  }
687  else
688  {
689  (*pVector)[j]->BuildWorkerPhysicsTable(*particle);
690  }
691 
692  } //End loop on processes vector
693  } //End if short-lived
694 }
G4ProcessVector * GetProcessList() const
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetMasterProcessManager() const
G4int size() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
virtual void RetrievePhysicsTable(G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
Here is the call graph for this function:

◆ CheckParticleList()

void G4VUserPhysicsList::CheckParticleList ( )

Definition at line 944 of file G4VUserPhysicsList.cc.

945 {
947  G4MT_thePLHelper->CheckParticleList();
948  }
949 }
#define G4MT_thePLHelper
Here is the caller graph for this function:

◆ Construct()

void G4VUserPhysicsList::Construct ( void  )
inline

Definition at line 404 of file G4VUserPhysicsList.hh.

405 {
406 #ifdef G4VERBOSE
407  if (verboseLevel >1) G4cout << "G4VUserPhysicsList::Construct()" << G4endl;
408 #endif
409 
411 
412 #ifdef G4VERBOSE
413  if (verboseLevel >1) G4cout << "Construct processes " << G4endl;
414 #endif
416 
417 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
virtual void ConstructProcess()=0
Here is the caller graph for this function:

◆ ConstructParticle()

virtual void G4VUserPhysicsList::ConstructParticle ( )
pure virtual

◆ ConstructProcess()

virtual void G4VUserPhysicsList::ConstructProcess ( )
pure virtual

◆ DisableCheckParticleList()

void G4VUserPhysicsList::DisableCheckParticleList ( )
inline

Definition at line 471 of file G4VUserPhysicsList.hh.

472 {
474 }

◆ DumpCutValuesTable()

void G4VUserPhysicsList::DumpCutValuesTable ( G4int  flag = 1)

Definition at line 810 of file G4VUserPhysicsList.cc.

811 {
812  fDisplayThreshold = flag;
813 }
#define fDisplayThreshold
Here is the caller graph for this function:

◆ DumpCutValuesTableIfRequested()

void G4VUserPhysicsList::DumpCutValuesTableIfRequested ( )

Definition at line 816 of file G4VUserPhysicsList.cc.

817 {
818  if(fDisplayThreshold==0) return;
820  fDisplayThreshold = 0;
821 }
#define fDisplayThreshold
static G4ProductionCutsTable * GetProductionCutsTable()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpList()

void G4VUserPhysicsList::DumpList ( ) const

Definition at line 792 of file G4VUserPhysicsList.cc.

793 {
794  theParticleIterator->reset();
795  G4int idx = 0;
796  while( (*theParticleIterator)() ){
797  G4ParticleDefinition* particle = theParticleIterator->value();
798  G4cout << particle->GetParticleName();
799  if ((idx++ % 4) == 3) {
800  G4cout << G4endl;
801  } else {
802  G4cout << ", ";
803  }
804  }
805  G4cout << G4endl;
806 }
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
#define theParticleIterator
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetApplyCuts()

G4bool G4VUserPhysicsList::GetApplyCuts ( const G4String name) const

Definition at line 937 of file G4VUserPhysicsList.cc.

938 {
940 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ParticleTable * theParticleTable
G4bool GetApplyCutsFlag() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCutValue()

G4double G4VUserPhysicsList::GetCutValue ( const G4String pname) const

Definition at line 395 of file G4VUserPhysicsList.cc.

396 {
397  size_t nReg = (G4RegionStore::GetInstance())->size();
398  if (nReg==0) {
399 #ifdef G4VERBOSE
400  if (verboseLevel>0){
401  G4cout << "G4VUserPhysicsList::GetCutValue "
402  <<" : No Default Region " <<G4endl;
403  }
404 #endif
405  G4Exception("G4VUserPhysicsList::GetCutValue",
406  "Run0253", FatalException,
407  "No Default Region");
408  return -1.*mm;
409  }
410  G4Region* region = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForTheWorld", false);
411  return region->GetProductionCuts()->GetProductionCut(name);
412 }
G4String name
Definition: TRTMaterials.hh:40
G4double GetProductionCut(G4int index) const
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4ProductionCuts * GetProductionCuts() const
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDefaultCutValue()

G4double G4VUserPhysicsList::GetDefaultCutValue ( ) const
inline

Definition at line 419 of file G4VUserPhysicsList.hh.

420 {
421  return defaultCutValue;
422 }
Here is the caller graph for this function:

◆ GetInstanceID()

G4int G4VUserPhysicsList::GetInstanceID ( ) const
inline

Definition at line 477 of file G4VUserPhysicsList.hh.

478 {
479  return g4vuplInstanceID;
480 }
Here is the caller graph for this function:

◆ GetParticleIterator()

G4ParticleTable::G4PTblDicIterator * G4VUserPhysicsList::GetParticleIterator ( ) const
protected

Definition at line 971 of file G4VUserPhysicsList.cc.

972 {
973  return (subInstanceManager.offset[g4vuplInstanceID])._theParticleIterator;
974 }
G4RUN_DLL G4ThreadLocalStatic T * offset
static G4RUN_DLL G4VUPLManager subInstanceManager

◆ GetPhysicsTableDirectory()

const G4String & G4VUserPhysicsList::GetPhysicsTableDirectory ( ) const
inline

Definition at line 443 of file G4VUserPhysicsList.hh.

444 {
445  return directoryPhysicsTable;
446 }
Here is the caller graph for this function:

◆ GetSubInstanceManager()

const G4VUPLManager & G4VUserPhysicsList::GetSubInstanceManager ( )
inlinestatic

Definition at line 483 of file G4VUserPhysicsList.hh.

484 {
485  return subInstanceManager;
486 }
static G4RUN_DLL G4VUPLManager subInstanceManager
Here is the caller graph for this function:

◆ GetVerboseLevel()

G4int G4VUserPhysicsList::GetVerboseLevel ( ) const
inline

Definition at line 425 of file G4VUserPhysicsList.hh.

426 {
427  return verboseLevel;
428 }
Here is the caller graph for this function:

◆ InitializeProcessManager()

void G4VUserPhysicsList::InitializeProcessManager ( )
protected

Definition at line 235 of file G4VUserPhysicsList.cc.

236 {
237  //Request lock for particle table accesses. Some changes are inside
238  //this critical region.
239 #ifdef G4MULTITHREADED
240  G4MUTEXLOCK(&G4ParticleTable::particleTableMutex);
241  G4ParticleTable::lockCount++;
242 #endif
244 
245  // loop over all particles in G4ParticleTable
246  theParticleIterator->reset();
247  while( (*theParticleIterator)() ){
248  G4ParticleDefinition* particle = theParticleIterator->value();
249  G4ProcessManager* pmanager = particle->GetProcessManager();
250 
251  if (pmanager==0) {
252  // create process manager if the particle does not have its own.
253  pmanager = new G4ProcessManager(particle);
254  particle->SetProcessManager(pmanager);
255  if( particle->GetMasterProcessManager() == 0 ) particle->SetMasterProcessManager(pmanager);
256 #ifdef G4VERBOSE
257  if (verboseLevel >2){
258  G4cout << "G4VUserPhysicsList::InitializeProcessManager: creating ProcessManager to "
259  << particle->GetParticleName() << G4endl;
260  }
261 #endif
262  }
263  }
264 
265  if(gion)
266  {
267  G4ProcessManager* gionPM = gion->GetProcessManager();
268  // loop over all particles once again (this time, with all general ions)
269  theParticleIterator->reset(false);
270  while( (*theParticleIterator)() ){
271  G4ParticleDefinition* particle = theParticleIterator->value();
272  if(particle->IsGeneralIon())
273  {
274  particle->SetProcessManager(gionPM);
275 #ifdef G4VERBOSE
276  if (verboseLevel >2){
277  G4cout << "G4VUserPhysicsList::InitializeProcessManager: copying ProcessManager to "
278  << particle->GetParticleName() << G4endl;
279  }
280 #endif
281  }
282  }
283  }
284 
285  //release lock for particle table accesses.
286 #ifdef G4MULTITHREADED
287  G4MUTEXUNLOCK(&G4ParticleTable::particleTableMutex);
288 #endif
289 // G4cout << "Particle table is released by G4VUserPhysicsList::InitializeProcessManager" << G4endl;
290 
291 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
void SetProcessManager(G4ProcessManager *aProcessManager)
G4ProcessManager * GetProcessManager() const
G4ParticleDefinition * GetGenericIon() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetMasterProcessManager() const
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4bool IsGeneralIon() const
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
#define theParticleIterator
void SetMasterProcessManager(G4ProcessManager *aNewPM)
Here is the call graph for this function:

◆ InitializeWorker()

void G4VUserPhysicsList::InitializeWorker ( )

Definition at line 145 of file G4VUserPhysicsList.cc.

146 {
147  //Remember messengers are per-thread, so this needs to be done by each worker
148  //and due to the presence of "this" cannot be done in G4VUPLData::initialize()
150 }
#define G4MT_theMessenger
Here is the caller graph for this function:

◆ IsPhysicsTableRetrieved()

G4bool G4VUserPhysicsList::IsPhysicsTableRetrieved ( ) const
inline

Definition at line 431 of file G4VUserPhysicsList.hh.

432 {
433  return fRetrievePhysicsTable;
434 }
Here is the caller graph for this function:

◆ IsStoredInAscii()

G4bool G4VUserPhysicsList::IsStoredInAscii ( ) const
inline

Definition at line 437 of file G4VUserPhysicsList.hh.

438 {
439  return fStoredInAscii;
440 }
Here is the caller graph for this function:

◆ operator=()

G4VUserPhysicsList & G4VUserPhysicsList::operator= ( const G4VUserPhysicsList right)

Definition at line 203 of file G4VUserPhysicsList.cc.

204 {
205  if (this != &right) {
206  verboseLevel = right.verboseLevel;
214  //fDisplayThreshold = right.fDisplayThreshold;
215  fIsPhysicsTableBuilt = right.GetSubInstanceManager().offset[right.GetInstanceID()]._fIsPhysicsTableBuilt;
216  fDisplayThreshold = right.GetSubInstanceManager().offset[right.GetInstanceID()]._fDisplayThreshold;
217  //fIsPhysicsTableBuilt = right.fIsPhysicsTableBuilt;
219  }
220  return *this;
221 }
G4bool fIsCheckedForRetrievePhysicsTable
G4RUN_DLL G4ThreadLocalStatic T * offset
#define fDisplayThreshold
G4int GetInstanceID() const
static const G4VUPLManager & GetSubInstanceManager()
#define fIsPhysicsTableBuilt
Here is the call graph for this function:

◆ PreparePhysicsTable()

void G4VUserPhysicsList::PreparePhysicsTable ( G4ParticleDefinition particle)

Definition at line 697 of file G4VUserPhysicsList.cc.

698 {
699  if(!(particle->GetMasterProcessManager())) {
702  return;
703  }
704  // Prepare the physics tables for every process for this particle type
705  // if particle is not ShortLived
706  if(!particle->IsShortLived()) {
707  G4ProcessManager* pManager = particle->GetProcessManager();
708  if (!pManager) {
709 #ifdef G4VERBOSE
710  if (verboseLevel>0) {
711  G4cout<< "G4VUserPhysicsList::PreparePhysicsTable "
712  << ": No Process Manager for "
713  << particle->GetParticleName() <<G4endl;
714  G4cout << particle->GetParticleName()
715  << " should be created in your PhysicsList" <<G4endl;
716  }
717 #endif
718  G4Exception("G4VUserPhysicsList::PreparePhysicsTable",
719  "Run0273", FatalException,
720  "No process manager");
721  return;
722  }
723 
724  //Get processes from master thread
725  G4ProcessManager* pManagerShadow = particle->GetMasterProcessManager();
726  //Andrea Dotti 15 Jan 2013: Change of interface of MSC
727  //G4ProcessVector* pVectorShadow = pManagerShadow->GetProcessList();
728 
729  G4ProcessVector* pVector = pManager->GetProcessList();
730  if (!pVector) {
731 #ifdef G4VERBOSE
732  if (verboseLevel>0) {
733  G4cout << "G4VUserPhysicsList::PreparePhysicsTable "
734  << ": No Process Vector for "
735  << particle->GetParticleName() <<G4endl;
736  }
737 #endif
738  G4Exception("G4VUserPhysicsList::PreparePhysicsTable",
739  "Run0274", FatalException,
740  "No process Vector");
741  return;
742  }
743  for (G4int j=0; j < pVector->size(); ++j) {
744 
745  //Andrea July 16th 2013 : migration to new interface...
746  //Infer if we are in a worker thread or master thread
747  //Master thread is the one in which the process manager
748  // and process manager shadow pointers are the same
749  if ( pManagerShadow == pManager )
750  {
751  (*pVector)[j]->PreparePhysicsTable(*particle);
752  }
753  else
754  {
755  (*pVector)[j]->PrepareWorkerPhysicsTable(*particle);
756  }
757  } //End loop on processes vector
758  } //End if pn ShortLived
759 }
G4ProcessVector * GetProcessList() const
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetMasterProcessManager() const
G4int size() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterProcess()

G4bool G4VUserPhysicsList::RegisterProcess ( G4VProcess process,
G4ParticleDefinition particle 
)
protected

Definition at line 964 of file G4VUserPhysicsList.cc.

966 {
967  return G4MT_thePLHelper->RegisterProcess(process, particle);
968 }
#define G4MT_thePLHelper

◆ RemoveProcessManager()

void G4VUserPhysicsList::RemoveProcessManager ( )

Definition at line 294 of file G4VUserPhysicsList.cc.

295 {
296  //Request lock for particle table accesses. Some changes are inside
297  //this critical region.
298 #ifdef G4MULTITHREADED
299  G4MUTEXLOCK(&G4ParticleTable::particleTableMutex);
300  G4ParticleTable::lockCount++;
301 #endif
302 // G4cout << "Particle table is held by G4VUserPhysicsList::InitializeProcessManager" << G4endl;
303 
304  // loop over all particles in G4ParticleTable
305  theParticleIterator->reset();
306  while( (*theParticleIterator)() ){
307  G4ParticleDefinition* particle = theParticleIterator->value();
309  {
310  if(particle->GetParticleSubType()!="generic" || particle->GetParticleName()=="GenericIon")
311  {
312  G4ProcessManager* pmanager = particle->GetProcessManager();
313  if (pmanager!=0) delete pmanager;
314 #ifdef G4VERBOSE
315  if (verboseLevel >2){
316  G4cout << "G4VUserPhysicsList::RemoveProcessManager: ";
317  G4cout << "remove ProcessManager from ";
318  G4cout << particle->GetParticleName() << G4endl;
319  }
320 #endif
321  }
322  particle->SetProcessManager(0);
323  }
324  }
325 
326  //release lock for particle table accesses.
327 #ifdef G4MULTITHREADED
328  G4MUTEXUNLOCK(&G4ParticleTable::particleTableMutex);
329 #endif
330 // G4cout << "Particle table is released by G4VUserPhysicsList::InitializeProcessManager" << G4endl;
331 
332 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
void SetProcessManager(G4ProcessManager *aProcessManager)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4int GetInstanceID() const
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4PART_DLL G4ThreadLocalStatic G4int slavetotalspace
#define G4endl
Definition: G4ios.hh:61
const G4String & GetParticleSubType() const
#define theParticleIterator
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetCuts()

void G4VUserPhysicsList::ResetCuts ( )

obsolete methods

Definition at line 998 of file G4VUserPhysicsList.cc.

999 {
1000 #ifdef G4VERBOSE
1001  if (verboseLevel>0){
1002  G4cout << "G4VUserPhysicsList::ResetCuts() is obsolete."
1003  << " This method gives no effect and you can remove it. "<< G4endl;
1004  }
1005 #endif
1006 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ ResetPhysicsTableRetrieved()

void G4VUserPhysicsList::ResetPhysicsTableRetrieved ( )
inline

Definition at line 456 of file G4VUserPhysicsList.hh.

457 {
458  fRetrievePhysicsTable = false;
459  fIsRestoredCutValues = false;
461 }
G4bool fIsCheckedForRetrievePhysicsTable
Here is the caller graph for this function:

◆ ResetStoredInAscii()

void G4VUserPhysicsList::ResetStoredInAscii ( )
inline

Definition at line 465 of file G4VUserPhysicsList.hh.

466 {
467  fStoredInAscii = false;
468 }
Here is the caller graph for this function:

◆ RetrievePhysicsTable()

void G4VUserPhysicsList::RetrievePhysicsTable ( G4ParticleDefinition particle,
const G4String directory,
G4bool  ascii = false 
)
protectedvirtual

Definition at line 886 of file G4VUserPhysicsList.cc.

889 {
890  G4int j;
891  G4bool success[100];
892  // Retrieve physics tables for every process for this particle type
893  G4ProcessVector* pVector = (particle->GetProcessManager())->GetProcessList();
894  for ( j=0; j < pVector->size(); ++j) {
895  success[j] =
896  (*pVector)[j]->RetrievePhysicsTable(particle,directory,ascii);
897 
898  if (!success[j]) {
899 #ifdef G4VERBOSE
900  if (verboseLevel>2){
901  G4cout << "G4VUserPhysicsList::RetrievePhysicsTable "
902  << " Fail to retrieve Physics Table for "
903  << (*pVector)[j]->GetProcessName() << G4endl;
904  G4cout << "Calculate Physics Table for "
905  << particle->GetParticleName() << G4endl;
906  }
907 #endif
908  (*pVector)[j]->BuildPhysicsTable(*particle);
909  }
910  }
911  for ( j=0; j < pVector->size(); ++j) {
912  // temporary addition to make the integral schema
913  if (!success[j]) BuildIntegralPhysicsTable((*pVector)[j], particle);
914  }
915 }
void BuildIntegralPhysicsTable(G4VProcess *, G4ParticleDefinition *)
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
G4int size() const
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetApplyCuts()

void G4VUserPhysicsList::SetApplyCuts ( G4bool  value,
const G4String name 
)

Definition at line 919 of file G4VUserPhysicsList.cc.

920 {
921 #ifdef G4VERBOSE
922  if (verboseLevel>2){
923  G4cout << "G4VUserPhysicsList::SetApplyCuts for " << name << G4endl;
924  }
925 #endif
926  if(name=="all") {
931  } else {
933  }
934 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ParticleTable * theParticleTable
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCuts()

void G4VUserPhysicsList::SetCuts ( )
virtual

Reimplemented in G4AdjointPhysicsList, PhysicsList, TSPhysicsList, PhysicsList, ExExChPhysicsList, PurgMagPhysicsList, XrayTelPhysicsList, PhysicsList, G4ErrorPhysicsList, ML2PhysicsList, DMXPhysicsList, PhysicsList, Par02PhysicsList, PhysicsList, IORTPhysicsList, B03PhysicsList, OpNovicePhysicsList, UltraPhysicsList, PhysicsList, Em10PhysicsList, PhysicsList, PhysicsList, XrayFluoPhysicsList, F01PhysicsList, F02PhysicsList, F03PhysicsList, PhysicsList, PhysicsList, WLSPhysicsList, ExN02PhysicsList, PhysicsListEMstd, ExN01PhysicsList, pyG4VUserPhysicsList::CB_G4VUserPhysicsList, G4HumanPhantomPhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, F05PhysicsList, F06PhysicsList, PhysicsList, PhysicsList, PhysicsList, BrachyPhysicsList, QBBC, PhysicsList, ExUCNPhysicsList, F04PhysicsList, QPhysicsList, B3PhysicsList, B3PhysicsList, HadrontherapyPhysicsList, PhysicsList, PhysicsList, PhysicsList, LXePhysicsList, Par01PhysicsList, PhysicsList, eRositaPhysicsList, XPhysicsList, PhysicsList, pyG4VModularPhysicsList::CB_G4VModularPhysicsList, GammaKnifePhysicsList, RE01PhysicsList, and GammaRayTelPhysicsList.

Definition at line 335 of file G4VUserPhysicsList.cc.

336 {
337  if ( !isSetDefaultCutValue ){
339  }
340 
341 #ifdef G4VERBOSE
342  if (verboseLevel >1){
343  G4cout << "G4VUserPhysicsList::SetCuts: " << G4endl;
344  G4cout << "Cut for gamma: " << GetCutValue("gamma")/mm
345  << "[mm]" << G4endl;
346  G4cout << "Cut for e-: " << GetCutValue("e-")/mm
347  << "[mm]" << G4endl;
348  G4cout << "Cut for e+: " << GetCutValue("e+")/mm
349  << "[mm]" << G4endl;
350  G4cout << "Cut for proton: " << GetCutValue("proton")/mm
351  << "[mm]" << G4endl;
352  }
353 #endif
354 
355  // dump Cut values if verboseLevel==3
356  if (verboseLevel>2) {
358  }
359 }
void SetDefaultCutValue(G4double newCutValue)
G4double GetCutValue(const G4String &pname) const
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCutsForRegion()

void G4VUserPhysicsList::SetCutsForRegion ( G4double  aCut,
const G4String rname 
)

Definition at line 447 of file G4VUserPhysicsList.cc.

448 {
449  // set cut values for gamma at first and for e- and e+
450  SetCutValue(aCut, "gamma", rname);
451  SetCutValue(aCut, "e-", rname);
452  SetCutValue(aCut, "e+", rname);
453  SetCutValue(aCut, "proton", rname);
454 }
void SetCutValue(G4double aCut, const G4String &pname)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCutsWithDefault()

void G4VUserPhysicsList::SetCutsWithDefault ( )

Definition at line 440 of file G4VUserPhysicsList.cc.

441 {
444 }
void SetDefaultCutValue(G4double newCutValue)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCutValue() [1/2]

void G4VUserPhysicsList::SetCutValue ( G4double  aCut,
const G4String pname 
)

Definition at line 415 of file G4VUserPhysicsList.cc.

416 {
417  SetParticleCuts( aCut ,name );
418 }
G4String name
Definition: TRTMaterials.hh:40
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCutValue() [2/2]

void G4VUserPhysicsList::SetCutValue ( G4double  aCut,
const G4String pname,
const G4String rname 
)

Definition at line 422 of file G4VUserPhysicsList.cc.

423 {
424  G4Region* region = G4RegionStore::GetInstance()->GetRegion(rname);
425  if (region != 0){
426  //set cut value
427  SetParticleCuts( aCut ,pname, region );
428  } else {
429 #ifdef G4VERBOSE
430  if (verboseLevel>0){
431  G4cout << "G4VUserPhysicsList::SetCutValue "
432  <<" : No Region of " << rname << G4endl;
433  }
434 #endif
435  }
436 }
static G4RegionStore * GetInstance()
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
Here is the call graph for this function:

◆ SetDefaultCutValue()

void G4VUserPhysicsList::SetDefaultCutValue ( G4double  newCutValue)

Definition at line 363 of file G4VUserPhysicsList.cc.

364 {
365  if (value<0.0) {
366 #ifdef G4VERBOSE
367  if (verboseLevel >0){
368  G4cout << "G4VUserPhysicsList::SetDefaultCutValue: negative cut values"
369  << " :" << value/mm << "[mm]" << G4endl;
370  }
371 #endif
372  return;
373  }
374 
375  defaultCutValue = value;
376  isSetDefaultCutValue = true;
377 
378  // set cut values for gamma at first and for e- and e+
379  SetCutValue(defaultCutValue, "gamma");
382  SetCutValue(defaultCutValue, "proton");
383 
384 #ifdef G4VERBOSE
385  if (verboseLevel >1){
386  G4cout << "G4VUserPhysicsList::SetDefaultCutValue:"
387  << "default cut value is changed to :"
388  << defaultCutValue/mm << "[mm]" << G4endl;
389  }
390 #endif
391  }
void SetCutValue(G4double aCut, const G4String &pname)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetParticleCuts() [1/2]

void G4VUserPhysicsList::SetParticleCuts ( G4double  cut,
G4ParticleDefinition particle,
G4Region region = 0 
)

Definition at line 459 of file G4VUserPhysicsList.cc.

460 {
461  SetParticleCuts(cut, particle->GetParticleName(), region);
462 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
const G4String & GetParticleName() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetParticleCuts() [2/2]

void G4VUserPhysicsList::SetParticleCuts ( G4double  cut,
const G4String particleName,
G4Region region = 0 
)

Definition at line 465 of file G4VUserPhysicsList.cc.

466 {
467  if (cut<0.0) {
468 #ifdef G4VERBOSE
469  if (verboseLevel >0){
470  G4cout << "G4VUserPhysicsList::SetParticleCuts: negative cut values"
471  << " :" << cut/mm << "[mm]"
472  << " for "<< particleName << G4endl;
473  }
474 #endif
475  return;
476  }
477 
478  G4Region* world_region = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForTheWorld", false);
479  if(!region){
480  size_t nReg = (G4RegionStore::GetInstance())->size();
481  if (nReg==0) {
482 #ifdef G4VERBOSE
483  if (verboseLevel>0){
484  G4cout << "G4VUserPhysicsList::SetParticleCuts "
485  <<" : No Default Region " <<G4endl;
486  }
487 #endif
488  G4Exception("G4VUserPhysicsList::SetParticleCuts ",
489  "Run0254", FatalException,
490  "No Default Region");
491  return;
492  }
493  region = world_region;
494  }
495 
496  if ( !isSetDefaultCutValue ){
498  }
499 
500  G4ProductionCuts* pcuts = region->GetProductionCuts();
501  if(region != world_region &&
502  pcuts==G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts())
503  { // This region had no unique cuts yet but shares the default cuts.
504  // Need to create a new object before setting the value.
505  pcuts = new G4ProductionCuts(
506  *(G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts()));
507  region->SetProductionCuts(pcuts);
508  }
509  pcuts->SetProductionCut(cut,particleName);
510 #ifdef G4VERBOSE
511  if (verboseLevel>2){
512  G4cout << "G4VUserPhysicsList::SetParticleCuts: "
513  << " :" << cut/mm << "[mm]"
514  << " for "<< particleName << G4endl;
515  }
516 #endif
517 }
void SetDefaultCutValue(G4double newCutValue)
void SetProductionCut(G4double cut, G4int index=-1)
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ProductionCutsTable * GetProductionCutsTable()
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4ProductionCuts * GetProductionCuts() const
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:

◆ SetPhysicsTableRetrieved()

void G4VUserPhysicsList::SetPhysicsTableRetrieved ( const G4String directory = "")

Definition at line 875 of file G4VUserPhysicsList.cc.

876 {
877  fRetrievePhysicsTable = true;
878  if(!directory.isNull()) {
879  directoryPhysicsTable = directory;
880  }
882  fIsRestoredCutValues = false;
883 }
G4bool fIsCheckedForRetrievePhysicsTable
G4bool isNull() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStoredInAscii()

void G4VUserPhysicsList::SetStoredInAscii ( )
inline

Definition at line 449 of file G4VUserPhysicsList.hh.

450 {
451  fStoredInAscii = true;
452 }
Here is the caller graph for this function:

◆ SetVerboseLevel()

void G4VUserPhysicsList::SetVerboseLevel ( G4int  value)

Definition at line 977 of file G4VUserPhysicsList.cc.

978 {
979  verboseLevel = value;
980  // set verboseLevel for G4ProductionCutsTable same as one for G4VUserPhysicsList:
982 
983  G4MT_thePLHelper->SetVerboseLevel(verboseLevel);
984 
985 #ifdef G4VERBOSE
986  if (verboseLevel >1){
987  G4cout << "G4VUserPhysicsList::SetVerboseLevel :"
988  << " Verbose level is set to " << verboseLevel << G4endl;
989  }
990 #endif
991 }
G4ProductionCutsTable * fCutsTable
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)
#define G4endl
Definition: G4ios.hh:61
#define G4MT_thePLHelper
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StorePhysicsTable()

G4bool G4VUserPhysicsList::StorePhysicsTable ( const G4String directory = ".")

Definition at line 825 of file G4VUserPhysicsList.cc.

826 {
827  G4bool ascii = fStoredInAscii;
828  G4String dir = directory;
829  if (dir.isNull()) dir = directoryPhysicsTable;
830  else directoryPhysicsTable = dir;
831 
832  // store CutsTable info
833  if (!fCutsTable->StoreCutsTable(dir, ascii)) {
834  G4Exception("G4VUserPhysicsList::StorePhysicsTable",
835  "Run0281", JustWarning,
836  "Fail to store Cut Table");
837  return false;
838  }
839 #ifdef G4VERBOSE
840  if (verboseLevel>2){
841  G4cout << "G4VUserPhysicsList::StorePhysicsTable "
842  << " Store material and cut values successfully" << G4endl;
843  }
844 #endif
845 
846  G4bool success= true;
847 
848  // loop over all particles in G4ParticleTable
849  theParticleIterator->reset();
850  while( (*theParticleIterator)() ){
851  G4ParticleDefinition* particle = theParticleIterator->value();
852  // Store physics tables for every process for this particle type
853  G4ProcessVector* pVector = (particle->GetProcessManager())->GetProcessList();
854  G4int j;
855  for ( j=0; j < pVector->size(); ++j) {
856  if (!(*pVector)[j]->StorePhysicsTable(particle,dir,ascii)){
857  G4String comment = "Fail to store physics table for ";
858  comment += (*pVector)[j]->GetProcessName();
859  comment += "(" + particle->GetParticleName() + ")";
860  G4Exception("G4VUserPhysicsList::StorePhysicsTable",
861  "Run0282", JustWarning,
862  comment);
863  success = false;
864  }
865  }
866  // end loop over processes
867  }
868  // end loop over particles
869  return success;
870 }
G4ProductionCutsTable * fCutsTable
G4ProcessManager * GetProcessManager() const
TDirectory * dir
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
G4int size() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool StoreCutsTable(const G4String &directory, G4bool ascii=false)
#define G4endl
Definition: G4ios.hh:61
#define theParticleIterator
G4bool isNull() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UseCoupledTransportation()

void G4VUserPhysicsList::UseCoupledTransportation ( G4bool  vl = true)

Definition at line 958 of file G4VUserPhysicsList.cc.

959 {
960  G4MT_thePLHelper->UseCoupledTransportation(vl);
961 }
#define G4MT_thePLHelper
Here is the caller graph for this function:

Member Data Documentation

◆ defaultCutValue

G4double G4VUserPhysicsList::defaultCutValue
protected

Definition at line 359 of file G4VUserPhysicsList.hh.

◆ directoryPhysicsTable

G4String G4VUserPhysicsList::directoryPhysicsTable
protected

Definition at line 374 of file G4VUserPhysicsList.hh.

◆ fCutsTable

G4ProductionCutsTable* G4VUserPhysicsList::fCutsTable
protected

Definition at line 364 of file G4VUserPhysicsList.hh.

◆ fDisableCheckParticleList

G4bool G4VUserPhysicsList::fDisableCheckParticleList
protected

Definition at line 383 of file G4VUserPhysicsList.hh.

◆ fIsCheckedForRetrievePhysicsTable

G4bool G4VUserPhysicsList::fIsCheckedForRetrievePhysicsTable
protected

Definition at line 370 of file G4VUserPhysicsList.hh.

◆ fIsRestoredCutValues

G4bool G4VUserPhysicsList::fIsRestoredCutValues
protected

Definition at line 371 of file G4VUserPhysicsList.hh.

◆ fRetrievePhysicsTable

G4bool G4VUserPhysicsList::fRetrievePhysicsTable
protected

Definition at line 367 of file G4VUserPhysicsList.hh.

◆ fStoredInAscii

G4bool G4VUserPhysicsList::fStoredInAscii
protected

Definition at line 368 of file G4VUserPhysicsList.hh.

◆ g4vuplInstanceID

G4int G4VUserPhysicsList::g4vuplInstanceID
protected

Definition at line 393 of file G4VUserPhysicsList.hh.

◆ isSetDefaultCutValue

G4bool G4VUserPhysicsList::isSetDefaultCutValue
protected

Definition at line 360 of file G4VUserPhysicsList.hh.

◆ subInstanceManager

G4VUPLManager G4VUserPhysicsList::subInstanceManager
staticprotected

Definition at line 394 of file G4VUserPhysicsList.hh.

◆ theParticleTable

G4ParticleTable* G4VUserPhysicsList::theParticleTable
protected

Definition at line 347 of file G4VUserPhysicsList.hh.

◆ verboseLevel

G4int G4VUserPhysicsList::verboseLevel
protected

Definition at line 355 of file G4VUserPhysicsList.hh.


The documentation for this class was generated from the following files: