Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4HadronElasticPhysicsLHEP.cc
Go to the documentation of this file.
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$
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4HadronElasticPhysicsLHEP
31//
32// Author: 3 June 2010 V. Ivanchenko
33//
34// Modified:
35//
36//----------------------------------------------------------------------------
37//
38// LHEP x-sectios and sampling
39
41
42#include "G4HadronicProcess.hh"
45#include "G4LElastic.hh"
46
48#include "G4ProcessManager.hh"
49
50#include "G4MesonConstructor.hh"
52#include "G4IonConstructor.hh"
53#include "G4Neutron.hh"
54
55// factory
57//
59
60
62 : G4VPhysicsConstructor("hElasticLHEP"), verbose(ver),
63 wasActivated(false)
64{
65 if(verbose > 1) {
66 G4cout << "### G4HadronElasticPhysicsLHEP: " << GetPhysicsName()
67 << G4endl;
68 }
69}
70
72{}
73
75{
76// G4cout << "G4HadronElasticPhysicsLHEP::ConstructParticle" << G4endl;
77 G4MesonConstructor pMesonConstructor;
78 pMesonConstructor.ConstructParticle();
79
80 G4BaryonConstructor pBaryonConstructor;
81 pBaryonConstructor.ConstructParticle();
82
83 // Construct light ions
84 G4IonConstructor pConstructor;
85 pConstructor.ConstructParticle();
86}
87
89{
90 if(wasActivated) return;
91 wasActivated = true;
92
93 if(verbose > 1) {
94 G4cout << "### HadronElasticPhysicsLHEP Construct Processes"
95 << G4endl;
96 }
97 G4HadronicProcess* hel = 0;
98 G4HadronicInteraction* model = new G4LElastic();
99
101 while( (*theParticleIterator)() )
102 {
104 G4ProcessManager* pmanager = particle->GetProcessManager();
105 G4String pname = particle->GetParticleName();
106 if(pname == "anti_lambda" ||
107 pname == "anti_neutron" ||
108 pname == "anti_omega-" ||
109 pname == "anti_proton" ||
110 pname == "anti_sigma-" ||
111 pname == "anti_sigma+" ||
112 pname == "anti_xi-" ||
113 pname == "anti_xi0" ||
114 pname == "kaon-" ||
115 pname == "kaon+" ||
116 pname == "kaon0S" ||
117 pname == "kaon0L" ||
118 pname == "lambda" ||
119 pname == "omega-" ||
120 pname == "sigma-" ||
121 pname == "sigma+" ||
122 pname == "xi-" ||
123 pname == "neutron" ||
124 pname == "proton" ||
125 pname == "pi+" ||
126 pname == "pi-" ||
127 pname == "alpha" ||
128 pname == "deuteron" ||
129 pname == "triton") {
130
131 hel = new G4HadronElasticProcess();
132 hel->RegisterMe(model);
133 pmanager->AddDiscreteProcess(hel);
134 if(verbose > 1) {
135 G4cout << "### HadronElasticPhysicsLHEP added for "
136 << particle->GetParticleName() << G4endl;
137 }
138 }
139 }
140}
141
142
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetPhysicsName() const
G4ParticleTable::G4PTblDicIterator * theParticleIterator