Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RemSimPhysicsList.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$
27 //
28 // Author: Susanna Guatelli, susanna@uow.edu.au
29 
30 #include "RemSimPhysicsList.hh"
32 
33 #include "G4SystemOfUnits.hh"
34 #include "G4ParticleDefinition.hh"
35 #include "G4PhysListFactory.hh"
36 #include "G4VPhysicsConstructor.hh"
37 
38 // Physic lists (contained inside the Geant4 distribution)
40 #include "G4DecayPhysics.hh"
45 #include "G4HadronInelasticQBBC.hh"
47 #include "G4Decay.hh"
48 #include "G4LossTableManager.hh"
49 #include "G4UnitsTable.hh"
50 #include "G4ProcessManager.hh"
51 #include "G4IonFluctuations.hh"
53 #include "G4EmProcessOptions.hh"
56 #include "HadronPhysicsQGSP_BIC.hh"
57 
58 // The electromagnetic physics and the decay are
59 // registered by default. The user has to execute the
60 // macro physics.mac to activate the hadronic component of the physics.
61 // Look vehicle1.mac, vehicle2.mac and moon.mac for example
62 
64 
65 {
66  defaultCutValue = 0.1* mm;
67  // SetVerboseLevel(1);
68 
69  helIsRegistered = false;
70  bicIsRegistered = false;
71  bicIonIsRegistered = false;
72  radioactiveDecayIsRegistered = false;
73 
74  messenger = new RemSimPhysicsListMessenger(this);
75 
76  SetVerboseLevel(1);
77 
78  // EM physics
79  emPhysicsList = new G4EmStandardPhysics_option3(1);
80 
81  // Decay physics
82  decPhysicsList = new G4DecayPhysics();
83 
84  G4cout<< ">> PhysicsList:: G4EmStandardPhysics_option3 activated << "<<G4endl;
85  G4cout<< ">> PhysicsList:: Decay activated << "<<G4endl;
86 }
87 
88 
90 {
91  delete messenger;
92  delete emPhysicsList;
93  delete decPhysicsList;
94  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
95 }
96 
99 {
100  decPhysicsList->ConstructParticle();
101 }
102 
104 {
105  // transportation
106  //
108 
109  // electromagnetic physics list
110  //
111  emPhysicsList->ConstructProcess();
112  em_config.AddModels();
113 
114  // decay physics list
115  //
116  decPhysicsList->ConstructProcess();
117 
118  // hadronic physics lists
119  for(size_t i=0; i<hadronPhys.size(); i++) {
120  hadronPhys[i]->ConstructProcess();
121  }
122 }
123 
125 {
126 
127  if (verboseLevel>1) {
128  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
129  }
130 
131 
132  if (name == "elastic" && !helIsRegistered) {
133  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronElasticPhysics()" << G4endl;
134  hadronPhys.push_back( new G4HadronElasticPhysics());
135  helIsRegistered = true;
136 
137  } else if (name == "DElastic" && !helIsRegistered) {
138  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronDElasticPhysics()" << G4endl;
139  hadronPhys.push_back( new G4HadronDElasticPhysics());
140  helIsRegistered = true;
141 
142  } else if (name == "HElastic" && !helIsRegistered) {
143  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronHElasticPhysics()" << G4endl;
144  hadronPhys.push_back( new G4HadronHElasticPhysics());
145  helIsRegistered = true;
146 
147  } else if (name == "QElastic" && !helIsRegistered) {
148  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronQElasticPhysics()" << G4endl;
149  hadronPhys.push_back( new G4HadronQElasticPhysics());
150  helIsRegistered = true;
151 
152  } else if (name == "binary" && !bicIsRegistered) {
153  hadronPhys.push_back(new HadronPhysicsQGSP_BIC);
154  bicIsRegistered = true;
155  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: QGSP_BIC" << G4endl;
156 
157  } else if (name == "binary_ion" && !bicIonIsRegistered) {
158  hadronPhys.push_back(new G4IonBinaryCascadePhysics());
159  bicIonIsRegistered = true;
160  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4IonBinaryCascadePhysics()" << G4endl;
161  } else if (name == "radioactive_decay" && !radioactiveDecayIsRegistered ) {
162  hadronPhys.push_back(new G4RadioactiveDecayPhysics());
163  radioactiveDecayIsRegistered = true;
164  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4RadioactiveDecayPhysics()" << G4endl;
165  } else {
166 
167  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
168  << " is not defined"
169  << G4endl;
170  }
171 }
172 
174 {
177 }
178 
179 
180 
181 
182 
183 
184 
185 
186 
187