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10.4.p3 ] [ 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/G4ComponentBarNucleonNucleusXsc.cc (Version 11.3.0) and /processes/hadronic/cross_sections/src/G4ComponentBarNucleonNucleusXsc.cc (Version 4.0)


  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 // author: Vladimir.Grichine@cern.ch              
 27 //                                                
 28 // Implements data from: Barashenkov V.S., Nuc    
 29 // Preprint JINR P2-89-770, p. 12, Dubna 1989     
 30 // Based on G4NucleonNuclearCrossSection class    
 31 //                                                
 32 //                                                
 33                                                   
 34 #include "G4ComponentBarNucleonNucleusXsc.hh"     
 35 #include "G4SystemOfUnits.hh"                     
 36 #include "G4DynamicParticle.hh"                   
 37 #include "G4Neutron.hh"                           
 38 #include "G4Proton.hh"                            
 39 #include "G4Pow.hh"                               
 40 #include "G4BarashenkovData.hh"                   
 41 #include "G4IsotopeList.hh"                       
 42 #include "G4HadronXSDataTable.hh"                 
 43                                                   
 44 //////////////////////////////////////////////    
 45                                                   
 46 G4double G4ComponentBarNucleonNucleusXsc::A75[    
 47 G4int G4ComponentBarNucleonNucleusXsc::theZ[]     
 48 {2,4,6,7,8,11,13,14,20,26,29,42,48,50,74,82,92    
 49 std::vector<G4PiData*>* G4ComponentBarNucleonN    
 50 std::vector<G4PiData*>* G4ComponentBarNucleonN    
 51                                                   
 52 G4ComponentBarNucleonNucleusXsc::G4ComponentBa    
 53  : G4VComponentCrossSection("BarashenkovNucleo    
 54 {                                                 
 55   theNeutron = G4Neutron::Neutron();              
 56   theProton  = G4Proton::Proton();                
 57   if (nullptr == thePData) {                      
 58     LoadData();                                   
 59   }                                               
 60 }                                                 
 61                                                   
 62 //////////////////////////////////////////////    
 63                                                   
 64 G4double G4ComponentBarNucleonNucleusXsc::GetT    
 65          const G4ParticleDefinition* aParticle    
 66    G4double kinEnergy, G4int Z, G4int)            
 67 {                                                 
 68   ComputeCrossSections(aParticle, kinEnergy, Z    
 69   return fTotalXsc;                               
 70 }                                                 
 71                                                   
 72 //////////////////////////////////////////////    
 73                                                   
 74 G4double G4ComponentBarNucleonNucleusXsc::GetT    
 75          const G4ParticleDefinition* aParticle    
 76    G4double kinEnergy, G4int Z, G4double)         
 77 {                                                 
 78   ComputeCrossSections(aParticle, kinEnergy, Z    
 79   return fTotalXsc;                               
 80 }                                                 
 81                                                   
 82 //////////////////////////////////////////////    
 83                                                   
 84 G4double G4ComponentBarNucleonNucleusXsc::GetI    
 85          const G4ParticleDefinition* aParticle    
 86    G4double kinEnergy, G4int Z, G4int)            
 87 {                                                 
 88   ComputeCrossSections(aParticle, kinEnergy, Z    
 89   return fInelasticXsc;                           
 90 }                                                 
 91                                                   
 92 //////////////////////////////////////////////    
 93                                                   
 94 G4double G4ComponentBarNucleonNucleusXsc::GetI    
 95          const G4ParticleDefinition* aParticle    
 96    G4double kinEnergy, G4int Z, G4double)         
 97 {                                                 
 98   ComputeCrossSections(aParticle, kinEnergy, Z    
 99   return fInelasticXsc;                           
100 }                                                 
101                                                   
102 //////////////////////////////////////////////    
103                                                   
104 G4double G4ComponentBarNucleonNucleusXsc::GetE    
105          const G4ParticleDefinition* aParticle    
106    G4double kinEnergy, G4int Z, G4double)         
107 {                                                 
108   ComputeCrossSections(aParticle, kinEnergy, Z    
109   return fElasticXsc;                             
110 }                                                 
111                                                   
112 //////////////////////////////////////////////    
113                                                   
114 G4double G4ComponentBarNucleonNucleusXsc::GetE    
115          const G4ParticleDefinition* aParticle    
116    G4double kinEnergy, G4int Z, G4int)            
117 {                                                 
118   ComputeCrossSections(aParticle, kinEnergy, Z    
119   return fElasticXsc;                             
120 }                                                 
121                                                   
122 //////////////////////////////////////////////    
123                                                   
124 void G4ComponentBarNucleonNucleusXsc::ComputeC    
125      const G4ParticleDefinition* aParticle, G4    
126 {                                                 
127   G4int Z = std::min(ZZ, 92);                     
128   G4int it = 0;                                   
129   for(; it<NZ; ++it) { if(Z <= theZ[it]) { bre    
130   if( it >= NZ ) { it = NZ-1; }                   
131                                                   
132   std::vector<G4PiData*>* theData = (aParticle    
133                                                   
134   if( theZ[it] == Z ) {                           
135     fInelasticXsc = (*theData)[it]->ReactionXS    
136     fTotalXsc = (*theData)[it]->TotalXSection(    
137   } else {                                        
138     if(0 == it) { it = 1; }                       
139     G4double x1  = (*theData)[it-1]->ReactionX    
140     G4double xt1 = (*theData)[it-1]->TotalXSec    
141     G4double x2  = (*theData)[it]->ReactionXSe    
142     G4double xt2 = (*theData)[it]->TotalXSecti    
143     G4int Z1 = theZ[it-1];                        
144     G4int Z2 = theZ[it];                          
145                                                   
146     fInelasticXsc = Interpolate(Z1, Z2, Z, x1,    
147     fTotalXsc = Interpolate(Z1, Z2, Z, xt1, xt    
148   }                                               
149                                                   
150   fElasticXsc = std::max(fTotalXsc - fInelasti    
151 }                                                 
152                                                   
153 //////////////////////////////////////////////    
154                                                   
155 G4double G4ComponentBarNucleonNucleusXsc::        
156 Interpolate(G4int Z1, G4int Z2, G4int Z, G4dou    
157 {                                                 
158   // for tabulated data, cross section scales     
159   G4double r1 = x1* A75[Z] / A75[Z1];             
160   G4double r2 = x2* A75[Z] / A75[Z2];             
161   G4double alp1 = (aeff[Z] - aeff[Z1]);           
162   G4double alp2 = (aeff[Z2] - aeff[Z]);           
163   G4double result = (r1*alp2 + r2*alp1)/(alp1     
164   //       G4cout << "x1/2, z1/2 z" <<x1<<" "<    
165   //       G4cout << "res1/2 " << r1 <<" " <<     
166   return result;                                  
167 }                                                 
168                                                   
169 //////////////////////////////////////////////    
170                                                   
171 void G4ComponentBarNucleonNucleusXsc::Descript    
172 {                                                 
173   outFile << "G4ComponentBarNucleonNucleusXsc     
174           << "cross section parameterization t    
175           << "neutrons on targets heavier than    
176           << "use as a cross section component    
177           << "G4BGGNucleonInelasticXS.  It is     
178           << "to 1 TeV.\n";                       
179 }                                                 
180                                                   
181 //////////////////////////////////////////////    
182                                                   
183 void G4ComponentBarNucleonNucleusXsc::LoadData    
184 {                                                 
185   theNData = new std::vector<G4PiData*>;          
186   thePData = new std::vector<G4PiData*>;          
187   theNData->resize(NZ, nullptr);                  
188   thePData->resize(NZ, nullptr);                  
189   auto ptr = G4HadronXSDataTable::Instance();     
190   ptr->AddPiData(theNData);                       
191   ptr->AddPiData(thePData);                       
192                                                   
193   // He, Be, C                                    
194   (*theNData)[0] = new G4PiData(he_m_t, he_m_i    
195   (*thePData)[0] = new G4PiData(he_m_t, he_p_i    
196                                                   
197   (*theNData)[1] = new G4PiData(be_m_t, be_m_i    
198   (*thePData)[1] = new G4PiData(be_m_t, be_p_i    
199                                                   
200   (*theNData)[2] = new G4PiData(c_m_t,  c_m_in    
201   (*thePData)[2] = new G4PiData(c_m_t,  c_p_in    
202                                                   
203   // N, O, Na                                     
204   (*theNData)[3] = new G4PiData(n_m_t,  n_m_in    
205   (*thePData)[3] = new G4PiData(n_m_t,  n_p_in    
206                                                   
207   (*theNData)[4] = new G4PiData(o_m_t,  o_m_in    
208   (*thePData)[4] = new G4PiData(o_m_t,  o_p_in    
209                                                   
210   (*theNData)[5] = new G4PiData(na_m_t, na_m_i    
211   (*thePData)[5] = new G4PiData(na_m_t, na_p_i    
212                                                   
213   // Al, Si, Ca                                   
214   (*theNData)[6] = new G4PiData(al_m_t, al_m_i    
215   (*thePData)[6] = new G4PiData(al_m_t, al_p_i    
216                                                   
217   (*theNData)[7] = new G4PiData(si_m_t, si_m_i    
218   (*thePData)[7] = new G4PiData(si_m_t, si_p_i    
219                                                   
220   (*theNData)[8] = new G4PiData(ca_m_t, ca_m_i    
221   (*thePData)[8] = new G4PiData(ca_m_t, ca_p_i    
222                                                   
223   // Fe, Cu, Mo                                   
224   (*theNData)[9] = new G4PiData(fe_m_t, fe_m_i    
225   (*thePData)[9] = new G4PiData(fe_m_t, fe_p_i    
226                                                   
227   (*theNData)[10] = new G4PiData(cu_m_t, cu_m_    
228   (*thePData)[10] = new G4PiData(cu_m_t, cu_p_    
229                                                   
230   (*theNData)[11] = new G4PiData(mo_m_t, mo_m_    
231   (*thePData)[11] = new G4PiData(mo_m_t, mo_p_    
232                                                   
233   // Cd, Sn, W                                    
234   (*theNData)[12] = new G4PiData(cd_m_t, cd_m_    
235   (*thePData)[12] = new G4PiData(cd_m_t, cd_p_    
236                                                   
237   (*theNData)[13] = new G4PiData(sn_m_t, sn_m_    
238   (*thePData)[13] = new G4PiData(sn_m_t, sn_p_    
239                                                   
240   (*theNData)[14] = new G4PiData(w_m_t,  w_m_i    
241   (*thePData)[14] = new G4PiData(w_m_t,  w_p_i    
242                                                   
243   // Pb, U                                        
244   (*theNData)[15] = new G4PiData(pb_m_t, pb_m_    
245   (*thePData)[15] = new G4PiData(pb_m_t, pb_p_    
246                                                   
247   (*theNData)[16] = new G4PiData(u_m_t,  u_m_i    
248   (*thePData)[16] = new G4PiData(u_m_t,  u_p_i    
249                                                   
250   A75[0] = 1.0;                                   
251   G4Pow* g4pow = G4Pow::GetInstance();            
252   for(G4int i=1; i<93; ++i) {                     
253     A75[i] = g4pow->A23(aeff[i]); // interpola    
254   }                                               
255 }                                                 
256                                                   
257 //////////////////////////////////////////////    
258