source: trunk/source/physics_lists/builders/src/G4HadronElasticPhysics.cc @ 1202

Last change on this file since 1202 was 988, checked in by garnier, 15 years ago

fichiers manquants

File size: 7.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: G4HadronElasticPhysics.cc,v 1.9 2008/12/01 16:57:22 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-02-ref-02 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4HadronElasticPhysics
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 "G4HadronElasticPhysics.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
69G4HadronElasticPhysics::G4HadronElasticPhysics(
70    const G4String& name,  G4int ver, G4bool hp, G4bool glauber)
71  : G4VPhysicsConstructor(name), mname(name), verbose(ver), hpFlag(hp), 
72    glFlag(glauber),wasActivated(false)
73{
74  if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl;
75  model = 0;
76  neutronModel = 0;
77  neutronHPModel = 0; 
78}
79
80G4HadronElasticPhysics::~G4HadronElasticPhysics()
81{
82  delete model;
83  delete neutronModel;
84  delete neutronHPModel;
85}
86
87void G4HadronElasticPhysics::ConstructParticle()
88{
89// G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
90  G4MesonConstructor pMesonConstructor;
91  pMesonConstructor.ConstructParticle();
92
93  G4BaryonConstructor pBaryonConstructor;
94  pBaryonConstructor.ConstructParticle();
95
96  //  Construct light ions
97  G4IonConstructor pConstructor;
98  pConstructor.ConstructParticle(); 
99}
100
101void G4HadronElasticPhysics::ConstructProcess()
102{
103  if(wasActivated) return;
104  wasActivated = true;
105
106  if(verbose > 1) {
107    G4cout << "### HadronElasticPhysics Construct Processes with the model <" 
108           << mname << ">" << G4endl;
109  }
110  G4HadronicProcess* hel = 0;
111  G4VQCrossSection* man = 0; 
112
113  if(mname == "elastic") {
114    G4HadronElastic* he = new G4HadronElastic();
115    model = he;
116    man = he->GetCS();
117    he->SetQModelLowLimit(0.0);
118    he->SetLowestEnergyLimit(0.0);
119  } else {
120    model = new G4LElastic();
121  }
122
123  theParticleIterator->reset();
124  while( (*theParticleIterator)() )
125  {
126    G4ParticleDefinition* particle = theParticleIterator->value();
127    G4ProcessManager* pmanager = particle->GetProcessManager();
128    G4String pname = particle->GetParticleName();
129    if(pname == "anti_lambda"  ||
130       pname == "anti_neutron" ||
131       pname == "anti_omega-"  || 
132       pname == "anti_proton"  || 
133       pname == "anti_sigma-"  || 
134       pname == "anti_sigma+"  || 
135       pname == "anti_xi-"  || 
136       pname == "anti_xi0"  || 
137       pname == "kaon-"     || 
138       pname == "kaon+"     || 
139       pname == "kaon0S"    || 
140       pname == "kaon0L"    || 
141       pname == "lambda"    || 
142       pname == "omega-"    || 
143       pname == "sigma-"    || 
144       pname == "sigma+"    || 
145       pname == "xi-"       || 
146       pname == "alpha"     ||
147       pname == "deuteron"  ||
148       pname == "triton") {
149     
150      if(mname == "elastic") {
151        G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
152        h->SetQElasticCrossSection(man);
153        hel = h;
154        if(glFlag) hel->AddDataSet(new G4UElasticCrossSection(particle));
155      } else {                   
156        hel = new G4HadronElasticProcess("hElastic");
157      }
158      hel->RegisterMe(model);
159      pmanager->AddDiscreteProcess(hel);
160      if(verbose > 1)
161        G4cout << "### HadronElasticPhysics added for " 
162               << particle->GetParticleName() << G4endl;
163
164      // proton case
165    } else if(pname == "proton") {
166      if(mname == "elastic") {
167        G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
168        h->SetQElasticCrossSection(man);
169        hel = h;
170        if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
171      } else {                   
172        hel = new G4HadronElasticProcess("hElastic");
173      }
174      hel->RegisterMe(model);
175      pmanager->AddDiscreteProcess(hel);
176      if(verbose > 1)
177        G4cout << "### HadronElasticPhysics added for " 
178               << particle->GetParticleName() << G4endl;
179
180      // neutron case
181    } else if(pname == "neutron") {   
182
183      if(mname == "elastic") {
184        G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
185        G4HadronElastic* nhe = new G4HadronElastic();
186        nhe->SetQModelLowLimit(0.0);
187        nhe->SetLowestEnergyLimit(0.0);
188        neutronModel = nhe;
189        h->SetQElasticCrossSection(nhe->GetCS());
190        hel = h;
191        if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
192      } else {                   
193        hel = new G4HadronElasticProcess("hElastic");
194        neutronModel = new G4LElastic();
195      }
196
197      if(hpFlag) {
198        neutronModel->SetMinEnergy(19.5*MeV);
199        neutronHPModel = new G4NeutronHPElastic();
200        hel->RegisterMe(neutronHPModel);
201        hel->AddDataSet(new G4NeutronHPElasticData());
202      }
203
204      hel->RegisterMe(neutronModel);
205      pmanager->AddDiscreteProcess(hel);
206
207      if(verbose > 1)
208        G4cout << "### HadronElasticPhysics added for " 
209               << particle->GetParticleName() << G4endl;
210
211      // pion case
212    } else if(pname == "pi+" || pname == "pi-") {
213      if(mname == "elastic") {
214        G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
215        h->SetQElasticCrossSection(man);
216        hel = h;
217        if(glFlag) hel->AddDataSet(new G4BGGPionElasticXS(particle));
218      } else {                   
219        hel = new G4HadronElasticProcess("hElastic");
220      }
221      hel->RegisterMe(model);
222      pmanager->AddDiscreteProcess(hel);
223
224      if(verbose > 1)
225        G4cout << "### HadronElasticPhysics added for " 
226               << particle->GetParticleName() << G4endl;
227    }
228  }
229}
230
231
Note: See TracBrowser for help on using the repository browser.