Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/lend/src/G4LENDManager.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/G4LENDManager.cc (Version 11.3.0) and /processes/hadronic/models/lend/src/G4LENDManager.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 // Manager of LEND (Low Energy Nuclear Data) t     27 // Manager of LEND (Low Energy Nuclear Data) target (nucleus) 
 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 "G4LENDManager.hh"                        40 #include "G4LENDManager.hh"
 41 #include "G4HadronicException.hh"                  41 #include "G4HadronicException.hh"
 42                                                    42 
 43 #include "G4Neutron.hh"                            43 #include "G4Neutron.hh"
 44 #include "G4Gamma.hh"                              44 #include "G4Gamma.hh"
 45 #include "G4Proton.hh"                             45 #include "G4Proton.hh"
 46 #include "G4Deuteron.hh"                           46 #include "G4Deuteron.hh"
 47 #include "G4Triton.hh"                             47 #include "G4Triton.hh"
 48 #include "G4He3.hh"                                48 #include "G4He3.hh"
 49 #include "G4Alpha.hh"                              49 #include "G4Alpha.hh"
 50                                                    50 
 51 #include <fstream>                                 51 #include <fstream>
 52                                                    52 
 53 G4LENDManager* G4LENDManager::lend_manager = N <<  53 G4ThreadLocal G4LENDManager* G4LENDManager::lend_manager = NULL;
 54                                                    54 
 55                                                    55 
 56 G4LENDManager::G4LENDManager()                     56 G4LENDManager::G4LENDManager()
 57 :verboseLevel( 0 )                                 57 :verboseLevel( 0 )
 58 {                                                  58 {
 59                                                    59 
 60    //printBanner();                                60    //printBanner();
 61                                                    61 
 62    G4String xmcf;                                  62    G4String xmcf;
 63    G4String xmcf_gamma;                            63    G4String xmcf_gamma;
 64    G4String xmcf_p;                                64    G4String xmcf_p;
 65    G4String xmcf_d;                                65    G4String xmcf_d;
 66    G4String xmcf_t;                                66    G4String xmcf_t;
 67    G4String xmcf_he3;                              67    G4String xmcf_he3;
 68    G4String xmcf_a;                                68    G4String xmcf_a;
 69    if( G4FindDataDir("G4LENDDATA") == NULL ) { <<  69    if( getenv("G4LENDDATA") == NULL ) {
 70       throw G4HadronicException(__FILE__, __LI     70       throw G4HadronicException(__FILE__, __LINE__, " Please setenv G4LENDDATA to point to the LEND files." );
 71    } else {                                        71    } else {
 72       xmcf = G4FindDataDir("G4LENDDATA");      <<  72       xmcf = getenv("G4LENDDATA");
 73       //xmcf += "/xmcf.n_1.map";                   73       //xmcf += "/xmcf.n_1.map";
 74       xmcf += "/neutrons.map";                     74       xmcf += "/neutrons.map";
 75       xmcf_gamma = G4FindDataDir("G4LENDDATA") <<  75       xmcf_gamma = getenv("G4LENDDATA");
 76       xmcf_gamma += "/gammas.map";                 76       xmcf_gamma += "/gammas.map";
 77       xmcf_p = G4FindDataDir("G4LENDDATA");    <<  77       xmcf_p = getenv("G4LENDDATA");
 78       xmcf_p += "/protons.map";                    78       xmcf_p += "/protons.map";
 79       xmcf_d = G4FindDataDir("G4LENDDATA");    <<  79       xmcf_d = getenv("G4LENDDATA");
 80       xmcf_d += "/deuterons.map";                  80       xmcf_d += "/deuterons.map";
 81       xmcf_t = G4FindDataDir("G4LENDDATA");    <<  81       xmcf_t = getenv("G4LENDDATA");
 82       xmcf_t += "/tritons.map";                    82       xmcf_t += "/tritons.map";
 83       xmcf_he3 = G4FindDataDir("G4LENDDATA");  <<  83       xmcf_he3 = getenv("G4LENDDATA");
 84       xmcf_he3 += "/He3s.map";                     84       xmcf_he3 += "/He3s.map";
 85       xmcf_a = G4FindDataDir("G4LENDDATA");    <<  85       xmcf_a = getenv("G4LENDDATA");
 86       xmcf_a += "/alphas.map";                     86       xmcf_a += "/alphas.map";
 87    }                                               87    }
 88                                                    88 
 89 //Example of xmcf.n_1.map                          89 //Example of xmcf.n_1.map
 90 //<map>                                            90 //<map>
 91 //<target schema="MonteCarlo" evaluation="ENDF     91 //<target schema="MonteCarlo" evaluation="ENDF.B-VII.0" projectile="n_1" target="H_1" path="000_n_1/xMC.000_n_1.001_H_1/xMC.000_n_1.001_H_1.xml"/>
 92 //</map>                                           92 //</map>
 93 //                                                 93 //
 94 // for neutron                                     94 // for neutron                                                                                             "1" for neutron; see G4GIDI::init
 95    proj_lend_map.insert ( std::pair < G4Partic     95    proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Neutron::Neutron() , new G4GIDI( 1 , xmcf ) ) );
 96 // for gamma                                       96 // for gamma                                                                                            "0" for gamma; see G4GIDI::init
 97    proj_lend_map.insert ( std::pair < G4Partic     97    proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Gamma::Gamma() , new G4GIDI( 0 , xmcf_gamma ) ) );
 98 //                                                 98 //
 99    std::ifstream aFile;                            99    std::ifstream aFile;
100    aFile.open( xmcf_p.c_str() );                  100    aFile.open( xmcf_p.c_str() );
101    if ( aFile.good() ) {                          101    if ( aFile.good() ) {
102       aFile.close();                              102       aFile.close(); 
103       proj_lend_map.insert ( std::pair < G4Par    103       proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Proton::Proton() , new G4GIDI( 2 , xmcf_p ) ) );
104    } else  {                                      104    } else  {
105       aFile.close();                              105       aFile.close(); 
106    }                                              106    }
107    aFile.open( xmcf_d.c_str() );                  107    aFile.open( xmcf_d.c_str() );
108    if ( aFile.good() ) {                          108    if ( aFile.good() ) {
109       aFile.close();                              109       aFile.close(); 
110       proj_lend_map.insert ( std::pair < G4Par    110       proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Deuteron::Deuteron() , new G4GIDI( 3 , xmcf_d ) ) );
111    } else  {                                      111    } else  {
112       aFile.close();                              112       aFile.close(); 
113    }                                              113    }
114    aFile.open( xmcf_t.c_str() );                  114    aFile.open( xmcf_t.c_str() );
115    if ( aFile.good() ) {                          115    if ( aFile.good() ) {
116       aFile.close();                              116       aFile.close(); 
117       proj_lend_map.insert ( std::pair < G4Par    117       proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Triton::Triton() , new G4GIDI( 4 , xmcf_t ) ) );
118    } else  {                                      118    } else  {
119       aFile.close();                              119       aFile.close(); 
120    }                                              120    }
121    aFile.open( xmcf_he3.c_str() );                121    aFile.open( xmcf_he3.c_str() );
122    if ( aFile.good() ) {                          122    if ( aFile.good() ) {
123       aFile.close();                              123       aFile.close(); 
124       proj_lend_map.insert ( std::pair < G4Par    124       proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4He3::He3() , new G4GIDI( 5 , xmcf_he3 ) ) );
125    } else  {                                      125    } else  {
126       aFile.close();                              126       aFile.close(); 
127    }                                              127    }
128    aFile.open( xmcf_a.c_str() );                  128    aFile.open( xmcf_a.c_str() );
129    if ( aFile.good() ) {                          129    if ( aFile.good() ) {
130       aFile.close();                              130       aFile.close(); 
131       proj_lend_map.insert ( std::pair < G4Par    131       proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( G4Alpha::Alpha() , new G4GIDI( 6 , xmcf_a ) ) );
132    } else  {                                      132    } else  {
133       aFile.close();                              133       aFile.close(); 
134    }                                              134    }
135                                                   135 
136                                                   136 
137                                                   137 
138 // proj_lend_map.insert ( std::pair < G4Partic    138 // proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > ( xxx , new G4GIDI( xxx , xmcf ) ) );
139                                                   139 
140    v_lend_target.clear();                         140    v_lend_target.clear();
141                                                   141 
142    //ionTable = new G4IonTable();                 142    //ionTable = new G4IonTable();
143    ionTable = G4ParticleTable::GetParticleTabl    143    ionTable = G4ParticleTable::GetParticleTable()->GetIonTable();
144    nistElementBuilder = new G4NistElementBuild    144    nistElementBuilder = new G4NistElementBuilder( 0 );
145                                                   145 
146    //Prepare table of excitation energy of exc << 
147    G4int pdgCode;                              << 
148    //              iZ        iA    iM ->Co58m1 << 
149    pdgCode= 10000 * 27 + 10 * 58 + 1;          << 
150    pdgCode = GetNucleusEncoding( 27 , 58 , 1 ) << 
151    mExcitationEnergy.insert(std::pair<G4int,G4 << 
152    pdgCode= 10000 * 47 + 10 * 110 + 1;         << 
153    pdgCode = GetNucleusEncoding( 47 , 110 , 1  << 
154    mExcitationEnergy.insert(std::pair<G4int,G4 << 
155    pdgCode= 10000 * 48 + 10 * 115 + 1;         << 
156    pdgCode = GetNucleusEncoding( 48 , 115 , 1  << 
157    mExcitationEnergy.insert(std::pair<G4int,G4 << 
158    pdgCode= 10000 * 52 + 10 * 127 + 1;         << 
159    pdgCode = GetNucleusEncoding( 52 , 127 , 1  << 
160    mExcitationEnergy.insert(std::pair<G4int,G4 << 
161    pdgCode= 10000 * 52 + 10 * 129 + 1;         << 
162    pdgCode = GetNucleusEncoding( 52 , 129 , 1  << 
163    mExcitationEnergy.insert(std::pair<G4int,G4 << 
164    pdgCode= 10000 * 61 + 10 * 148 + 1;         << 
165    pdgCode = GetNucleusEncoding( 61 , 148 , 1  << 
166    mExcitationEnergy.insert(std::pair<G4int,G4 << 
167    pdgCode= 10000 * 67 + 10 * 166 + 1;         << 
168    pdgCode = GetNucleusEncoding( 67 , 166 , 1  << 
169    mExcitationEnergy.insert(std::pair<G4int,G4 << 
170    pdgCode= 10000 * 95 + 10 * 242 + 1;         << 
171    pdgCode = GetNucleusEncoding( 95 , 242 , 1  << 
172    mExcitationEnergy.insert(std::pair<G4int,G4 << 
173    pdgCode= 10000 * 95 + 10 * 244 + 1;         << 
174    pdgCode = GetNucleusEncoding( 95 , 244 , 1  << 
175    mExcitationEnergy.insert(std::pair<G4int,G4 << 
176    pdgCode= 10000 * 99 + 10 * 254 + 1;         << 
177    pdgCode = GetNucleusEncoding( 99 , 254 , 1  << 
178    mExcitationEnergy.insert(std::pair<G4int,G4 << 
179                                                << 
180 }                                                 146 }
181                                                   147    
182                                                   148 
183                                                   149 
184 G4LENDManager::~G4LENDManager()                   150 G4LENDManager::~G4LENDManager()
185 {                                                 151 {
186                                                   152    
187 // deleting target                                153 // deleting target
188    for ( auto it = v_lend_target.cbegin() ; it << 154    for ( std::vector < lend_target >::iterator 
                                                   >> 155          it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
189    {                                              156    {
190         (*it).lend->freeTarget( it->target );     157         (*it).lend->freeTarget( it->target ); 
191    }                                              158    }
192                                                   159 
193 // deleting lend                                  160 // deleting lend
194    for ( auto it = proj_lend_map.cbegin() ; it << 161    for ( std::map < G4ParticleDefinition* , G4GIDI* >::iterator 
                                                   >> 162          it = proj_lend_map.begin() ; it != proj_lend_map.end() ; it++ )
195    {                                              163    {
196       delete it->second;                          164       delete it->second;
197    }                                              165    }
198                                                   166 
199    //delete ionTable;                             167    //delete ionTable;
200    delete nistElementBuilder;                     168    delete nistElementBuilder;
201                                                   169 
202 }                                                 170 }
203                                                   171 
204                                                   172 
205                                                   173 
206 G4GIDI_target* G4LENDManager::GetLENDTarget( G << 174 G4GIDI_target* G4LENDManager::GetLENDTarget( G4ParticleDefinition* proj , G4String evaluation , G4int iZ , G4int iA , G4int iM )
207 {                                                 175 {
208                                                   176 
209    G4GIDI_target* anLENDTarget = NULL;            177    G4GIDI_target* anLENDTarget = NULL;
210                                                   178 
211    if ( iM > 9 ) {                                179    if ( iM > 9 ) { 
212       throw G4HadronicException(__FILE__, __LI    180       throw G4HadronicException(__FILE__, __LINE__, "Requested isomer level of target is too high." ); 
213    }                                              181    }
214                                                   182 
215    G4int iTarg = GetNucleusEncoding( iZ , iA ,    183    G4int iTarg = GetNucleusEncoding( iZ , iA , iM );
216                                                   184 
217    // Searching in current map                    185    // Searching in current map
218    for ( auto it = v_lend_target.cbegin() ; it << 186    for ( std::vector < lend_target >::iterator 
                                                   >> 187          it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
219    {                                              188    {
220       if ( it->proj == proj && it->target_code    189       if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation ) 
221       {                                           190       {
222          //find!                                  191          //find! 
223          return it->target;                       192          return it->target;
224       }                                           193       }
225    }                                              194    }
226                                                   195 
227                                                   196 
228    if ( proj_lend_map.find ( proj ) == proj_le << 197    if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) {
229       G4cout << proj->GetParticleName() << " i    198       G4cout << proj->GetParticleName() << " is not supported by this LEND library." << G4endl;
230       return anLENDTarget; // return NULL         199       return anLENDTarget; // return NULL 
231    }                                              200    }
232                                                   201 
233    G4GIDI* xlend = proj_lend_map.find ( proj )    202    G4GIDI* xlend = proj_lend_map.find ( proj ) -> second; 
234                                                   203 
235    if ( xlend->isThisDataAvailable( evaluation    204    if ( xlend->isThisDataAvailable( evaluation, iZ, iA , iM ) )
236    {                                              205    {
237                                                   206 
238       if ( verboseLevel > 1 ) {                   207       if ( verboseLevel > 1 ) {
239          G4cout << evaluation << " for " << io    208          G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 ) 
240                  << " with Isomer level of " <    209                  << " with Isomer level of " << iM  << " is exist in this LEND." << G4endl;
241       }                                           210       }
242                                                   211 
243       anLENDTarget = xlend->readTarget( evalua    212       anLENDTarget = xlend->readTarget( evaluation , iZ , iA , iM );
244                                                   213 
245       lend_target new_target;                     214       lend_target new_target; 
246       new_target.lend = xlend;                    215       new_target.lend = xlend; 
247       new_target.target = anLENDTarget;           216       new_target.target = anLENDTarget; 
248       new_target.proj = proj;                     217       new_target.proj = proj;
249       new_target.evaluation = evaluation;         218       new_target.evaluation = evaluation;
250       new_target.target_code = iTarg;             219       new_target.target_code = iTarg;
251                                                   220       
252       v_lend_target.push_back( std::move(new_t << 221       v_lend_target.push_back( new_target );
253                                                   222 
254 //    found EXACT                                 223 //    found EXACT
255       return anLENDTarget;                        224       return anLENDTarget;
256                                                   225 
257    }                                              226    }
258    else                                           227    else 
259    {                                              228    {
260 //    NO EXACT DATA (Evaluatino & Z,A,M)          229 //    NO EXACT DATA (Evaluatino & Z,A,M)
261                                                   230                                                                         
262       //Searching available evaluation and nat    231       //Searching available evaluation and natural abundance data and give suggestions.  
263       //                                          232       //
264       if ( verboseLevel > 1 )                     233       if ( verboseLevel > 1 ) 
265          G4cout << evaluation << " for " << io    234          G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 ) 
266                 << " with Isomer level of " <<    235                 << " with Isomer level of " << iM << " is not exist in this LEND." << G4endl;
267                                                   236 
268       std::vector< std::string >* available =     237       std::vector< std::string >* available =  xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
269       if ( available->size() > 0 ) {              238       if ( available->size() > 0 ) {
270 //       EXACT Z,A,M but Evaluation is differe    239 //       EXACT Z,A,M but Evaluation is different 
271          if ( verboseLevel > 1 )                  240          if ( verboseLevel > 1 ) 
272          {                                        241          {
273             G4cout << " However you can use fo    242             G4cout << " However you can use following evaluation(s) for the target. " << G4endl;
274                                                   243 
275             for ( auto its = available->cbegin << 244             std::vector< std::string >::iterator its;
                                                   >> 245             for ( its = available->begin() ; its != available->end() ; its++ ) 
276                G4cout << *its << G4endl;          246                G4cout << *its << G4endl;
277                                                   247 
278             G4cout << G4endl;                     248             G4cout << G4endl;
279          }                                        249          }
280       } else if ( xlend->isThisDataAvailable(     250       } else if ( xlend->isThisDataAvailable( evaluation, iZ, 0 , iM ) ) {
281 //                                                251 //      
282 //    checking natural abundance data for Z       252 //    checking natural abundance data for Z
283 //                                                253 //
284 //       EXACT natural abundance data for the     254 //       EXACT natural abundance data for the evaluation 
285          if ( verboseLevel > 1 )                  255          if ( verboseLevel > 1 ) 
286             G4cout << " However you can use na    256             G4cout << " However you can use natural abundance data for the target. " << G4endl;
287       }                                           257       }
288       else                                        258       else
289       {                                           259       {
290          std::vector< std::string >* available    260          std::vector< std::string >* available_nat =  xlend->getNamesOfAvailableLibraries( iZ, 0 , iM );
291 //                                                261 //
292          if ( available_nat->size() > 0 ) {       262          if ( available_nat->size() > 0 ) {
293 //          EXACT natural abundance data for Z    263 //          EXACT natural abundance data for Z but differnet evaluation
294             if ( verboseLevel > 1 ) {             264             if ( verboseLevel > 1 ) {
295                G4cout << " However you can use    265                G4cout << " However you can use following evaluation(s) for natural abundace of the target. " << G4endl;
296                                                   266 
297                for ( auto its = available_nat- << 267                std::vector< std::string >::iterator its;
                                                   >> 268                for ( its = available_nat->begin() ; its != available_nat->end() ; its++ ) 
298                   G4cout << *its << G4endl;       269                   G4cout << *its << G4endl;
299                G4cout << G4endl;                  270                G4cout << G4endl;
300             }                                     271             }
301          }                                        272          }
302          delete available_nat;                    273          delete available_nat;
303       }                                           274       }
304       delete available;                           275       delete available;
305 //    return NULL if exact data is not availab    276 //    return NULL if exact data is not available               
306       return anLENDTarget; // return NULL         277       return anLENDTarget; // return NULL   
307    }                                              278    }
308                                                   279    
309    return anLENDTarget;                           280    return anLENDTarget; 
310 }                                                 281 }
311                                                   282 
312                                                   283 
313 std::vector< G4String > G4LENDManager::IsLENDT    284 std::vector< G4String > G4LENDManager::IsLENDTargetAvailable ( G4ParticleDefinition* proj , G4int iZ , G4int iA , G4int iM )
314 {                                                 285 {
315                                                   286 
316    std::vector< G4String > vEvaluation;           287    std::vector< G4String > vEvaluation; 
317    if ( proj_lend_map.find ( proj ) == proj_le << 288    if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) 
318    {                                              289    {
319       G4cout << proj->GetParticleName() << " i    290       G4cout << proj->GetParticleName() << " is not supported by this LEND." << G4endl;
320       return vEvaluation; // return empty         291       return vEvaluation; // return empty 
321    }                                              292    }
322                                                   293 
323    G4GIDI* xlend = proj_lend_map.find ( proj )    294    G4GIDI* xlend = proj_lend_map.find ( proj ) -> second; 
324    std::vector< std::string >* available =  xl    295    std::vector< std::string >* available =  xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
325                                                   296 
326    if ( available->size() > 0 ) {                 297    if ( available->size() > 0 ) {
327       for ( auto its = available->cbegin() ; i << 298       std::vector< std::string >::iterator its;
                                                   >> 299       for ( its = available->begin() ; its != available->end() ; its++ ) 
328          vEvaluation.push_back ( *its );          300          vEvaluation.push_back ( *its );
329    }                                              301    }
330    delete available;                              302    delete available;
331                                                   303 
332    return vEvaluation;                            304    return vEvaluation;
333 }                                                 305 }
334                                                   306 
335                                                   307 
336                                                   308 
337 G4int G4LENDManager::GetNucleusEncoding ( G4in    309 G4int G4LENDManager::GetNucleusEncoding ( G4int iZ , G4int iA , G4int iM ) 
338 {                                                 310 {   
339    G4int value = ionTable->GetNucleusEncoding(    311    G4int value = ionTable->GetNucleusEncoding( iZ , iA ); // Ground State
340                                                   312                                                      // G4double E=0.0, G4int J=0);
341    value += iM;                                   313    value += iM;
342    return value;                                  314    return value;
343 }                                                 315 }
344                                                   316 
345                                                   317 
346                                                   318 
347 void G4LENDManager::printBanner()                 319 void G4LENDManager::printBanner()
348 {                                                 320 {
349    G4cout << " <<BEGIN-copyright>> " << G4endl    321    G4cout << " <<BEGIN-copyright>> " << G4endl;
350    G4cout << " Copyright (c) 2010, Lawrence Li    322    G4cout << " Copyright (c) 2010, Lawrence Livermore National Security, LLC.  " << G4endl;
351    G4cout << " Produced at the Lawrence Liverm    323    G4cout << " Produced at the Lawrence Livermore National Laboratory " << G4endl;
352    G4cout << " Written by Bret R. Beck, beck6@    324    G4cout << " Written by Bret R. Beck, beck6@llnl.gov.  " << G4endl;
353    G4cout << " CODE-461393 " << G4endl;           325    G4cout << " CODE-461393 " << G4endl;
354    G4cout << " All rights reserved.  " << G4en    326    G4cout << " All rights reserved.  " << G4endl;
355    G4cout << "  " << G4endl;                      327    G4cout << "  " << G4endl;
356    G4cout << " This file is part of GIDI. For     328    G4cout << " This file is part of GIDI. For details, see nuclear.llnl.gov.  " << G4endl;
357    G4cout << " Please also read the \"Addition    329    G4cout << " Please also read the \"Additional BSD Notice\" at nuclear.llnl.gov.  " << G4endl;
358    G4cout << " " << G4endl;                       330    G4cout << " " << G4endl;
359    G4cout << " Redistribution and use in sourc    331    G4cout << " Redistribution and use in source and binary forms, with or without modification, " << G4endl;
360    G4cout << " are permitted provided that the    332    G4cout << " are permitted provided that the following conditions are met: " << G4endl;
361    G4cout << " " << G4endl;                       333    G4cout << " " << G4endl;
362    G4cout << "      1) Redistributions of sour    334    G4cout << "      1) Redistributions of source code must retain the above copyright notice, " << G4endl;
363    G4cout << "         this list of conditions    335    G4cout << "         this list of conditions and the disclaimer below.  " << G4endl;
364    G4cout << "      2) Redistributions in bina    336    G4cout << "      2) Redistributions in binary form must reproduce the above copyright notice, " << G4endl;
365    G4cout << "         this list of conditions    337    G4cout << "         this list of conditions and the disclaimer (as noted below) in the " << G4endl;
366    G4cout << "          documentation and/or o    338    G4cout << "          documentation and/or other materials provided with the distribution.  " << G4endl;
367    G4cout << "      3) Neither the name of the    339    G4cout << "      3) Neither the name of the LLNS/LLNL nor the names of its contributors may be " << G4endl;
368    G4cout << "         used to endorse or prom    340    G4cout << "         used to endorse or promote products derived from this software without " << G4endl;
369    G4cout << "         specific prior written     341    G4cout << "         specific prior written permission.  " << G4endl;
370    G4cout << " " << G4endl;                       342    G4cout << " " << G4endl;
371    G4cout << " THIS SOFTWARE IS PROVIDED BY TH    343    G4cout << " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY " << G4endl;
372    G4cout << " EXPRESS OR IMPLIED WARRANTIES,     344    G4cout << " EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES " << G4endl;
373    G4cout << " OF MERCHANTABILITY AND FITNESS     345    G4cout << " OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT " << G4endl;
374    G4cout << " SHALL LAWRENCE LIVERMORE NATION    346    G4cout << " SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR " << G4endl;
375    G4cout << " CONTRIBUTORS BE LIABLE FOR ANY     347    G4cout << " CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " << G4endl;
376    G4cout << " CONSEQUENTIAL DAMAGES (INCLUDIN    348    G4cout << " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS " << G4endl;
377    G4cout << " OR SERVICES;  LOSS OF USE, DATA    349    G4cout << " OR SERVICES;  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED " << G4endl; 
378    G4cout << " AND ON  ANY THEORY OF LIABILITY    350    G4cout << " AND ON  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " << G4endl; 
379    G4cout << " (INCLUDING NEGLIGENCE OR OTHERW    351    G4cout << " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, " << G4endl;
380    G4cout << " EVEN IF ADVISED OF THE POSSIBIL    352    G4cout << " EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  " << G4endl;
381    G4cout << " <<END-copyright>> " << G4endl;     353    G4cout << " <<END-copyright>> " << G4endl;
382 }                                                 354 }
383                                                   355 
384                                                   356 
385 G4bool G4LENDManager::RequestChangeOfVerboseLe    357 G4bool G4LENDManager::RequestChangeOfVerboseLevel( G4int newValue )
386 {                                                 358 {
387    G4bool result=false;                           359    G4bool result=false;
388    if ( newValue >= verboseLevel)                 360    if ( newValue >= verboseLevel) 
389    {                                              361    {
390       verboseLevel = newValue;                    362       verboseLevel = newValue;
391       result=true;                                363       result=true;
392    }                                              364    }
393    else                                           365    else
394    {                                              366    {
395       G4cout << "Since other LEND model or cro    367       G4cout << "Since other LEND model or cross section have set the higher verbose level (" << verboseLevel << ") in LENDManager, you cannot change the value now." << G4endl; 
396    }                                              368    }
397                                                   369 
398    return result;                                 370    return result;
399 }                                              << 
400                                                << 
401 G4double G4LENDManager::GetExcitationEnergyOfE << 
402 {                                              << 
403    G4double EE = 0.0;                          << 
404    G4int nucCode = GetNucleusEncoding( iZ , iA << 
405    auto it = mExcitationEnergy.find( nucCode ) << 
406    if ( it != mExcitationEnergy.cend() ) {     << 
407       EE = it->second;                         << 
408    } else {                                    << 
409       if ( iM == 0 ) {                         << 
410          G4cout << "G4LENDManager::GetExcitati << 
411       } else {                                 << 
412          G4cout << "Can not find excitation en << 
413       }                                        << 
414    }                                           << 
415    return EE;                                  << 
416 }                                                 371 }
417                                                   372