53 if(!getenv(
"G4LENDDATA"))
54 throw G4HadronicException(__FILE__, __LINE__,
" Please setenv G4LENDDATA to point to the LEND files." );
56 G4String xmcf = getenv(
"G4LENDDATA");
57 xmcf = xmcf+
"/xmcf.n_1.map";
65 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Neutron::Neutron() , axLEND ) );
68 v_lend_target.clear();
81 for ( std::vector < lend_target >::iterator
82 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
84 (*it).lend->freeTarget( it->target );
88 for ( std::map < G4ParticleDefinition* , G4GIDI* >::iterator
89 it = proj_lend_map.begin() ; it != proj_lend_map.end() ; it++ )
95 delete nistElementBuilder;
109 for ( std::vector < lend_target >::iterator
110 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
113 if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation )
119 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() )
125 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
130 if ( verboseLevel > 1 )
131 G4cout << evaluation <<
" for " << ionTable->
GetIonName( iZ , iA , 0 ) <<
" is exist in this LEND." <<
G4endl;
133 anLENDTarget = xlend->
readTarget( evaluation , iZ , iA , iM );
136 new_target.
lend = xlend;
137 new_target.
target = anLENDTarget;
138 new_target.
proj = proj;
142 v_lend_target.push_back( new_target );
152 if ( verboseLevel > 1 )
153 G4cout << evaluation <<
" for " << ionTable->
GetIonName( iZ , iA , 0 ) <<
" is not exist in this LEND." <<
G4endl;
156 if ( available->size() > 0 )
159 if ( verboseLevel > 1 )
161 G4cout <<
" However you can use following evaluation(s) for the target. " <<
G4endl;
163 std::vector< std::string >::iterator its;
164 for ( its = available->begin() ; its != available->end() ; its++ )
176 if ( verboseLevel > 1 )
177 G4cout <<
" However you can use natural abundance data for the target. " <<
G4endl;
183 if ( available_nat->size() > 0 )
186 if ( verboseLevel > 1 )
188 G4cout <<
" However you can use following evaluation(s) for natural abundace of the target. " <<
G4endl;
190 std::vector< std::string >::iterator its;
191 for ( its = available_nat->begin() ; its != available_nat->end() ; its++ )
210 std::vector< G4String > answer;
211 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() )
217 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
220 if ( available->size() > 0 )
222 std::vector< std::string >::iterator its;
223 for ( its = available->begin() ; its != available->end() ; its++ )
224 answer.push_back ( *its );
232void G4LENDManager::printBanner()
235 G4cout <<
" Copyright (c) 2010, Lawrence Livermore National Security, LLC. " <<
G4endl;
236 G4cout <<
" Produced at the Lawrence Livermore National Laboratory " <<
G4endl;
241 G4cout <<
" This file is part of GIDI. For details, see nuclear.llnl.gov. " <<
G4endl;
242 G4cout <<
" Please also read the \"Additional BSD Notice\" at nuclear.llnl.gov. " <<
G4endl;
244 G4cout <<
" Redistribution and use in source and binary forms, with or without modification, " <<
G4endl;
245 G4cout <<
" are permitted provided that the following conditions are met: " <<
G4endl;
247 G4cout <<
" 1) Redistributions of source code must retain the above copyright notice, " <<
G4endl;
248 G4cout <<
" this list of conditions and the disclaimer below. " <<
G4endl;
249 G4cout <<
" 2) Redistributions in binary form must reproduce the above copyright notice, " <<
G4endl;
250 G4cout <<
" this list of conditions and the disclaimer (as noted below) in the " <<
G4endl;
251 G4cout <<
" documentation and/or other materials provided with the distribution. " <<
G4endl;
252 G4cout <<
" 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be " <<
G4endl;
253 G4cout <<
" used to endorse or promote products derived from this software without " <<
G4endl;
254 G4cout <<
" specific prior written permission. " <<
G4endl;
256 G4cout <<
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY " <<
G4endl;
257 G4cout <<
" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES " <<
G4endl;
258 G4cout <<
" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT " <<
G4endl;
259 G4cout <<
" SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR " <<
G4endl;
260 G4cout <<
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " <<
G4endl;
261 G4cout <<
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS " <<
G4endl;
262 G4cout <<
" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED " <<
G4endl;
263 G4cout <<
" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " <<
G4endl;
264 G4cout <<
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, " <<
G4endl;
265 G4cout <<
" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. " <<
G4endl;
273 if ( newValue >= verboseLevel)
275 verboseLevel = newValue;
280 G4cout <<
"Since other LEND model or cross section have set the higher verbose level (" << verboseLevel <<
") in LENDManager, you cannot change the value now." <<
G4endl;
G4DLLIMPORT std::ostream G4cout
bool isThisDataAvailable(std::string &lib_name, int iZ, int iA, int iM=0)
G4GIDI_target * readTarget(std::string &lib_name, int iZ, int iA, int iM=0, bool bind=true)
std::vector< std::string > * getNamesOfAvailableLibraries(int iZ, int iA, int iM=0)
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int J=0)
const G4String & GetIonName(G4int Z, G4int A, G4double E) const
std::vector< G4String > IsLENDTargetAvailable(G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
G4bool RequestChangeOfVerboseLevel(G4int)
G4GIDI_target * GetLENDTarget(G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
static G4Neutron * Neutron()
const G4String & GetParticleName() const
G4ParticleDefinition * proj