Geant4  10.00.p03
PhysicsList.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: PhysicsList.cc 68585 2013-04-01 23:35:07Z adotti $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "PhysListEmStandard.hh"
38 #include "PhysListEmStandardSS.hh"
39 #include "PhysListEmStandardNR.hh"
40 #include "G4EmStandardPhysics.hh"
45 #include "G4EmLivermorePhysics.hh"
46 #include "G4EmPenelopePhysics.hh"
47 
48 #include "G4DecayPhysics.hh"
49 
53 #include "G4HadronInelasticQBBC.hh"
54 #include "G4IonPhysics.hh"
55 
56 #include "G4LossTableManager.hh"
57 #include "G4EmConfigurator.hh"
58 #include "G4UnitsTable.hh"
59 
60 #include "G4ProcessManager.hh"
61 #include "G4Decay.hh"
62 
63 #include "StepMax.hh"
64 
65 #include "G4IonFluctuations.hh"
68 
69 #include "G4BraggIonGasModel.hh"
71 
72 #include "G4PhysicalConstants.hh"
73 #include "G4SystemOfUnits.hh"
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78  fEmPhysicsList(0),
79  fDecPhysicsList(0),
80  fHadronPhys(),
81  fStepMaxProcess(0),
82  fMessenger(0)
83 {
85  defaultCutValue = 1.*mm;
89 
90  fHelIsRegisted = false;
91  fBicIsRegisted = false;
92  fBiciIsRegisted = false;
93 
94  fStepMaxProcess = 0;
95 
96  fMessenger = new PhysicsListMessenger(this);
97 
98  SetVerboseLevel(1);
99 
100  // EM physics
101  fEmName = G4String("emstandard_opt0");
103 
104  // Deacy physics and all particles
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
111 {
112  delete fMessenger;
113  delete fEmPhysicsList;
114  delete fDecPhysicsList;
115  for(size_t i=0; i<fHadronPhys.size(); i++) {delete fHadronPhys[i];}
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 
128 {
129  // transportation
130  //
132 
133  // electromagnetic physics list
134  //
136 
137  // decay physics list
138  //
140 
141  // hadronic physics lists
142  for(size_t i=0; i<fHadronPhys.size(); i++) {
143  fHadronPhys[i]->ConstructProcess();
144  }
145 
146  // step limitation (as a full process)
147  //
148  AddStepMax();
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
154 {
155  if (verboseLevel>1) {
156  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
157  }
158 
159  if (name == fEmName) return;
160 
161  if (name == "local") {
162 
163  fEmName = name;
164  delete fEmPhysicsList;
166 
167  } else if (name == "emstandard_opt0") {
168 
169  fEmName = name;
170  delete fEmPhysicsList;
172 
173  } else if (name == "emstandard_opt1") {
174 
175  fEmName = name;
176  delete fEmPhysicsList;
178 
179  } else if (name == "emstandard_opt2") {
180 
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else if (name == "emstandard_opt3") {
186 
187  fEmName = name;
188  delete fEmPhysicsList;
190 
191  } else if (name == "emstandard_opt4") {
192 
193  fEmName = name;
194  delete fEmPhysicsList;
196 
197  } else if (name == "standardSS") {
198 
199  fEmName = name;
200  delete fEmPhysicsList;
202 
203  } else if (name == "ionGasModels") {
204 
205  AddPhysicsList("emstandard_opt0");
206  fEmName = name;
207  AddIonGasModels();
208 
209  } else if (name == "standardNR") {
210 
211  fEmName = name;
212  delete fEmPhysicsList;
214 
215  } else if (name == "emlivermore") {
216  fEmName = name;
217  delete fEmPhysicsList;
219 
220  } else if (name == "empenelope") {
221  fEmName = name;
222  delete fEmPhysicsList;
224 
225  } else if (name == "elastic" && !fHelIsRegisted) {
226  fHadronPhys.push_back( new G4HadronElasticPhysics());
227  fHelIsRegisted = true;
228 
229  } else if (name == "DElastic" && !fHelIsRegisted) {
230  fHadronPhys.push_back( new G4HadronDElasticPhysics());
231  fHelIsRegisted = true;
232 
233  } else if (name == "HElastic" && !fHelIsRegisted) {
234  fHadronPhys.push_back( new G4HadronHElasticPhysics());
235  fHelIsRegisted = true;
236 
237  } else if (name == "binary" && !fBicIsRegisted) {
238  fHadronPhys.push_back(new G4HadronInelasticQBBC());
239  fBicIsRegisted = true;
240 
241  } else if (name == "binary_ion" && !fBiciIsRegisted) {
242  fHadronPhys.push_back(new G4IonPhysics());
243  fBiciIsRegisted = true;
244 
245  } else {
246 
247  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
248  << " is not defined"
249  << G4endl;
250  }
251 }
252 
253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
254 
256 {
257  // Step limitation seen as a process
258  fStepMaxProcess = new StepMax();
259 
260  theParticleIterator->reset();
261  while ((*theParticleIterator)()){
262  G4ParticleDefinition* particle = theParticleIterator->value();
263  G4ProcessManager* pmanager = particle->GetProcessManager();
264 
265  if (fStepMaxProcess->IsApplicable(*particle) && pmanager)
266  {
268  }
269  }
270 }
271 
272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
273 
275 {
276  if (verboseLevel >0) {
277  G4cout << "PhysicsList::SetCuts:";
278  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
279  }
280 
281  // set cut values for gamma at first and for e- second and next for e+,
282  // because some processes for e+/e- need cut values for gamma
283  SetCutValue(fCutForGamma, "gamma");
286 
288 }
289 
290 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
291 
293 {
294  fCutForGamma = cut;
296 }
297 
298 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
299 
301 {
302  fCutForElectron = cut;
304 }
305 
306 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
307 
309 {
310  fCutForPositron = cut;
312 }
313 
314 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
315 
317 {
319  theParticleIterator->reset();
320  while ((*theParticleIterator)())
321  {
322  G4ParticleDefinition* particle = theParticleIterator->value();
323  G4String partname = particle->GetParticleName();
324  if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
327  G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
328  em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
329  new G4IonFluctuations());
330  em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
331  new G4UniversalFluctuation());
332 
333  }
334  }
335 }
336 
337 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
338 
G4EmConfigurator * EmConfigurator()
void ConstructParticle()
Definition: PhysicsList.cc:117
static const double MeV
Definition: G4SIunits.hh:193
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
void SetCutForGamma(G4double)
Definition: PhysicsList.cc:231
void AddIonGasModels()
Definition: PhysicsList.cc:316
G4String name
Definition: TRTMaterials.hh:40
G4double fCutForPositron
Definition: PhysicsList.hh:70
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetCutForPositron(G4double)
Definition: PhysicsList.cc:247
G4double fCutForElectron
Definition: PhysicsList.hh:69
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4VPhysicsConstructor * > fHadronPhys
Definition: PhysicsList.hh:85
G4ProcessManager * GetProcessManager() const
void SetCutForElectron(G4double)
Definition: PhysicsList.cc:239
G4EmConfigurator em_config
Definition: PhysicsList.hh:65
PhysicsListMessenger * fMessenger
Definition: PhysicsList.hh:78
const G4String & GetParticleName() const
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
G4bool fHelIsRegisted
Definition: PhysicsList.hh:78
virtual void ConstructParticle()=0
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
G4double fCutForGamma
Definition: PhysicsList.hh:64
void SetVerboseLevel(G4int value)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetCuts()
Definition: PhysicsList.cc:219
void AddStepMax()
Definition: PhysicsList.cc:172
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double GetPDGMass() const
G4VPhysicsConstructor * fEmPhysicsList
Definition: PhysicsList.hh:73
virtual void ConstructProcess()=0
G4bool fBiciIsRegisted
Definition: PhysicsList.hh:80
G4StepLimiter * fStepMaxProcess
Definition: PhysicsList.hh:76
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
G4VPhysicsConstructor * fDecPhysicsList
Definition: PhysicsList.hh:74
static const double TeV
Definition: G4SIunits.hh:197
Definition of the PhysListEmStandardNR class.
double G4double
Definition: G4Types.hh:76
G4String fEmName
Definition: PhysicsList.hh:72
void ConstructProcess()
Definition: PhysicsList.cc:170
static const double mm
Definition: G4SIunits.hh:102
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=0)
#define theParticleIterator
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
G4bool fBicIsRegisted
Definition: PhysicsList.hh:79