Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
IORTPhysicsList Class Reference

#include <IORTPhysicsList.hh>

Inheritance diagram for IORTPhysicsList:
G4VModularPhysicsList G4VUserPhysicsList

Public Member Functions

 IORTPhysicsList ()
 
virtual ~IORTPhysicsList ()
 
void ConstructParticle ()
 
void SetCuts ()
 
void SetCutForGamma (G4double)
 
void SetCutForElectron (G4double)
 
void SetCutForPositron (G4double)
 
void SetDetectorCut (G4double cut)
 
void AddPhysicsList (const G4String &name)
 
void ConstructProcess ()
 
void AddStepMax ()
 
IORTStepMaxGetStepMaxProcess ()
 
void AddPackage (const G4String &name)
 
- Public Member Functions inherited from G4VModularPhysicsList
 G4VModularPhysicsList ()
 
virtual ~G4VModularPhysicsList ()
 
void RegisterPhysics (G4VPhysicsConstructor *)
 
const G4VPhysicsConstructorGetPhysics (G4int index) const
 
const G4VPhysicsConstructorGetPhysics (const G4String &name) const
 
const G4VPhysicsConstructorGetPhysicsWithType (G4int physics_type) const
 
void ReplacePhysics (G4VPhysicsConstructor *)
 
void RemovePhysics (G4VPhysicsConstructor *)
 
void RemovePhysics (G4int type)
 
void RemovePhysics (const G4String &name)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 
- Public Member Functions inherited from G4VUserPhysicsList
 G4VUserPhysicsList ()
 
virtual ~G4VUserPhysicsList ()
 
 G4VUserPhysicsList (const G4VUserPhysicsList &)
 
G4VUserPhysicsListoperator= (const G4VUserPhysicsList &)
 
void Construct ()
 
void UseCoupledTransportation (G4bool vl=true)
 
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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VModularPhysicsList
static const G4VMPLManagerGetSubInstanceManager ()
 
- Static Public Member Functions inherited from G4VUserPhysicsList
static const G4VUPLManagerGetSubInstanceManager ()
 
- Protected Types inherited from G4VModularPhysicsList
typedef
G4VMPLData::G4PhysConstVectorData 
G4PhysConstVector
 
- Protected Member Functions inherited from G4VModularPhysicsList
 G4VModularPhysicsList (const G4VModularPhysicsList &)
 
G4VModularPhysicsListoperator= (const G4VModularPhysicsList &)
 
- Protected Member Functions inherited from G4VUserPhysicsList
void AddTransportation ()
 
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
void BuildIntegralPhysicsTable (G4VProcess *, G4ParticleDefinition *)
 
