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

Last change on this file since 848 was 825, checked in by garnier, 17 years ago

import all except CVS

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