Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/lend/src/G4LENDCrossSection.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 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/models/lend/src/G4LENDCrossSection.cc (Version 11.3.0) and /processes/hadronic/models/lend/src/G4LENDCrossSection.cc (Version 10.2.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // Class Description                               26 // Class Description
 27 // Cross Section for LEND (Low Energy Nuclear      27 // Cross Section for LEND (Low Energy Nuclear Data)
 28 // LEND is Geant4 interface for GIDI (General      28 // LEND is Geant4 interface for GIDI (General Interaction Data Interface) 
 29 // which gives a discription of nuclear and at     29 // which gives a discription of nuclear and atomic reactions, such as
 30 //    Binary collision cross sections              30 //    Binary collision cross sections
 31 //    Particle number multiplicity distributio     31 //    Particle number multiplicity distributions of reaction products
 32 //    Energy and angular distributions of reac     32 //    Energy and angular distributions of reaction products
 33 //    Derived calculational constants              33 //    Derived calculational constants
 34 // GIDI is developped at Lawrence Livermore Na     34 // GIDI is developped at Lawrence Livermore National Laboratory
 35 // Class Description - End                         35 // Class Description - End
 36                                                    36 
 37 // 071025 First implementation done by T. Koi      37 // 071025 First implementation done by T. Koi (SLAC/SCCS)
 38 // 101118 Name modifications for release T. Ko     38 // 101118 Name modifications for release T. Koi (SLAC/PPA)
 39                                                    39 
 40 #include "G4LENDCrossSection.hh"                   40 #include "G4LENDCrossSection.hh"
 41 #include "G4Pow.hh"                                41 #include "G4Pow.hh"
 42 #include "G4SystemOfUnits.hh"                      42 #include "G4SystemOfUnits.hh"
 43 #include "G4ElementTable.hh"                       43 #include "G4ElementTable.hh"
 44 #include "G4HadronicException.hh"                  44 #include "G4HadronicException.hh"
 45                                                    45 
 46 G4bool G4LENDCrossSection::IsIsoApplicable( co <<  46 //TK110811
 47                                             co <<  47 G4bool G4LENDCrossSection::IsIsoApplicable( const G4DynamicParticle* dp, G4int /*iZ*/ , G4int /*aA*/ , 
                                                   >>  48                                             const G4Element* /*element*/ , const G4Material* /*material*/ )
 48 {                                                  49 {
 49    G4double eKin = dp->GetKineticEnergy();         50    G4double eKin = dp->GetKineticEnergy();
 50    if ( dp->GetDefinition() != proj ) return f     51    if ( dp->GetDefinition() != proj ) return false;
 51    if ( eKin > GetMaxKinEnergy() || eKin < Get     52    if ( eKin > GetMaxKinEnergy() || eKin < GetMinKinEnergy() ) return false;
 52                                                    53 
 53    //G4cout << "G4LENDCrossSection::GetIsoIsIs <<  54    return true;
 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 }                                                  55 }
 82                                                    56 
 83 G4double G4LENDCrossSection::GetIsoCrossSectio     57 G4double G4LENDCrossSection::GetIsoCrossSection( const G4DynamicParticle* dp , G4int iZ , G4int iA ,
 84                                                    58                                                  const G4Isotope* isotope , const G4Element* /*elment*/ , const G4Material* material )
 85 {                                                  59 {
 86                                                    60 
 87    G4double xs = 0.0;                              61    G4double xs = 0.0;
 88    G4double ke = dp->GetKineticEnergy();           62    G4double ke = dp->GetKineticEnergy();
 89    G4double temp = material->GetTemperature();     63    G4double temp = material->GetTemperature();
 90    G4int iM = 0;                               <<  64    G4int iM = isotope->Getm();
 91    if ( isotope != NULL ) iM = isotope->Getm() <<  65 
 92                                                <<  66    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA , iM ) )->second->GetTarget();
 93    G4GIDI_target* aTarget = get_target_from_ma <<  67 
 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     68    xs = getLENDCrossSection ( aTarget , ke , temp );
103                                                    69 
104    return xs;                                      70    return xs;
105 }                                                  71 }
106                                                    72 
107                                                    73 
108 /*                                                 74 /*
109 G4bool G4LENDCrossSection::IsApplicable(const      75 G4bool G4LENDCrossSection::IsApplicable(const G4DynamicParticle*aP, const G4Element*)
110 {                                                  76 {
111    G4bool result = true;                           77    G4bool result = true;
112    G4double eKin = aP->GetKineticEnergy();         78    G4double eKin = aP->GetKineticEnergy();
113    if( eKin > GetMaxKinEnergy() || aP->GetDefi     79    if( eKin > GetMaxKinEnergy() || aP->GetDefinition() != proj ) result = false;
114    return result;                                  80    return result;
115 }                                                  81 }
116 */                                                 82 */
117                                                    83 
118 G4LENDCrossSection::G4LENDCrossSection( const      84 G4LENDCrossSection::G4LENDCrossSection( const G4String nam )
119 :G4VCrossSectionDataSet( nam )                     85 :G4VCrossSectionDataSet( nam )
120 {                                                  86 {
121                                                    87 
122    proj = NULL; //will be set in an inherited      88    proj = NULL; //will be set in an inherited class
123    //default_evaluation = "endl99";                89    //default_evaluation = "endl99";
124    //default_evaluation = "ENDF.B-VII.0";          90    //default_evaluation = "ENDF.B-VII.0";
125    default_evaluation = "ENDF/BVII.1";             91    default_evaluation = "ENDF/BVII.1";
126                                                    92 
127    allow_nat = false;                              93    allow_nat = false;
128    allow_any = false;                              94    allow_any = false;
129                                                    95 
130    SetMinKinEnergy(  0*MeV );                      96    SetMinKinEnergy(  0*MeV );
131    SetMaxKinEnergy( 20*MeV );                      97    SetMaxKinEnergy( 20*MeV );
132                                                    98 
133    lend_manager = G4LENDManager::GetInstance()     99    lend_manager = G4LENDManager::GetInstance(); 
134                                                   100 
135 }                                                 101 }
136                                                   102    
137 G4LENDCrossSection::~G4LENDCrossSection()         103 G4LENDCrossSection::~G4LENDCrossSection()
138 {                                                 104 {
139                                                   105 
140    for ( std::map< G4int , G4LENDUsedTarget* >    106    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
141          it = usedTarget_map.begin() ; it != u    107          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
142    {                                              108    { 
143       delete it->second;                          109       delete it->second;  
144    }                                              110    }
145                                                   111 
146 }                                                 112 }
147                                                   113    
148 void G4LENDCrossSection::BuildPhysicsTable( co    114 void G4LENDCrossSection::BuildPhysicsTable( const G4ParticleDefinition&  )
149 {                                                 115 {
150    create_used_target_map();                      116    create_used_target_map();
151 }                                                 117 }
152                                                   118 
153 void G4LENDCrossSection::DumpPhysicsTable(cons    119 void G4LENDCrossSection::DumpPhysicsTable(const G4ParticleDefinition& aP)
154 {                                                 120 {
155                                                   121 
156   if ( &aP != proj )                              122   if ( &aP != proj ) 
157      throw G4HadronicException(__FILE__, __LIN    123      throw G4HadronicException(__FILE__, __LINE__, "Attempt to use LEND data for particles other than neutrons!!!");  
158                                                   124 
159    G4cout << G4endl;                              125    G4cout << G4endl;
160    G4cout << "Dump Cross Sections of " << GetN    126    G4cout << "Dump Cross Sections of " << GetName() << G4endl;
161    G4cout << "(Pointwise cross-section at 300     127    G4cout << "(Pointwise cross-section at 300 Kelvin.)" << G4endl;
162    G4cout << G4endl;                              128    G4cout << G4endl;
163                                                   129 
164    G4cout << "Target informaiton " << G4endl;     130    G4cout << "Target informaiton " << G4endl;
165                                                   131 
166    for ( std::map< G4int , G4LENDUsedTarget* >    132    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
167          it = usedTarget_map.begin() ; it != u    133          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
168    {                                              134    {
169       G4cout                                      135       G4cout 
170          << "Wanted " << it->second->GetWanted    136          << "Wanted " << it->second->GetWantedEvaluation() 
171          << ", Z= " << it->second->GetWantedZ(    137          << ", Z= " << it->second->GetWantedZ() 
172          << ", A= " << it->second->GetWantedA(    138          << ", A= " << it->second->GetWantedA() 
173          << "; Actual " << it->second->GetActu    139          << "; Actual " << it->second->GetActualEvaluation() 
174          << ", Z= " << it->second->GetActualZ(    140          << ", Z= " << it->second->GetActualZ() 
175          << ", A= " << it->second->GetActualA(    141          << ", A= " << it->second->GetActualA() 
176          << ", " << it->second->GetTarget()       142          << ", " << it->second->GetTarget() 
177          << G4endl;                               143          << G4endl; 
178                                                   144 
179       G4int ie = 0;                               145       G4int ie = 0;
180                                                   146 
181       G4GIDI_target* aTarget = it->second->Get    147       G4GIDI_target* aTarget = it->second->GetTarget();
182       G4double aT = 300;                          148       G4double aT = 300;
183       for ( ie = 0 ; ie < 130 ; ie++ )            149       for ( ie = 0 ; ie < 130 ; ie++ )
184       {                                           150       {
185          G4double ke = 1.0e-5 * G4Pow::GetInst    151          G4double ke = 1.0e-5 * G4Pow::GetInstance()->powA ( 10.0 , ie/10.0 ) *eV;
186                                                   152 
187          if ( ke < 20*MeV )                       153          if ( ke < 20*MeV )
188          {                                        154          {
189             G4cout << "  " << GetName() << ",     155             G4cout << "  " << GetName() << ", cross section at " << ke/eV << " [eV] = " << getLENDCrossSection ( aTarget , ke , aT )/barn << " [barn] " << G4endl;
190          }                                        156          }
191       }                                           157       }
192       G4cout << G4endl;                           158       G4cout << G4endl;
193                                                   159 
194    }                                              160    }
195                                                   161 
196 }                                                 162 }
197                                                   163 
198                                                   164 
199 /*                                                165 /*
200 //110810                                          166 //110810
201 //G4double G4LENDCrossSection::GetCrossSection    167 //G4double G4LENDCrossSection::GetCrossSection(const G4DynamicParticle* aP , const G4Element* anElement , G4double aT)
202 G4double G4LENDCrossSection::GetCrossSection(c    168 G4double G4LENDCrossSection::GetCrossSection(const G4DynamicParticle* aP , int iZ , const G4Material* aMat)
203 {                                                 169 {
204                                                   170 
205 //110810                                          171 //110810
206    G4double aT = aMat->GetTemperature();          172    G4double aT = aMat->GetTemperature();
207    G4Element* anElement = lend_manager->GetNis    173    G4Element* anElement = lend_manager->GetNistElementBuilder()->FindOrBuildElement( iZ );
208                                                   174 
209    G4double ke = aP->GetKineticEnergy();          175    G4double ke = aP->GetKineticEnergy();
210    G4double XS = 0.0;                             176    G4double XS = 0.0;
211                                                   177 
212    G4int numberOfIsotope = anElement->GetNumbe    178    G4int numberOfIsotope = anElement->GetNumberOfIsotopes(); 
213                                                   179 
214    if ( numberOfIsotope > 0 )                     180    if ( numberOfIsotope > 0 )
215    {                                              181    {
216       // User Defined Abundances                  182       // User Defined Abundances   
217       for ( G4int i_iso = 0 ; i_iso < numberOf    183       for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ )
218       {                                           184       {
219                                                   185 
220          G4int iZ = anElement->GetIsotope( i_i    186          G4int iZ = anElement->GetIsotope( i_iso )->GetZ();
221          G4int iA = anElement->GetIsotope( i_i    187          G4int iA = anElement->GetIsotope( i_iso )->GetN();
222          G4double ratio = anElement->GetRelati    188          G4double ratio = anElement->GetRelativeAbundanceVector()[i_iso];
223                                                   189 
224          G4GIDI_target* aTarget = usedTarget_m    190          G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
225          XS += ratio*getLENDCrossSection ( aTa    191          XS += ratio*getLENDCrossSection ( aTarget , ke , aT );
226                                                   192 
227       }                                           193       }
228    }                                              194    }
229    else                                           195    else
230    {                                              196    {
231       // Natural Abundances                       197       // Natural Abundances   
232       G4NistElementBuilder* nistElementBuild =    198       G4NistElementBuilder* nistElementBuild = lend_manager->GetNistElementBuilder();
233       G4int iZ = int ( anElement->GetZ() );       199       G4int iZ = int ( anElement->GetZ() );
234       G4int numberOfNistIso = nistElementBuild    200       G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ); 
235                                                   201 
236        G4int Nfirst = nistElementBuild->GetNis    202        G4int Nfirst = nistElementBuild->GetNistFirstIsotopeN( iZ );
237       for ( G4int i = 0 ; i < numberOfNistIso     203       for ( G4int i = 0 ; i < numberOfNistIso ; i++ )
238       {                                           204       {
239          G4int iA = Nfirst + i;                   205          G4int iA = Nfirst + i;  
240          G4double ratio = nistElementBuild->Ge    206          G4double ratio = nistElementBuild->GetIsotopeAbundance( iZ , iA );
241          if ( ratio > 0.0 )                       207          if ( ratio > 0.0 )
242          {                                        208          {
243             G4GIDI_target* aTarget = usedTarge    209             G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
244             XS += ratio*getLENDCrossSection (     210             XS += ratio*getLENDCrossSection ( aTarget , ke , aT );
245             //G4cout << ke/eV << " "  << iZ <<    211             //G4cout << ke/eV << " "  << iZ << " " << iMass << " " << aTarget << " " << getLENDCrossSection ( aTarget , ke , aT ) << G4endl;
246          }                                        212          }
247       }                                           213       }
248    }                                              214    }
249                                                   215  
250    //G4cout << "XS= " << XS << G4endl;            216    //G4cout << "XS= " << XS << G4endl;
251    return XS;                                     217    return XS;
252 }                                                 218 }
253                                                   219 
254                                                   220 
255                                                   221 
256 //110810                                          222 //110810
257 //G4double G4LENDCrossSection::GetIsoCrossSect    223 //G4double G4LENDCrossSection::GetIsoCrossSection(const G4DynamicParticle* dp, const G4Isotope* isotope, G4double aT )
258 G4double G4LENDCrossSection::GetIsoCrossSectio    224 G4double G4LENDCrossSection::GetIsoCrossSection(const G4DynamicParticle* dp, const G4Isotope* isotope, const G4Material* aMat)
259 {                                                 225 {
260                                                   226 
261 //110810                                          227 //110810
262    G4double aT = aMat->GetTemperature();          228    G4double aT = aMat->GetTemperature();
263                                                   229 
264    G4double ke = dp->GetKineticEnergy();          230    G4double ke = dp->GetKineticEnergy();
265                                                   231 
266    G4int iZ = isotope->GetZ();                    232    G4int iZ = isotope->GetZ();
267    G4int iA = isotope->GetN();                    233    G4int iA = isotope->GetN();
268                                                   234 
269    G4GIDI_target* aTarget = usedTarget_map.fin    235    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
270                                                   236 
271    return getLENDCrossSection ( aTarget , ke ,    237    return getLENDCrossSection ( aTarget , ke , aT );
272                                                   238 
273 }                                                 239 }
274                                                   240 
275                                                   241 
276                                                   242 
277 //110810                                          243 //110810
278 //G4double G4LENDCrossSection::GetZandACrossSe    244 //G4double G4LENDCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, G4int iZ, G4int iA, G4double aT)
279 G4double G4LENDCrossSection::GetZandACrossSect    245 G4double G4LENDCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, G4int iZ, G4int iA, const G4Material* aMat)
280 {                                                 246 {
281                                                   247 
282 //110810                                          248 //110810
283    G4double aT = aMat->GetTemperature();          249    G4double aT = aMat->GetTemperature();
284                                                   250 
285    G4double ke = dp->GetKineticEnergy();          251    G4double ke = dp->GetKineticEnergy();
286                                                   252 
287    G4GIDI_target* aTarget = usedTarget_map.fin    253    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
288                                                   254 
289    return getLENDCrossSection ( aTarget , ke ,    255    return getLENDCrossSection ( aTarget , ke , aT );
290                                                   256 
291 }                                                 257 }
292 */                                                258 */
293                                                   259 
294                                                   260 
295                                                   261 
296 void G4LENDCrossSection::recreate_used_target_    262 void G4LENDCrossSection::recreate_used_target_map()
297 {                                                 263 {
298    for ( std::map< G4int , G4LENDUsedTarget* >    264    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
299          it = usedTarget_map.begin() ; it != u    265          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
300    {                                              266    { 
301       delete it->second;                          267       delete it->second;  
302    }                                              268    }
303    usedTarget_map.clear();                        269    usedTarget_map.clear();
304                                                   270 
305    create_used_target_map();                      271    create_used_target_map();
306 }                                                 272 }
307                                                   273 
308                                                   274 
309                                                   275 
310 void G4LENDCrossSection::create_used_target_ma    276 void G4LENDCrossSection::create_used_target_map()
311 {                                                 277 {
312                                                   278 
313    lend_manager->RequestChangeOfVerboseLevel(     279    lend_manager->RequestChangeOfVerboseLevel( verboseLevel );
314                                                   280 
315    std::size_t numberOfElements = G4Element::G << 281    size_t numberOfElements = G4Element::GetNumberOfElements();
316    static const G4ElementTable* theElementTabl    282    static const G4ElementTable* theElementTable = G4Element::GetElementTable();
317                                                   283 
318    for ( std::size_t i = 0 ; i < numberOfEleme << 284    for ( size_t i = 0 ; i < numberOfElements ; ++i )
319    {                                              285    {
320                                                   286 
321       const G4Element* anElement = (*theElemen    287       const G4Element* anElement = (*theElementTable)[i];
322       G4int numberOfIsotope = (G4int)anElement << 288       G4int numberOfIsotope = anElement->GetNumberOfIsotopes(); 
323                                                   289 
324       if ( numberOfIsotope > 0 )                  290       if ( numberOfIsotope > 0 )
325       {                                           291       {
326       // User Defined Abundances                  292       // User Defined Abundances   
327          for ( G4int i_iso = 0 ; i_iso < numbe    293          for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ )
328          {                                        294          {
329             G4int iZ = anElement->GetIsotope(     295             G4int iZ = anElement->GetIsotope( i_iso )->GetZ();
330             G4int iA = anElement->GetIsotope(     296             G4int iA = anElement->GetIsotope( i_iso )->GetN();
331             G4int iIsomer = anElement->GetIsot    297             G4int iIsomer = anElement->GetIsotope( i_iso )->Getm();
332                                                   298 
333             //G4LENDUsedTarget* aTarget = new     299             //G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( G4Neutron::Neutron() , default_evaluation , iZ , iA );  
334             G4LENDUsedTarget* aTarget = new G4 << 300             G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA );  
335             if ( allow_nat == true ) aTarget->    301             if ( allow_nat == true ) aTarget->AllowNat();
336             if ( allow_any == true ) aTarget->    302             if ( allow_any == true ) aTarget->AllowAny();
337             usedTarget_map.insert( std::pair<     303             usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA , iIsomer ) , aTarget ) );
338          }                                        304          }
339       }                                           305       }
340       else                                        306       else
341       {                                           307       {
342       // Natural Abundances                       308       // Natural Abundances   
343          G4NistElementBuilder* nistElementBuil    309          G4NistElementBuilder* nistElementBuild = lend_manager->GetNistElementBuilder();
344          G4int iZ = int ( anElement->GetZ() );    310          G4int iZ = int ( anElement->GetZ() );
345          //G4cout << nistElementBuild->GetNumb    311          //G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl;
346          G4int numberOfNistIso = nistElementBu    312          G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ); 
347                                                   313 
348          for ( G4int ii = 0 ; ii < numberOfNis    314          for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
349          {                                        315          {
350             //G4cout << nistElementBuild->GetI    316             //G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl;
351             if ( nistElementBuild->GetIsotopeA    317             if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 )
352             {                                     318             {
353                G4int iMass = nistElementBuild-    319                G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii;  
354                //G4cout << iZ << " " << nistEl    320                //G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl;  
355                G4int iIsomer = 0;                 321                G4int iIsomer = 0; 
356                                                   322 
357                G4LENDUsedTarget* aTarget = new    323                G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass );  
358                if ( allow_nat == true ) aTarge    324                if ( allow_nat == true ) aTarget->AllowNat();
359                if ( allow_any == true ) aTarge    325                if ( allow_any == true ) aTarget->AllowAny();
360                usedTarget_map.insert( std::pai    326                usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iMass , iIsomer ) , aTarget ) );
361                                                   327 
362             }                                     328             }
363                                                   329 
364          }                                        330          }
365       }                                           331       }
366    }                                              332    }
367    DumpLENDTargetInfo();                       << 333 
                                                   >> 334    G4cout << "Dump UsedTarget for " << GetName() << G4endl;
                                                   >> 335    //G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) , Pointer of Target" << G4endl;
                                                   >> 336    G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) " << G4endl;
                                                   >> 337    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
                                                   >> 338          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
                                                   >> 339    {
                                                   >> 340       G4cout 
                                                   >> 341          << " " << it->second->GetWantedEvaluation() 
                                                   >> 342          << ", " << it->second->GetWantedZ() 
                                                   >> 343          << ", " << it->second->GetWantedA() 
                                                   >> 344          << " -> " << it->second->GetActualEvaluation() 
                                                   >> 345          << ", " << it->second->GetActualZ() 
                                                   >> 346          << ", " << it->second->GetActualA() 
                                                   >> 347          //<< ", " << it->second->GetTarget() 
                                                   >> 348          << G4endl; 
                                                   >> 349    } 
                                                   >> 350 
368 }                                                 351 }
369                                                   352 
370                                                   353                                                            // elow          ehigh       xs_elow      xs_ehigh      ke (ke < elow)
371 G4double G4LENDCrossSection::GetUltraLowEnergy    354 G4double G4LENDCrossSection::GetUltraLowEnergyExtrapolatedXS( G4double x1, G4double x2, G4double y1, G4double y2 , G4double ke )
372 {                                                 355 {
373    //XS propotinal to 1/v at low energy -> 1/r    356    //XS propotinal to 1/v at low energy -> 1/root(E) 
374    //XS = a * 1/root(E) + b                       357    //XS = a * 1/root(E) + b  
375    G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2    358    G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2) - 1/std::sqrt(x1) );
376    G4double b = y1 - a * 1/std::sqrt(x1);         359    G4double b = y1 - a * 1/std::sqrt(x1);
377    G4double result = a * 1/std::sqrt(ke) + b;     360    G4double result = a * 1/std::sqrt(ke) + b;
378    return result;                                 361    return result;
379 }                                                 362 }
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                                                   363