47 G4LENDManager::G4LENDManager()
54 if( getenv(
"G4LENDDATA") == NULL ) {
55 throw G4HadronicException(__FILE__, __LINE__,
" Please setenv G4LENDDATA to point to the LEND files." );
57 xmcf = getenv(
"G4LENDDATA");
58 xmcf +=
"/xmcf.n_1.map";
67 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Neutron::Neutron() ,
new G4GIDI( 1 , xmcf ) ) );
72 v_lend_target.clear();
81 G4LENDManager::~G4LENDManager()
85 for ( std::vector < lend_target >::iterator
86 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
88 (*it).lend->freeTarget( it->target );
92 for ( std::map < G4ParticleDefinition* , G4GIDI* >::iterator
93 it = proj_lend_map.begin() ; it != proj_lend_map.end() ; it++ )
99 delete nistElementBuilder;
111 throw G4HadronicException(__FILE__, __LINE__,
"Requested isomer level of target is too high." );
117 for ( std::vector < lend_target >::iterator
118 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
120 if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation )
128 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) {
138 if ( verboseLevel > 1 ) {
140 <<
" with Isomer level of " << iM <<
" is exist in this LEND." <<
G4endl;
143 anLENDTarget = xlend->
readTarget( evaluation , iZ , iA , iM );
146 new_target.
lend = xlend;
147 new_target.
target = anLENDTarget;
148 new_target.
proj = proj;
152 v_lend_target.push_back( new_target );
164 if ( verboseLevel > 1 )
166 <<
" with Isomer level of " << iM <<
" is not exist in this LEND." <<
G4endl;
169 if ( available->size() > 0 ) {
171 if ( verboseLevel > 1 )
173 G4cout <<
" However you can use following evaluation(s) for the target. " <<
G4endl;
175 std::vector< std::string >::iterator its;
176 for ( its = available->begin() ; its != available->end() ; its++ )
186 if ( verboseLevel > 1 )
187 G4cout <<
" However you can use natural abundance data for the target. " <<
G4endl;
193 if ( available_nat->size() > 0 ) {
195 if ( verboseLevel > 1 ) {
196 G4cout <<
" However you can use following evaluation(s) for natural abundace of the target. " <<
G4endl;
198 std::vector< std::string >::iterator its;
199 for ( its = available_nat->begin() ; its != available_nat->end() ; its++ )
204 delete available_nat;
218 std::vector< G4String > vEvaluation;
219 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() )
228 if ( available->size() > 0 ) {
229 std::vector< std::string >::iterator its;
230 for ( its = available->begin() ; its != available->end() ; its++ )
231 vEvaluation.push_back ( *its );
250 void G4LENDManager::printBanner()
253 G4cout <<
" Copyright (c) 2010, Lawrence Livermore National Security, LLC. " <<
G4endl;
254 G4cout <<
" Produced at the Lawrence Livermore National Laboratory " <<
G4endl;
255 G4cout <<
" Written by Bret R. Beck, beck6@llnl.gov. " <<
G4endl;
259 G4cout <<
" This file is part of GIDI. For details, see nuclear.llnl.gov. " <<
G4endl;
260 G4cout <<
" Please also read the \"Additional BSD Notice\" at nuclear.llnl.gov. " <<
G4endl;
262 G4cout <<
" Redistribution and use in source and binary forms, with or without modification, " <<
G4endl;
263 G4cout <<
" are permitted provided that the following conditions are met: " <<
G4endl;
265 G4cout <<
" 1) Redistributions of source code must retain the above copyright notice, " <<
G4endl;
266 G4cout <<
" this list of conditions and the disclaimer below. " <<
G4endl;
267 G4cout <<
" 2) Redistributions in binary form must reproduce the above copyright notice, " <<
G4endl;
268 G4cout <<
" this list of conditions and the disclaimer (as noted below) in the " <<
G4endl;
269 G4cout <<
" documentation and/or other materials provided with the distribution. " <<
G4endl;
270 G4cout <<
" 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be " <<
G4endl;
271 G4cout <<
" used to endorse or promote products derived from this software without " <<
G4endl;
272 G4cout <<
" specific prior written permission. " <<
G4endl;
274 G4cout <<
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY " <<
G4endl;
275 G4cout <<
" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES " <<
G4endl;
276 G4cout <<
" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT " <<
G4endl;
277 G4cout <<
" SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR " <<
G4endl;
278 G4cout <<
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " <<
G4endl;
279 G4cout <<
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS " <<
G4endl;
280 G4cout <<
" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED " <<
G4endl;
281 G4cout <<
" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " <<
G4endl;
282 G4cout <<
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, " <<
G4endl;
283 G4cout <<
" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. " <<
G4endl;
291 if ( newValue >= verboseLevel)
293 verboseLevel = newValue;
298 G4cout <<
"Since other LEND model or cross section have set the higher verbose level (" << verboseLevel <<
") in LENDManager, you cannot change the value now." <<
G4endl;
G4double G4NeutronHPJENDLHEData::G4double result
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
const G4String & GetParticleName() const
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
G4GIDI_target * GetLENDTarget(G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
G4ParticleDefinition * proj
G4GLOB_DLL std::ostream G4cout
std::vector< std::string > * getNamesOfAvailableLibraries(int iZ, int iA, int iM=0)
bool isThisDataAvailable(std::string &lib_name, int iZ, int iA, int iM=0)
static G4Neutron * Neutron()
std::vector< G4String > IsLENDTargetAvailable(G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
G4GIDI_target * readTarget(std::string &lib_name, int iZ, int iA, int iM=0, bool bind=true)
const XML_Char int const XML_Char * value
G4bool RequestChangeOfVerboseLevel(G4int)