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

Last change on this file since 921 was 850, checked in by garnier, 17 years ago

geant4.8.2 beta

File size: 6.4 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.3 2008/05/19 10:21:34 vnivanch Exp $
27// GEANT4 tag $Name: HEAD $
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//
46//----------------------------------------------------------------------------
47//
48
49#include "G4HadronDElasticPhysics.hh"
50
51#include "G4HadronicProcess.hh"
52#include "G4HadronElasticProcess.hh"
53#include "G4HadronicInteraction.hh"
54#include "G4DiffuseElastic.hh"
55#include "G4HadronElastic.hh"
56
57#include "G4ParticleDefinition.hh"
58#include "G4ProcessManager.hh"
59
60#include "G4MesonConstructor.hh"
61#include "G4BaryonConstructor.hh"
62#include "G4IonConstructor.hh"
63#include "G4Neutron.hh"
64
65#include "G4VQCrossSection.hh"
66#include "G4UElasticCrossSection.hh"
67#include "G4BGGNucleonElasticXS.hh"
68#include "G4BGGPionElasticXS.hh"
69
70G4HadronDElasticPhysics::G4HadronDElasticPhysics(G4int ver, G4bool hp)
71 : G4VPhysicsConstructor("DElastic"), mname("DElastic"), verbose(ver),
72 hpFlag(hp), wasActivated(false)
73{
74 if(verbose > 1) G4cout << "### HadronDElasticPhysics" << G4endl;
75}
76
77G4HadronDElasticPhysics::~G4HadronDElasticPhysics()
78{}
79
80void G4HadronDElasticPhysics::ConstructParticle()
81{
82 // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
83 G4MesonConstructor pMesonConstructor;
84 pMesonConstructor.ConstructParticle();
85
86 G4BaryonConstructor pBaryonConstructor;
87 pBaryonConstructor.ConstructParticle();
88
89 // Construct light ions
90 G4IonConstructor pConstructor;
91 pConstructor.ConstructParticle();
92}
93
94void G4HadronDElasticPhysics::ConstructProcess()
95{
96 if(wasActivated) return;
97 wasActivated = true;
98
99 if(verbose > 1)
100 G4cout << "### HadronDElasticPhysics Construct Processes with the model <"
101 << mname << ">" << G4endl;
102
103 G4UHadronElasticProcess* hel = 0;
104 G4DiffuseElastic* model = 0;
105
106 G4double elimit = 11.0*MeV;
107
108 G4HadronElastic* he = new G4HadronElastic();
109 G4VQCrossSection* man = he->GetCS();
110 he->SetMaxEnergy(elimit);
111
112 theParticleIterator->reset();
113 while( (*theParticleIterator)() )
114 {
115 G4ParticleDefinition* particle = theParticleIterator->value();
116 G4String pname = particle->GetParticleName();
117 if(pname == "anti_lambda" ||
118 pname == "anti_neutron" ||
119 pname == "anti_omega-" ||
120 pname == "anti_proton" ||
121 pname == "anti_sigma-" ||
122 pname == "anti_sigma+" ||
123 pname == "anti_xi-" ||
124 pname == "anti_xi0" ||
125 pname == "kaon-" ||
126 pname == "kaon+" ||
127 pname == "kaon0S" ||
128 pname == "kaon0L" ||
129 pname == "lambda" ||
130 pname == "omega-" ||
131 pname == "pi-" ||
132 pname == "pi+" ||
133 pname == "proton" ||
134 pname == "sigma-" ||
135 pname == "sigma+" ||
136 pname == "xi-" ||
137 pname == "alpha" ||
138 pname == "deuteron" ||
139 pname == "triton") {
140
141 G4ProcessManager* pmanager = particle->GetProcessManager();
142 hel = new G4UHadronElasticProcess("hElastic");
143 hel->SetQElasticCrossSection(man);
144 if(pname == "proton") {
145 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
146 } else if (pname == "pi+" || pname == "pi-") {
147 hel->AddDataSet(new G4BGGPionElasticXS(particle));
148 } else {
149 hel->AddDataSet(new G4UElasticCrossSection(particle));
150 }
151 model = new G4DiffuseElastic(particle);
152 hel->RegisterMe(model);
153 hel->RegisterMe(he);
154 pmanager->AddDiscreteProcess(hel);
155
156 // neutron case
157 } else if(pname == "neutron") {
158
159 G4ProcessManager* pmanager = particle->GetProcessManager();
160 hel = new G4UHadronElasticProcess("hElastic");
161 hel->SetQElasticCrossSection(man);
162 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
163 model = new G4DiffuseElastic(particle);
164 if(hpFlag) {
165 model->SetMinEnergy(19.5*MeV);
166 G4NeutronHPElastic* modelHP = new G4NeutronHPElastic();
167 hel->RegisterMe(modelHP);
168 hel->AddDataSet(new G4NeutronHPElasticData());
169 } else {
170 hel->RegisterMe(he);
171 }
172 hel->RegisterMe(model);
173 pmanager->AddDiscreteProcess(hel);
174
175 if(verbose > 1)
176 G4cout << "### HadronDElasticPhysics added for "
177 << particle->GetParticleName() << G4endl;
178 }
179 }
180}
181
182
Note: See TracBrowser for help on using the repository browser.