source: trunk/source/physics_lists/builders/src/G4HadronQElasticPhysics.cc@ 1271

Last change on this file since 1271 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 4.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: G4HadronQElasticPhysics.cc,v 1.7 2008/05/19 10:21:34 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName: G4HadronQElasticPhysics
32//
33// Author: 17 Nov 2006 V.Ivanchenko
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4HadronQElasticPhysics.hh"
41
42#include "G4UHadronElasticProcess.hh"
43#include "G4HadronicInteraction.hh"
44#include "G4HadronElastic.hh"
45#include "G4QElastic.hh"
46
47#include "G4VQCrossSection.hh"
48
49#include "G4ParticleDefinition.hh"
50#include "G4ProcessManager.hh"
51
52#include "G4MesonConstructor.hh"
53#include "G4BaryonConstructor.hh"
54#include "G4IonConstructor.hh"
55
56G4HadronQElasticPhysics::G4HadronQElasticPhysics(
57 const G4String& name, G4int ver)
58 : G4VPhysicsConstructor(name), verbose(ver), wasActivated(false)
59{
60 if(verbose > 1) G4cout << "### HadronQElasticPhysics" << G4endl;
61 model = 0;
62}
63
64G4HadronQElasticPhysics::~G4HadronQElasticPhysics()
65{
66 delete model;
67}
68
69void G4HadronQElasticPhysics::ConstructParticle()
70{
71 G4MesonConstructor pMesonConstructor;
72 pMesonConstructor.ConstructParticle();
73
74 G4BaryonConstructor pBaryonConstructor;
75 pBaryonConstructor.ConstructParticle();
76
77 // Construct light ions
78 G4IonConstructor pConstructor;
79 pConstructor.ConstructParticle();
80}
81
82void G4HadronQElasticPhysics::ConstructProcess()
83{
84 if(wasActivated) return;
85 wasActivated = true;
86
87 G4double elimit = DBL_MAX;
88
89 if(verbose > 1)
90 G4cout << "### HadronQElasticPhysics: use HE limit " << elimit << " MeV"
91 << G4endl;
92
93 process = new G4QElastic();
94
95 model = new G4HadronElastic();
96 model->SetHEModelLowLimit(elimit);
97 G4VQCrossSection* man = model->GetCS();
98
99 theParticleIterator->reset();
100 while( (*theParticleIterator)() )
101 {
102 G4ParticleDefinition* particle = theParticleIterator->value();
103 G4String pname = particle->GetParticleName();
104 if(pname == "anti_lambda" ||
105 pname == "anti_neutron" ||
106 pname == "anti_omega-" ||
107 pname == "anti_proton" ||
108 pname == "anti_sigma-" ||
109 pname == "anti_sigma+" ||
110 pname == "anti_xi-" ||
111 pname == "anti_xi0" ||
112 pname == "kaon-" ||
113 pname == "kaon+" ||
114 pname == "kaon0S" ||
115 pname == "kaon0L" ||
116 pname == "lambda" ||
117 pname == "omega-" ||
118 pname == "pi-" ||
119 pname == "pi+" ||
120 pname == "sigma-" ||
121 pname == "sigma+" ||
122 pname == "xi-" ||
123 pname == "alpha" ||
124 pname == "deuteron" ||
125 pname == "triton") {
126
127 G4ProcessManager* pmanager = particle->GetProcessManager();
128 G4UHadronElasticProcess* hel = new G4UHadronElasticProcess("hElastic");
129 hel->SetQElasticCrossSection(man);
130 hel->RegisterMe(model);
131 pmanager->AddDiscreteProcess(hel);
132
133 } else if(pname == "neutron" || pname == "proton") {
134
135 G4ProcessManager* pmanager = particle->GetProcessManager();
136 pmanager->AddDiscreteProcess(process);
137
138 if(verbose > 0)
139 G4cout << "### QElastic added for "
140 << particle->GetParticleName() << G4endl;
141 }
142 }
143}
144
145
Note: See TracBrowser for help on using the repository browser.