- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/physics_lists/builders/src/G4HadronElasticPhysics.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronElasticPhysics.cc,v 1.1 2 2010/06/03 16:28:39 gunterExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4HadronElasticPhysics.cc,v 1.16 2010/09/24 12:54:13 vnivanch Exp $ 27 // GEANT4 tag $Name: phys-lists-V09-03-34 $ 28 28 // 29 29 //--------------------------------------------------------------------------- 30 30 // 31 // ClassName: G4HadronElasticPhysics 31 // ClassName: G4HadronElasticPhysics 32 32 // 33 // Author: 11 April2006 V. Ivanchenko33 // Author: 23 November 2006 V. Ivanchenko 34 34 // 35 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 36 // 21.03.2007 V.Ivanchenko Use G4BGGNucleonElasticXS and G4BGGPionElasticXS; 37 // Reduce thresholds for HE and Q-models to zero 38 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method 39 // 29.07.2010 V.Ivanchenko rename this class from G4HadronHElasticPhysics to 40 // G4HadronElasticPhysics, old version of the class 41 // is renamed to G4HadronElasticPhysics93 45 42 // 46 43 //---------------------------------------------------------------------------- 47 44 // 45 // CHIPS for sampling scattering for p and n 46 // Glauber model for samplimg of high energy pi+- (E > 1GeV) 47 // LHEP sampling model for the other particle 48 // BBG cross sections for p, n and pi+- 49 // LHEP cross sections for other particles 48 50 49 51 #include "G4HadronElasticPhysics.hh" 50 51 #include "G4HadronicProcess.hh"52 #include "G4HadronElasticProcess.hh"53 #include "G4HadronicInteraction.hh"54 #include "G4LElastic.hh"55 52 56 53 #include "G4ParticleDefinition.hh" … … 62 59 #include "G4Neutron.hh" 63 60 64 #include "G4VQCrossSection.hh" 65 #include "G4UElasticCrossSection.hh" 61 #include "G4WHadronElasticProcess.hh" 62 #include "G4VHadronElastic.hh" 63 #include "G4CHIPSElastic.hh" 64 #include "G4ElasticHadrNucleusHE.hh" 66 65 #include "G4BGGNucleonElasticXS.hh" 67 66 #include "G4BGGPionElasticXS.hh" 67 #include "G4NeutronElasticXS.hh" 68 #include "G4CHIPSElasticXS.hh" 68 69 69 70 G4HadronElasticPhysics::G4HadronElasticPhysics(G4int ver) 70 : G4VPhysicsConstructor(" elastic"), mname("elastic"),verbose(ver),71 hpFlag(false), glFlag(false),wasActivated(false)71 : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver), 72 wasActivated(false) 72 73 { 73 if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl;74 model = 0;75 neutronModel = 0; 76 neutronHPModel = 0;74 if(verbose > 1) { 75 G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName() 76 << G4endl; 77 } 77 78 } 78 79 79 G4HadronElasticPhysics::G4HadronElasticPhysics( 80 const G4String& name, G4int ver, G4bool hp, G4bool glauber)81 : G4VPhysicsConstructor( name), mname(name), verbose(ver), hpFlag(hp),82 glFlag(glauber),wasActivated(false)80 G4HadronElasticPhysics::G4HadronElasticPhysics(const G4String&, 81 G4int ver, G4bool, const G4String&) 82 : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver), 83 wasActivated(false) 83 84 { 84 if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl;85 model = 0;86 neutronModel = 0; 87 neutronHPModel = 0;85 if(verbose > 1) { 86 G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName() 87 << G4endl; 88 } 88 89 } 89 90 90 91 G4HadronElasticPhysics::~G4HadronElasticPhysics() 91 { 92 delete model; 93 delete neutronModel; 94 delete neutronHPModel; 95 } 92 {} 96 93 97 94 void G4HadronElasticPhysics::ConstructParticle() 98 95 { 99 // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;96 // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl; 100 97 G4MesonConstructor pMesonConstructor; 101 98 pMesonConstructor.ConstructParticle(); … … 111 108 void G4HadronElasticPhysics::ConstructProcess() 112 109 { 113 if(wasActivated) return;110 if(wasActivated) { return; } 114 111 wasActivated = true; 115 112 113 G4double elimit = 1.0*GeV; 116 114 if(verbose > 1) { 117 G4cout << "### HadronElasticPhysics Construct Processes with the model <"118 << mname << ">" << G4endl;115 G4cout << "### HadronElasticPhysics Construct Processes with HE limit " 116 << elimit << " MeV" << G4endl; 119 117 } 120 G4HadronicProcess* hel = 0;121 G4VQCrossSection* man = 0;122 118 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 }119 G4VHadronElastic* plep0 = new G4VHadronElastic(); 120 G4VHadronElastic* plep1 = new G4VHadronElastic(); 121 plep1->SetMaxEnergy(elimit); 122 123 G4CHIPSElastic* chipsp = new G4CHIPSElastic(); 124 G4CHIPSElastic* chipsn = new G4CHIPSElastic(); 125 126 G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE(); 127 he->SetMinEnergy(elimit); 132 128 133 129 theParticleIterator->reset(); … … 135 131 { 136 132 G4ParticleDefinition* particle = theParticleIterator->value(); 137 G4ProcessManager* pmanager = particle->GetProcessManager();138 133 G4String pname = particle->GetParticleName(); 139 134 if(pname == "anti_lambda" || … … 151 146 pname == "lambda" || 152 147 pname == "omega-" || 148 pname == "pi-" || 149 pname == "pi+" || 150 pname == "proton" || 153 151 pname == "sigma-" || 154 152 pname == "sigma+" || … … 158 156 pname == "triton") { 159 157 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"); 158 G4ProcessManager* pmanager = particle->GetProcessManager(); 159 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess(); 160 if(pname == "proton") { 161 //hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); 162 hel->AddDataSet(new G4CHIPSElasticXS()); 163 hel->RegisterMe(chipsp); 164 } else if (pname == "pi+" || pname == "pi-") { 165 hel->AddDataSet(new G4BGGPionElasticXS(particle)); 166 hel->RegisterMe(plep1); 167 hel->RegisterMe(he); 168 } else { 169 hel->RegisterMe(plep0); 167 170 } 168 hel->RegisterMe(model);169 171 pmanager->AddDiscreteProcess(hel); 170 if(verbose > 1) 171 G4cout << "### HadronElasticPhysics 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"); 172 if(verbose > 1) { 173 G4cout << "### HadronElasticPhysics: " << hel->GetProcessName() 174 << " added for " << particle->GetParticleName() << G4endl; 183 175 } 184 hel->RegisterMe(model);185 pmanager->AddDiscreteProcess(hel);186 if(verbose > 1)187 G4cout << "### HadronElasticPhysics added for "188 << particle->GetParticleName() << G4endl;189 176 190 177 // neutron case 191 178 } else if(pname == "neutron") { 192 179 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 } 180 G4ProcessManager* pmanager = particle->GetProcessManager(); 181 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess(); 182 //hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); 183 hel->AddDataSet(new G4CHIPSElasticXS()); 184 hel->RegisterMe(chipsn); 206 185 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 186 pmanager->AddDiscreteProcess(hel); 216 187 217 if(verbose > 1) 218 G4cout << "### HadronElasticPhysics 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"); 188 if(verbose > 1) { 189 G4cout << "### HadronElasticPhysics: " << hel->GetProcessName() 190 << " added for " << particle->GetParticleName() << G4endl; 230 191 } 231 hel->RegisterMe(model);232 pmanager->AddDiscreteProcess(hel);233 234 if(verbose > 1)235 G4cout << "### HadronElasticPhysics added for "236 << particle->GetParticleName() << G4endl;237 192 } 238 193 }
Note: See TracChangeset
for help on using the changeset viewer.