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

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

fichiers manquants

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