Geant4  10.00.p02
exrdmPhysicsList.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 //
26 // $Id: exrdmPhysicsList.cc 73290 2013-08-23 10:04:20Z gcosmo $
27 //
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "exrdmPhysicsList.hh"
35 
37 #include "G4EmStandardPhysics.hh"
39 #include "G4EmLivermorePhysics.hh"
40 #include "G4EmPenelopePhysics.hh"
41 #include "exrdmPhysListHadron.hh"
42 #include "G4RegionStore.hh"
43 #include "G4Region.hh"
44 #include "G4ProductionCuts.hh"
45 #include "G4ProcessManager.hh"
46 #include "G4ParticleTypes.hh"
47 #include "G4ParticleTable.hh"
48 
49 #include "G4Gamma.hh"
50 #include "G4Electron.hh"
51 #include "G4Positron.hh"
52 
53 #include "G4UnitsTable.hh"
54 #include "G4LossTableManager.hh"
55 
60 
61 #include "G4EmExtraPhysics.hh"
64 #include "G4StoppingPhysics.hh"
67 #include "G4NeutronTrackingCut.hh"
68 #include "G4DecayPhysics.hh"
69 
70 #include "G4SystemOfUnits.hh"
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
76  fCutForGamma(1.*mm), fCutForElectron(1.*mm),
77  fCutForPositron(1.*mm),
78  fEmPhysicsList(0),
79  fRaddecayList(0),
80  fParticleList(0),
81  fHadPhysicsList(0),
82  fNhadcomp(0),
83  fPMessenger(0),fDetectorCuts(0), fTargetCuts(0)
84 {
86  defaultCutValue =1.*mm;
87 
89 
90  SetVerboseLevel(1);
91 
92  //default physics
94 
95  //default physics
97 
98  // EM physics
100 }
101 
102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103 
105 {
106  delete fPMessenger;
107  delete fRaddecayList;
108  delete fEmPhysicsList;
109  if (fHadPhysicsList) delete fHadPhysicsList;
110  if (fNhadcomp > 0) {
111  for(G4int i=0; i<fNhadcomp; i++) {
112  delete fHadronPhys[i];
113  }
114  }
115 }
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118 
120 {
122 }
123 
124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125 
127 {
129  // em
131  // decays
134  // had
135  if (fNhadcomp > 0) {
136  for(G4int i=0; i<fNhadcomp; i++) {
138  }
139  }
141  G4cout << "### exrdmPhysicsList::ConstructProcess is done" << G4endl;
142 
143 }
144 
145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146 
148 {
149  if (verboseLevel>1) {
150  G4cout << "exrdmPhysicsList::SelectPhysicsList: <" << name << ">" << G4endl;
151  }
152  // default Had physics
153  if (name == "Hadron" && !fHadPhysicsList) {
154  fHadPhysicsList = new exrdmPhysListHadron("hadron");
155  } else if (name == "QGSP_BERT") {
156  AddExtraBuilders(false);
158  } else if (name == "QGSP_BIC" && !fHadPhysicsList) {
159  AddExtraBuilders(false);
161  } else if (name == "QGSP_BERT_HP" && !fHadPhysicsList) {
162  AddExtraBuilders(true);
164  } else if (name == "QGSP_BIC_HP" && !fHadPhysicsList) {
165  AddExtraBuilders(true);
167  } else if (name == "emlivermore") {
168  delete fEmPhysicsList;
170  } else if (name == "empenelope") {
171  delete fEmPhysicsList;
173  } else if (name == "emstandard") {
174  delete fEmPhysicsList;
176  } else if (name == "emstandard_opt4") {
177  delete fEmPhysicsList;
179  } else {
180  G4cout << "exrdmPhysicsList WARNING wrong or unkonwn <"
181  << name << "> Physics " << G4endl;
182  }
183 }
184 
185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
186 
188 {
189  fNhadcomp = 5;
190  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
191  if(flagHP) {
193  } else {
195  }
196  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
199 }
200 
201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
202 
204 {
205  SetCutValue(fCutForGamma, "gamma");
208  G4cout << "world cuts are set" << G4endl;
209 
211  G4Region* region = (G4RegionStore::GetInstance())->GetRegion("Target");
213  G4cout << "Target cuts are set" << G4endl;
214 
216  region = (G4RegionStore::GetInstance())->GetRegion("Detector");
218  G4cout << "Detector cuts are set" << G4endl;
219 
221 }
222 
223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 
226 {
227  fCutForGamma = cut;
229 }
230 
231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
232 
234 {
235  fCutForElectron = cut;
237 }
238 
239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
240 
242 {
243  fCutForPositron = cut;
245 }
246 
247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
248 
250 {
252 
256 
257 }
258 
259 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
260 
262 {
264 
268 }
269 
270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
virtual void SetCuts()
G4String name
Definition: TRTMaterials.hh:40
Definition of the exrdmPhysListHadron class.
G4VPhysicsConstructor * fEmPhysicsList
G4VPhysicsConstructor * fParticleList
void SetProductionCut(G4double cut, G4int index=-1)
G4VPhysicsConstructor * fRaddecayList
virtual ~exrdmPhysicsList()
int G4int
Definition: G4Types.hh:78
void SetTargetCut(G4double val)
static G4RegionStore * GetInstance()
virtual void ConstructParticle()=0
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
Definition of the exrdmPhysListParticles class.
void SetCutForElectron(G4double)
bool G4bool
Definition: G4Types.hh:79
virtual void ConstructParticle()
Definition of the exrdmPhysicsListMessenger class.
void SetVerboseLevel(G4int value)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
std::vector< G4VPhysicsConstructor * > fHadronPhys
void SetDetectorCut(G4double val)
static G4Positron * Positron()
Definition: G4Positron.cc:94
void SetCutForGamma(G4double)
virtual void ConstructProcess()
G4VPhysicsConstructor * fHadPhysicsList
void AddExtraBuilders(G4bool flagHP)
Definition of the exrdmPhysicsList class.
void SetCutForPositron(G4double)
virtual void ConstructProcess()=0
static G4Electron * Electron()
Definition: G4Electron.cc:94
exrdmPhysicsListMessenger * fPMessenger
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
G4ProductionCuts * fDetectorCuts
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:102
G4ProductionCuts * fTargetCuts
void SelectPhysicsList(const G4String &name)