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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/models/lend/src/G4LENDCrossSection.cc (Version 11.3.0) and /processes/hadronic/models/lend/src/G4LENDCrossSection.cc (Version 7.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 // Class Description                              
 27 // Cross Section for LEND (Low Energy Nuclear     
 28 // LEND is Geant4 interface for GIDI (General     
 29 // which gives a discription of nuclear and at    
 30 //    Binary collision cross sections             
 31 //    Particle number multiplicity distributio    
 32 //    Energy and angular distributions of reac    
 33 //    Derived calculational constants             
 34 // GIDI is developped at Lawrence Livermore Na    
 35 // Class Description - End                        
 36                                                   
 37 // 071025 First implementation done by T. Koi     
 38 // 101118 Name modifications for release T. Ko    
 39                                                   
 40 #include "G4LENDCrossSection.hh"                  
 41 #include "G4Pow.hh"                               
 42 #include "G4SystemOfUnits.hh"                     
 43 #include "G4ElementTable.hh"                      
 44 #include "G4HadronicException.hh"                 
 45                                                   
 46 G4bool G4LENDCrossSection::IsIsoApplicable( co    
 47                                             co    
 48 {                                                 
 49    G4double eKin = dp->GetKineticEnergy();        
 50    if ( dp->GetDefinition() != proj ) return f    
 51    if ( eKin > GetMaxKinEnergy() || eKin < Get    
 52                                                   
 53    //G4cout << "G4LENDCrossSection::GetIsoIsIs    
 54    //Check existence of target data               
 55    if ( element != NULL ) {                       
 56       if ( element->GetNumberOfIsotopes() != 0    
 57          std::vector< const G4Isotope*> vIsoto    
 58          for ( G4int i = 0 ; i != (G4int)eleme    
 59             if ( element->GetIsotope( i )->Get    
 60          }                                        
 61          for ( std::size_t i = 0 ; i != vIsoto    
 62             G4int iM = vIsotope[i]->Getm();       
 63             if ( get_target_from_map( lend_man    
 64          }                                        
 65          //No isomer has data                     
 66          //Check natural aboundance data for t    
 67          if ( get_target_from_map( lend_manage    
 68       } else {                                    
 69          //Check for iZ and iA under assuming     
 70          if ( get_target_from_map( lend_manage    
 71          //Check natural aboundance data for t    
 72          if ( get_target_from_map( lend_manage    
 73       }                                           
 74    } else {                                       
 75       //Check for iZ and iA under assuming iM     
 76       if ( get_target_from_map( lend_manager->    
 77       //Check natural aboundance data for iZ      
 78       if ( get_target_from_map( lend_manager->    
 79    }                                              
 80    return false;                                  
 81 }                                                 
 82                                                   
 83 G4double G4LENDCrossSection::GetIsoCrossSectio    
 84                                                   
 85 {                                                 
 86                                                   
 87    G4double xs = 0.0;                             
 88    G4double ke = dp->GetKineticEnergy();          
 89    G4double temp = material->GetTemperature();    
 90    G4int iM = 0;                                  
 91    if ( isotope != NULL ) iM = isotope->Getm()    
 92                                                   
 93    G4GIDI_target* aTarget = get_target_from_ma    
 94    if ( aTarget == NULL ) {                       
 95       G4String message;                           
 96       message = this->GetName();                  
 97       message += " is unexpectedly called.";      
 98       //G4Exception( "G4LEND::GetIsoCrossSecti    
 99       G4Exception( "G4LEND::GetIsoCrossSection    
100                   message );                      
101    }                                              
102    xs = getLENDCrossSection ( aTarget , ke , t    
103                                                   
104    return xs;                                     
105 }                                                 
106                                                   
107                                                   
108 /*                                                
109 G4bool G4LENDCrossSection::IsApplicable(const     
110 {                                                 
111    G4bool result = true;                          
112    G4double eKin = aP->GetKineticEnergy();        
113    if( eKin > GetMaxKinEnergy() || aP->GetDefi    
114    return result;                                 
115 }                                                 
116 */                                                
117                                                   
118 G4LENDCrossSection::G4LENDCrossSection( const     
119 :G4VCrossSectionDataSet( nam )                    
120 {                                                 
121                                                   
122    proj = NULL; //will be set in an inherited     
123    //default_evaluation = "endl99";               
124    //default_evaluation = "ENDF.B-VII.0";         
125    default_evaluation = "ENDF/BVII.1";            
126                                                   
127    allow_nat = false;                             
128    allow_any = false;                             
129                                                   
130    SetMinKinEnergy(  0*MeV );                     
131    SetMaxKinEnergy( 20*MeV );                     
132                                                   
133    lend_manager = G4LENDManager::GetInstance()    
134                                                   
135 }                                                 
136                                                   
137 G4LENDCrossSection::~G4LENDCrossSection()         
138 {                                                 
139                                                   
140    for ( std::map< G4int , G4LENDUsedTarget* >    
141          it = usedTarget_map.begin() ; it != u    
142    {                                              
143       delete it->second;                          
144    }                                              
145                                                   
146 }                                                 
147                                                   
148 void G4LENDCrossSection::BuildPhysicsTable( co    
149 {                                                 
150    create_used_target_map();                      
151 }                                                 
152                                                   
153 void G4LENDCrossSection::DumpPhysicsTable(cons    
154 {                                                 
155                                                   
156   if ( &aP != proj )                              
157      throw G4HadronicException(__FILE__, __LIN    
158                                                   
159    G4cout << G4endl;                              
160    G4cout << "Dump Cross Sections of " << GetN    
161    G4cout << "(Pointwise cross-section at 300     
162    G4cout << G4endl;                              
163                                                   
164    G4cout << "Target informaiton " << G4endl;     
165                                                   
166    for ( std::map< G4int , G4LENDUsedTarget* >    
167          it = usedTarget_map.begin() ; it != u    
168    {                                              
169       G4cout                                      
170          << "Wanted " << it->second->GetWanted    
171          << ", Z= " << it->second->GetWantedZ(    
172          << ", A= " << it->second->GetWantedA(    
173          << "; Actual " << it->second->GetActu    
174          << ", Z= " << it->second->GetActualZ(    
175          << ", A= " << it->second->GetActualA(    
176          << ", " << it->second->GetTarget()       
177          << G4endl;                               
178                                                   
179       G4int ie = 0;                               
180                                                   
181       G4GIDI_target* aTarget = it->second->Get    
182       G4double aT = 300;                          
183       for ( ie = 0 ; ie < 130 ; ie++ )            
184       {                                           
185          G4double ke = 1.0e-5 * G4Pow::GetInst    
186                                                   
187          if ( ke < 20*MeV )                       
188          {                                        
189             G4cout << "  " << GetName() << ",     
190          }                                        
191       }                                           
192       G4cout << G4endl;                           
193                                                   
194    }                                              
195                                                   
196 }                                                 
197                                                   
198                                                   
199 /*                                                
200 //110810                                          
201 //G4double G4LENDCrossSection::GetCrossSection    
202 G4double G4LENDCrossSection::GetCrossSection(c    
203 {                                                 
204                                                   
205 //110810                                          
206    G4double aT = aMat->GetTemperature();          
207    G4Element* anElement = lend_manager->GetNis    
208                                                   
209    G4double ke = aP->GetKineticEnergy();          
210    G4double XS = 0.0;                             
211                                                   
212    G4int numberOfIsotope = anElement->GetNumbe    
213                                                   
214    if ( numberOfIsotope > 0 )                     
215    {                                              
216       // User Defined Abundances                  
217       for ( G4int i_iso = 0 ; i_iso < numberOf    
218       {                                           
219                                                   
220          G4int iZ = anElement->GetIsotope( i_i    
221          G4int iA = anElement->GetIsotope( i_i    
222          G4double ratio = anElement->GetRelati    
223                                                   
224          G4GIDI_target* aTarget = usedTarget_m    
225          XS += ratio*getLENDCrossSection ( aTa    
226                                                   
227       }                                           
228    }                                              
229    else                                           
230    {                                              
231       // Natural Abundances                       
232       G4NistElementBuilder* nistElementBuild =    
233       G4int iZ = int ( anElement->GetZ() );       
234       G4int numberOfNistIso = nistElementBuild    
235                                                   
236        G4int Nfirst = nistElementBuild->GetNis    
237       for ( G4int i = 0 ; i < numberOfNistIso     
238       {                                           
239          G4int iA = Nfirst + i;                   
240          G4double ratio = nistElementBuild->Ge    
241          if ( ratio > 0.0 )                       
242          {                                        
243             G4GIDI_target* aTarget = usedTarge    
244             XS += ratio*getLENDCrossSection (     
245             //G4cout << ke/eV << " "  << iZ <<    
246          }                                        
247       }                                           
248    }                                              
249                                                   
250    //G4cout << "XS= " << XS << G4endl;            
251    return XS;                                     
252 }                                                 
253                                                   
254                                                   
255                                                   
256 //110810                                          
257 //G4double G4LENDCrossSection::GetIsoCrossSect    
258 G4double G4LENDCrossSection::GetIsoCrossSectio    
259 {                                                 
260                                                   
261 //110810                                          
262    G4double aT = aMat->GetTemperature();          
263                                                   
264    G4double ke = dp->GetKineticEnergy();          
265                                                   
266    G4int iZ = isotope->GetZ();                    
267    G4int iA = isotope->GetN();                    
268                                                   
269    G4GIDI_target* aTarget = usedTarget_map.fin    
270                                                   
271    return getLENDCrossSection ( aTarget , ke ,    
272                                                   
273 }                                                 
274                                                   
275                                                   
276                                                   
277 //110810                                          
278 //G4double G4LENDCrossSection::GetZandACrossSe    
279 G4double G4LENDCrossSection::GetZandACrossSect    
280 {                                                 
281                                                   
282 //110810                                          
283    G4double aT = aMat->GetTemperature();          
284                                                   
285    G4double ke = dp->GetKineticEnergy();          
286                                                   
287    G4GIDI_target* aTarget = usedTarget_map.fin    
288                                                   
289    return getLENDCrossSection ( aTarget , ke ,    
290                                                   
291 }                                                 
292 */                                                
293                                                   
294                                                   
295                                                   
296 void G4LENDCrossSection::recreate_used_target_    
297 {                                                 
298    for ( std::map< G4int , G4LENDUsedTarget* >    
299          it = usedTarget_map.begin() ; it != u    
300    {                                              
301       delete it->second;                          
302    }                                              
303    usedTarget_map.clear();                        
304                                                   
305    create_used_target_map();                      
306 }                                                 
307                                                   
308                                                   
309                                                   
310 void G4LENDCrossSection::create_used_target_ma    
311 {                                                 
312                                                   
313    lend_manager->RequestChangeOfVerboseLevel(     
314                                                   
315    std::size_t numberOfElements = G4Element::G    
316    static const G4ElementTable* theElementTabl    
317                                                   
318    for ( std::size_t i = 0 ; i < numberOfEleme    
319    {                                              
320                                                   
321       const G4Element* anElement = (*theElemen    
322       G4int numberOfIsotope = (G4int)anElement    
323                                                   
324       if ( numberOfIsotope > 0 )                  
325       {                                           
326       // User Defined Abundances                  
327          for ( G4int i_iso = 0 ; i_iso < numbe    
328          {                                        
329             G4int iZ = anElement->GetIsotope(     
330             G4int iA = anElement->GetIsotope(     
331             G4int iIsomer = anElement->GetIsot    
332                                                   
333             //G4LENDUsedTarget* aTarget = new     
334             G4LENDUsedTarget* aTarget = new G4    
335             if ( allow_nat == true ) aTarget->    
336             if ( allow_any == true ) aTarget->    
337             usedTarget_map.insert( std::pair<     
338          }                                        
339       }                                           
340       else                                        
341       {                                           
342       // Natural Abundances                       
343          G4NistElementBuilder* nistElementBuil    
344          G4int iZ = int ( anElement->GetZ() );    
345          //G4cout << nistElementBuild->GetNumb    
346          G4int numberOfNistIso = nistElementBu    
347                                                   
348          for ( G4int ii = 0 ; ii < numberOfNis    
349          {                                        
350             //G4cout << nistElementBuild->GetI    
351             if ( nistElementBuild->GetIsotopeA    
352             {                                     
353                G4int iMass = nistElementBuild-    
354                //G4cout << iZ << " " << nistEl    
355                G4int iIsomer = 0;                 
356                                                   
357                G4LENDUsedTarget* aTarget = new    
358                if ( allow_nat == true ) aTarge    
359                if ( allow_any == true ) aTarge    
360                usedTarget_map.insert( std::pai    
361                                                   
362             }                                     
363                                                   
364          }                                        
365       }                                           
366    }                                              
367    DumpLENDTargetInfo();                          
368 }                                                 
369                                                   
370                                                   
371 G4double G4LENDCrossSection::GetUltraLowEnergy    
372 {                                                 
373    //XS propotinal to 1/v at low energy -> 1/r    
374    //XS = a * 1/root(E) + b                       
375    G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2    
376    G4double b = y1 - a * 1/std::sqrt(x1);         
377    G4double result = a * 1/std::sqrt(ke) + b;     
378    return result;                                 
379 }                                                 
380                                                   
381 G4GIDI_target* G4LENDCrossSection::get_target_    
382    G4GIDI_target* target = NULL;                  
383    if ( usedTarget_map.find( nuclear_code ) !=    
384       target = usedTarget_map.find( nuclear_co    
385    }                                              
386    return target;                                 
387 }                                                 
388                                                   
389 void G4LENDCrossSection::DumpLENDTargetInfo( G    
390                                                   
391    if ( lend_manager->GetVerboseLevel() >= 1 |    
392       if ( usedTarget_map.size() == 0 ) create    
393       G4cout << "Dumping UsedTarget of " << Ge    
394       G4cout << "Requested Evaluation, Z , A -    
395       for ( std::map< G4int , G4LENDUsedTarget    
396          it = usedTarget_map.begin() ; it != u    
397          G4cout                                   
398          << " " << it->second->GetWantedEvalua    
399          << ", " << it->second->GetWantedZ()      
400          << ", " << it->second->GetWantedA()      
401          << " -> " << it->second->GetActualEva    
402          << ", " << it->second->GetActualZ()      
403          << ", " << it->second->GetActualA()      
404          << G4endl;                               
405       }                                           
406    }                                              
407 }                                                 
408                                                   
409