37#ifndef G4ProductionCutsTable_hh
38#define G4ProductionCutsTable_hh 1
206 std::vector<G4MaterialCutsCouple*> coupleTable;
207 std::vector<std::vector<G4double>*> rangeCutTable;
208 std::vector<std::vector<G4double>*> energyCutTable;
210 std::vector<G4double>* userEnergyCuts[4] = {
nullptr,
nullptr,
nullptr,
nullptr};
223 enum { FixedStringLengthForStore = 32 };
226 G4int verboseLevel = 1;
235const std::vector<G4double>*
238 return rangeCutTable[pcIdx];
242const std::vector<G4double>*
245 return energyCutTable[pcIdx];
251 return coupleTable.size();
258 return coupleTable[std::size_t(i)];
264 if(firstUse)
return true;
265 for(
auto itr=coupleTable.cbegin(); itr!=coupleTable.cend(); ++itr)
267 if((*itr)->IsRecalcNeeded())
278 for(
auto itr=coupleTable.cbegin(); itr!=coupleTable.cend(); ++itr)
280 (*itr)->PhysicsTableUpdated();
288 return rangeDoubleVector[pcIdx];
295 return energyDoubleVector[pcIdx];
301 return defaultProductionCuts;
305G4bool G4ProductionCutsTable::IsCoupleUsedInTheRegion(
312 for(std::size_t iMate=0;iMate<nMaterial; ++iMate, ++mItr)
328 for(
auto cItr=coupleTable.cbegin(); cItr!=coupleTable.cend(); ++cItr)
330 if((*cItr)->GetMaterial()!=aMat)
continue;
331 if((*cItr)->GetProductionCuts()==aCut)
return (*cItr);
341 for(
auto cItr=coupleTable.cbegin(); cItr!=coupleTable.cend(); ++cItr)
343 if((*cItr)==aCouple)
return idx;
367 return &mccConversionTable;
const G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
const std::vector< G4double > * GetRangeCutsVector(std::size_t pcIdx) const
virtual G4bool RetrieveCutsInfo(const G4String &directory, G4bool ascii=false)
G4double * GetEnergyCutsDoubleVector(std::size_t pcIdx) const
G4bool RetrieveCutsTable(const G4String &directory, G4bool ascii=false)
virtual G4bool StoreCutsInfo(const G4String &directory, G4bool ascii=false)
G4double GetLowEdgeEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
void SetMaxEnergyCut(G4double value)
void UpdateCoupleTable(G4VPhysicalVolume *currentWorld)
G4double GetMaxEnergyCut()
void SetVerboseLevel(G4int value)
std::size_t GetTableSize() const
virtual G4bool CheckMaterialInfo(const G4String &directory, G4bool ascii=false)
G4int GetVerboseLevel() const
virtual G4bool StoreMaterialInfo(const G4String &directory, G4bool ascii=false)
G4double GetHighEdgeEnergy() const
virtual ~G4ProductionCutsTable()
G4double * GetRangeCutsDoubleVector(std::size_t pcIdx) const
const std::vector< G4double > * GetEnergyCutsVector(std::size_t pcIdx) const
G4bool StoreCutsTable(const G4String &directory, G4bool ascii=false)
G4ProductionCutsTable & operator=(const G4ProductionCutsTable &)=delete
const G4MCCIndexConversionTable * GetMCCIndexConversionTable() const
G4bool CheckForRetrieveCutsTable(const G4String &directory, G4bool ascii=false)
void PhysicsTableUpdated()
void CreateCoupleTables()
void SetEnergyRange(G4double lowedge, G4double highedge)
static G4ProductionCutsTable * GetProductionCutsTable()
G4int GetCoupleIndex(const G4MaterialCutsCouple *aCouple) const
virtual G4bool CheckMaterialCutsCoupleInfo(const G4String &directory, G4bool ascii=false)
void SetEnergyCutVector(const std::vector< G4double > &cutE, std::size_t idx)
G4ProductionCuts * GetDefaultProductionCuts() const
G4ProductionCutsTable(const G4ProductionCutsTable &)=delete
G4bool IsModified() const
G4double ConvertRangeToEnergy(const G4ParticleDefinition *particle, const G4Material *material, G4double range)
virtual G4bool StoreMaterialCutsCoupleInfo(const G4String &directory, G4bool ascii=false)
std::size_t GetNumberOfMaterials() const
G4ProductionCuts * GetProductionCuts() const
std::vector< G4Material * >::const_iterator GetMaterialIterator() const