37#ifndef G4ProductionCutsTable_hh
38#define G4ProductionCutsTable_hh 1
198 std::vector<G4MaterialCutsCouple*> coupleTable;
199 std::vector<std::vector<G4double>*> rangeCutTable;
200 std::vector<std::vector<G4double>*> energyCutTable;
213 enum { FixedStringLengthForStore = 32 };
216 G4int verboseLevel = 1;
225const std::vector<G4double>*
228 return rangeCutTable[pcIdx];
232const std::vector<G4double>*
235 return energyCutTable[pcIdx];
241 return coupleTable.size();
248 return coupleTable[std::size_t(i)];
254 if(firstUse)
return true;
255 for(
auto itr=coupleTable.cbegin(); itr!=coupleTable.cend(); ++itr)
257 if((*itr)->IsRecalcNeeded())
268 for(
auto itr=coupleTable.cbegin(); itr!=coupleTable.cend(); ++itr)
270 (*itr)->PhysicsTableUpdated();
278 return rangeDoubleVector[pcIdx];
285 return energyDoubleVector[pcIdx];
291 return defaultProductionCuts;
295G4bool G4ProductionCutsTable::IsCoupleUsedInTheRegion(
302 for(std::size_t iMate=0;iMate<nMaterial; ++iMate, ++mItr)
318 for(
auto cItr=coupleTable.cbegin(); cItr!=coupleTable.cend(); ++cItr)
320 if((*cItr)->GetMaterial()!=aMat)
continue;
321 if((*cItr)->GetProductionCuts()==aCut)
return (*cItr);
331 for(
auto cItr=coupleTable.cbegin(); cItr!=coupleTable.cend(); ++cItr)
333 if((*cItr)==aCouple)
return idx;
357 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 SetEnergyRange(G4double lowedge, G4double highedge)
static G4ProductionCutsTable * GetProductionCutsTable()
G4int GetCoupleIndex(const G4MaterialCutsCouple *aCouple) const
virtual G4bool CheckMaterialCutsCoupleInfo(const G4String &directory, G4bool ascii=false)
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)
G4ProductionCuts * GetProductionCuts() const
size_t GetNumberOfMaterials() const
std::vector< G4Material * >::const_iterator GetMaterialIterator() const