SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_ModularPhysicsList.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: SToGS::PhysicsList.cc,v 1.39 2010-06-04 15:42:23 vnivanch Exp $
27 // GEANT4 tag $Name: geant4-09-04-patch-02 $
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 
34 
35 #include "G4Version.hh"
36 
37 //Electromagnetic
38 #include "G4EmStandardPhysics.hh"
39 #include "G4EmStandardPhysics_option1.hh"
40 #include "G4EmStandardPhysics_option2.hh"
41 #include "G4EmStandardPhysics_option3.hh"
42 #include "G4EmLivermorePhysics.hh"
43 #include "G4EmPenelopePhysics.hh"
44 #include "G4EmConfigurator.hh"
45 #include "G4UnitsTable.hh"
46 
47 // transport and decay
48 #include "G4ProcessManager.hh"
49 #include "G4Decay.hh"
50 
51 // scintillation
52 #include "G4OpticalPhysics.hh"
53 
54 // hadrons
55 #include "G4EmExtraPhysics.hh"
56 #include "G4HadronElasticPhysics.hh"
57 #include "G4HadronElasticPhysicsHP.hh"
58 #include "G4StoppingPhysics.hh"
59 #include "G4IonBinaryCascadePhysics.hh"
60 #include "G4NeutronTrackingCut.hh"
61 #if G4VERSION_NUMBER < 1000
62 #include "HadronPhysicsQGSP_BIC_HP.hh"
63 #define QGSP_BIC_HP_MODEL HadronPhysicsQGSP_BIC_HP
64 #else
65 #include "G4HadronPhysicsQGSP_BIC_HP.hh"
66 #define QGSP_BIC_HP_MODEL G4HadronPhysicsQGSP_BIC_HP
67 #endif
69 
70 
71 /*
72 #include "SToGS_StandardEMPhysicsList.hh"
73 #include "SToGS_LowEnergyEMPhysicsList.hh"
74 #include "SToGS_PenelopeEMPhysicsList.hh"
75 #include "SToGS_HadronPhysicsList.hh"
76 #include "SToGS::Hadron1.hh"
77  */
78 
79 
80 SToGS::ModularPhysicsList::ModularPhysicsList(const G4String &option) : G4VModularPhysicsList()
81 {
82  G4cout << " ------ INF ------ from SToGS::ModularPhysicsList::ModularPhysicsList with " << option << G4endl;
83 
84  // parse option
85  std::vector <G4String> all_opt; G4String lopt = option, tmp = ""; lopt += ';';
86  //
87  for (size_t i = 0; i < lopt.size(); i++) { // search for one sequence
88  if ( lopt[i] == ';' && tmp.size() > 0 ) {
89  all_opt.push_back(tmp);
90  tmp = "";
91  }
92  else {
93  tmp += G4String(lopt[i]);
94  }
95  }
96 
97  // default cut value (1.0mm)
98  defaultCutValue = 1.0*CLHEP::mm;
99 
100  // General Physics
101  for (size_t i = 0; i < all_opt.size(); i++) {
102  // Register general physics list
103  if (all_opt[i].contains(G4String("general")) ) {
104  //
105  RegisterPhysics( new SToGS::GeneralPhysics(all_opt[i]) );
106  //
107  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
108  }
109  // G4 EM physics list
110  if ( all_opt[i] == "emstandard_opt0" ) {
111  RegisterPhysics( new G4EmStandardPhysics(1) );
112  //
113  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
114  }
115  if ( all_opt[i] == "emstandard_opt1" ) {
116  RegisterPhysics( new G4EmStandardPhysics_option1() );
117  //
118  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
119  }
120  if ( all_opt[i] == "emstandard_opt2" ) {
121  RegisterPhysics( new G4EmStandardPhysics_option2() );
122  //
123  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
124  }
125  if ( all_opt[i] == "emstandard_opt3" ) {
126  RegisterPhysics( new G4EmStandardPhysics_option3() );
127  //
128  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
129  }
130  if ( all_opt[i] == "emlivermore" ) {
131  RegisterPhysics( new G4EmLivermorePhysics() );
132  //
133  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
134  }
135  if ( all_opt[i] == "empenelope" ) {
136  RegisterPhysics( new G4EmPenelopePhysics() );
137  //
138  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
139  }
140 
141 //SToGS:: hadron physics for list
142  if ( all_opt[i] == "SToGS_hadron" ) {
143  RegisterPhysics( new SToGS::HadronPhysicsList() );
144  //
145  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
146  }
147  if ( all_opt[i] == "QGSP_BIC_HP" ) {
148  RegisterPhysics( new QGSP_BIC_HP_MODEL() );
149  // It requires some addons ...
150  SetBuilderList0(true);
151  //
152  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
153  }
154  // SToGS:: EM physics list
155  /*
156  if ( all_opt[i] == "SToGS::StandardEM" ) {
157  RegisterPhysics( new SToGS::StandardEMPhysicsList() );
158  //
159  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
160  }
161  if ( all_opt[i] == "SToGS::LowEnergyEM" ) {
162  RegisterPhysics( new SToGS::LowEnergyEMPhysicsList() );
163  //
164  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
165  }
166  if ( all_opt[i] == "SToGS::PenelopeEM" ) {
167  RegisterPhysics( new SToGS::LowEnergyEMPhysicsList() );
168  //
169  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
170  }
171  */
172  if ( all_opt[i] == "Optical" ) {
173 
174  G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
175  RegisterPhysics( opticalPhysics );
176 
177  // in case Wavelength Shifting (WLS) fibers are used. It means the time between abs. and re-emission is constant equal to WLSTIMECONSTANT
178  // other possibility could be exponential
179  // opticalPhysics->SetWLSTimeProfile("delta");
180 
181  // to allow rising time ==> FASTSCINTILLATIONRISETIME and SLOWSCINTILLATIONRISETIME to be defined
182 
183  opticalPhysics->SetFiniteRiseTime(true);
184 
185  //opticalPhysics->SetScintillationYieldFactor(1.0);
186  // 1.0 so that optical goes to two components in case of fast and slow components .... not clear why .... ??
187  opticalPhysics->SetScintillationExcitationRatio(1.0);
188 
189  opticalPhysics->SetMaxNumPhotonsPerStep(100);
190  opticalPhysics->SetMaxBetaChangePerStep(10.0);
191 
192  opticalPhysics->SetTrackSecondariesFirst(kCerenkov,true);
193  opticalPhysics->SetTrackSecondariesFirst(kScintillation,true);
194  //
195  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
196  }
197 
198  /*
199  if ( all_opt[i] == "SToGS::Hadron0" ) {
200  RegisterPhysics( new SToGS::Hadron0() );
201 
202 
203  RegisterPhysics( new HadronPhysicsQGSP_BIC());
204  RegisterPhysics( new G4EmExtraPhysics());
205  RegisterPhysics( new G4HadronElasticPhysics());
206  RegisterPhysics( new G4QStoppingPhysics());
207  RegisterPhysics( new G4IonBinaryCascadePhysics());
208  RegisterPhysics( new G4NeutronTrackingCut());
209 
210  //
211  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
212  }
213  if ( all_opt[i] == "SToGS::Hadron1" ) {
214  RegisterPhysics( new SToGS::Hadron1() );
215 
216 
217  RegisterPhysics( new HadronPhysicsQGSP_BIC());
218  RegisterPhysics( new G4EmExtraPhysics());
219  RegisterPhysics( new G4HadronElasticPhysics());
220  RegisterPhysics( new G4QStoppingPhysics());
221  RegisterPhysics( new G4IonBinaryCascadePhysics());
222  RegisterPhysics( new G4NeutronTrackingCut());
223 
224  //
225  G4cout << " ==> Physics list " << all_opt[i] << " registered " << G4endl;
226  }
227  */
228  }
229  G4cout << " ------ END ------ from SToGS::ModularPhysicsList::ModularPhysicsList " << G4endl ;
230 }
231 
232 
234 {
235 }
236 
237 void SToGS::ModularPhysicsList::SetBuilderList0(G4bool flagHP, G4int verboseLevel)
238 {
239  RegisterPhysics(new G4EmExtraPhysics());
240  if(flagHP) {
241  RegisterPhysics( new G4HadronElasticPhysicsHP(verboseLevel) ) ;
242  } else {
243  RegisterPhysics( new G4HadronElasticPhysics(verboseLevel) );
244  }
245  RegisterPhysics( new G4StoppingPhysics(verboseLevel));
246  RegisterPhysics( new G4IonBinaryCascadePhysics(verboseLevel));
247  RegisterPhysics( new G4NeutronTrackingCut(verboseLevel));
248  /*
249  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
250  if(flagHP) {
251  fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
252  } else {
253  fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
254  }
255  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
256  fHadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
257  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
258  */
259 }
260 
261 /*
262 void SToGS::PhysicsList::AddIonGasModels()
263 {
264  G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator();
265  theParticleIterator->reset();
266  while ((*theParticleIterator)())
267  {
268  G4ParticleDefinition* particle = theParticleIterator->value();
269  G4String partname = particle->GetParticleName();
270  if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
271  G4BraggIonGasModel* mod1 = new G4BraggIonGasModel();
272  G4BetheBlochIonGasModel* mod2 = new G4BetheBlochIonGasModel();
273  G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
274  em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
275  new G4IonFluctuations());
276  em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
277  new G4UniversalFluctuation());
278 
279  }
280  }
281 }
282 */
283 
#define QGSP_BIC_HP_MODEL
General regroups transportation and base decay.
ModularPhysicsList(const G4String &file="general0")
Only Standard electromagnetic processes from the "low energy package".