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

Last change on this file since 830 was 825, checked in by garnier, 16 years ago

import all except CVS

File size: 6.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: G4HadronDElasticPhysics.cc,v 1.2 2007/11/14 18:45:37 vnivanch Exp $
27// GEANT4 tag $Name:  $
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 "G4HadronProcessStore.hh"
66#include "G4VQCrossSection.hh"
67#include "G4UElasticCrossSection.hh"
68#include "G4BGGNucleonElasticXS.hh"
69#include "G4BGGPionElasticXS.hh"
70
71G4HadronDElasticPhysics::G4HadronDElasticPhysics(G4int ver, G4bool hp)
72  : G4VPhysicsConstructor("DElastic"), mname("DElastic"), verbose(ver), 
73    hpFlag(hp), wasActivated(false)
74{
75  if(verbose > 1) G4cout << "### HadronDElasticPhysics" << G4endl;
76}
77
78G4HadronDElasticPhysics::~G4HadronDElasticPhysics()
79{}
80
81void G4HadronDElasticPhysics::ConstructParticle()
82{
83  // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
84  G4MesonConstructor pMesonConstructor;
85  pMesonConstructor.ConstructParticle();
86
87  G4BaryonConstructor pBaryonConstructor;
88  pBaryonConstructor.ConstructParticle();
89
90  //  Construct light ions
91  G4IonConstructor pConstructor;
92  pConstructor.ConstructParticle(); 
93}
94
95void G4HadronDElasticPhysics::ConstructProcess()
96{
97  if(wasActivated) return;
98  wasActivated = true;
99
100  G4HadronProcessStore* store = G4HadronProcessStore::Instance();
101
102  if(verbose > 1) 
103    G4cout << "### HadronDElasticPhysics Construct Processes with the model <" 
104           << mname << ">" << G4endl;
105
106  G4UHadronElasticProcess* hel = 0;
107  G4DiffuseElastic* model = 0;
108
109  G4double elimit = 11.0*MeV;
110
111  G4HadronElastic* he = new G4HadronElastic();
112  G4VQCrossSection* man = he->GetCS();
113  he->SetMaxEnergy(elimit);
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      hel = new G4UHadronElasticProcess("hElastic");
146      hel->SetQElasticCrossSection(man);
147      if(pname == "proton") { 
148        hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
149      } else if (pname == "pi+" || pname == "pi-") { 
150        hel->AddDataSet(new G4BGGPionElasticXS(particle));
151      } else {
152        hel->AddDataSet(new G4UElasticCrossSection(particle));
153      }
154      model = new G4DiffuseElastic(particle);
155      hel->RegisterMe(model);
156      hel->RegisterMe(he);
157      store->Register(hel,particle,he,"elastic");
158      store->Register(hel,particle,model,mname);
159      pmanager->AddDiscreteProcess(hel);
160
161      // neutron case
162    } else if(pname == "neutron") {   
163
164      G4ProcessManager* pmanager = particle->GetProcessManager();
165      hel = new G4UHadronElasticProcess("hElastic");
166      hel->SetQElasticCrossSection(man);
167      hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
168      model = new G4DiffuseElastic(particle);
169      if(hpFlag) {
170        model->SetMinEnergy(19.5*MeV);
171        G4NeutronHPElastic* modelHP = new G4NeutronHPElastic();
172        hel->RegisterMe(modelHP);
173        store->Register(hel,particle,modelHP,"HP");
174        hel->AddDataSet(new G4NeutronHPElasticData());
175      } else {
176        hel->RegisterMe(he);
177        store->Register(hel,particle,he,"elastic");
178      }
179      hel->RegisterMe(model);
180      store->Register(hel,particle,model,mname);
181      pmanager->AddDiscreteProcess(hel);
182
183      if(verbose > 1)
184        G4cout << "### HadronDElasticPhysics added for " 
185               << particle->GetParticleName() << G4endl;
186    }
187  }
188}
189
190
Note: See TracBrowser for help on using the repository browser.