virtual void RetrievePhysicsTable (G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
 
void InitializeProcessManager ()
 
- Protected Attributes inherited from G4VModularPhysicsList
G4int verboseLevel
 
G4int g4vmplInstanceID
 
- Protected Attributes inherited from G4VUserPhysicsList
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 inherited from G4VModularPhysicsList
static G4RUN_DLL G4VMPLManager G4VMPLsubInstanceManager
 
- Static Protected Attributes inherited from G4VUserPhysicsList
static G4RUN_DLL G4VUPLManager subInstanceManager
 

Detailed Description

Definition at line 51 of file IORTPhysicsList.hh.

Constructor & Destructor Documentation

IORTPhysicsList::IORTPhysicsList ( )

Definition at line 110 of file IORTPhysicsList.cc.

References G4VUserPhysicsList::defaultCutValue, G4LossTableManager::Instance(), python.hepunit::mm, and G4VModularPhysicsList::SetVerboseLevel().

111 {
113  defaultCutValue = 0.01 *mm; //1.*mm;
114  cutForGamma = defaultCutValue;
115  cutForElectron = defaultCutValue;
116  cutForPositron = defaultCutValue;
117 
118  helIsRegistered = false;
119  bicIsRegistered = false;
120  biciIsRegistered = false;
121  locIonIonInelasticIsRegistered = false;
122  radioactiveDecayIsRegistered = false;
123 
124  stepMaxProcess = 0;
125 
126  pMessenger = new IORTPhysicsListMessenger(this);
127 
128  SetVerboseLevel(1);
129 
130  // EM physics
131  emPhysicsList = new G4EmStandardPhysics_option3(1);
132  emName = G4String("emstandard_opt3");
133 
134  // Decay physics and all particles
135  decPhysicsList = new G4DecayPhysics();
136 }
static G4LossTableManager * Instance()
void SetVerboseLevel(G4int value)
IORTPhysicsList::~IORTPhysicsList ( )
virtual

Definition at line 139 of file IORTPhysicsList.cc.

140 {
141  delete pMessenger;
142  delete emPhysicsList;
143  delete decPhysicsList;
144  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
145 }

Member Function Documentation

void IORTPhysicsList::AddPackage ( const G4String name)
void IORTPhysicsList::AddPhysicsList ( const G4String name)

Definition at line 177 of file IORTPhysicsList.cc.

References G4cout, G4endl, G4RunManager::GetRunManager(), and G4VModularPhysicsList::verboseLevel.

Referenced by IORTPhysicsListMessenger::SetNewValue().

178 {
179 
180  if (verboseLevel>1) {
181  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
182  }
183  if (name == emName) return;
184 
185  /////////////////////////////////////////////////////////////////////////////
186  // ELECTROMAGNETIC MODELS
187  /////////////////////////////////////////////////////////////////////////////
188  if (name == "standard_opt3") {
189  emName = name;
190  delete emPhysicsList;
191  emPhysicsList = new G4EmStandardPhysics_option3();
192  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
193  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
194 
195 
196  } else if (name == "LowE_Livermore") {
197  emName = name;
198  delete emPhysicsList;
199  emPhysicsList = new G4EmLivermorePhysics();
200  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
201  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
202 
203  } else if (name == "LowE_Penelope") {
204  emName = name;
205  delete emPhysicsList;
206  emPhysicsList = new G4EmPenelopePhysics();
207  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
208  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmPenelopePhysics" << G4endl;
209 
210  /////////////////////////////////////////////////////////////////////////////
211  // HADRONIC MODELS
212  /////////////////////////////////////////////////////////////////////////////
213  } else if (name == "Elastic")
214  {
215  if(!helIsRegistered)
216  {
217  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronElasticPhysics()" << G4endl;
218  hadronPhys.push_back( new G4HadronElasticPhysics());
219  helIsRegistered = true;
220  }
221  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
222  }
223  else if (name == "DElastic")
224  {
225  if(!helIsRegistered)
226  {
227  hadronPhys.push_back( new G4HadronDElasticPhysics());
228  helIsRegistered = true;
229  }
230  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
231 
232  }
233  else if (name == "HElastic")
234  {
235  if(!helIsRegistered)
236  {
237  hadronPhys.push_back( new G4HadronHElasticPhysics());
238  helIsRegistered = true;
239  }
240  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
241 
242  }
243  else if (name == "Em_extra_physics")
244  {
245  hadronPhys.push_back( new G4EmExtraPhysics());
246  }
247  else if (name == "Stopping_physics")
248  {
249  hadronPhys.push_back( new G4StoppingPhysics());
250  }
251  else if (name == "Neutron_tracking_cut")
252  {
253  hadronPhys.push_back( new G4NeutronTrackingCut());
254  }
255  else if (name == "Hadron_QGSP_BIC")
256  {
257  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
258  // helIsRegistered = true;
259  }
260  else if (name == "Hadron_QBBC")
261  {
262  hadronPhys.push_back(new G4HadronInelasticQBBC());
263  //bicIsRegistered = true;
264  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronInelasticQBBC()" << G4endl;
265  }
266 
267  else if (name == "binary")
268  {
269  hadronPhys.push_back(new G4HadronInelasticQBBC());
270  //bicIsRegisted = true;
271  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronInelasticQBBC()" << G4endl;
272  }
273 
274  else if (name == "binary_ion")
275  {
276  hadronPhys.push_back(new G4IonBinaryCascadePhysics());
277  //biciIsRegistered = true;
278  }
279 /*
280  else if (name == "local_ion_ion_inelastic")
281  {
282  hadronPhys.push_back(new LocalIonIonInelasticPhysic());
283  locIonIonInelasticIsRegistered = true;
284  }
285  else if (name == "local_incl_ion_ion_inelastic")
286  {
287  hadronPhys.push_back(new LocalINCLIonIonInelasticPhysic());
288  locIonIonInelasticIsRegistered = true;
289  }
290 */
291  else if (name == "decay")
292  {
293  hadronPhys.push_back(new G4DecayPhysics());
294  //radioactiveDecayIsRegistered = true;
295  }
296  else if (name == "radioactive_decay" && !radioactiveDecayIsRegistered )
297  {
298  hadronPhys.push_back(new G4RadioactiveDecayPhysics());
299  radioactiveDecayIsRegistered = true;
300 
301  // The following is the construction of the QGSP_BIC_EMY Reference physics list
302  // reconstructed here like a builder: it should be identical to the
303  // one contained inside the $G4INSTALL/physics_lists/lists folder
304  }
305  else if (name == "QGSP_BIC_EMY")
306  {
307  AddPhysicsList("emstandard_opt3");
308  hadronPhys.push_back( new G4EmExtraPhysics());
309  hadronPhys.push_back( new G4HadronElasticPhysics());
310  hadronPhys.push_back( new G4StoppingPhysics());
311  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
312  hadronPhys.push_back( new G4NeutronTrackingCut());
313  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
314  hadronPhys.push_back( new G4DecayPhysics());
315 
316  }
317  else {
318 
319  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
320  << " is not defined"
321  << G4endl;
322  }
323 }
void AddPhysicsList(const G4String &name)
const XML_Char * name
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
#define G4endl
Definition: G4ios.hh:61
void IORTPhysicsList::AddStepMax ( )

Definition at line 326 of file IORTPhysicsList.cc.

References G4ProcessManager::AddDiscreteProcess(), G4ParticleDefinition::GetProcessManager(), IORTStepMax::IsApplicable(), and theParticleIterator.

Referenced by ConstructProcess().

327 {
328  // Step limitation seen as a process
329  stepMaxProcess = new IORTStepMax();
330 
331  theParticleIterator->reset();
332  while ((*theParticleIterator)()){
333  G4ParticleDefinition* particle = theParticleIterator->value();
334  G4ProcessManager* pmanager = particle->GetProcessManager();
335 
336  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
337  {
338  pmanager ->AddDiscreteProcess(stepMaxProcess);
339  }
340  }
341 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ProcessManager * GetProcessManager() const
G4bool IsApplicable(const G4ParticleDefinition &)
Definition: IORTStepMax.cc:55
#define theParticleIterator
void IORTPhysicsList::ConstructParticle ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 148 of file IORTPhysicsList.cc.

References G4VPhysicsConstructor::ConstructParticle().

149 {
150  decPhysicsList->ConstructParticle();
151 }
virtual void ConstructParticle()=0
void IORTPhysicsList::ConstructProcess ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 154 of file IORTPhysicsList.cc.

References G4EmConfigurator::AddModels(), AddStepMax(), G4VUserPhysicsList::AddTransportation(), and G4VPhysicsConstructor::ConstructProcess().

155 {
156  // transportation
158 
159  // electromagnetic physics list
160  emPhysicsList->ConstructProcess();
161  em_config.AddModels();
162 
163  // decay physics list
164  decPhysicsList->ConstructProcess();
165 
166  // hadronic physics lists
167  for(size_t i=0; i<hadronPhys.size(); i++) {
168  hadronPhys[i] -> ConstructProcess();
169  }
170 
171  // step limitation (as a full process)
172  //
173  AddStepMax();
174 }
virtual void ConstructProcess()=0
IORTStepMax* IORTPhysicsList::GetStepMaxProcess ( )
inline

Definition at line 69 of file IORTPhysicsList.hh.

69 {return stepMaxProcess;};
void IORTPhysicsList::SetCutForElectron ( G4double  cut)

Definition at line 371 of file IORTPhysicsList.cc.

References G4Electron::Electron(), and G4VUserPhysicsList::SetParticleCuts().

Referenced by IORTPhysicsListMessenger::SetNewValue().

372 {
373  cutForElectron = cut;
374  SetParticleCuts(cutForElectron, G4Electron::Electron());
375 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Electron * Electron()
Definition: G4Electron.cc:94
void IORTPhysicsList::SetCutForGamma ( G4double  cut)

Definition at line 364 of file IORTPhysicsList.cc.

References G4Gamma::Gamma(), and G4VUserPhysicsList::SetParticleCuts().

Referenced by IORTPhysicsListMessenger::SetNewValue().

365 {
366  cutForGamma = cut;
367  SetParticleCuts(cutForGamma, G4Gamma::Gamma());
368 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void IORTPhysicsList::SetCutForPositron ( G4double  cut)

Definition at line 378 of file IORTPhysicsList.cc.

References G4Positron::Positron(), and G4VUserPhysicsList::SetParticleCuts().

Referenced by IORTPhysicsListMessenger::SetNewValue().

379 {
380  cutForPositron = cut;
381  SetParticleCuts(cutForPositron, G4Positron::Positron());
382 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Positron * Positron()
Definition: G4Positron.cc:94
void IORTPhysicsList::SetCuts ( )
virtual

Reimplemented from G4VUserPhysicsList.

Definition at line 344 of file IORTPhysicsList.cc.

References G4VUserPhysicsList::defaultCutValue, G4VUserPhysicsList::DumpCutValuesTable(), G4BestUnit, G4cout, G4endl, G4VUserPhysicsList::SetCutValue(), SetDetectorCut(), and G4VModularPhysicsList::verboseLevel.

345 {
346 
347  if (verboseLevel >0){
348  G4cout << "PhysicsList::SetCuts:";
349  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
350  }
351 
352  // set cut values for gamma at first and for e- second and next for e+,
353  // because some processes for e+/e- need cut values for gamma
354  SetCutValue(cutForGamma, "gamma");
355  SetCutValue(cutForElectron, "e-");
356  SetCutValue(cutForPositron, "e+");
357 
358  // Set cuts for detector
361 }
void SetCutValue(G4double aCut, const G4String &pname)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
void SetDetectorCut(G4double cut)
#define G4endl
Definition: G4ios.hh:61
void IORTPhysicsList::SetDetectorCut ( G4double  cut)

Definition at line 384 of file IORTPhysicsList.cc.

References G4ProductionCuts::GetIndex(), G4RegionStore::GetInstance(), and G4RegionStore::GetRegion().

Referenced by SetCuts().

385 {
386  G4String regionName = "DetectorLog";
387  G4Region* region = G4RegionStore::GetInstance()->GetRegion(regionName);
388 
389  G4ProductionCuts* cuts = new G4ProductionCuts ;
390  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("gamma"));
391  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e-"));
392  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e+"));
393  region -> SetProductionCuts(cuts);
394 }
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
static G4int GetIndex(const G4String &name)
static G4RegionStore * GetInstance()

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