54 YieldType_(WhichYield)
67 Verbosity_(Verbosity),
68 YieldType_(WhichYield)
80 Verbosity_(Verbosity),
81 YieldType_(WhichYield)
90 std::istringstream dataStream(std::ios::in);
102 EnergyGroupValues_ = NULL;
108 ReadInData(dataStream);
109 }
catch (std::exception & e)
111 delete YieldContainerTable_;
126 return EnergyGroupValues_;
135 return EnergyGroups_;
146 return NumberOfElements;
155 if(WhichYield >= 0 && WhichYield < YieldContainerTable_->G4GetNumberOfElements())
169 this->Verbosity_ = WhatVerbosity;
175ReadInData( std::istringstream& dataStream )
180 if(!dataStream.good())
185 "Fission product data not available");
189 throw std::exception();
410 G4int currentEnergy = 0;
423 std::vector< G4double > projectileEnergies;
424 std::map< const G4int, std::pair< std::vector< G4double >, std::vector< G4double > > > intermediateData;
425 std::map< const G4int, std::pair< std::vector< G4double >, std::vector< G4double > > >::iterator dataIterator;
427 while(dataStream.good())
429 dataStream >>
MT >> MF >> dummy >> blockCount;
431 correctMT =
MT == YieldType_;
433 for(
G4int b = 0; b < blockCount; ++b)
435 dataStream >> incidentEnergy >> itemCount >> interpolation;
436 maxSize = maxSize >= itemCount ? maxSize : itemCount;
441 projectileEnergies.push_back(incidentEnergy);
442 currentEnergy = projectileEnergies.size() - 1;
449 for(
G4int i = 0; i < itemCount; ++i)
451 dataStream >> isotope >> metastate >> yield;
455 identifier = isotope * 10 + metastate;
457 dataIterator = intermediateData.insert(std::make_pair(
460 std::vector< G4double >(projectileEnergies.size(), 0.0),
461 std::vector< G4double >(projectileEnergies.size(), 0.0)))).first;
463 if(dataIterator->second.first.size() < projectileEnergies.size())
465 dataIterator->second.first.resize(projectileEnergies.size());
466 dataIterator->second.second.resize(projectileEnergies.size());
469 dataIterator->second.first[currentEnergy] = yield;
470 dataIterator->second.second[currentEnergy] = error;
481 EnergyGroups_ = projectileEnergies.size();
482 EnergyGroupValues_ =
new G4double[EnergyGroups_];
488 for(
G4int energyGroup = 0; energyGroup < EnergyGroups_; energyGroup++)
491 EnergyGroupValues_[energyGroup] = projectileEnergies[energyGroup];
495 for(dataIterator = intermediateData.begin(); dataIterator != intermediateData.end(); ++dataIterator)
497 identifier = dataIterator->first;
498 metastate = identifier % 10;
513 "Unsupported metastable state supplied in fission yield data. Defaulting to the ground state");
519 NewProduct = (identifier - metastate) / 10;
521 for(
G4int energyGroup = 0; energyGroup < EnergyGroups_; energyGroup++)
523 if(energyGroup < (
signed)dataIterator->second.first.size())
525 yield = dataIterator->second.first[energyGroup];
526 error = dataIterator->second.second[energyGroup];
533 NewYield[energyGroup] = yield;
534 NewError[energyGroup] = error;
555 delete[] EnergyGroupValues_;
556 delete YieldContainerTable_;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4FFG_DATA_FUNCTIONENTER__
#define G4FFG_DATA_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4int G4GetNumberOfFissionProducts(void)
void Initialize(G4String dataFile)
void G4SetVerbosity(G4int WhatVerbosity)
G4double * G4GetEnergyGroupValues(void)
G4ENDFYieldDataContainer * G4GetYield(G4int WhichYield)
G4ENDFTapeRead(G4String FileLocation, G4String FileName, G4FFGEnumerations::YieldType WhichYield, G4FFGEnumerations::FissionCause WhichCause)
G4int G4GetNumberOfEnergyGroups(void)
void SetProduct(G4int Product)
void SetMetaState(G4FFGEnumerations::MetaState MetaState)
void SetYieldError(G4double *YieldError)
void SetYieldProbability(G4double *YieldProbability)
static G4ParticleHPManager * GetInstance()
void GetDataStream(G4String, std::istringstream &iss)
T * G4GetNewContainer(void)
G4long G4GetNumberOfElements(void)
T * G4GetContainer(unsigned int WhichContainer)