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

Last change on this file since 1273 was 1228, checked in by garnier, 14 years ago

update geant4.9.3 tag

File size: 6.3 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.7 2009/11/28 17:35:01 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-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#include "G4NeutronElasticXS.hh"
61
62G4HadronHElasticPhysics::G4HadronHElasticPhysics(G4int ver, G4bool hp,
63                                                 const G4String& type)
64  : G4VPhysicsConstructor("HElastic"), verbose(ver), 
65    hpFlag(hp), wasActivated(false), subtype(type)
66{
67  if(verbose > 1) G4cout << "### HadronHElasticPhysics" << G4endl;
68}
69
70G4HadronHElasticPhysics::~G4HadronHElasticPhysics()
71{}
72
73void G4HadronHElasticPhysics::ConstructParticle()
74{
75  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
76  G4MesonConstructor pMesonConstructor;
77  pMesonConstructor.ConstructParticle();
78
79  G4BaryonConstructor pBaryonConstructor;
80  pBaryonConstructor.ConstructParticle();
81
82  //  Construct light ions
83  G4IonConstructor pConstructor;
84  pConstructor.ConstructParticle(); 
85}
86
87void G4HadronHElasticPhysics::ConstructProcess()
88{
89  if(wasActivated) return;
90  wasActivated = true;
91
92  G4double elimit = 1.0*GeV;
93  if(verbose > 1) {
94    G4cout << "### HadronElasticPhysics Construct Processes with HE limit " 
95           << elimit << " MeV" << G4endl;
96  }
97
98  G4VHadronElastic* plep0 = new G4VHadronElastic();
99  G4VHadronElastic* plep1 = new G4VHadronElastic();
100  plep1->SetMaxEnergy(elimit);
101
102  G4CHIPSElastic* chipsp = new G4CHIPSElastic();
103  G4CHIPSElastic* chipsn = new G4CHIPSElastic();
104
105  G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE(); 
106  he->SetMinEnergy(elimit);
107
108  theParticleIterator->reset();
109  while( (*theParticleIterator)() )
110  {
111    G4ParticleDefinition* particle = theParticleIterator->value();
112    G4String pname = particle->GetParticleName();
113    if(pname == "anti_lambda"  ||
114       pname == "anti_neutron" ||
115       pname == "anti_omega-"  || 
116       pname == "anti_proton"  || 
117       pname == "anti_sigma-"  || 
118       pname == "anti_sigma+"  || 
119       pname == "anti_xi-"  || 
120       pname == "anti_xi0"  || 
121       pname == "kaon-"     || 
122       pname == "kaon+"     || 
123       pname == "kaon0S"    || 
124       pname == "kaon0L"    || 
125       pname == "lambda"    || 
126       pname == "omega-"    || 
127       pname == "pi-"       || 
128       pname == "pi+"       || 
129       pname == "proton"    || 
130       pname == "sigma-"    || 
131       pname == "sigma+"    || 
132       pname == "xi-"       || 
133       pname == "alpha"     ||
134       pname == "deuteron"  ||
135       pname == "triton") {
136     
137      G4ProcessManager* pmanager = particle->GetProcessManager();
138      G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
139      if(pname == "proton") { 
140        hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
141        hel->RegisterMe(chipsp);
142      } else if (pname == "pi+" || pname == "pi-") { 
143        hel->AddDataSet(new G4BGGPionElasticXS(particle));
144        hel->RegisterMe(plep1);
145        hel->RegisterMe(he);
146      } else {
147        //hel->AddDataSet(new G4UElasticCrossSection(particle));
148        hel->RegisterMe(plep0);
149      }
150      pmanager->AddDiscreteProcess(hel);
151      if(verbose > 1) {
152        G4cout << "### HadronHElasticPhysics: " << hel->GetProcessName()
153               << " added for " << particle->GetParticleName() << G4endl;
154      }
155
156      // neutron case
157    } else if(pname == "neutron") {   
158
159      G4ProcessManager* pmanager = particle->GetProcessManager();
160      G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
161      if(subtype == "QBBC_XGGSN") {
162        hel->AddDataSet(new G4NeutronElasticXS());
163      } else {
164        hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
165      }
166      hel->RegisterMe(chipsn);
167
168      if(hpFlag) {
169        chipsn->SetMinEnergy(19.5*MeV);
170        G4NeutronHPElastic* hp = new G4NeutronHPElastic();
171        hel->RegisterMe(hp);
172        hel->AddDataSet(new G4NeutronHPElasticData());
173      }
174      pmanager->AddDiscreteProcess(hel);
175
176      if(verbose > 1) {
177        G4cout << "### HadronHElasticPhysics: " << hel->GetProcessName()
178               << " added for " << particle->GetParticleName() << G4endl;
179      }
180    }
181  }
182}
183
184
Note: See TracBrowser for help on using the repository browser.