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] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/cross_sections/src/G4ChipsComponentXS.cc (Version 11.3.0) and /processes/hadronic/cross_sections/src/G4ChipsComponentXS.cc (Version 5.0.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //  Calculation of the total, elastic and inel    
 27 //  of hadron (proton, neutron, pi+, pi-, K+,     
 28 //  interactions with nuclei based on CHIPS mo    
 29 //                                                
 30 //   Created by V. Uzhinsky, 31.05.2011           
 31 //  Copied to hadronic/cross_sections by W. Po    
 32                                                   
 33 #include "G4ChipsComponentXS.hh"                  
 34                                                   
 35 #include "G4SystemOfUnits.hh"                     
 36 #include "G4ParticleTable.hh"                     
 37 #include "G4IonTable.hh"                          
 38 #include "G4ParticleDefinition.hh"                
 39                                                   
 40 #include "G4CrossSectionDataSetRegistry.hh"       
 41                                                   
 42 //////////////////////////////////////////////    
 43                                                   
 44                                                   
 45 G4ChipsComponentXS::G4ChipsComponentXS():G4VCo    
 46            fLowerLimit( 10 * MeV )                
 47 {                                                 
 48   PxsManagerEl      = (G4ChipsProtonElasticXS*    
 49   PxsManagerInEl    = (G4ChipsProtonInelasticX    
 50                                                   
 51   NxsManagerEl      = (G4ChipsNeutronElasticXS    
 52   NxsManagerInEl    = (G4ChipsNeutronInelastic    
 53                                                   
 54   PBARxsManagerEl   = (G4ChipsAntiBaryonElasti    
 55   PBARxsManagerInEl = (G4ChipsAntiBaryonInelas    
 56                                                   
 57   PIPxsManagerEl    = (G4ChipsPionPlusElasticX    
 58   PIPxsManagerInEl  = (G4ChipsPionPlusInelasti    
 59                                                   
 60   PIMxsManagerEl    = (G4ChipsPionMinusElastic    
 61   PIMxsManagerInEl  = (G4ChipsPionMinusInelast    
 62                                                   
 63   KPxsManagerEl     = (G4ChipsKaonPlusElasticX    
 64   KPxsManagerInEl   = (G4ChipsKaonPlusInelasti    
 65                                                   
 66   KMxsManagerEl     = (G4ChipsKaonMinusElastic    
 67   KMxsManagerInEl   = (G4ChipsKaonMinusInelast    
 68                                                   
 69   KZxsManagerEl     = (G4ChipsKaonZeroElasticX    
 70   KZxsManagerInEl   = (G4ChipsKaonZeroInelasti    
 71                                                   
 72   HxsManagerEl     = (G4ChipsHyperonElasticXS*    
 73   HxsManagerInEl   = (G4ChipsHyperonInelasticX    
 74 }                                                 
 75                                                   
 76 //////////////////////////////////////////////    
 77 G4ChipsComponentXS::~G4ChipsComponentXS()         
 78 {                                                 
 79 }                                                 
 80                                                   
 81 //////////////////////////////////////////////    
 82 G4double G4ChipsComponentXS::GetTotalElementCr    
 83 (const G4ParticleDefinition* aParticle, G4doub    
 84 {                                                 
 85   G4double momentum = std::sqrt(kinEnergy*(kin    
 86   G4int PDGcode=aParticle->GetPDGEncoding();      
 87                                                   
 88   G4double Xelastic(0.), Xinelastic(0.);          
 89                                                   
 90   if     (PDGcode == 2212)   // Projectile is     
 91   {                                               
 92    Xelastic   = PxsManagerEl->GetChipsCrossSec    
 93    Xinelastic = PxsManagerInEl->GetChipsCrossS    
 94   } else if(PDGcode == 2112)  // Projectile is    
 95   {                                               
 96    Xelastic = NxsManagerEl->GetChipsCrossSecti    
 97    Xinelastic = NxsManagerInEl->GetChipsCrossS    
 98   } else if(PDGcode == -2212) // Projectile is    
 99   {                                               
100    Xelastic = PBARxsManagerEl->GetChipsCrossSe    
101    Xinelastic = PBARxsManagerInEl->GetChipsCro    
102   } else if(PDGcode == -2112) // Projectile is    
103   {                                               
104    Xelastic = PBARxsManagerEl->GetChipsCrossSe    
105    Xinelastic = PBARxsManagerInEl->GetChipsCro    
106   }else if(PDGcode == -3122 || PDGcode == -322    
107      || PDGcode == -3312  || PDGcode == -3334)    
108   {                                               
109    Xelastic = PBARxsManagerEl->GetChipsCrossSe    
110    Xinelastic = PBARxsManagerInEl->GetChipsCro    
111   } else if(PDGcode ==   211) // Projectile is    
112   {                                               
113    Xelastic = PIPxsManagerEl->GetChipsCrossSec    
114    Xinelastic = PIPxsManagerInEl->GetChipsCros    
115   } else if(PDGcode ==  -211) // Projectile is    
116   {                                               
117    Xelastic = PIMxsManagerEl->GetChipsCrossSec    
118    Xinelastic = PIMxsManagerInEl->GetChipsCros    
119   } else if(PDGcode ==  321)  // Projectile is    
120   {                                               
121    Xelastic = KPxsManagerEl->GetChipsCrossSect    
122    Xinelastic = KPxsManagerInEl->GetChipsCross    
123   } else if(PDGcode ==  -321) // Projectile is    
124   {                                               
125    Xelastic = KMxsManagerEl->GetChipsCrossSect    
126    Xinelastic = KMxsManagerInEl->GetChipsCross    
127   } else if(PDGcode ==  130 || PDGcode ==  310    
128   {                                               
129    Xelastic = KZxsManagerEl->GetChipsCrossSect    
130    Xinelastic = KZxsManagerInEl->GetChipsCross    
131   }else if(PDGcode ==   3122 || PDGcode ==  32    
132      || PDGcode ==   3312 || PDGcode ==  3322     
133   {                                               
134    Xelastic = HxsManagerEl->GetChipsCrossSecti    
135    Xinelastic = HxsManagerInEl->GetChipsCrossS    
136   }                                               
137                                                   
138   return Xelastic+Xinelastic;                     
139 }                                                 
140                                                   
141 //////////////////////////////////////////////    
142 G4double G4ChipsComponentXS::GetTotalIsotopeCr    
143 (const G4ParticleDefinition* aParticle, G4doub    
144 { return GetTotalElementCrossSection(aParticle    
145                                                   
146 //////////////////////////////////////////////    
147 G4double G4ChipsComponentXS::GetInelasticEleme    
148 (const G4ParticleDefinition* aParticle, G4doub    
149 {                                                 
150   G4double momentum = std::sqrt(kinEnergy*(kin    
151   G4int PDGcode=aParticle->GetPDGEncoding();      
152                                                   
153   G4double Xinelastic(0.);                        
154                                                   
155   if     (PDGcode == 2212)   // Projectile is     
156   {                                               
157    Xinelastic = PxsManagerInEl->GetChipsCrossS    
158   } else if(PDGcode == 2112)  // Projectile is    
159   {                                               
160    Xinelastic = NxsManagerInEl->GetChipsCrossS    
161   } else if(PDGcode == -2212) // Projectile is    
162   {                                               
163    Xinelastic = PBARxsManagerInEl->GetChipsCro    
164   } else if(PDGcode == -2112) // Projectile is    
165   {                                               
166    Xinelastic = PBARxsManagerInEl->GetChipsCro    
167   } else if(PDGcode ==   211) // Projectile is    
168   {                                               
169    Xinelastic = PIPxsManagerInEl->GetChipsCros    
170   } else if(PDGcode ==  -211) // Projectile is    
171   {                                               
172    Xinelastic = PIMxsManagerInEl->GetChipsCros    
173   } else if(PDGcode ==  321)  // Projectile is    
174   {                                               
175    Xinelastic = KPxsManagerInEl->GetChipsCross    
176   } else if(PDGcode ==  -321) // Projectile is    
177   {                                               
178    Xinelastic = KMxsManagerInEl->GetChipsCross    
179   }                                               
180                                                   
181   return Xinelastic;                              
182 }                                                 
183                                                   
184 //////////////////////////////////////////////    
185 G4double G4ChipsComponentXS::GetInelasticIsoto    
186 (const G4ParticleDefinition* aParticle, G4doub    
187 {return GetInelasticElementCrossSection(aParti    
188                                                   
189 //////////////////////////////////////////////    
190 G4double G4ChipsComponentXS::GetElasticElement    
191 (const G4ParticleDefinition* aParticle, G4doub    
192 {                                                 
193   G4double momentum = std::sqrt(kinEnergy*(kin    
194   G4int PDGcode=aParticle->GetPDGEncoding();      
195                                                   
196   G4double Xelastic(0.);                          
197                                                   
198   if     (PDGcode == 2212)   // Projectile is     
199   {                                               
200    Xelastic=PxsManagerEl->GetChipsCrossSection    
201   } else if(PDGcode == 2112)  // Projectile is    
202   {                                               
203    Xelastic=NxsManagerEl->GetChipsCrossSection    
204   } else if(PDGcode == -2212) // Projectile is    
205   {                                               
206    Xelastic=PBARxsManagerEl->GetChipsCrossSect    
207   } else if(PDGcode == -2112) // Projectile is    
208   {                                               
209    Xelastic=PBARxsManagerEl->GetChipsCrossSect    
210   } else if(PDGcode ==   211) // Projectile is    
211   {                                               
212    Xelastic=PIPxsManagerEl->GetChipsCrossSecti    
213   } else if(PDGcode ==  -211) // Projectile is    
214   {                                               
215    Xelastic=PIMxsManagerEl->GetChipsCrossSecti    
216   } else if(PDGcode ==  321)  // Projectile is    
217   {                                               
218    Xelastic=KPxsManagerEl->GetChipsCrossSectio    
219   } else if(PDGcode ==  -321) // Projectile is    
220   {                                               
221    Xelastic=KMxsManagerEl->GetChipsCrossSectio    
222   }                                               
223   return Xelastic;                                
224 }                                                 
225                                                   
226 //////////////////////////////////////////////    
227 G4double G4ChipsComponentXS::GetElasticIsotope    
228 (const G4ParticleDefinition* aParticle, G4doub    
229 { return GetElasticElementCrossSection(aPartic    
230