56G4LENDManager::G4LENDManager()
70 throw G4HadronicException(__FILE__, __LINE__,
" Please setenv G4LENDDATA to point to the LEND files." );
74 xmcf +=
"/neutrons.map";
76 xmcf_gamma +=
"/gammas.map";
78 xmcf_p +=
"/protons.map";
80 xmcf_d +=
"/deuterons.map";
82 xmcf_t +=
"/tritons.map";
84 xmcf_he3 +=
"/He3s.map";
86 xmcf_a +=
"/alphas.map";
95 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Neutron::Neutron() ,
new G4GIDI( 1 , xmcf ) ) );
97 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Gamma::Gamma() ,
new G4GIDI( 0 , xmcf_gamma ) ) );
100 aFile.open( xmcf_p.c_str() );
101 if ( aFile.good() ) {
103 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Proton::Proton() ,
new G4GIDI( 2 , xmcf_p ) ) );
107 aFile.open( xmcf_d.c_str() );
108 if ( aFile.good() ) {
114 aFile.open( xmcf_t.c_str() );
115 if ( aFile.good() ) {
117 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Triton::Triton() ,
new G4GIDI( 4 , xmcf_t ) ) );
121 aFile.open( xmcf_he3.c_str() );
122 if ( aFile.good() ) {
124 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4He3::He3() ,
new G4GIDI( 5 , xmcf_he3 ) ) );
128 aFile.open( xmcf_a.c_str() );
129 if ( aFile.good() ) {
131 proj_lend_map.insert ( std::pair < G4ParticleDefinition* , G4GIDI* > (
G4Alpha::Alpha() ,
new G4GIDI( 6 , xmcf_a ) ) );
140 v_lend_target.clear();
149 pdgCode= 10000 * 27 + 10 * 58 + 1;
150 pdgCode = GetNucleusEncoding( 27 , 58 , 1 );
151 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 24890 *CLHEP::eV));
152 pdgCode= 10000 * 47 + 10 * 110 + 1;
153 pdgCode = GetNucleusEncoding( 47 , 110 , 1 );
154 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 117590 *CLHEP::eV));
155 pdgCode= 10000 * 48 + 10 * 115 + 1;
156 pdgCode = GetNucleusEncoding( 48 , 115 , 1 );
157 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 181000 *CLHEP::eV));
158 pdgCode= 10000 * 52 + 10 * 127 + 1;
159 pdgCode = GetNucleusEncoding( 52 , 127 , 1 );
160 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 88260 *CLHEP::eV));
161 pdgCode= 10000 * 52 + 10 * 129 + 1;
162 pdgCode = GetNucleusEncoding( 52 , 129 , 1 );
163 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 105280 *CLHEP::eV));
164 pdgCode= 10000 * 61 + 10 * 148 + 1;
165 pdgCode = GetNucleusEncoding( 61 , 148 , 1 );
166 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 137900 *CLHEP::eV));
167 pdgCode= 10000 * 67 + 10 * 166 + 1;
168 pdgCode = GetNucleusEncoding( 67 , 166 , 1 );
169 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 5985 *CLHEP::eV));
170 pdgCode= 10000 * 95 + 10 * 242 + 1;
171 pdgCode = GetNucleusEncoding( 95 , 242 , 1 );
172 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 48600 *CLHEP::eV));
173 pdgCode= 10000 * 95 + 10 * 244 + 1;
174 pdgCode = GetNucleusEncoding( 95 , 244 , 1 );
175 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 87999.9*CLHEP::eV));
176 pdgCode= 10000 * 99 + 10 * 254 + 1;
177 pdgCode = GetNucleusEncoding( 99 , 254 , 1 );
178 mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 84200 *CLHEP::eV));
184G4LENDManager::~G4LENDManager()
188 for ( std::vector < lend_target >::iterator
189 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
191 (*it).lend->freeTarget( it->target );
195 for ( std::map < G4ParticleDefinition* , G4GIDI* >::iterator
196 it = proj_lend_map.begin() ; it != proj_lend_map.end() ; it++ )
202 delete nistElementBuilder;
214 throw G4HadronicException(__FILE__, __LINE__,
"Requested isomer level of target is too high." );
220 for ( std::vector < lend_target >::iterator
221 it = v_lend_target.begin() ; it != v_lend_target.end() ; it++ )
223 if ( it->proj == proj && it->target_code == iTarg && it->evaluation == evaluation )
231 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() ) {
236 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
241 if ( verboseLevel > 1 ) {
243 <<
" with Isomer level of " << iM <<
" is exist in this LEND." <<
G4endl;
246 anLENDTarget = xlend->
readTarget( evaluation , iZ , iA , iM );
249 new_target.
lend = xlend;
250 new_target.
target = anLENDTarget;
251 new_target.
proj = proj;
255 v_lend_target.push_back( new_target );
267 if ( verboseLevel > 1 )
269 <<
" with Isomer level of " << iM <<
" is not exist in this LEND." <<
G4endl;
272 if ( available->size() > 0 ) {
274 if ( verboseLevel > 1 )
276 G4cout <<
" However you can use following evaluation(s) for the target. " <<
G4endl;
278 std::vector< std::string >::iterator its;
279 for ( its = available->begin() ; its != available->end() ; its++ )
289 if ( verboseLevel > 1 )
290 G4cout <<
" However you can use natural abundance data for the target. " <<
G4endl;
296 if ( available_nat->size() > 0 ) {
298 if ( verboseLevel > 1 ) {
299 G4cout <<
" However you can use following evaluation(s) for natural abundace of the target. " <<
G4endl;
301 std::vector< std::string >::iterator its;
302 for ( its = available_nat->begin() ; its != available_nat->end() ; its++ )
307 delete available_nat;
321 std::vector< G4String > vEvaluation;
322 if ( proj_lend_map.find ( proj ) == proj_lend_map.end() )
328 G4GIDI* xlend = proj_lend_map.find ( proj ) -> second;
331 if ( available->size() > 0 ) {
332 std::vector< std::string >::iterator its;
333 for ( its = available->begin() ; its != available->end() ; its++ )
334 vEvaluation.push_back ( *its );
353void G4LENDManager::printBanner()
356 G4cout <<
" Copyright (c) 2010, Lawrence Livermore National Security, LLC. " <<
G4endl;
357 G4cout <<
" Produced at the Lawrence Livermore National Laboratory " <<
G4endl;
362 G4cout <<
" This file is part of GIDI. For details, see nuclear.llnl.gov. " <<
G4endl;
363 G4cout <<
" Please also read the \"Additional BSD Notice\" at nuclear.llnl.gov. " <<
G4endl;
365 G4cout <<
" Redistribution and use in source and binary forms, with or without modification, " <<
G4endl;
366 G4cout <<
" are permitted provided that the following conditions are met: " <<
G4endl;
368 G4cout <<
" 1) Redistributions of source code must retain the above copyright notice, " <<
G4endl;
369 G4cout <<
" this list of conditions and the disclaimer below. " <<
G4endl;
370 G4cout <<
" 2) Redistributions in binary form must reproduce the above copyright notice, " <<
G4endl;
371 G4cout <<
" this list of conditions and the disclaimer (as noted below) in the " <<
G4endl;
372 G4cout <<
" documentation and/or other materials provided with the distribution. " <<
G4endl;
373 G4cout <<
" 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be " <<
G4endl;
374 G4cout <<
" used to endorse or promote products derived from this software without " <<
G4endl;
375 G4cout <<
" specific prior written permission. " <<
G4endl;
377 G4cout <<
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY " <<
G4endl;
378 G4cout <<
" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES " <<
G4endl;
379 G4cout <<
" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT " <<
G4endl;
380 G4cout <<
" SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR " <<
G4endl;
381 G4cout <<
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " <<
G4endl;
382 G4cout <<
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS " <<
G4endl;
383 G4cout <<
" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED " <<
G4endl;
384 G4cout <<
" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " <<
G4endl;
385 G4cout <<
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, " <<
G4endl;
386 G4cout <<
" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. " <<
G4endl;
394 if ( newValue >= verboseLevel)
396 verboseLevel = newValue;
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;
411 auto it = mExcitationEnergy.find( nucCode );
412 if ( it != mExcitationEnergy.end() ) {
416 G4cout <<
"G4LENDManager::GetExcitationEnergyOfExcitedIsomer is called for ground state (iM=0) nucleus" <<
G4endl;
418 G4cout <<
"Can not find excitation energy for Z = " << iZ <<
", A = " << iA <<
", M = " << iM <<
" and the energy set to 0." <<
G4endl;
const char * G4FindDataDir(const char *)
G4GLOB_DLL std::ostream G4cout
static G4Deuteron * Deuteron()
G4GIDI_target * readTarget(std::string &lib_name, G4int iZ, G4int iA, G4int iM=0, G4bool bind=true)
std::vector< std::string > * getNamesOfAvailableLibraries(G4int iZ, G4int iA, G4int iM=0)
G4bool isThisDataAvailable(std::string &lib_name, G4int iZ, G4int iA, G4int iM=0)
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
G4double GetExcitationEnergyOfExcitedIsomer(G4int, G4int, G4int)
std::vector< G4String > IsLENDTargetAvailable(G4ParticleDefinition *, G4int iZ, G4int iA, G4int iM=0)
G4bool RequestChangeOfVerboseLevel(G4int)
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
G4GIDI_target * GetLENDTarget(G4ParticleDefinition *, G4String, G4int iZ, G4int iA, G4int iM=0)
static G4Neutron * Neutron()
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
static G4Triton * Triton()
G4ParticleDefinition * proj