Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadrontherapyPhysicsList Class Reference

#include <HadrontherapyPhysicsList.hh>

Inheritance diagram for HadrontherapyPhysicsList:
Collaboration diagram for HadrontherapyPhysicsList:

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 ()
 
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 ()
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- 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 40 of file HadrontherapyPhysicsList.hh.

Constructor & Destructor Documentation

HadrontherapyPhysicsList::HadrontherapyPhysicsList ( )

Definition at line 76 of file HadrontherapyPhysicsList.cc.

77 {
79  defaultCutValue = 1.*mm;
80  cutForGamma = defaultCutValue;
81  cutForElectron = defaultCutValue;
82  cutForPositron = defaultCutValue;
83 
84  pMessenger = new HadrontherapyPhysicsListMessenger(this);
85 
86  SetVerboseLevel(1);
87 
88 
89  // ****** Definition of defaults for the physics processes *****
90  // ****** in case no physics is called by the macro file *****
91  //
92  // The default physics corresponds to the actual QGSP_BIC_HP list
93  // but with the following differences:
94  // --> G4EmStandardPhysics_option4 for the electromagnetic processes
95  // is used n place of the less accurate G4EmStandardPhysics
96  // --> The G4RadioactiveDecayPhysics is add
97  // --> G4HadronPhysicsQGSP_BIC is used in place of G4HadronPhysicsQGSP_BIC_HP
98  // --> G4HadronElasticPhysics is used in place of G4HadronElasticPhysics_HP
99 
100  // Elecromagnetic physics
101  //
102  emPhysicsList = new G4EmStandardPhysics_option4();
103  emName = G4String("emstandard_opt4");
104 
105  // Hadronic physics
106  //
107  hadronPhys.push_back( new G4DecayPhysics());
108  hadronPhys.push_back( new G4RadioactiveDecayPhysics());
109  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
110  hadronPhys.push_back( new G4EmExtraPhysics());
111  hadronPhys.push_back( new G4HadronElasticPhysics());
112  hadronPhys.push_back( new G4StoppingPhysics());
113  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
114 
115  // Decay physics
116  //
117  decay_List = new G4DecayPhysics();
118  radioactiveDecay_List = new G4RadioactiveDecayPhysics();
119 }
static G4LossTableManager * Instance()
static constexpr double mm
Definition: G4SIunits.hh:115
void SetVerboseLevel(G4int value)

Here is the call graph for this function:

HadrontherapyPhysicsList::~HadrontherapyPhysicsList ( )
virtual

Definition at line 122 of file HadrontherapyPhysicsList.cc.

123 {
124  delete pMessenger;
125  delete emPhysicsList;
126  delete decay_List;
127  delete radioactiveDecay_List;
128  hadronPhys.clear();
129  for(size_t i=0; i<hadronPhys.size(); i++)
130  {
131  delete hadronPhys[i];
132  }
133 }

Member Function Documentation

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

Definition at line 173 of file HadrontherapyPhysicsList.cc.

174 {
175  if (verboseLevel>1) {
176  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
177  }
178  if (name == emName) return;
179 
181  // ELECTROMAGNETIC MODELS
183  if (name == "standard_opt4") {
184  emName = name;
185  delete emPhysicsList;
186  hadronPhys.clear();
187  emPhysicsList = new G4EmStandardPhysics_option4();
188  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
189  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option4" << G4endl;
190 
191  // The following 'local_ion_ion_inelastic' is an example of implemenation of
192  // inelastic hadronic models to be used when
193  // mucleus-nulceus (ion-ion) interactions have to be
194  // taken into account;
195  // It must be used, of course, in connection with other lists: electromagnetic
196  // plus hadronic elastic plus nucleon-nulcleon hadronic inelastic
197  //
198  // An example of coplete physics list using the 'local_ion_ion_inelastic' physics
199  // is the one named HADRONTHERAPY_2, and defined below.
200  //
201  } else if (name == "standard_opt3") {
202  emName = name;
203  delete emPhysicsList;
204  hadronPhys.clear();
205  emPhysicsList = new G4EmStandardPhysics_option3();
206  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
207  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
208  } else if (name == "local_ion_ion_inelastic") {
209  hadronPhys.push_back(new LocalIonIonInelasticPhysic());
210  locIonIonInelasticIsRegistered = true;
211 
212  } else if (name == "HADRONTHERAPY_1") {
213 
214  // The HADRONTHERAPY_1 physics list corresponds to the actual QGSP_BIC_HP list
215  // but with the following differences:
216  // --> G4EmStandardPhysics_option4 for the electromagnetic processes
217  // is used in place of the less accurate G4EmStandardPhysics
218  // --> The G4RadioactiveDecayPhysics is added
219 
220  AddPhysicsList("standard_opt4");
221  hadronPhys.push_back( new G4DecayPhysics());
222  hadronPhys.push_back( new G4RadioactiveDecayPhysics());
223  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
224  hadronPhys.push_back( new G4EmExtraPhysics());
225  hadronPhys.push_back( new G4HadronElasticPhysicsHP());
226  hadronPhys.push_back( new G4StoppingPhysics());
227  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP());
228 
229  G4cout << "HADRONTHERAPY_1 PHYSICS LIST has been activated" << G4endl;
230 
231 
232  } else if (name == "HADRONTHERAPY_2") {
233 
234  // The HADRONTHERAPY_2 physics list corresponds to the actual QGSP_BIC_HP list
235  // but with the following differences:
236  // --> G4EmStandardPhysics_option4 for the electromagnetic processes
237  // is used in place of the less accurate G4EmStandardPhysics
238  // --> The G4RadioactiveDecayPhysics is added
239  // --> The 'local_ion_ion_inelastic' physics is used in place of the
240  // G4IonBinaryCascadePhysics(): it used the QMD model to treat
241  // the ion-ion inelastic interactions
242 
243  AddPhysicsList("standard_opt4");
244  AddPhysicsList("local_ion_ion_inelastic");
245  hadronPhys.push_back( new G4DecayPhysics());
246  hadronPhys.push_back( new G4RadioactiveDecayPhysics());
247  hadronPhys.push_back( new G4EmExtraPhysics());
248  hadronPhys.push_back( new G4HadronElasticPhysicsHP());
249  hadronPhys.push_back( new G4StoppingPhysics());
250  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP());
251 
252  G4cout << "HADRONTHERAPY_2 PHYSICS LIST has been acivated" << G4endl;
253 
254  }
255  else if (name == "QGSP_BIC_EMY") {
256  AddPhysicsList("standard_opt3");
257  //emPhysicsList = new G4EmLivermorePhysics();
258  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
259  hadronPhys.push_back( new G4EmExtraPhysics());
260  hadronPhys.push_back( new G4HadronElasticPhysics());
261  hadronPhys.push_back( new G4StoppingPhysics());
262  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
263  hadronPhys.push_back( new G4NeutronTrackingCut());
264  hadronPhys.push_back( new G4DecayPhysics());
265  }
266  else {
267  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
268  << " is not defined"
269  << G4endl;
270  }
271 
272 }
const XML_Char * name
Definition: expat.h:151
G4GLOB_DLL std::ostream G4cout
void AddPhysicsList(const G4String &name)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void HadrontherapyPhysicsList::AddStepMax ( )

