1#ifndef TG4_REGIONS_MANAGER_H
2#define TG4_REGIONS_MANAGER_H
28class G4VRangeToEnergyConverter;
29class G4MaterialCutsCouple;
90 void DumpRegion(
const G4String& volName)
const;
112 G4bool
Iterate(G4double energyCut, G4double& lowerCut, G4double& higherCut,
113 G4double defaultRangeCut, G4double lowEdgeEnergy, G4double highEdgeEnergy,
114 G4int nbin, std::map<G4double, G4double>& map,
115 std::map<G4double, G4double>::const_iterator& it, G4Material* material,
116 G4VRangeToEnergyConverter& converter)
const;
118 std::pair<G4double,G4double>
120 G4VRangeToEnergyConverter& converter, G4double defaultRangeValue)
const;
122 std::pair<G4double,G4double>
123 GetRangeCut(G4double energyCut, G4Material* material,
124 G4VRangeToEnergyConverter& converter, G4double defaultRangeValue)
const;
163 G4cout <<
"### New precision: " << precision << G4endl;
170 G4cout <<
"### New tolerance: " << tolerance << G4endl;
Definition of the TG4VRegionsManager class.
Extended G4UserLimits class.
Manager class for converting VMC cuts in energy in G4 regions.
void PrintFromMap(std::ostream &output) const
TG4RegionsMessenger fMessenger
messenger
std::pair< G4double, G4double > ConvertEnergyToRange(G4double energyCut, G4Material *material, G4VRangeToEnergyConverter &converter, G4double defaultRangeValue) const
G4int fRangePrecision
the precision for calculating ranges
void DefineRegions() override
G4bool IsLoad() const
Return the option to load regions ranges from a file.
void CheckRegionsRanges() const
void UpdateProductionCutsTable() override
G4int GetRangePrecision() const
Return the precision for calculating ranges.
static constexpr G4int fgkDefaultRangePrecision
the default precision for calculating ranges
void SetLoad(G4bool isLoad)
G4double fEnergyTolerance
the tolerance (relative) for comparing energy cut values
~TG4RegionsManager() override=default
void SetEnergyTolerance(G4double tolerance)
Set the tolerance (relative) for comparing energy cut values.
void SetFromG4Table(G4bool isG4Table)
Set the option to print/save cuts from G4 table.
std::array< G4double, fgkValuesSize > TG4RegionData
static constexpr G4double fgkDefaultEnergyTolerance
the default tolerance (relative) for comparing energy cut values
void CheckRegions() const override
G4bool IsG4Table() const
Return the option to print or save regions from production cuts table.
G4bool fIsLoad
option to load regions ranges from a file
static constexpr G4int fgkMinRangeOrder
the minimum range order
void SetRangePrecision(G4int precision)
Set the precision for calculating ranges.
std::pair< G4double, G4double > GetRangeCut(G4double energyCut, G4Material *material, G4VRangeToEnergyConverter &converter, G4double defaultRangeValue) const
void DumpRegion(const G4String &volName) const
TG4RegionsManager & operator=(const TG4RegionsManager &right)=delete
TG4RegionsManager(const TG4RegionsManager &right)=delete
G4String GetFileName() const
void PrintRegions(std::ostream &output) const override
static constexpr G4int fgkMaxRangeOrder
the maximum range order
std::map< G4String, TG4RegionData > fRegionData
map for computed or loaded regions data
G4double GetEnergyTolerance() const
Return the tolerance (relative) for comparing energy cut values.
G4bool Iterate(G4double energyCut, G4double &lowerCut, G4double &higherCut, G4double defaultRangeCut, G4double lowEdgeEnergy, G4double highEdgeEnergy, G4int nbin, std::map< G4double, G4double > &map, std::map< G4double, G4double >::const_iterator &it, G4Material *material, G4VRangeToEnergyConverter &converter) const
G4bool fIsG4Table
option to print or save regions from G4 production cuts table
static constexpr G4int fgkNofBins
the number of bins for search range iteration
Messenger class that defines commands for TG4RegionsManager[2].
Base class for mangers for converting VMC cuts in energy in G4 regions.