source: trunk/source/physics_lists/builders/src/G4HadronElasticPhysicsLHEP.cc@ 1350

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

tag geant4.9.4 beta 1 + modifs locales

File size: 4.7 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: G4HadronElasticPhysicsLHEP.cc,v 1.2 2010/06/03 14:28:32 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName: G4HadronElasticPhysicsLHEP
32//
33// Author: 3 June 2010 V. Ivanchenko
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39// LHEP x-sectios and sampling
40
41#include "G4HadronElasticPhysicsLHEP.hh"
42
43#include "G4HadronicProcess.hh"
44#include "G4HadronElasticProcess.hh"
45#include "G4HadronicInteraction.hh"
46#include "G4LElastic.hh"
47
48#include "G4ParticleDefinition.hh"
49#include "G4ProcessManager.hh"
50
51#include "G4MesonConstructor.hh"
52#include "G4BaryonConstructor.hh"
53#include "G4IonConstructor.hh"
54#include "G4Neutron.hh"
55
56G4HadronElasticPhysicsLHEP::G4HadronElasticPhysicsLHEP(G4int ver)
57 : G4VPhysicsConstructor("hElasticLHEP"), verbose(ver),
58 wasActivated(false)
59{
60 if(verbose > 1) {
61 G4cout << "### G4HadronElasticPhysicsLHEP: " << GetPhysicsName()
62 << G4endl;
63 }
64}
65
66G4HadronElasticPhysicsLHEP::~G4HadronElasticPhysicsLHEP()
67{}
68
69void G4HadronElasticPhysicsLHEP::ConstructParticle()
70{
71// G4cout << "G4HadronElasticPhysicsLHEP::ConstructParticle" << G4endl;
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 G4HadronElasticPhysicsLHEP::ConstructProcess()
84{
85 if(wasActivated) return;
86 wasActivated = true;
87
88 if(verbose > 1) {
89 G4cout << "### HadronElasticPhysicsLHEP Construct Processes"
90 << G4endl;
91 }
92 G4HadronicProcess* hel = 0;
93 G4HadronicInteraction* model = new G4LElastic();
94
95 theParticleIterator->reset();
96 while( (*theParticleIterator)() )
97 {
98 G4ParticleDefinition* particle = theParticleIterator->value();
99 G4ProcessManager* pmanager = particle->GetProcessManager();
100 G4String pname = particle->GetParticleName();
101 if(pname == "anti_lambda" ||
102 pname == "anti_neutron" ||
103 pname == "anti_omega-" ||
104 pname == "anti_proton" ||
105 pname == "anti_sigma-" ||
106 pname == "anti_sigma+" ||
107 pname == "anti_xi-" ||
108 pname == "anti_xi0" ||
109 pname == "kaon-" ||
110 pname == "kaon+" ||
111 pname == "kaon0S" ||
112 pname == "kaon0L" ||
113 pname == "lambda" ||
114 pname == "omega-" ||
115 pname == "sigma-" ||
116 pname == "sigma+" ||
117 pname == "xi-" ||
118 pname == "neutron" ||
119 pname == "proton" ||
120 pname == "pi+" ||
121 pname == "pi-" ||
122 pname == "alpha" ||
123 pname == "deuteron" ||
124 pname == "triton") {
125
126 hel = new G4HadronElasticProcess("hElasticLHEP");
127 hel->RegisterMe(model);
128 pmanager->AddDiscreteProcess(hel);
129 if(verbose > 1) {
130 G4cout << "### HadronElasticPhysicsLHEP added for "
131 << particle->GetParticleName() << G4endl;
132 }
133 }
134 }
135}
136
137
Note: See TracBrowser for help on using the repository browser.