| [807] | 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 | //
|
|---|
| [1337] | 26 | // $Id: MicrobeamPhysicsList.cc,v 1.10 2010/06/10 09:54:05 vnivanch Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-04-beta-01 $
|
|---|
| 28 | //
|
|---|
| 29 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [807] | 31 |
|
|---|
| [1337] | 32 | #include "MicrobeamPhysicsList.hh"
|
|---|
| 33 | #include "MicrobeamPhysicsListMessenger.hh"
|
|---|
| 34 |
|
|---|
| [807] | 35 | #include "G4StepLimiter.hh"
|
|---|
| 36 |
|
|---|
| [1337] | 37 | #include "G4EmStandardPhysics.hh"
|
|---|
| 38 | #include "G4EmStandardPhysics_option1.hh"
|
|---|
| 39 | #include "G4EmStandardPhysics_option2.hh"
|
|---|
| 40 | #include "G4EmStandardPhysics_option3.hh"
|
|---|
| 41 | #include "G4EmLivermorePhysics.hh"
|
|---|
| 42 | #include "G4EmPenelopePhysics.hh"
|
|---|
| [807] | 43 |
|
|---|
| [1337] | 44 | #include "G4DecayPhysics.hh"
|
|---|
| [807] | 45 |
|
|---|
| [1337] | 46 | #include "G4HadronElasticPhysics.hh"
|
|---|
| 47 | #include "G4HadronDElasticPhysics.hh"
|
|---|
| 48 | #include "G4HadronHElasticPhysics.hh"
|
|---|
| 49 | #include "G4HadronQElasticPhysics.hh"
|
|---|
| 50 | #include "G4HadronInelasticQBBC.hh"
|
|---|
| 51 | #include "G4IonBinaryCascadePhysics.hh"
|
|---|
| 52 |
|
|---|
| 53 | #include "G4LossTableManager.hh"
|
|---|
| 54 | #include "G4EmConfigurator.hh"
|
|---|
| 55 | #include "G4UnitsTable.hh"
|
|---|
| 56 |
|
|---|
| 57 | #include "G4ProcessManager.hh"
|
|---|
| 58 | #include "G4Decay.hh"
|
|---|
| 59 |
|
|---|
| 60 | #include "G4IonFluctuations.hh"
|
|---|
| 61 | #include "G4IonParametrisedLossModel.hh"
|
|---|
| 62 |
|
|---|
| 63 | #include "G4BraggIonGasModel.hh"
|
|---|
| 64 | #include "G4BetheBlochIonGasModel.hh"
|
|---|
| 65 |
|
|---|
| 66 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 67 |
|
|---|
| 68 | MicrobeamPhysicsList::MicrobeamPhysicsList() : G4VModularPhysicsList()
|
|---|
| [807] | 69 | {
|
|---|
| [1337] | 70 | G4LossTableManager::Instance();
|
|---|
| [807] | 71 | defaultCutValue = 0.01*micrometer;
|
|---|
| 72 | cutForGamma = defaultCutValue;
|
|---|
| 73 | cutForElectron = defaultCutValue;
|
|---|
| 74 | cutForPositron = defaultCutValue;
|
|---|
| 75 |
|
|---|
| [1337] | 76 | helIsRegisted = false;
|
|---|
| 77 | bicIsRegisted = false;
|
|---|
| 78 | biciIsRegisted = false;
|
|---|
| [807] | 79 |
|
|---|
| [1337] | 80 | pMessenger = new MicrobeamPhysicsListMessenger(this);
|
|---|
| [807] | 81 |
|
|---|
| [1337] | 82 | SetVerboseLevel(1);
|
|---|
| [807] | 83 |
|
|---|
| [1337] | 84 | // EM physics
|
|---|
| 85 | emName = G4String("emstandard_opt0");
|
|---|
| [807] | 86 |
|
|---|
| [1337] | 87 | emPhysicsList = new G4EmStandardPhysics(1);
|
|---|
| [807] | 88 |
|
|---|
| [1337] | 89 | // Deacy physics and all particles
|
|---|
| 90 | decPhysicsList = new G4DecayPhysics();
|
|---|
| [807] | 91 | }
|
|---|
| 92 |
|
|---|
| [1337] | 93 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 94 |
|
|---|
| 95 | MicrobeamPhysicsList::~MicrobeamPhysicsList()
|
|---|
| [807] | 96 | {
|
|---|
| [1337] | 97 | delete pMessenger;
|
|---|
| 98 | delete emPhysicsList;
|
|---|
| 99 | delete decPhysicsList;
|
|---|
| 100 | for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
|
|---|
| [807] | 101 | }
|
|---|
| 102 |
|
|---|
| [1337] | 103 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [807] | 104 |
|
|---|
| [1337] | 105 | void MicrobeamPhysicsList::ConstructParticle()
|
|---|
| [807] | 106 | {
|
|---|
| [1337] | 107 | decPhysicsList->ConstructParticle();
|
|---|
| [807] | 108 | }
|
|---|
| 109 |
|
|---|
| [1337] | 110 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [807] | 111 |
|
|---|
| 112 | void MicrobeamPhysicsList::ConstructProcess()
|
|---|
| 113 | {
|
|---|
| [1337] | 114 | // transportation
|
|---|
| 115 | //
|
|---|
| [807] | 116 | AddTransportation();
|
|---|
| [1337] | 117 |
|
|---|
| 118 | // electromagnetic physics list
|
|---|
| 119 | //
|
|---|
| 120 | emPhysicsList->ConstructProcess();
|
|---|
| 121 |
|
|---|
| 122 | // decay physics list
|
|---|
| 123 | //
|
|---|
| 124 | decPhysicsList->ConstructProcess();
|
|---|
| 125 |
|
|---|
| 126 | // hadronic physics lists
|
|---|
| 127 | for(size_t i=0; i<hadronPhys.size(); i++) {
|
|---|
| 128 | hadronPhys[i]->ConstructProcess();
|
|---|
| 129 | }
|
|---|
| 130 |
|
|---|
| 131 | // step limitation (as a full process)
|
|---|
| 132 | //
|
|---|
| 133 | AddStepMax();
|
|---|
| 134 |
|
|---|
| [807] | 135 | }
|
|---|
| 136 |
|
|---|
| [1337] | 137 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [1230] | 138 |
|
|---|
| [1337] | 139 | void MicrobeamPhysicsList::AddPhysicsList(const G4String& name)
|
|---|
| 140 | {
|
|---|
| 141 | if (verboseLevel>1) {
|
|---|
| 142 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
|---|
| 143 | }
|
|---|
| [1230] | 144 |
|
|---|
| [1337] | 145 | if (name == emName) return;
|
|---|
| [1230] | 146 |
|
|---|
| [1337] | 147 | if (name == "emstandard_opt0") {
|
|---|
| [1230] | 148 |
|
|---|
| [1337] | 149 | emName = name;
|
|---|
| 150 | delete emPhysicsList;
|
|---|
| 151 | emPhysicsList = new G4EmStandardPhysics(1);
|
|---|
| [1230] | 152 |
|
|---|
| [1337] | 153 | } else if (name == "emstandard_opt1") {
|
|---|
| [1230] | 154 |
|
|---|
| [1337] | 155 | emName = name;
|
|---|
| 156 | delete emPhysicsList;
|
|---|
| 157 | emPhysicsList = new G4EmStandardPhysics_option1();
|
|---|
| [1230] | 158 |
|
|---|
| [1337] | 159 | } else if (name == "emstandard_opt2") {
|
|---|
| [1230] | 160 |
|
|---|
| [1337] | 161 | emName = name;
|
|---|
| 162 | delete emPhysicsList;
|
|---|
| 163 | emPhysicsList = new G4EmStandardPhysics_option2();
|
|---|
| 164 |
|
|---|
| 165 | } else if (name == "emstandard_opt3") {
|
|---|
| [1230] | 166 |
|
|---|
| [1337] | 167 | emName = name;
|
|---|
| 168 | delete emPhysicsList;
|
|---|
| 169 | emPhysicsList = new G4EmStandardPhysics_option3();
|
|---|
| [1230] | 170 |
|
|---|
| [1337] | 171 | } else if (name == "emlivermore") {
|
|---|
| 172 | emName = name;
|
|---|
| 173 | delete emPhysicsList;
|
|---|
| 174 | emPhysicsList = new G4EmLivermorePhysics();
|
|---|
| [1230] | 175 |
|
|---|
| [1337] | 176 | } else if (name == "empenelope") {
|
|---|
| 177 | emName = name;
|
|---|
| 178 | delete emPhysicsList;
|
|---|
| 179 | emPhysicsList = new G4EmPenelopePhysics();
|
|---|
| [807] | 180 |
|
|---|
| [1337] | 181 | } else if (name == "ionGasModels") {
|
|---|
| [1230] | 182 |
|
|---|
| [1337] | 183 | AddPhysicsList("emstandard_opt3");
|
|---|
| 184 | emName = name;
|
|---|
| 185 | AddIonGasModels();
|
|---|
| [807] | 186 |
|
|---|
| [1337] | 187 | } else if (name == "elastic" && !helIsRegisted) {
|
|---|
| 188 | hadronPhys.push_back( new G4HadronElasticPhysics());
|
|---|
| 189 | helIsRegisted = true;
|
|---|
| [807] | 190 |
|
|---|
| [1337] | 191 | } else if (name == "DElastic" && !helIsRegisted) {
|
|---|
| 192 | hadronPhys.push_back( new G4HadronDElasticPhysics());
|
|---|
| 193 | helIsRegisted = true;
|
|---|
| [807] | 194 |
|
|---|
| [1337] | 195 | } else if (name == "HElastic" && !helIsRegisted) {
|
|---|
| 196 | hadronPhys.push_back( new G4HadronHElasticPhysics());
|
|---|
| 197 | helIsRegisted = true;
|
|---|
| [807] | 198 |
|
|---|
| [1337] | 199 | } else if (name == "QElastic" && !helIsRegisted) {
|
|---|
| 200 | hadronPhys.push_back( new G4HadronQElasticPhysics());
|
|---|
| 201 | helIsRegisted = true;
|
|---|
| [1230] | 202 |
|
|---|
| [1337] | 203 | } else if (name == "binary" && !bicIsRegisted) {
|
|---|
| 204 | hadronPhys.push_back(new G4HadronInelasticQBBC());
|
|---|
| 205 | bicIsRegisted = true;
|
|---|
| [1230] | 206 |
|
|---|
| [1337] | 207 | } else if (name == "binary_ion" && !biciIsRegisted) {
|
|---|
| 208 | hadronPhys.push_back(new G4IonBinaryCascadePhysics());
|
|---|
| 209 | biciIsRegisted = true;
|
|---|
| [1230] | 210 |
|
|---|
| [1337] | 211 | } else {
|
|---|
| [1230] | 212 |
|
|---|
| [1337] | 213 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
|
|---|
| 214 | << " is not defined"
|
|---|
| 215 | << G4endl;
|
|---|
| 216 | }
|
|---|
| 217 | }
|
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| [807] | 220 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 221 |
|
|---|
| [1337] | 222 | void MicrobeamPhysicsList::AddStepMax()
|
|---|
| [807] | 223 | {
|
|---|
| [1337] | 224 | // Step limitation seen as a process
|
|---|
| 225 | stepMaxProcess = new G4StepLimiter();
|
|---|
| 226 |
|
|---|
| [807] | 227 | theParticleIterator->reset();
|
|---|
| [1337] | 228 | while ((*theParticleIterator)()){
|
|---|
| [807] | 229 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 230 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 231 |
|
|---|
| [1337] | 232 | if (stepMaxProcess->IsApplicable(*particle) && pmanager)
|
|---|
| 233 | {
|
|---|
| 234 | pmanager ->AddDiscreteProcess(stepMaxProcess);
|
|---|
| 235 | }
|
|---|
| 236 | }
|
|---|
| 237 | }
|
|---|
| [807] | 238 |
|
|---|
| [1337] | 239 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [807] | 240 |
|
|---|
| [1337] | 241 | void MicrobeamPhysicsList::SetCuts()
|
|---|
| 242 | {
|
|---|
| [807] | 243 |
|
|---|
| [1337] | 244 | if (verboseLevel >0){
|
|---|
| 245 | G4cout << "PhysicsList::SetCuts:";
|
|---|
| 246 | G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
|---|
| 247 | }
|
|---|
| [1230] | 248 |
|
|---|
| [1337] | 249 | // set cut values for gamma at first and for e- second and next for e+,
|
|---|
| 250 | // because some processes for e+/e- need cut values for gamma
|
|---|
| 251 | SetCutValue(cutForGamma, "gamma");
|
|---|
| 252 | SetCutValue(cutForElectron, "e-");
|
|---|
| 253 | SetCutValue(cutForPositron, "e+");
|
|---|
| [1230] | 254 |
|
|---|
| [1337] | 255 | if (verboseLevel>0) DumpCutValuesTable();
|
|---|
| 256 | }
|
|---|
| [807] | 257 |
|
|---|
| [1337] | 258 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [807] | 259 |
|
|---|
| [1337] | 260 | void MicrobeamPhysicsList::SetCutForGamma(G4double cut)
|
|---|
| 261 | {
|
|---|
| 262 | cutForGamma = cut;
|
|---|
| 263 | SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
|---|
| 264 | }
|
|---|
| [1230] | 265 |
|
|---|
| [1337] | 266 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [1230] | 267 |
|
|---|
| [1337] | 268 | void MicrobeamPhysicsList::SetCutForElectron(G4double cut)
|
|---|
| 269 | {
|
|---|
| 270 | cutForElectron = cut;
|
|---|
| 271 | SetParticleCuts(cutForElectron, G4Electron::Electron());
|
|---|
| 272 | }
|
|---|
| [1230] | 273 |
|
|---|
| [1337] | 274 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| [1230] | 275 |
|
|---|
| [1337] | 276 | void MicrobeamPhysicsList::SetCutForPositron(G4double cut)
|
|---|
| 277 | {
|
|---|
| 278 | cutForPositron = cut;
|
|---|
| 279 | SetParticleCuts(cutForPositron, G4Positron::Positron());
|
|---|
| [807] | 280 | }
|
|---|
| 281 |
|
|---|
| 282 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 283 |
|
|---|
| [1337] | 284 | void MicrobeamPhysicsList::AddIonGasModels()
|
|---|
| [807] | 285 | {
|
|---|
| [1337] | 286 | G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator();
|
|---|
| [807] | 287 | theParticleIterator->reset();
|
|---|
| [1337] | 288 | while ((*theParticleIterator)())
|
|---|
| [807] | 289 | {
|
|---|
| 290 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| [1337] | 291 | G4String partname = particle->GetParticleName();
|
|---|
| 292 | if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
|
|---|
| 293 | G4BraggIonGasModel* mod1 = new G4BraggIonGasModel();
|
|---|
| 294 | G4BetheBlochIonGasModel* mod2 = new G4BetheBlochIonGasModel();
|
|---|
| 295 | G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
|
|---|
| 296 | em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
|
|---|
| 297 | new G4IonFluctuations());
|
|---|
| 298 | em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
|
|---|
| 299 | new G4UniversalFluctuation());
|
|---|
| [807] | 300 |
|
|---|
| [1337] | 301 | }
|
|---|
| [807] | 302 | }
|
|---|
| 303 | }
|
|---|
| 304 |
|
|---|
| 305 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 306 |
|
|---|