Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronQElasticPhysics.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: G4HadronQElasticPhysics
31 //
32 // Author: 17 Nov 2006 V.Ivanchenko
33 //
34 // Modified:
35 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
36 // 01.11.2012 A.Ribon: use G4AntiNuclElastic for light anti-ions.
37 //
38 //----------------------------------------------------------------------------
39 //
40 // CHIPS x-sections and generator (G4QElastic) for n and p
41 // LHEP x-section and generator for the rest
42 
44 
46 #include "G4HadronicInteraction.hh"
47 #include "G4HadronElastic.hh"
48 #include "G4QElastic.hh"
49 #include "G4AntiNuclElastic.hh"
50 
51 #include "G4VQCrossSection.hh"
52 
53 #include "G4ParticleDefinition.hh"
54 #include "G4ProcessManager.hh"
55 
56 #include "G4MesonConstructor.hh"
57 #include "G4BaryonConstructor.hh"
58 #include "G4IonConstructor.hh"
59 
61 #include "G4CrossSectionElastic.hh"
62 
63 // factory
65 //
67 
68 
70  : G4VPhysicsConstructor("hElasticCHIPS_LHEP"), verbose(ver),
71  wasActivated(false)
72 {
73  if(verbose > 1) {
74  G4cout << "### G4HadronQElasticPhysics: " << GetPhysicsName()
75  << G4endl;
76  }
77 }
78 
80  : G4VPhysicsConstructor("hElasticCHIPS_LHEP"), verbose(ver),
81  wasActivated(false)
82 {
83  if(verbose > 1) {
84  G4cout << "### G4HadronQElasticPhysics: " << GetPhysicsName()
85  << G4endl;
86  }
87 }
88 
90 {}
91 
93 {
94  G4MesonConstructor pMesonConstructor;
95  pMesonConstructor.ConstructParticle();
96 
97  G4BaryonConstructor pBaryonConstructor;
98  pBaryonConstructor.ConstructParticle();
99 
100  // Construct light ions
101  G4IonConstructor pConstructor;
102  pConstructor.ConstructParticle();
103 }
104 
106 {
107  if(wasActivated) { return; }
108  wasActivated = true;
109 
110  if(verbose > 1) {
111  G4cout << "### HadronQElasticPhysics::ConstructProcess" << G4endl;
112  }
113 
114  G4HadronElastic* lhep0 = new G4HadronElastic();
115  G4HadronElastic* lhep1 = new G4HadronElastic();
116  G4double elimitAntiNuc = 100*CLHEP::MeV;
117  lhep1->SetMaxEnergy(elimitAntiNuc);
118  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
119  anuc->SetMinEnergy(elimitAntiNuc);
120  G4CrossSectionElastic* anucxs =
122 
124  while( (*theParticleIterator)() )
125  {
127  G4ProcessManager* pmanager = particle->GetProcessManager();
128  G4String pname = particle->GetParticleName();
129  if(pname == "anti_lambda" ||
130  pname == "anti_neutron" ||
131  pname == "anti_omega-" ||
132  pname == "anti_sigma-" ||
133  pname == "anti_sigma+" ||
134  pname == "anti_xi-" ||
135  pname == "anti_xi0" ||
136  pname == "kaon-" ||
137  pname == "kaon+" ||
138  pname == "kaon0S" ||
139  pname == "kaon0L" ||
140  pname == "lambda" ||
141  pname == "omega-" ||
142  pname == "pi-" ||
143  pname == "pi+" ||
144  pname == "sigma-" ||
145  pname == "sigma+" ||
146  pname == "xi-" ||
147  pname == "alpha" ||
148  pname == "deuteron" ||
149  pname == "triton"
150  ) {
151 
153  hel->RegisterMe(lhep0);
154  pmanager->AddDiscreteProcess(hel);
155 
156  } else if(pname == "neutron" || pname == "proton") {
157 
158  G4QElastic* process = new G4QElastic();
159  pmanager->AddDiscreteProcess(process);
160 
161  if(verbose > 0)
162  G4cout << "### QElastic added for "
163  << particle->GetParticleName() << G4endl;
164 
165  } else if(
166  pname == "anti_proton" ||
167  pname == "anti_alpha" ||
168  pname == "anti_deuteron" ||
169  pname == "anti_triton" ||
170  pname == "anti_He3"
171  ) {
172 
174  hel->AddDataSet(anucxs);
175  hel->RegisterMe(lhep1);
176  hel->RegisterMe(anuc);
177  pmanager->AddDiscreteProcess(hel);
178 
179  }
180 
181  }
182 }