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

#include <HadrontherapyPhysicsList.hh>

Inheritance diagram for HadrontherapyPhysicsList:
G4VModularPhysicsList G4VUserPhysicsList

Public Member Functions

 HadrontherapyPhysicsList ()
 
virtual ~HadrontherapyPhysicsList ()
 
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 ()
 
HadrontherapyStepMaxGetStepMaxProcess ()
 
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 45 of file HadrontherapyPhysicsList.hh.

Constructor & Destructor Documentation

HadrontherapyPhysicsList::HadrontherapyPhysicsList ( )

Definition at line 85 of file HadrontherapyPhysicsList.cc.

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

86 {
88  defaultCutValue = 1.*mm;
89  cutForGamma = defaultCutValue;
90  cutForElectron = defaultCutValue;
91  cutForPositron = defaultCutValue;
92 
93  helIsRegistered = false;
94  bicIsRegistered = false;
95  biciIsRegistered = false;
96  locIonIonInelasticIsRegistered = false;
97  radioactiveDecayIsRegistered = false;
98 
99  stepMaxProcess = 0;
100 
101  pMessenger = new HadrontherapyPhysicsListMessenger(this);
102 
103  SetVerboseLevel(1);
104 
105  // ****** Definition of some defaults for the physics *****
106  // ****** in case no physics is called by the macro file *****
107  // EM physics
108  emPhysicsList = new G4EmStandardPhysics_option3(1);
109  emName = G4String("emstandard_opt3");
110 
111  // Decay physics and all particles
112  decPhysicsList = new G4DecayPhysics();
113  raddecayList = new G4RadioactiveDecayPhysics();
114 }
static G4LossTableManager * Instance()
void SetVerboseLevel(G4int value)
HadrontherapyPhysicsList::~HadrontherapyPhysicsList ( )
virtual

Definition at line 117 of file HadrontherapyPhysicsList.cc.

118 {
119  delete pMessenger;
120  delete emPhysicsList;
121  delete decPhysicsList;
122  delete raddecayList;
123 
124  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
125 }

Member Function Documentation

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

Definition at line 164 of file HadrontherapyPhysicsList.cc.

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

Referenced by HadrontherapyPhysicsListMessenger::SetNewValue().

165 {
166 
167  if (verboseLevel>1) {
168  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
169  }
170  if (name == emName) return;
171 
172  /////////////////////////////////////////////////////////////////////////////
173  // ELECTROMAGNETIC MODELS
174  /////////////////////////////////////////////////////////////////////////////
175  if (name == "standard_opt3") {
176  emName = name;
177  delete emPhysicsList;
178  emPhysicsList = new G4EmStandardPhysics_option3();
179  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
180  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
181 
182  } else if (name == "LowE_Livermore") {
183  emName = name;
184  delete emPhysicsList;
185  emPhysicsList = new G4EmLivermorePhysics();
186  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
187  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
188 
189  } else if (name == "LowE_Penelope") {
190  emName = name;
191  delete emPhysicsList;
192  emPhysicsList = new G4EmPenelopePhysics();
193  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
194  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmPenelopePhysics" << G4endl;
195 
196  } else if (name == "local_ion_ion_inelastic") {
197  hadronPhys.push_back(new LocalIonIonInelasticPhysic());
198  locIonIonInelasticIsRegistered = true;
199 
200  } else if (name == "QGSP_BIC_EMY") {
201  AddPhysicsList("emstandard_opt3");
202  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
203  hadronPhys.push_back( new G4EmExtraPhysics());
204  hadronPhys.push_back( new G4HadronElasticPhysics());
205  hadronPhys.push_back( new G4StoppingPhysics());
206  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
207  hadronPhys.push_back( new G4NeutronTrackingCut());
208 
209  } else {
210  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
211  << " is not defined"
212  << G4endl;
213  }
214 }
const XML_Char * name
G4GLOB_DLL std::ostream G4cout
void AddPhysicsList(const G4String &name)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
#define G4endl
Definition: G4ios.hh:61
void HadrontherapyPhysicsList::AddStepMax ( )

Definition at line 217 of file HadrontherapyPhysicsList.cc.

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

Referenced by ConstructProcess().

