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.7.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 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( std::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 = std::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 = std::getenv("G4LENDDATA");
 76       xmcf_gamma += "/gammas.map";                 76       xmcf_gamma += "/gammas.map";
 77       xmcf_p = G4FindDataDir("G4LENDDATA");    <<  77       xmcf_p = std::getenv("G4LENDDATA");
 78       xmcf_p += "/protons.map";                    78       xmcf_p += "/protons.map";
 79       xmcf_d = G4FindDataDir("G4LENDDATA");    <<  79       xmcf_d = std::getenv("G4LENDDATA");
 80       xmcf_d += "/deuterons.map";                  80       xmcf_d += "/deuterons.map";
 81       xmcf_t = G4FindDataDir("G4LENDDATA");    <<  81       xmcf_t = std::getenv("G4LENDDATA");
 82       xmcf_t += "/tritons.map";                    82       xmcf_t += "/tritons.map";
 83       xmcf_he3 = G4FindDataDir("G4LENDDATA");  <<  83       xmcf_he3 = std::getenv("G4LENDDATA");
 84       xmcf_he3 += "/He3s.map";                     84       xmcf_he3 += "/He3s.map";
 85       xmcf_a = G4FindDataDir("G4LENDDATA");    <<  85       xmcf_a = std::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    146    //Prepare table of excitation energy of excited isomers
147    G4int pdgCode;                                 147    G4int pdgCode;
148    //              iZ        iA    iM ->Co58m1    148    //              iZ        iA    iM ->Co58m1
149    pdgCode= 10000 * 27 + 10 * 58 + 1;             149    pdgCode= 10000 * 27 + 10 * 58 + 1;
150    pdgCode = GetNucleusEncoding( 27 , 58 , 1 )    150    pdgCode = GetNucleusEncoding( 27 , 58 , 1 );
151    mExcitationEnergy.insert(std::pair<G4int,G4    151    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 24890 *CLHEP::eV));
152    pdgCode= 10000 * 47 + 10 * 110 + 1;            152    pdgCode= 10000 * 47 + 10 * 110 + 1;
153    pdgCode = GetNucleusEncoding( 47 , 110 , 1     153    pdgCode = GetNucleusEncoding( 47 , 110 , 1 );
154    mExcitationEnergy.insert(std::pair<G4int,G4    154    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 117590 *CLHEP::eV));
155    pdgCode= 10000 * 48 + 10 * 115 + 1;            155    pdgCode= 10000 * 48 + 10 * 115 + 1;
156    pdgCode = GetNucleusEncoding( 48 , 115 , 1     156    pdgCode = GetNucleusEncoding( 48 , 115 , 1 );
157    mExcitationEnergy.insert(std::pair<G4int,G4    157    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 181000 *CLHEP::eV));
158    pdgCode= 10000 * 52 + 10 * 127 + 1;            158    pdgCode= 10000 * 52 + 10 * 127 + 1;
159    pdgCode = GetNucleusEncoding( 52 , 127 , 1     159    pdgCode = GetNucleusEncoding( 52 , 127 , 1 );
160    mExcitationEnergy.insert(std::pair<G4int,G4    160    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode,  88260 *CLHEP::eV));
161    pdgCode= 10000 * 52 + 10 * 129 + 1;            161    pdgCode= 10000 * 52 + 10 * 129 + 1;
162    pdgCode = GetNucleusEncoding( 52 , 129 , 1     162    pdgCode = GetNucleusEncoding( 52 , 129 , 1 );
163    mExcitationEnergy.insert(std::pair<G4int,G4    163    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 105280 *CLHEP::eV));
164    pdgCode= 10000 * 61 + 10 * 148 + 1;            164    pdgCode= 10000 * 61 + 10 * 148 + 1;
165    pdgCode = GetNucleusEncoding( 61 , 148 , 1     165    pdgCode = GetNucleusEncoding( 61 , 148 , 1 );
166    mExcitationEnergy.insert(std::pair<G4int,G4    166    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 137900 *CLHEP::eV));
167    pdgCode= 10000 * 67 + 10 * 166 + 1;            167    pdgCode= 10000 * 67 + 10 * 166 + 1;
168    pdgCode = GetNucleusEncoding( 67 , 166 , 1     168    pdgCode = GetNucleusEncoding( 67 , 166 , 1 );
169    mExcitationEnergy.insert(std::pair<G4int,G4    169    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode,   5985 *CLHEP::eV));
170    pdgCode= 10000 * 95 + 10 * 242 + 1;            170    pdgCode= 10000 * 95 + 10 * 242 + 1;
171    pdgCode = GetNucleusEncoding( 95 , 242 , 1     171    pdgCode = GetNucleusEncoding( 95 , 242 , 1 );
172    mExcitationEnergy.insert(std::pair<G4int,G4    172    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode,  48600 *CLHEP::eV));
173    pdgCode= 10000 * 95 + 10 * 244 + 1;            173    pdgCode= 10000 * 95 + 10 * 244 + 1;
174    pdgCode = GetNucleusEncoding( 95 , 244 , 1     174    pdgCode = GetNucleusEncoding( 95 , 244 , 1 );
175    mExcitationEnergy.insert(std::pair<G4int,G4    175    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 87999.9*CLHEP::eV));
176    pdgCode= 10000 * 99 + 10 * 254 + 1;            176    pdgCode= 10000 * 99 + 10 * 254 + 1;
177    pdgCode = GetNucleusEncoding( 99 , 254 , 1     177    pdgCode = GetNucleusEncoding( 99 , 254 , 1 );
178    mExcitationEnergy.insert(std::pair<G4int,G4    178    mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode,  84200 *CLHEP::eV));
179                                                   179 
180 }                                                 180 }
181                                                   181    
182                                                   182 
183                                                   183 
184 G4LENDManager::~G4LENDManager()                   184 G4LENDManager::~G4LENDManager()
185 {                                                 185 {
186                                                   186    
187 // deleting target                                187 // deleting target
188    for ( auto it = v_lend_target.cbegin() ; it << 188    for ( std::vector < lend_target >::iterator 
                                                   >> 189          it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
189    {                                              190    {
190         (*it).lend->freeTarget( it->target );     191         (*it).lend->freeTarget( it->target ); 
191    }                                              192    }
192                                                   193 
193 // deleting lend                                  194 // deleting lend
194    for ( auto it = proj_lend_map.cbegin() ; it << 195    for ( std::map < G4ParticleDefinition* , G4GIDI* >::iterator 
                                                   >> 196          it = proj_lend_map.begin() ; it != proj_lend_map.end() ; it++ )
195    {                                              197    {
196       delete it->second;                          198       delete it->second;
197    }                                              199    }
198                                                   200 
199    //delete ionTable;                             201    //delete ionTable;
200    delete nistElementBuilder;                     202    delete nistElementBuilder;
201                                                   203 
202 }                                                 204 }
203                                                   205 
204                                                   206 
205                                                   207 
206 G4GIDI_target* G4LENDManager::GetLENDTarget( G << 208 G4GIDI_target* G4LENDManager::GetLENDTarget( G4ParticleDefinition* proj , G4String evaluation , G4int iZ , G4int iA , G4int iM )
207 {                                                 209 {
208                                                   210 
209    G4GIDI_target* anLENDTarget = NULL;            211    G4GIDI_target* anLENDTarget = NULL;
210                                                   212 
211    if ( iM > 9 ) {                                213    if ( iM > 9 ) { 
212       throw G4HadronicException(__FILE__, __LI    214       throw G4HadronicException(__FILE__, __LINE__, "Requested isomer level of target is too high." ); 
213    }                                              215    }
214                                                   216 
215    G4int iTarg = GetNucleusEncoding( iZ , iA ,    217    G4int iTarg = GetNucleusEncoding( iZ , iA , iM );
216                                                   218 
217    // Searching in current map                    219    // Searching in current map
218    for ( auto it = v_lend_target.cbegin() ; it << 220    for ( std::vector < lend_target >::iterator 
                                                   >> 221          it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
219    {                                              222    {
220       if ( it->proj == proj && it->target_code    223       if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation ) 
221       {                                           224       {
222          //find!                                  225          //find! 
223          return it->target;                       226          return it->target;
224       }                                           227       }
225    }                                              228    }
226                                                   229 
227                                                   230 
228    if ( proj_lend_map.find ( proj ) == proj_le << 231    if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) {
229       G4cout << proj->GetParticleName() << " i    232       G4cout << proj->GetParticleName() << " is not supported by this LEND library." << G4endl;
230       return anLENDTarget; // return NULL         233       return anLENDTarget; // return NULL 
231    }                                              234    }
232                                                   235 
233    G4GIDI* xlend = proj_lend_map.find ( proj )    236    G4GIDI* xlend = proj_lend_map.find ( proj ) -> second; 
234                                                   237 
235    if ( xlend->isThisDataAvailable( evaluation    238    if ( xlend->isThisDataAvailable( evaluation, iZ, iA , iM ) )
236    {                                              239    {
237                                                   240 
238       if ( verboseLevel > 1 ) {                   241       if ( verboseLevel > 1 ) {
239          G4cout << evaluation << " for " << io    242          G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 ) 
240                  << " with Isomer level of " <    243                  << " with Isomer level of " << iM  << " is exist in this LEND." << G4endl;
241       }                                           244       }
242                                                   245 
243       anLENDTarget = xlend->readTarget( evalua    246       anLENDTarget = xlend->readTarget( evaluation , iZ , iA , iM );
244                                                   247 
245       lend_target new_target;                     248       lend_target new_target; 
246       new_target.lend = xlend;                    249       new_target.lend = xlend; 
247       new_target.target = anLENDTarget;           250       new_target.target = anLENDTarget; 
248       new_target.proj = proj;                     251       new_target.proj = proj;
249       new_target.evaluation = evaluation;         252       new_target.evaluation = evaluation;
250       new_target.target_code = iTarg;             253       new_target.target_code = iTarg;
251                                                   254       
252       v_lend_target.push_back( std::move(new_t << 255       v_lend_target.push_back( new_target );
253                                                   256 
254 //    found EXACT                                 257 //    found EXACT
255       return anLENDTarget;                        258       return anLENDTarget;
256                                                   259 
257    }                                              260    }
258    else                                           261    else 
259    {                                              262    {
260 //    NO EXACT DATA (Evaluatino & Z,A,M)          263 //    NO EXACT DATA (Evaluatino & Z,A,M)
261                                                   264                                                                         
262       //Searching available evaluation and nat    265       //Searching available evaluation and natural abundance data and give suggestions.  
263       //                                          266       //
264       if ( verboseLevel > 1 )                     267       if ( verboseLevel > 1 ) 
265          G4cout << evaluation << " for " << io    268          G4cout << evaluation << " for " << ionTable->GetIonName( iZ , iA , 0 ) 
266                 << " with Isomer level of " <<    269                 << " with Isomer level of " << iM << " is not exist in this LEND." << G4endl;
267                                                   270 
268       std::vector< std::string >* available =     271       std::vector< std::string >* available =  xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
269       if ( available->size() > 0 ) {              272       if ( available->size() > 0 ) {
270 //       EXACT Z,A,M but Evaluation is differe    273 //       EXACT Z,A,M but Evaluation is different 
271          if ( verboseLevel > 1 )                  274          if ( verboseLevel > 1 ) 
272          {                                        275          {
273             G4cout << " However you can use fo    276             G4cout << " However you can use following evaluation(s) for the target. " << G4endl;
274                                                   277 
275             for ( auto its = available->cbegin << 278             std::vector< std::string >::iterator its;
                                                   >> 279             for ( its = available->begin() ; its != available->end() ; its++ ) 
276                G4cout << *its << G4endl;          280                G4cout << *its << G4endl;
277                                                   281 
278             G4cout << G4endl;                     282             G4cout << G4endl;
279          }                                        283          }
280       } else if ( xlend->isThisDataAvailable(     284       } else if ( xlend->isThisDataAvailable( evaluation, iZ, 0 , iM ) ) {
281 //                                                285 //      
282 //    checking natural abundance data for Z       286 //    checking natural abundance data for Z
283 //                                                287 //
284 //       EXACT natural abundance data for the     288 //       EXACT natural abundance data for the evaluation 
285          if ( verboseLevel > 1 )                  289          if ( verboseLevel > 1 ) 
286             G4cout << " However you can use na    290             G4cout << " However you can use natural abundance data for the target. " << G4endl;
287       }                                           291       }
288       else                                        292       else
289       {                                           293       {
290          std::vector< std::string >* available    294          std::vector< std::string >* available_nat =  xlend->getNamesOfAvailableLibraries( iZ, 0 , iM );
291 //                                                295 //
292          if ( available_nat->size() > 0 ) {       296          if ( available_nat->size() > 0 ) {
293 //          EXACT natural abundance data for Z    297 //          EXACT natural abundance data for Z but differnet evaluation
294             if ( verboseLevel > 1 ) {             298             if ( verboseLevel > 1 ) {
295                G4cout << " However you can use    299                G4cout << " However you can use following evaluation(s) for natural abundace of the target. " << G4endl;
296                                                   300 
297                for ( auto its = available_nat- << 301                std::vector< std::string >::iterator its;
                                                   >> 302                for ( its = available_nat->begin() ; its != available_nat->end() ; its++ ) 
298                   G4cout << *its << G4endl;       303                   G4cout << *its << G4endl;
299                G4cout << G4endl;                  304                G4cout << G4endl;
300             }                                     305             }
301          }                                        306          }
302          delete available_nat;                    307          delete available_nat;
303       }                                           308       }
304       delete available;                           309       delete available;
305 //    return NULL if exact data is not availab    310 //    return NULL if exact data is not available               
306       return anLENDTarget; // return NULL         311       return anLENDTarget; // return NULL   
307    }                                              312    }
308                                                   313    
309    return anLENDTarget;                           314    return anLENDTarget; 
310 }                                                 315 }
311                                                   316 
312                                                   317 
313 std::vector< G4String > G4LENDManager::IsLENDT    318 std::vector< G4String > G4LENDManager::IsLENDTargetAvailable ( G4ParticleDefinition* proj , G4int iZ , G4int iA , G4int iM )
314 {                                                 319 {
315                                                   320 
316    std::vector< G4String > vEvaluation;           321    std::vector< G4String > vEvaluation; 
317    if ( proj_lend_map.find ( proj ) == proj_le << 322    if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) 
318    {                                              323    {
319       G4cout << proj->GetParticleName() << " i    324       G4cout << proj->GetParticleName() << " is not supported by this LEND." << G4endl;
320       return vEvaluation; // return empty         325       return vEvaluation; // return empty 
321    }                                              326    }
322                                                   327 
323    G4GIDI* xlend = proj_lend_map.find ( proj )    328    G4GIDI* xlend = proj_lend_map.find ( proj ) -> second; 
324    std::vector< std::string >* available =  xl    329    std::vector< std::string >* available =  xlend->getNamesOfAvailableLibraries( iZ, iA , iM );
325                                                   330 
326    if ( available->size() > 0 ) {                 331    if ( available->size() > 0 ) {
327       for ( auto its = available->cbegin() ; i << 332       std::vector< std::string >::iterator its;
                                                   >> 333       for ( its = available->begin() ; its != available->end() ; its++ ) 
328          vEvaluation.push_back ( *its );          334          vEvaluation.push_back ( *its );
329    }                                              335    }
330    delete available;                              336    delete available;
331                                                   337 
332    return vEvaluation;                            338    return vEvaluation;
333 }                                                 339 }
334                                                   340 
335                                                   341 
336                                                   342 
337 G4int G4LENDManager::GetNucleusEncoding ( G4in    343 G4int G4LENDManager::GetNucleusEncoding ( G4int iZ , G4int iA , G4int iM ) 
338 {                                                 344 {   
339    G4int value = ionTable->GetNucleusEncoding(    345    G4int value = ionTable->GetNucleusEncoding( iZ , iA ); // Ground State
340                                                   346                                                      // G4double E=0.0, G4int J=0);
341    value += iM;                                   347    value += iM;
342    return value;                                  348    return value;
343 }                                                 349 }
344                                                   350 
345                                                   351 
346                                                   352 
347 void G4LENDManager::printBanner()                 353 void G4LENDManager::printBanner()
348 {                                                 354 {
349    G4cout << " <<BEGIN-copyright>> " << G4endl    355    G4cout << " <<BEGIN-copyright>> " << G4endl;
350    G4cout << " Copyright (c) 2010, Lawrence Li    356    G4cout << " Copyright (c) 2010, Lawrence Livermore National Security, LLC.  " << G4endl;
351    G4cout << " Produced at the Lawrence Liverm    357    G4cout << " Produced at the Lawrence Livermore National Laboratory " << G4endl;
352    G4cout << " Written by Bret R. Beck, beck6@    358    G4cout << " Written by Bret R. Beck, beck6@llnl.gov.  " << G4endl;
353    G4cout << " CODE-461393 " << G4endl;           359    G4cout << " CODE-461393 " << G4endl;
354    G4cout << " All rights reserved.  " << G4en    360    G4cout << " All rights reserved.  " << G4endl;
355    G4cout << "  " << G4endl;                      361    G4cout << "  " << G4endl;
356    G4cout << " This file is part of GIDI. For     362    G4cout << " This file is part of GIDI. For details, see nuclear.llnl.gov.  " << G4endl;
357    G4cout << " Please also read the \"Addition    363    G4cout << " Please also read the \"Additional BSD Notice\" at nuclear.llnl.gov.  " << G4endl;
358    G4cout << " " << G4endl;                       364    G4cout << " " << G4endl;
359    G4cout << " Redistribution and use in sourc    365    G4cout << " Redistribution and use in source and binary forms, with or without modification, " << G4endl;
360    G4cout << " are permitted provided that the    366    G4cout << " are permitted provided that the following conditions are met: " << G4endl;
361    G4cout << " " << G4endl;                       367    G4cout << " " << G4endl;
362    G4cout << "      1) Redistributions of sour    368    G4cout << "      1) Redistributions of source code must retain the above copyright notice, " << G4endl;
363    G4cout << "         this list of conditions    369    G4cout << "         this list of conditions and the disclaimer below.  " << G4endl;
364    G4cout << "      2) Redistributions in bina    370    G4cout << "      2) Redistributions in binary form must reproduce the above copyright notice, " << G4endl;
365    G4cout << "         this list of conditions    371    G4cout << "         this list of conditions and the disclaimer (as noted below) in the " << G4endl;
366    G4cout << "          documentation and/or o    372    G4cout << "          documentation and/or other materials provided with the distribution.  " << G4endl;
367    G4cout << "      3) Neither the name of the    373    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    374    G4cout << "         used to endorse or promote products derived from this software without " << G4endl;
369    G4cout << "         specific prior written     375    G4cout << "         specific prior written permission.  " << G4endl;
370    G4cout << " " << G4endl;                       376    G4cout << " " << G4endl;
371    G4cout << " THIS SOFTWARE IS PROVIDED BY TH    377    G4cout << " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY " << G4endl;
372    G4cout << " EXPRESS OR IMPLIED WARRANTIES,     378    G4cout << " EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES " << G4endl;
373    G4cout << " OF MERCHANTABILITY AND FITNESS     379    G4cout << " OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT " << G4endl;
374    G4cout << " SHALL LAWRENCE LIVERMORE NATION    380    G4cout << " SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR " << G4endl;
375    G4cout << " CONTRIBUTORS BE LIABLE FOR ANY     381    G4cout << " CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " << G4endl;
376    G4cout << " CONSEQUENTIAL DAMAGES (INCLUDIN    382    G4cout << " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS " << G4endl;
377    G4cout << " OR SERVICES;  LOSS OF USE, DATA    383    G4cout << " OR SERVICES;  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED " << G4endl; 
378    G4cout << " AND ON  ANY THEORY OF LIABILITY    384    G4cout << " AND ON  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " << G4endl; 
379    G4cout << " (INCLUDING NEGLIGENCE OR OTHERW    385    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    386    G4cout << " EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  " << G4endl;
381    G4cout << " <<END-copyright>> " << G4endl;     387    G4cout << " <<END-copyright>> " << G4endl;
382 }                                                 388 }
383                                                   389 
384                                                   390 
385 G4bool G4LENDManager::RequestChangeOfVerboseLe    391 G4bool G4LENDManager::RequestChangeOfVerboseLevel( G4int newValue )
386 {                                                 392 {
387    G4bool result=false;                           393    G4bool result=false;
388    if ( newValue >= verboseLevel)                 394    if ( newValue >= verboseLevel) 
389    {                                              395    {
390       verboseLevel = newValue;                    396       verboseLevel = newValue;
391       result=true;                                397       result=true;
392    }                                              398    }
393    else                                           399    else
394    {                                              400    {
395       G4cout << "Since other LEND model or cro    401       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    }                                              402    }
397                                                   403 
398    return result;                                 404    return result;
399 }                                                 405 }
400                                                   406 
401 G4double G4LENDManager::GetExcitationEnergyOfE    407 G4double G4LENDManager::GetExcitationEnergyOfExcitedIsomer( G4int iZ , G4int iA , G4int iM )
402 {                                                 408 {
403    G4double EE = 0.0;                             409    G4double EE = 0.0;
404    G4int nucCode = GetNucleusEncoding( iZ , iA    410    G4int nucCode = GetNucleusEncoding( iZ , iA , iM );
405    auto it = mExcitationEnergy.find( nucCode )    411    auto it = mExcitationEnergy.find( nucCode );
406    if ( it != mExcitationEnergy.cend() ) {     << 412    if ( it != mExcitationEnergy.end() ) {
407       EE = it->second;                            413       EE = it->second;
408    } else {                                       414    } else {
409       if ( iM == 0 ) {                            415       if ( iM == 0 ) {
410          G4cout << "G4LENDManager::GetExcitati    416          G4cout << "G4LENDManager::GetExcitationEnergyOfExcitedIsomer is called for ground state (iM=0) nucleus" << G4endl;
411       } else {                                    417       } else {
412          G4cout << "Can not find excitation en    418          G4cout << "Can not find excitation energy for Z = " << iZ << ", A = " << iA << ", M = " << iM << " and the energy set to 0." << G4endl;
413       }                                           419       }
414    }                                              420    }
415    return EE;                                     421    return EE;
416 }                                                 422 }
417                                                   423