source: trunk/source/physics_lists/builders/src/G4HadronDElasticPhysics.cc@ 1331

Last change on this file since 1331 was 1315, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 6.8 KB
Line 
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: G4HadronDElasticPhysics.cc,v 1.6 2010/06/03 15:09:54 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName: G4HadronDElasticPhysics
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// 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
46//
47//----------------------------------------------------------------------------
48//
49// Diffuse optical model for sampling scattering
50// BBG cross sections for p, pi+-
51// XS cross sections for n
52// LHEP cross sections for other particles
53
54#include "G4HadronDElasticPhysics.hh"
55
56#include "G4ParticleDefinition.hh"
57#include "G4ProcessManager.hh"
58#include "G4HadronicProcess.hh"
59
60#include "G4MesonConstructor.hh"
61#include "G4BaryonConstructor.hh"
62#include "G4IonConstructor.hh"
63#include "G4Neutron.hh"
64
65#include "G4WHadronElasticProcess.hh"
66#include "G4VHadronElastic.hh"
67#include "G4CHIPSElastic.hh"
68#include "G4ElasticHadrNucleusHE.hh"
69#include "G4BGGNucleonElasticXS.hh"
70#include "G4BGGPionElasticXS.hh"
71#include "G4NeutronElasticXS.hh"
72
73#include "G4DiffuseElastic.hh"
74
75#include "G4NeutronElasticXS.hh"
76#include "G4BGGNucleonElasticXS.hh"
77#include "G4BGGPionElasticXS.hh"
78
79G4HadronDElasticPhysics::G4HadronDElasticPhysics(G4int ver)
80 : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver),
81 wasActivated(false)
82{
83 if(verbose > 1) {
84 G4cout << "### G4HadronHElasticPhysics: " << GetPhysicsName()
85 << G4endl;
86 }
87}
88
89G4HadronDElasticPhysics::G4HadronDElasticPhysics(G4int ver, G4bool)
90 : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver),
91 wasActivated(false)
92{
93 if(verbose > 1) {
94 G4cout << "### G4HadronHElasticPhysics: " << GetPhysicsName()
95 << G4endl;
96 }
97}
98
99G4HadronDElasticPhysics::~G4HadronDElasticPhysics()
100{}
101
102void G4HadronDElasticPhysics::ConstructParticle()
103{
104 // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
105 G4MesonConstructor pMesonConstructor;
106 pMesonConstructor.ConstructParticle();
107
108 G4BaryonConstructor pBaryonConstructor;
109 pBaryonConstructor.ConstructParticle();
110
111 // Construct light ions
112 G4IonConstructor pConstructor;
113 pConstructor.ConstructParticle();
114}
115
116void G4HadronDElasticPhysics::ConstructProcess()
117{
118 if(wasActivated) return;
119 wasActivated = true;
120
121 //G4double elimit = 1.0*GeV;
122
123 if(verbose > 1) {
124 G4cout << "### HadronDElasticPhysics Construct Processes " << G4endl;
125 }
126
127 //G4VHadronElastic* plep0 = new G4VHadronElastic();
128 //G4VHadronElastic* plep1 = new G4VHadronElastic();
129 //plep1->SetMaxEnergy(elimit);
130
131 // G4CHIPSElastic* chipsp = new G4CHIPSElastic();
132 // G4CHIPSElastic* chipsn = new G4CHIPSElastic();
133
134 //G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
135 //he->SetMinEnergy(elimit);
136
137 G4DiffuseElastic* model = 0;
138
139 theParticleIterator->reset();
140 while( (*theParticleIterator)() )
141 {
142 G4ParticleDefinition* particle = theParticleIterator->value();
143 G4String pname = particle->GetParticleName();
144 if(pname == "anti_lambda" ||
145 pname == "anti_neutron" ||
146 pname == "anti_omega-" ||
147 pname == "anti_proton" ||
148 pname == "anti_sigma-" ||
149 pname == "anti_sigma+" ||
150 pname == "anti_xi-" ||
151 pname == "anti_xi0" ||
152 pname == "kaon-" ||
153 pname == "kaon+" ||
154 pname == "kaon0S" ||
155 pname == "kaon0L" ||
156 pname == "lambda" ||
157 pname == "omega-" ||
158 pname == "pi-" ||
159 pname == "pi+" ||
160 pname == "proton" ||
161 pname == "sigma-" ||
162 pname == "sigma+" ||
163 pname == "xi-" ||
164 pname == "alpha" ||
165 pname == "deuteron" ||
166 pname == "triton") {
167
168 G4ProcessManager* pmanager = particle->GetProcessManager();
169 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
170 if(pname == "proton") {
171 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
172 } else if (pname == "pi+" || pname == "pi-") {
173 hel->AddDataSet(new G4BGGPionElasticXS(particle));
174 }
175 model = new G4DiffuseElastic(particle);
176 hel->RegisterMe(model);
177 pmanager->AddDiscreteProcess(hel);
178
179 // neutron case
180 } else if(pname == "neutron") {
181
182 G4ProcessManager* pmanager = particle->GetProcessManager();
183 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
184 hel->AddDataSet(new G4NeutronElasticXS());
185 model = new G4DiffuseElastic(particle);
186 hel->RegisterMe(model);
187 pmanager->AddDiscreteProcess(hel);
188
189 if(verbose > 1)
190 G4cout << "### HadronDElasticPhysics added for "
191 << particle->GetParticleName() << G4endl;
192 }
193 }
194}
195
196
Note: See TracBrowser for help on using the repository browser.