218 {
219  // Step limitation seen as a process
220  stepMaxProcess = new HadrontherapyStepMax();
221 
222  theParticleIterator->reset();
223  while ((*theParticleIterator)()){
224  G4ParticleDefinition* particle = theParticleIterator->value();
225  G4ProcessManager* pmanager = particle->GetProcessManager();
226 
227  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
228  {
229  pmanager ->AddDiscreteProcess(stepMaxProcess);
230  }
231  }
232 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4bool IsApplicable(const G4ParticleDefinition &)
G4ProcessManager * GetProcessManager() const
#define theParticleIterator
void HadrontherapyPhysicsList::ConstructParticle ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 128 of file HadrontherapyPhysicsList.cc.

References G4VPhysicsConstructor::ConstructParticle().

129 {
130  decPhysicsList->ConstructParticle();
131 }
virtual void ConstructParticle()=0
void HadrontherapyPhysicsList::ConstructProcess ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 134 of file HadrontherapyPhysicsList.cc.

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

135 {
136  // transportation
138 
139  // electromagnetic physics list
140  emPhysicsList->ConstructProcess();
141  em_config.AddModels();
142 
143  // decay physics list
144  decPhysicsList->ConstructProcess();
145  raddecayList->ConstructProcess();
146 
147  // hadronic physics lists
148  for(size_t i=0; i<hadronPhys.size(); i++) {
149  hadronPhys[i] -> ConstructProcess();
150  }
151 
152  // step limitation (as a full process)
153  //
154  AddStepMax();
155 
156  //Parallel world sensitivity
157  G4ParallelWorldPhysics* pWorld = new G4ParallelWorldPhysics("DetectorROGeometry");
158  pWorld->ConstructProcess();
159 
160  return;
161 }
virtual void ConstructProcess()=0
HadrontherapyStepMax* HadrontherapyPhysicsList::GetStepMaxProcess ( )
inline

Definition at line 63 of file HadrontherapyPhysicsList.hh.

63 {return stepMaxProcess;};
void HadrontherapyPhysicsList::SetCutForElectron ( G4double  cut)

Definition at line 262 of file HadrontherapyPhysicsList.cc.

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

Referenced by HadrontherapyPhysicsListMessenger::SetNewValue().

263 {
264  cutForElectron = cut;
265  SetParticleCuts(cutForElectron, G4Electron::Electron());
266 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Electron * Electron()
Definition: G4Electron.cc:94
void HadrontherapyPhysicsList::SetCutForGamma ( G4double  cut)

Definition at line 255 of file HadrontherapyPhysicsList.cc.

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

Referenced by HadrontherapyPhysicsListMessenger::SetNewValue().

256 {
257  cutForGamma = cut;
258  SetParticleCuts(cutForGamma, G4Gamma::Gamma());
259 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void HadrontherapyPhysicsList::SetCutForPositron ( G4double  cut)

Definition at line 269 of file HadrontherapyPhysicsList.cc.

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

Referenced by HadrontherapyPhysicsListMessenger::SetNewValue().

270 {
271  cutForPositron = cut;
272  SetParticleCuts(cutForPositron, G4Positron::Positron());
273 }
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
static G4Positron * Positron()
Definition: G4Positron.cc:94
void HadrontherapyPhysicsList::SetCuts ( )
virtual

Reimplemented from G4VUserPhysicsList.

Definition at line 235 of file HadrontherapyPhysicsList.cc.

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

236 {
237 
238  if (verboseLevel >0){
239  G4cout << "PhysicsList::SetCuts:";
240  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
241  }
242 
243  // set cut values for gamma at first and for e- second and next for e+,
244  // because some processes for e+/e- need cut values for gamma
245  SetCutValue(cutForGamma, "gamma");
246  SetCutValue(cutForElectron, "e-");
247  SetCutValue(cutForPositron, "e+");
248 
249  // Set cuts for detector
252 }
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
#define G4endl
Definition: G4ios.hh:61
void HadrontherapyPhysicsList::SetDetectorCut ( G4double  cut)

Definition at line 275 of file HadrontherapyPhysicsList.cc.

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

Referenced by SetCuts().

276 {
277  G4String regionName = "DetectorLog";
278  G4Region* region = G4RegionStore::GetInstance()->GetRegion(regionName);
279 
280  G4ProductionCuts* cuts = new G4ProductionCuts ;
281  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("gamma"));
282  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e-"));
283  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e+"));
284  region -> SetProductionCuts(cuts);
285 }
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: