[1350] | 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: G4HadronElasticPhysics93.cc,v 1.1 2010/07/29 10:52:14 vnivanch Exp $ |
---|
| 27 | // GEANT4 tag $Name: phys-lists-V09-03-34 $ |
---|
| 28 | // |
---|
| 29 | //--------------------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // ClassName: G4HadronElasticPhysics93 |
---|
| 32 | // |
---|
| 33 | // Author: 11 April 2006 V. Ivanchenko |
---|
| 34 | // |
---|
| 35 | // Modified: |
---|
| 36 | // 05.07.2006 V.Ivanchenko define process by particle name; |
---|
| 37 | // fix problem of initialisation of HP |
---|
| 38 | // 24.07.2006 V.Ivanchenko add G4NeutronHPElasticData |
---|
| 39 | // 10.08.2006 V.Ivanchenko separate neutrons from other particles |
---|
| 40 | // 17.11.2006 V.Ivanchenko do not redefine G4HadronElastic default parameters |
---|
| 41 | // 19.02.2007 V.Ivanchenko set QModelLowLimit and LowestEnergyLimit to zero |
---|
| 42 | // 19.02.2007 A.Howard set QModelLowLimit and LowestEnergyLimit to zero |
---|
| 43 | // for neutrons |
---|
| 44 | // 06.03.2007 V.Ivanchenko use updated interface to G4UElasticCrossSection |
---|
| 45 | // |
---|
| 46 | //---------------------------------------------------------------------------- |
---|
| 47 | // |
---|
| 48 | |
---|
| 49 | #include "G4HadronElasticPhysics93.hh" |
---|
| 50 | |
---|
| 51 | #include "G4HadronicProcess.hh" |
---|
| 52 | #include "G4HadronElasticProcess.hh" |
---|
| 53 | #include "G4HadronicInteraction.hh" |
---|
| 54 | #include "G4LElastic.hh" |
---|
| 55 | |
---|
| 56 | #include "G4ParticleDefinition.hh" |
---|
| 57 | #include "G4ProcessManager.hh" |
---|
| 58 | |
---|
| 59 | #include "G4MesonConstructor.hh" |
---|
| 60 | #include "G4BaryonConstructor.hh" |
---|
| 61 | #include "G4IonConstructor.hh" |
---|
| 62 | #include "G4Neutron.hh" |
---|
| 63 | |
---|
| 64 | #include "G4VQCrossSection.hh" |
---|
| 65 | #include "G4UElasticCrossSection.hh" |
---|
| 66 | #include "G4BGGNucleonElasticXS.hh" |
---|
| 67 | #include "G4BGGPionElasticXS.hh" |
---|
| 68 | |
---|
| 69 | G4HadronElasticPhysics93::G4HadronElasticPhysics93(G4int ver) |
---|
| 70 | : G4VPhysicsConstructor("elastic"), mname("elastic"),verbose(ver), |
---|
| 71 | hpFlag(false), glFlag(false),wasActivated(false) |
---|
| 72 | { |
---|
| 73 | if(verbose > 1) G4cout << "### HadronElasticPhysics93" << G4endl; |
---|
| 74 | model = 0; |
---|
| 75 | neutronModel = 0; |
---|
| 76 | neutronHPModel = 0; |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | G4HadronElasticPhysics93::G4HadronElasticPhysics93( |
---|
| 80 | const G4String& name, G4int ver, G4bool hp, G4bool glauber) |
---|
| 81 | : G4VPhysicsConstructor(name), mname(name), verbose(ver), hpFlag(hp), |
---|
| 82 | glFlag(glauber),wasActivated(false) |
---|
| 83 | { |
---|
| 84 | if(verbose > 1) G4cout << "### HadronElasticPhysics93" << G4endl; |
---|
| 85 | model = 0; |
---|
| 86 | neutronModel = 0; |
---|
| 87 | neutronHPModel = 0; |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | G4HadronElasticPhysics93::~G4HadronElasticPhysics93() |
---|
| 91 | { |
---|
| 92 | delete model; |
---|
| 93 | delete neutronModel; |
---|
| 94 | delete neutronHPModel; |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | void G4HadronElasticPhysics93::ConstructParticle() |
---|
| 98 | { |
---|
| 99 | // G4cout << "G4HadronElasticPhysics93::ConstructParticle" << G4endl; |
---|
| 100 | G4MesonConstructor pMesonConstructor; |
---|
| 101 | pMesonConstructor.ConstructParticle(); |
---|
| 102 | |
---|
| 103 | G4BaryonConstructor pBaryonConstructor; |
---|
| 104 | pBaryonConstructor.ConstructParticle(); |
---|
| 105 | |
---|
| 106 | // Construct light ions |
---|
| 107 | G4IonConstructor pConstructor; |
---|
| 108 | pConstructor.ConstructParticle(); |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | void G4HadronElasticPhysics93::ConstructProcess() |
---|
| 112 | { |
---|
| 113 | if(wasActivated) return; |
---|
| 114 | wasActivated = true; |
---|
| 115 | |
---|
| 116 | if(verbose > 1) { |
---|
| 117 | G4cout << "### HadronElasticPhysics93 Construct Processes with the model <" |
---|
| 118 | << mname << ">" << G4endl; |
---|
| 119 | } |
---|
| 120 | G4HadronicProcess* hel = 0; |
---|
| 121 | G4VQCrossSection* man = 0; |
---|
| 122 | |
---|
| 123 | if(mname == "elastic") { |
---|
| 124 | G4HadronElastic* he = new G4HadronElastic(); |
---|
| 125 | model = he; |
---|
| 126 | man = he->GetCS(); |
---|
| 127 | he->SetQModelLowLimit(0.0); |
---|
| 128 | he->SetLowestEnergyLimit(0.0); |
---|
| 129 | } else { |
---|
| 130 | model = new G4LElastic(); |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | theParticleIterator->reset(); |
---|
| 134 | while( (*theParticleIterator)() ) |
---|
| 135 | { |
---|
| 136 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 137 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 138 | G4String pname = particle->GetParticleName(); |
---|
| 139 | if(pname == "anti_lambda" || |
---|
| 140 | pname == "anti_neutron" || |
---|
| 141 | pname == "anti_omega-" || |
---|
| 142 | pname == "anti_proton" || |
---|
| 143 | pname == "anti_sigma-" || |
---|
| 144 | pname == "anti_sigma+" || |
---|
| 145 | pname == "anti_xi-" || |
---|
| 146 | pname == "anti_xi0" || |
---|
| 147 | pname == "kaon-" || |
---|
| 148 | pname == "kaon+" || |
---|
| 149 | pname == "kaon0S" || |
---|
| 150 | pname == "kaon0L" || |
---|
| 151 | pname == "lambda" || |
---|
| 152 | pname == "omega-" || |
---|
| 153 | pname == "sigma-" || |
---|
| 154 | pname == "sigma+" || |
---|
| 155 | pname == "xi-" || |
---|
| 156 | pname == "alpha" || |
---|
| 157 | pname == "deuteron" || |
---|
| 158 | pname == "triton") { |
---|
| 159 | |
---|
| 160 | if(mname == "elastic") { |
---|
| 161 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
| 162 | h->SetQElasticCrossSection(man); |
---|
| 163 | hel = h; |
---|
| 164 | if(glFlag) hel->AddDataSet(new G4UElasticCrossSection(particle)); |
---|
| 165 | } else { |
---|
| 166 | hel = new G4HadronElasticProcess("hElastic"); |
---|
| 167 | } |
---|
| 168 | hel->RegisterMe(model); |
---|
| 169 | pmanager->AddDiscreteProcess(hel); |
---|
| 170 | if(verbose > 1) |
---|
| 171 | G4cout << "### HadronElasticPhysics93 added for " |
---|
| 172 | << particle->GetParticleName() << G4endl; |
---|
| 173 | |
---|
| 174 | // proton case |
---|
| 175 | } else if(pname == "proton") { |
---|
| 176 | if(mname == "elastic") { |
---|
| 177 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
| 178 | h->SetQElasticCrossSection(man); |
---|
| 179 | hel = h; |
---|
| 180 | if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); |
---|
| 181 | } else { |
---|
| 182 | hel = new G4HadronElasticProcess("hElastic"); |
---|
| 183 | } |
---|
| 184 | hel->RegisterMe(model); |
---|
| 185 | pmanager->AddDiscreteProcess(hel); |
---|
| 186 | if(verbose > 1) |
---|
| 187 | G4cout << "### HadronElasticPhysics93 added for " |
---|
| 188 | << particle->GetParticleName() << G4endl; |
---|
| 189 | |
---|
| 190 | // neutron case |
---|
| 191 | } else if(pname == "neutron") { |
---|
| 192 | |
---|
| 193 | if(mname == "elastic") { |
---|
| 194 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
| 195 | G4HadronElastic* nhe = new G4HadronElastic(); |
---|
| 196 | nhe->SetQModelLowLimit(0.0); |
---|
| 197 | nhe->SetLowestEnergyLimit(0.0); |
---|
| 198 | neutronModel = nhe; |
---|
| 199 | h->SetQElasticCrossSection(nhe->GetCS()); |
---|
| 200 | hel = h; |
---|
| 201 | if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); |
---|
| 202 | } else { |
---|
| 203 | hel = new G4HadronElasticProcess("hElastic"); |
---|
| 204 | neutronModel = new G4LElastic(); |
---|
| 205 | } |
---|
| 206 | |
---|
| 207 | if(hpFlag) { |
---|
| 208 | neutronModel->SetMinEnergy(19.5*MeV); |
---|
| 209 | neutronHPModel = new G4NeutronHPElastic(); |
---|
| 210 | hel->RegisterMe(neutronHPModel); |
---|
| 211 | hel->AddDataSet(new G4NeutronHPElasticData()); |
---|
| 212 | } |
---|
| 213 | |
---|
| 214 | hel->RegisterMe(neutronModel); |
---|
| 215 | pmanager->AddDiscreteProcess(hel); |
---|
| 216 | |
---|
| 217 | if(verbose > 1) |
---|
| 218 | G4cout << "### HadronElasticPhysics93 added for " |
---|
| 219 | << particle->GetParticleName() << G4endl; |
---|
| 220 | |
---|
| 221 | // pion case |
---|
| 222 | } else if(pname == "pi+" || pname == "pi-") { |
---|
| 223 | if(mname == "elastic") { |
---|
| 224 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
| 225 | h->SetQElasticCrossSection(man); |
---|
| 226 | hel = h; |
---|
| 227 | if(glFlag) hel->AddDataSet(new G4BGGPionElasticXS(particle)); |
---|
| 228 | } else { |
---|
| 229 | hel = new G4HadronElasticProcess("hElastic"); |
---|
| 230 | } |
---|
| 231 | hel->RegisterMe(model); |
---|
| 232 | pmanager->AddDiscreteProcess(hel); |
---|
| 233 | |
---|
| 234 | if(verbose > 1) |
---|
| 235 | G4cout << "### HadronElasticPhysics93 added for " |
---|
| 236 | << particle->GetParticleName() << G4endl; |
---|
| 237 | } |
---|
| 238 | } |
---|
| 239 | } |
---|
| 240 | |
---|
| 241 | |
---|