| 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: 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......
|
|---|
| 31 |
|
|---|
| 32 | #include "MicrobeamPhysicsList.hh"
|
|---|
| 33 | #include "MicrobeamPhysicsListMessenger.hh"
|
|---|
| 34 |
|
|---|
| 35 | #include "G4StepLimiter.hh"
|
|---|
| 36 |
|
|---|
| 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"
|
|---|
| 43 |
|
|---|
| 44 | #include "G4DecayPhysics.hh"
|
|---|
| 45 |
|
|---|
| 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()
|
|---|
| 69 | {
|
|---|
| 70 | G4LossTableManager::Instance();
|
|---|
| 71 | defaultCutValue = 0.01*micrometer;
|
|---|
| 72 | cutForGamma = defaultCutValue;
|
|---|
| 73 | cutForElectron = defaultCutValue;
|
|---|
| 74 | cutForPositron = defaultCutValue;
|
|---|
| 75 |
|
|---|
| 76 | helIsRegisted = false;
|
|---|
| 77 | bicIsRegisted = false;
|
|---|
| 78 | biciIsRegisted = false;
|
|---|
| 79 |
|
|---|
| 80 | pMessenger = new MicrobeamPhysicsListMessenger(this);
|
|---|
| 81 |
|
|---|
| 82 | SetVerboseLevel(1);
|
|---|
| 83 |
|
|---|
| 84 | // EM physics
|
|---|
| 85 | emName = G4String("emstandard_opt0");
|
|---|
| 86 |
|
|---|
| 87 | emPhysicsList = new G4EmStandardPhysics(1);
|
|---|
| 88 |
|
|---|
| 89 | // Deacy physics and all particles
|
|---|
| 90 | decPhysicsList = new G4DecayPhysics();
|
|---|
| 91 | }
|
|---|
| 92 |
|
|---|
| 93 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 94 |
|
|---|
| 95 | MicrobeamPhysicsList::~MicrobeamPhysicsList()
|
|---|
| 96 | {
|
|---|
| 97 | delete pMessenger;
|
|---|
| 98 | delete emPhysicsList;
|
|---|
| 99 | delete decPhysicsList;
|
|---|
| 100 | for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
|
|---|
| 101 | }
|
|---|
| 102 |
|
|---|
| 103 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 104 |
|
|---|
| 105 | void MicrobeamPhysicsList::ConstructParticle()
|
|---|
| 106 | {
|
|---|
| 107 | decPhysicsList->ConstructParticle();
|
|---|
| 108 | }
|
|---|
| 109 |
|
|---|
| 110 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 111 |
|
|---|
| 112 | void MicrobeamPhysicsList::ConstructProcess()
|
|---|
| 113 | {
|
|---|
| 114 | // transportation
|
|---|
| 115 | //
|
|---|
| 116 | AddTransportation();
|
|---|
| 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 |
|
|---|
| 135 | }
|
|---|
| 136 |
|
|---|
| 137 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 138 |
|
|---|
| 139 | void MicrobeamPhysicsList::AddPhysicsList(const G4String& name)
|
|---|
| 140 | {
|
|---|
| 141 | if (verboseLevel>1) {
|
|---|
| 142 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
|---|
| 143 | }
|
|---|
| 144 |
|
|---|
| 145 | if (name == emName) return;
|
|---|
| 146 |
|
|---|
| 147 | if (name == "emstandard_opt0") {
|
|---|
| 148 |
|
|---|
| 149 | emName = name;
|
|---|
| 150 | delete emPhysicsList;
|
|---|
| 151 | emPhysicsList = new G4EmStandardPhysics(1);
|
|---|
| 152 |
|
|---|
| 153 | } else if (name == "emstandard_opt1") {
|
|---|
| 154 |
|
|---|
| 155 | emName = name;
|
|---|
| 156 | delete emPhysicsList;
|
|---|
| 157 | emPhysicsList = new G4EmStandardPhysics_option1();
|
|---|
| 158 |
|
|---|
| 159 | } else if (name == "emstandard_opt2") {
|
|---|
| 160 |
|
|---|
| 161 | emName = name;
|
|---|
| 162 | delete emPhysicsList;
|
|---|
| 163 | emPhysicsList = new G4EmStandardPhysics_option2();
|
|---|
| 164 |
|
|---|
| 165 | } else if (name == "emstandard_opt3") {
|
|---|
| 166 |
|
|---|
| 167 | emName = name;
|
|---|
| 168 | delete emPhysicsList;
|
|---|
| 169 | emPhysicsList = new G4EmStandardPhysics_option3();
|
|---|
| 170 |
|
|---|
| 171 | } else if (name == "emlivermore") {
|
|---|
| 172 | emName = name;
|
|---|
| 173 | delete emPhysicsList;
|
|---|
| 174 | emPhysicsList = new G4EmLivermorePhysics();
|
|---|
| 175 |
|
|---|
| 176 | } else if (name == "empenelope") {
|
|---|
| 177 | emName = name;
|
|---|
| 178 | delete emPhysicsList;
|
|---|
| 179 | emPhysicsList = new G4EmPenelopePhysics();
|
|---|
| 180 |
|
|---|
| 181 | } else if (name == "ionGasModels") {
|
|---|
| 182 |
|
|---|
| 183 | AddPhysicsList("emstandard_opt3");
|
|---|
| 184 | emName = name;
|
|---|
| 185 | AddIonGasModels();
|
|---|
| 186 |
|
|---|
| 187 | } else if (name == "elastic" && !helIsRegisted) {
|
|---|
| 188 | hadronPhys.push_back( new G4HadronElasticPhysics());
|
|---|
| 189 | helIsRegisted = true;
|
|---|
| 190 |
|
|---|
| 191 | } else if (name == "DElastic" && !helIsRegisted) {
|
|---|
| 192 | hadronPhys.push_back( new G4HadronDElasticPhysics());
|
|---|
| 193 | helIsRegisted = true;
|
|---|
| 194 |
|
|---|
| 195 | } else if (name == "HElastic" && !helIsRegisted) {
|
|---|
| 196 | hadronPhys.push_back( new G4HadronHElasticPhysics());
|
|---|
| 197 | helIsRegisted = true;
|
|---|
| 198 |
|
|---|
| 199 | } else if (name == "QElastic" && !helIsRegisted) {
|
|---|
| 200 | hadronPhys.push_back( new G4HadronQElasticPhysics());
|
|---|
| 201 | helIsRegisted = true;
|
|---|
| 202 |
|
|---|
| 203 | } else if (name == "binary" && !bicIsRegisted) {
|
|---|
| 204 | hadronPhys.push_back(new G4HadronInelasticQBBC());
|
|---|
| 205 | bicIsRegisted = true;
|
|---|
| 206 |
|
|---|
| 207 | } else if (name == "binary_ion" && !biciIsRegisted) {
|
|---|
| 208 | hadronPhys.push_back(new G4IonBinaryCascadePhysics());
|
|---|
| 209 | biciIsRegisted = true;
|
|---|
| 210 |
|
|---|
| 211 | } else {
|
|---|
| 212 |
|
|---|
| 213 | G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
|
|---|
| 214 | << " is not defined"
|
|---|
| 215 | << G4endl;
|
|---|
| 216 | }
|
|---|
| 217 | }
|
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| 220 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 221 |
|
|---|
| 222 | void MicrobeamPhysicsList::AddStepMax()
|
|---|
| 223 | {
|
|---|
| 224 | // Step limitation seen as a process
|
|---|
| 225 | stepMaxProcess = new G4StepLimiter();
|
|---|
| 226 |
|
|---|
| 227 | theParticleIterator->reset();
|
|---|
| 228 | while ((*theParticleIterator)()){
|
|---|
| 229 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 230 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 231 |
|
|---|
| 232 | if (stepMaxProcess->IsApplicable(*particle) && pmanager)
|
|---|
| 233 | {
|
|---|
| 234 | pmanager ->AddDiscreteProcess(stepMaxProcess);
|
|---|
| 235 | }
|
|---|
| 236 | }
|
|---|
| 237 | }
|
|---|
| 238 |
|
|---|
| 239 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 240 |
|
|---|
| 241 | void MicrobeamPhysicsList::SetCuts()
|
|---|
| 242 | {
|
|---|
| 243 |
|
|---|
| 244 | if (verboseLevel >0){
|
|---|
| 245 | G4cout << "PhysicsList::SetCuts:";
|
|---|
| 246 | G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
|---|
| 247 | }
|
|---|
| 248 |
|
|---|
| 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+");
|
|---|
| 254 |
|
|---|
| 255 | if (verboseLevel>0) DumpCutValuesTable();
|
|---|
| 256 | }
|
|---|
| 257 |
|
|---|
| 258 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 259 |
|
|---|
| 260 | void MicrobeamPhysicsList::SetCutForGamma(G4double cut)
|
|---|
| 261 | {
|
|---|
| 262 | cutForGamma = cut;
|
|---|
| 263 | SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
|---|
| 264 | }
|
|---|
| 265 |
|
|---|
| 266 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 267 |
|
|---|
| 268 | void MicrobeamPhysicsList::SetCutForElectron(G4double cut)
|
|---|
| 269 | {
|
|---|
| 270 | cutForElectron = cut;
|
|---|
| 271 | SetParticleCuts(cutForElectron, G4Electron::Electron());
|
|---|
| 272 | }
|
|---|
| 273 |
|
|---|
| 274 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 275 |
|
|---|
| 276 | void MicrobeamPhysicsList::SetCutForPositron(G4double cut)
|
|---|
| 277 | {
|
|---|
| 278 | cutForPositron = cut;
|
|---|
| 279 | SetParticleCuts(cutForPositron, G4Positron::Positron());
|
|---|
| 280 | }
|
|---|
| 281 |
|
|---|
| 282 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 283 |
|
|---|
| 284 | void MicrobeamPhysicsList::AddIonGasModels()
|
|---|
| 285 | {
|
|---|
| 286 | G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator();
|
|---|
| 287 | theParticleIterator->reset();
|
|---|
| 288 | while ((*theParticleIterator)())
|
|---|
| 289 | {
|
|---|
| 290 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 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());
|
|---|
| 300 |
|
|---|
| 301 | }
|
|---|
| 302 | }
|
|---|
| 303 | }
|
|---|
| 304 |
|
|---|
| 305 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 306 |
|
|---|