Definition at line 275 of file HadrontherapyPhysicsList.cc.

276 {
277  // Step limitation seen as a process
278  // This process must exist in all threads.
279  //
280  HadrontherapyStepMax* stepMaxProcess = new HadrontherapyStepMax();
281  G4AutoDelete::Register( stepMaxProcess );
282 
284  particleIterator->reset();
285  while ((*particleIterator)()){
286  G4ParticleDefinition* particle = particleIterator->value();
287  G4ProcessManager* pmanager = particle->GetProcessManager();
288 
289  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
290  {
291  pmanager ->AddDiscreteProcess(stepMaxProcess);
292  }
293  }
294 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4bool IsApplicable(const G4ParticleDefinition &)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const

Here is the call graph for this function:

Here is the caller graph for this function:

void HadrontherapyPhysicsList::ConstructParticle ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 136 of file HadrontherapyPhysicsList.cc.

137 {
138  decay_List -> ConstructParticle();
139 }
void HadrontherapyPhysicsList::ConstructProcess ( void  )
virtual

Reimplemented from G4VModularPhysicsList.

Definition at line 142 of file HadrontherapyPhysicsList.cc.

143 {
144  // Transportation
145  //
147 
148  // Electromagnetic physics
149  //
150  emPhysicsList -> ConstructProcess();
151  em_config.AddModels();
152 
153  // Hadronic physics
154  //
155  for(size_t i=0; i < hadronPhys.size(); i++)
156  {
157  hadronPhys[i] -> ConstructProcess();
158  }
159 
160  // step limitation (as a full process)
161  //
162  AddStepMax();
163 
164  //Parallel world sensitivity
165  //
166  G4ParallelWorldPhysics* pWorld = new G4ParallelWorldPhysics("DetectorROGeometry");
167  pWorld->ConstructProcess();
168 
169  return;
170 }

Here is the call graph for this function:

void HadrontherapyPhysicsList::SetCutForElectron ( G4double  )
void HadrontherapyPhysicsList::SetCutForGamma ( G4double  )
void HadrontherapyPhysicsList::SetCutForPositron ( G4double  )
void HadrontherapyPhysicsList::SetCuts ( )
virtual

Reimplemented from G4VUserPhysicsList.

Definition at line 297 of file HadrontherapyPhysicsList.cc.

298 {
299 
300  if (verboseLevel >0){
301  G4cout << "PhysicsList::SetCuts:";
302  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
303  }
304 
305  // Production thresholds for detector regions
306  // The G4Regions, for which you want define a given cut via de macro command
307  // '/run/setCutForRegion <G4Region name> <cut value>'
308  // must be defined here
309  //
310  SetCutValue(cutForGamma, "gamma");
311  SetCutValue(cutForElectron, "e-");
312  SetCutValue(cutForPositron, "e+");
313  // At moment, only 'DetectorLog' is defined as G4Region
314  //
315  G4String regName[] = {"DetectorLog"};
316  G4double fuc = 1.;
317  for(G4int i=0;i<1;i++)
318  {
322  reg->SetProductionCuts(cuts);
323  fuc *= 10.;
324  }
325 }
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void SetCutValue(G4double aCut, const G4String &pname)
void SetProductionCut(G4double cut, G4int index=-1)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
static const G4double reg
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void HadrontherapyPhysicsList::SetDetectorCut ( G4double  cut)

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