Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ChipsComponentXS.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 // Calculation of the total, elastic and inelastic cross-sections
27 // of hadron (proton, neutron, pi+, pi-, K+, K-, anti_proton, anti_neutron
28 // interactions with nuclei based on CHIPS model
29 //
30 // Created by V. Uzhinsky, 31.05.2011
31 // Copied to hadronic/cross_sections by W. Pokorski
32 
33 #include "G4ChipsComponentXS.hh"
34 
35 #include "G4SystemOfUnits.hh"
36 #include "G4ParticleTable.hh"
37 #include "G4IonTable.hh"
38 #include "G4ParticleDefinition.hh"
39 
41 
42 ///////////////////////////////////////////////////////////////////////////////
43 
44 
45 G4ChipsComponentXS::G4ChipsComponentXS():G4VComponentCrossSection("G4ChipsComponentXS"), fUpperLimit( 10000 * GeV ),
46  fLowerLimit( 10 * MeV )
47 {
50 
53 
56 
59 
62 
65 
68 
71 
74 }
75 
76 ///////////////////////////////////////////////////////////////////////////////////////
78 {
79 }
80 
81 ////////////////////////////////////////////////////////////////////////////////
83 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
84 {
85  G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
86  G4int PDGcode=aParticle->GetPDGEncoding();
87 
88  G4double Xelastic(0.), Xinelastic(0.);
89 
90  if (PDGcode == 2212) // Projectile is Proton
91  {
92  Xelastic = PxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
93  Xinelastic = PxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
94  } else if(PDGcode == 2112) // Projectile is Neutron
95  {
96  Xelastic = NxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
97  Xinelastic = NxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
98  } else if(PDGcode == -2212) // Projectile is Anti-Proton
99  {
100  Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
101  Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
102  } else if(PDGcode == -2112) // Projectile is Anti-Neutron
103  {
104  Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
105  Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
106  }else if(PDGcode == -3122 || PDGcode == -3222 || PDGcode == -3212 || PDGcode == -3112 || PDGcode == -3322
107  || PDGcode == -3312 || PDGcode == -3334) // Projectile is other Anti-baryon
108  {
109  Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
110  Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
111  } else if(PDGcode == 211) // Projectile is Pi+
112  {
113  Xelastic = PIPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
114  Xinelastic = PIPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
115  } else if(PDGcode == -211) // Projectile is Pi-
116  {
117  Xelastic = PIMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
118  Xinelastic = PIMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
119  } else if(PDGcode == 321) // Projectile is K+
120  {
121  Xelastic = KPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
122  Xinelastic = KPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
123  } else if(PDGcode == -321) // Projectile is K-
124  {
125  Xelastic = KMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
126  Xinelastic = KMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
127  } else if(PDGcode == 130 || PDGcode == 310 || PDGcode == 311 || PDGcode == -311) // Projectile is K0
128  {
129  Xelastic = KZxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
130  Xinelastic = KZxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
131  }else if(PDGcode == 3122 || PDGcode == 3222 || PDGcode == 3112 || PDGcode == 3212
132  || PDGcode == 3312 || PDGcode == 3322 || PDGcode == 3334) // Projectile is hyperon
133  {
134  Xelastic = HxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
135  Xinelastic = HxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
136  }
137 
138  return Xelastic+Xinelastic;
139 }
140 
141 ////////////////////////////////////////////////////////////////////////////////
143 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A )
144 { return GetTotalElementCrossSection(aParticle, kinEnergy, Z, (G4double) A); }
145 
146 ////////////////////////////////////////////////////////////////////////////////
148 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
149 {
150  G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
151  G4int PDGcode=aParticle->GetPDGEncoding();
152 
153  G4double Xinelastic(0.);
154 
155  if (PDGcode == 2212) // Projectile is Proton
156  {
157  Xinelastic = PxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
158  } else if(PDGcode == 2112) // Projectile is Neutron
159  {
160  Xinelastic = NxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
161  } else if(PDGcode == -2212) // Projectile is Anti-Proton
162  {
163  Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
164  } else if(PDGcode == -2112) // Projectile is Anti-Neutron
165  {
166  Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
167  } else if(PDGcode == 211) // Projectile is Pi+
168  {
169  Xinelastic = PIPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
170  } else if(PDGcode == -211) // Projectile is Pi-
171  {
172  Xinelastic = PIMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
173  } else if(PDGcode == 321) // Projectile is K+
174  {
175  Xinelastic = KPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
176  } else if(PDGcode == -321) // Projectile is K-
177  {
178  Xinelastic = KMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);;
179  }
180 
181  return Xinelastic;
182 }
183 
184 ///////////////////////////////////////////////////////////////////////////////
186 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A)
187 {return GetInelasticElementCrossSection(aParticle, kinEnergy, Z, (G4double) A); }
188 
189 ///////////////////////////////////////////////////////////////////////////////
191 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
192 {
193  G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
194  G4int PDGcode=aParticle->GetPDGEncoding();
195 
196  G4double Xelastic(0.);
197 
198  if (PDGcode == 2212) // Projectile is Proton
199  {
200  Xelastic=PxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
201  } else if(PDGcode == 2112) // Projectile is Neutron
202  {
203  Xelastic=NxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
204  } else if(PDGcode == -2212) // Projectile is Anti-Proton
205  {
206  Xelastic=PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
207  } else if(PDGcode == -2112) // Projectile is Anti-Neutron
208  {
209  Xelastic=PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
210  } else if(PDGcode == 211) // Projectile is Pi+
211  {
212  Xelastic=PIPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
213  } else if(PDGcode == -211) // Projectile is Pi-
214  {
215  Xelastic=PIMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
216  } else if(PDGcode == 321) // Projectile is K+
217  {
218  Xelastic=KPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
219  } else if(PDGcode == -321) // Projectile is K-
220  {
221  Xelastic=KMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
222  }
223  return Xelastic;
224 }
225 
226 ///////////////////////////////////////////////////////////////////////////////
228 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A)
229 { return GetElasticElementCrossSection(aParticle, kinEnergy, Z, (G4double) A); }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
virtual G4double GetElasticIsotopeCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int N)
int G4int
Definition: G4Types.hh:78
virtual G4double GetInelasticElementCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double N)
static const char * Default_Name()
static const char * Default_Name()
static G4CrossSectionDataSetRegistry * Instance()
static const char * Default_Name()
virtual G4double GetElasticElementCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double N)
virtual G4double GetInelasticIsotopeCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int N)
virtual G4double GetTotalIsotopeCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int N)
G4double GetPDGMass() const
static const char * Default_Name()
**D E S C R I P T I O N
static const char * Default_Name()
static const char * Default_Name()
virtual G4double GetTotalElementCrossSection(const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double N)
double G4double
Definition: G4Types.hh:76
static const char * Default_Name()