source: trunk/source/physics_lists/builders/src/G4HadronHElasticPhysics.cc@ 1208

Last change on this file since 1208 was 1203, checked in by garnier, 16 years ago

update CVS

File size: 6.2 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: G4HadronHElasticPhysics.cc,v 1.6 2009/10/04 16:03:38 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03-cand-03 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName: G4HadronHElasticPhysics
32//
33// Author: 23 November 2006 V. Ivanchenko
34//
35// Modified:
36// 21.03.07 (V.Ivanchenko) Use G4BGGNucleonElasticXS and G4BGGPionElasticXS;
37// Reduce thresholds for HE and Q-models to zero
38//
39//----------------------------------------------------------------------------
40//
41
42#include "G4HadronHElasticPhysics.hh"
43
44#include "G4ParticleDefinition.hh"
45#include "G4ProcessManager.hh"
46
47#include "G4MesonConstructor.hh"
48#include "G4BaryonConstructor.hh"
49#include "G4IonConstructor.hh"
50#include "G4Neutron.hh"
51
52#include "G4WHadronElasticProcess.hh"
53#include "G4VHadronElastic.hh"
54#include "G4CHIPSElastic.hh"
55#include "G4ElasticHadrNucleusHE.hh"
56#include "G4NeutronHPElastic.hh"
57#include "G4UElasticCrossSection.hh"
58#include "G4BGGNucleonElasticXS.hh"
59#include "G4BGGPionElasticXS.hh"
60
61G4HadronHElasticPhysics::G4HadronHElasticPhysics(G4int ver, G4bool hp)
62 : G4VPhysicsConstructor("HElastic"), verbose(ver),
63 hpFlag(hp), wasActivated(false)
64{
65 if(verbose > 1) G4cout << "### HadronHElasticPhysics" << G4endl;
66}
67
68G4HadronHElasticPhysics::~G4HadronHElasticPhysics()
69{}
70
71void G4HadronHElasticPhysics::ConstructParticle()
72{
73 // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
74 G4MesonConstructor pMesonConstructor;
75 pMesonConstructor.ConstructParticle();
76
77 G4BaryonConstructor pBaryonConstructor;
78 pBaryonConstructor.ConstructParticle();
79
80 // Construct light ions
81 G4IonConstructor pConstructor;
82 pConstructor.ConstructParticle();
83}
84
85void G4HadronHElasticPhysics::ConstructProcess()
86{
87 if(wasActivated) return;
88 wasActivated = true;
89
90 G4double elimit = 1.0*GeV;
91 if(verbose > 1) {
92 G4cout << "### HadronElasticPhysics Construct Processes with HE limit "
93 << elimit << " MeV" << G4endl;
94 }
95
96 G4VHadronElastic* plep0 = new G4VHadronElastic();
97 G4VHadronElastic* plep1 = new G4VHadronElastic();
98 plep1->SetMaxEnergy(elimit);
99
100 G4CHIPSElastic* chipsp = new G4CHIPSElastic();
101 G4CHIPSElastic* chipsn = new G4CHIPSElastic();
102
103 G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
104 he->SetMinEnergy(elimit);
105
106 theParticleIterator->reset();
107 while( (*theParticleIterator)() )
108 {
109 G4ParticleDefinition* particle = theParticleIterator->value();
110 G4String pname = particle->GetParticleName();
111 if(pname == "anti_lambda" ||
112 pname == "anti_neutron" ||
113 pname == "anti_omega-" ||
114 pname == "anti_proton" ||
115 pname == "anti_sigma-" ||
116 pname == "anti_sigma+" ||
117 pname == "anti_xi-" ||
118 pname == "anti_xi0" ||
119 pname == "kaon-" ||
120 pname == "kaon+" ||
121 pname == "kaon0S" ||
122 pname == "kaon0L" ||
123 pname == "lambda" ||
124 pname == "omega-" ||
125 pname == "pi-" ||
126 pname == "pi+" ||
127 pname == "proton" ||
128 pname == "sigma-" ||
129 pname == "sigma+" ||
130 pname == "xi-" ||
131 pname == "alpha" ||
132 pname == "deuteron" ||
133 pname == "triton") {
134
135 G4ProcessManager* pmanager = particle->GetProcessManager();
136 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
137 if(pname == "proton") {
138 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
139 hel->RegisterMe(chipsp);
140 } else if (pname == "pi+" || pname == "pi-") {
141 hel->AddDataSet(new G4BGGPionElasticXS(particle));
142 hel->RegisterMe(plep1);
143 hel->RegisterMe(he);
144 } else {
145 //hel->AddDataSet(new G4UElasticCrossSection(particle));
146 hel->RegisterMe(plep0);
147 }
148 pmanager->AddDiscreteProcess(hel);
149 if(verbose > 1) {
150 G4cout << "### HadronHElasticPhysics: " << hel->GetProcessName()
151 << " added for " << particle->GetParticleName() << G4endl;
152 }
153
154 // neutron case
155 } else if(pname == "neutron") {
156
157 G4ProcessManager* pmanager = particle->GetProcessManager();
158 G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
159 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
160 hel->RegisterMe(chipsn);
161
162 if(hpFlag) {
163 chipsn->SetMinEnergy(19.5*MeV);
164 G4NeutronHPElastic* hp = new G4NeutronHPElastic();
165 hel->RegisterMe(hp);
166 hel->AddDataSet(new G4NeutronHPElasticData());
167 }
168 pmanager->AddDiscreteProcess(hel);
169
170 if(verbose > 1) {
171 G4cout << "### HadronHElasticPhysics: " << hel->GetProcessName()
172 << " added for " << particle->GetParticleName() << G4endl;
173 }
174 }
175 }
176}
177
178
Note: See TracBrowser for help on using the repository browser.