source: trunk/source/physics_lists/builders/src/G4QElasticPhysics.cc@ 1325

Last change on this file since 1325 was 1316, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 4.1 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: G4QElasticPhysics.cc,v 1.2 2010/06/04 10:44:07 mkossov Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName: G4QElasticPhysics
32//
33// Author: 3 Nov 2010 M. Kosov
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4QElasticPhysics.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
56G4QElasticPhysics::G4QElasticPhysics(const G4String& name, G4int ver)
57 : G4VPhysicsConstructor(name), verbose(ver), wasActivated(false)
58{
59 if(verbose > 1) G4cout << "### QElasticPhysics is initialized" << G4endl;
60 model = 0;
61}
62
63void G4QElasticPhysics::ConstructParticle()
64{
65 G4MesonConstructor pMesonConstructor;
66 pMesonConstructor.ConstructParticle();
67
68 G4BaryonConstructor pBaryonConstructor;
69 pBaryonConstructor.ConstructParticle();
70
71 // Construct light ions
72 G4IonConstructor pConstructor;
73 pConstructor.ConstructParticle();
74}
75
76void G4QElasticPhysics::ConstructProcess()
77{
78 if(wasActivated) return;
79 wasActivated = true;
80
81 process = new G4QElastic();
82
83 theParticleIterator->reset();
84 while( (*theParticleIterator)() )
85 {
86 G4ParticleDefinition* particle = theParticleIterator->value();
87 G4String pname = particle->GetParticleName();
88 G4ProcessManager* pmanager = particle->GetProcessManager();
89 if(pname == "anti_neutron" ||
90 pname == "anti_proton" ||
91 pname == "anti_lambda" ||
92 pname == "anti_sigma-" ||
93 pname == "anti_sigma0" ||
94 pname == "anti_sigma+" ||
95 pname == "anti_xi-" ||
96 pname == "anti_xi0" ||
97 pname == "anti_omega-" ||
98 pname == "pi-" ||
99 pname == "pi+" ||
100 pname == "kaon-" ||
101 pname == "kaon+" ||
102 pname == "kaon0S" ||
103 pname == "kaon0L" ||
104 pname == "lambda" ||
105 pname == "sigma-" ||
106 pname == "sigma0" ||
107 pname == "sigma+" ||
108 pname == "xi-" ||
109 pname == "xi0" ||
110 pname == "omega-" )
111 {
112 pmanager->AddDiscreteProcess(process);
113 if(verbose>0) G4cout<<"### G4QElastic process is added for particle="<<pname<<G4endl;
114 }
115 }
116}
117
118
Note: See TracBrowser for help on using the repository browser.