Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TG4VRegionsManager Class Referenceabstract

Base class for mangers for converting VMC cuts in energy in G4 regions. More...

#include <TG4VRegionsManager.h>

Inheritance diagram for TG4VRegionsManager:
Inheritance graph
[legend]

Public Member Functions

 TG4VRegionsManager ()
 
virtual ~TG4VRegionsManager ()
 
virtual void DefineRegions ()=0
 
virtual void UpdateProductionCutsTable ()=0
 
virtual void CheckRegions () const
 
virtual void PrintRegions (std::ostream &output) const
 
virtual void SaveRegions ()
 
virtual void DumpRegionStore () const
 
void SetFileName (const G4String &fileName)
 Set the file name for regions output.
 
void SetApplyForGamma (G4bool applyForGamma)
 Set the option to apply range cuts for gamma (default is true)
 
void SetApplyForElectron (G4bool applyForElectron)
 Set the option to apply range cuts for e- (default is true)
 
void SetApplyForPositron (G4bool applyForPositron)
 Set the option to apply range cuts for e+ (default is true)
 
void SetApplyForProton (G4bool applyForProton)
 Set the option to apply range cuts for proton (default is true)
 
void SetCheck (G4bool isCheck)
 Set the option to perform consistency check (by default false)
 
void SetPrint (G4bool isPrint)
 Set the option to print all regions.
 
void SetSave (G4bool isSave)
 Set the option to save all regions in a file.
 
G4String GetFileName () const
 Return the file name for regions output.
 
G4bool GetApplyForGamma () const
 Return the option to apply range cuts for gamma.
 
G4bool GetApplyForElectron () const
 Return the option to apply range cuts for e+.
 
G4bool GetApplyForPositron () const
 Return the option to apply range cuts for positron.
 
G4bool GetApplyForProton () const
 Return the option to apply range cuts for proton.
 
G4bool IsCheck () const
 Return the option to perform consistency check.
 
G4bool IsPrint () const
 Return the option to print all regions.
 
G4bool IsSave () const
 Return option to save all regions in a file.
 
- Public Member Functions inherited from TG4Verbose
 TG4Verbose (const G4String &cmdName)
 
 TG4Verbose (const G4String &cmdName, G4int verboseLevel)
 
virtual ~TG4Verbose ()
 
virtual void VerboseLevel (G4int level)
 
virtual G4int VerboseLevel () const
 

Static Public Member Functions

static TG4VRegionsManagerInstance ()
 Return the singleton instance.
 

Protected Types

using TG4RegionData = std::array<G4double, fgkValuesSize>
 

Protected Member Functions

 TG4VRegionsManager (const TG4VRegionsManager &right)=delete
 
TG4VRegionsManageroperator= (const TG4VRegionsManager &right)=delete
 
G4double GetGlobalEnergyCut (TG4G3Cut cutType) const
 
G4double GetEnergyCut (TG4Limits *limits, TG4G3Cut cutType, G4double globalCutValue) const
 
G4bool IsCoupleUsedInTheRegion (const G4MaterialCutsCouple *couple, const G4Region *region) const
 
void CheckRegionsInGeometry () const
 
void PrintLegend (std::ostream &output) const
 
void PrintRegionData (std::ostream &output, const G4String &matName, const TG4RegionData &values) const
 
void PrintFromG4Table (std::ostream &output) const
 

Protected Attributes

G4String fFileName
 file name for regions output
 
G4bool fApplyForGamma = true
 option to apply cuts for gamma (default is true)
 
G4bool fApplyForElectron = true
 option to apply cuts for e- (default is true)
 
G4bool fApplyForPositron = true
 option to apply cuts for e+ (default is true)
 
G4bool fApplyForProton = true
 option to apply cuts for proton (default is true)
 
G4bool fIsCheck = false
 option to perform consistency check (by default false)
 
G4bool fIsPrint = false
 option to print all regions
 
G4bool fIsSave = false
 option to save all regions in a file
 

Static Protected Attributes

static constexpr size_t fgkRangeGamIdx = 0
 
static constexpr size_t fgkRangeEleIdx = 1
 
static constexpr size_t fgkCutGamIdx = 2
 
static constexpr size_t fgkCutEleIdx = 3
 
static constexpr size_t fgkVmcCutGamIdx = 4
 
static constexpr size_t fgkVmcCutEleIdx = 5
 
static constexpr size_t fgkValuesSize = 6
 
static TG4VRegionsManagerfgInstance = nullptr
 the singleton instance
 
static const G4String fgkDefaultRegionName
 the name of the region with default cuts
 
static const G4String fgkDefaultFileName = "regions.dat"
 the name of the region with default cuts
 

Detailed Description

Base class for mangers for converting VMC cuts in energy in G4 regions.

Author
I. Hrivnacova; IPN Orsay

Definition at line 38 of file TG4VRegionsManager.h.

Member Typedef Documentation

◆ TG4RegionData

using TG4VRegionsManager::TG4RegionData = std::array<G4double, fgkValuesSize>
protected

Definition at line 85 of file TG4VRegionsManager.h.

Constructor & Destructor Documentation

◆ TG4VRegionsManager() [1/2]

TG4VRegionsManager::TG4VRegionsManager ( )

Default constructor

Definition at line 46 of file TG4VRegionsManager.cxx.

◆ ~TG4VRegionsManager()

TG4VRegionsManager::~TG4VRegionsManager ( )
virtual

Destructor

Definition at line 55 of file TG4VRegionsManager.cxx.

◆ TG4VRegionsManager() [2/2]

TG4VRegionsManager::TG4VRegionsManager ( const TG4VRegionsManager & right)
protecteddelete

Member Function Documentation

◆ Instance()

TG4VRegionsManager * TG4VRegionsManager::Instance ( )
inlinestatic

Return the singleton instance.

Definition at line 137 of file TG4VRegionsManager.h.

Referenced by TG4RunAction::BeginOfRunAction().

◆ DefineRegions()

virtual void TG4VRegionsManager::DefineRegions ( )
pure virtual

◆ UpdateProductionCutsTable()

virtual void TG4VRegionsManager::UpdateProductionCutsTable ( )
pure virtual

◆ CheckRegions()

void TG4VRegionsManager::CheckRegions ( ) const
virtual

Check if the region to which the volume belongs correspond to its material

Reimplemented in TG4RegionsManager.

Definition at line 291 of file TG4VRegionsManager.cxx.

◆ PrintRegions()

void TG4VRegionsManager::PrintRegions ( std::ostream & output) const
virtual

Print regions from the production cuts table.

Reimplemented in TG4RegionsManager.

Definition at line 283 of file TG4VRegionsManager.cxx.

Referenced by SaveRegions().

◆ SaveRegions()

void TG4VRegionsManager::SaveRegions ( )
virtual

Dump all regions data in a file

Definition at line 299 of file TG4VRegionsManager.cxx.

◆ DumpRegionStore()

void TG4VRegionsManager::DumpRegionStore ( ) const
virtual

Dump all region properties: production cuts, volumes list and material list.

Definition at line 322 of file TG4VRegionsManager.cxx.

◆ SetFileName()

void TG4VRegionsManager::SetFileName ( const G4String & fileName)
inline

Set the file name for regions output.

Definition at line 140 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetApplyForGamma()

void TG4VRegionsManager::SetApplyForGamma ( G4bool applyForGamma)
inline

Set the option to apply range cuts for gamma (default is true)

Definition at line 144 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetApplyForElectron()

void TG4VRegionsManager::SetApplyForElectron ( G4bool applyForElectron)
inline

Set the option to apply range cuts for e- (default is true)

Definition at line 150 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetApplyForPositron()

void TG4VRegionsManager::SetApplyForPositron ( G4bool applyForPositron)
inline

Set the option to apply range cuts for e+ (default is true)

Definition at line 156 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetApplyForProton()

void TG4VRegionsManager::SetApplyForProton ( G4bool applyForProton)
inline

Set the option to apply range cuts for proton (default is true)

Definition at line 162 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetCheck()

void TG4VRegionsManager::SetCheck ( G4bool isCheck)
inline

Set the option to perform consistency check (by default false)

Definition at line 168 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetPrint()

void TG4VRegionsManager::SetPrint ( G4bool isPrint)
inline

Set the option to print all regions.

Definition at line 172 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ SetSave()

void TG4VRegionsManager::SetSave ( G4bool isSave)
inline

Set the option to save all regions in a file.

Definition at line 176 of file TG4VRegionsManager.h.

Referenced by TG4RegionsMessenger::SetNewValue().

◆ GetFileName()

G4String TG4VRegionsManager::GetFileName ( ) const
inline

Return the file name for regions output.

Definition at line 180 of file TG4VRegionsManager.h.

◆ GetApplyForGamma()

G4bool TG4VRegionsManager::GetApplyForGamma ( ) const
inline

Return the option to apply range cuts for gamma.

Definition at line 184 of file TG4VRegionsManager.h.

◆ GetApplyForElectron()

G4bool TG4VRegionsManager::GetApplyForElectron ( ) const
inline

Return the option to apply range cuts for e+.

Definition at line 190 of file TG4VRegionsManager.h.

◆ GetApplyForPositron()

G4bool TG4VRegionsManager::GetApplyForPositron ( ) const
inline

Return the option to apply range cuts for positron.

Definition at line 196 of file TG4VRegionsManager.h.

◆ GetApplyForProton()

G4bool TG4VRegionsManager::GetApplyForProton ( ) const
inline

Return the option to apply range cuts for proton.

Definition at line 202 of file TG4VRegionsManager.h.

◆ IsCheck()

G4bool TG4VRegionsManager::IsCheck ( ) const
inline

Return the option to perform consistency check.

Definition at line 208 of file TG4VRegionsManager.h.

◆ IsPrint()

G4bool TG4VRegionsManager::IsPrint ( ) const
inline

Return the option to print all regions.

Definition at line 211 of file TG4VRegionsManager.h.

◆ IsSave()

G4bool TG4VRegionsManager::IsSave ( ) const
inline

Return option to save all regions in a file.

Definition at line 214 of file TG4VRegionsManager.h.

◆ operator=()

TG4VRegionsManager & TG4VRegionsManager::operator= ( const TG4VRegionsManager & right)
protecteddelete

◆ GetGlobalEnergyCut()

G4double TG4VRegionsManager::GetGlobalEnergyCut ( TG4G3Cut cutType) const
protected

Return global cut in energy of given cutType. Return DBL_MAX if cut value is not defined

Definition at line 67 of file TG4VRegionsManager.cxx.

Referenced by TG4RegionsManager::DefineRegions(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ GetEnergyCut()

G4double TG4VRegionsManager::GetEnergyCut ( TG4Limits * limits,
TG4G3Cut cutType,
G4double globalCutValue ) const
protected

Return cut in energy defined in limits of given cutType. Return DBL_MAX if cut value is not defined.

Definition at line 94 of file TG4VRegionsManager.cxx.

Referenced by TG4RegionsManager::DefineRegions(), PrintFromG4Table(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ IsCoupleUsedInTheRegion()

G4bool TG4VRegionsManager::IsCoupleUsedInTheRegion ( const G4MaterialCutsCouple * couple,
const G4Region * region ) const
protected

Reimplemented G4ProductionCutsTable::IsCoupleUsedInTheRegion which is declared private

Definition at line 112 of file TG4VRegionsManager.cxx.

Referenced by TG4RegionsManager::DumpRegion().

◆ CheckRegionsInGeometry()

void TG4VRegionsManager::CheckRegionsInGeometry ( ) const
protected

Loop over all logical volumes and check if the region to which the volume belongs correspond to its material

Definition at line 132 of file TG4VRegionsManager.cxx.

Referenced by CheckRegions(), TG4RegionsManager::CheckRegions(), and TG4RegionsManager2::DefineRegions().

◆ PrintLegend()

void TG4VRegionsManager::PrintLegend ( std::ostream & output) const
protected

Print the range data legend

Definition at line 177 of file TG4VRegionsManager.cxx.

Referenced by PrintFromG4Table(), and TG4RegionsManager::PrintFromMap().

◆ PrintRegionData()

void TG4VRegionsManager::PrintRegionData ( std::ostream & output,
const G4String & matName,
const TG4RegionData & values ) const
protected

Print one region data. The regions names are printed within '' and separated from the following date with ';' to facilitate reading data back. The procedure then works only with material names that do not contain these two special characters.

Definition at line 193 of file TG4VRegionsManager.cxx.

Referenced by TG4RegionsManager::LoadRegions(), PrintFromG4Table(), and TG4RegionsManager::PrintFromMap().

◆ PrintFromG4Table()

void TG4VRegionsManager::PrintFromG4Table ( std::ostream & output) const
protected

Loop over the production cuts table and print the production ranges and cuts from the table and the VMC cuts from the TG4Limits associated with the production cuts material.

Definition at line 216 of file TG4VRegionsManager.cxx.

Referenced by PrintRegions(), and TG4RegionsManager::PrintRegions().

Member Data Documentation

◆ fgkRangeGamIdx

constexpr size_t TG4VRegionsManager::fgkRangeGamIdx = 0
staticconstexprprotected

Definition at line 77 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::GetRangeCut(), and PrintRegionData().

◆ fgkRangeEleIdx

constexpr size_t TG4VRegionsManager::fgkRangeEleIdx = 1
staticconstexprprotected

Definition at line 78 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::GetRangeCut(), and PrintRegionData().

◆ fgkCutGamIdx

constexpr size_t TG4VRegionsManager::fgkCutGamIdx = 2
staticconstexprprotected

◆ fgkCutEleIdx

constexpr size_t TG4VRegionsManager::fgkCutEleIdx = 3
staticconstexprprotected

Definition at line 80 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::GetRangeCut(), and PrintRegionData().

◆ fgkVmcCutGamIdx

constexpr size_t TG4VRegionsManager::fgkVmcCutGamIdx = 4
staticconstexprprotected

Definition at line 81 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::CheckRegionsRanges(), and PrintRegionData().

◆ fgkVmcCutEleIdx

constexpr size_t TG4VRegionsManager::fgkVmcCutEleIdx = 5
staticconstexprprotected

Definition at line 82 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::LoadRegions(), and PrintRegionData().

◆ fgkValuesSize

constexpr size_t TG4VRegionsManager::fgkValuesSize = 6
staticconstexprprotected

Definition at line 83 of file TG4VRegionsManager.h.

◆ fgInstance

TG4VRegionsManager * TG4VRegionsManager::fgInstance = nullptr
staticprotected

the singleton instance

Definition at line 109 of file TG4VRegionsManager.h.

Referenced by Instance(), TG4VRegionsManager(), and ~TG4VRegionsManager().

◆ fgkDefaultRegionName

const G4String TG4VRegionsManager::fgkDefaultRegionName
staticprotected
Initial value:
=
"RegionWithDefaultCuts"

the name of the region with default cuts

Definition at line 111 of file TG4VRegionsManager.h.

Referenced by CheckRegionsInGeometry(), and TG4RegionsManager::DefineRegions().

◆ fgkDefaultFileName

const G4String TG4VRegionsManager::fgkDefaultFileName = "regions.dat"
staticprotected

the name of the region with default cuts

Definition at line 113 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::LoadRegions(), and SaveRegions().

◆ fFileName

G4String TG4VRegionsManager::fFileName
protected

file name for regions output

Definition at line 119 of file TG4VRegionsManager.h.

Referenced by GetFileName(), TG4RegionsManager::LoadRegions(), SaveRegions(), SetFileName(), and TG4RegionsManager::SetLoad().

◆ fApplyForGamma

G4bool TG4VRegionsManager::fApplyForGamma = true
protected

option to apply cuts for gamma (default is true)

Definition at line 121 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), GetApplyForGamma(), SetApplyForGamma(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ fApplyForElectron

G4bool TG4VRegionsManager::fApplyForElectron = true
protected

option to apply cuts for e- (default is true)

Definition at line 123 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), GetApplyForElectron(), SetApplyForElectron(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ fApplyForPositron

G4bool TG4VRegionsManager::fApplyForPositron = true
protected

option to apply cuts for e+ (default is true)

Definition at line 125 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), GetApplyForPositron(), SetApplyForPositron(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ fApplyForProton

G4bool TG4VRegionsManager::fApplyForProton = true
protected

option to apply cuts for proton (default is true)

Definition at line 127 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), GetApplyForProton(), SetApplyForProton(), and TG4RegionsManager2::UpdateProductionCutsTable().

◆ fIsCheck

G4bool TG4VRegionsManager::fIsCheck = false
protected

option to perform consistency check (by default false)

Definition at line 129 of file TG4VRegionsManager.h.

Referenced by TG4RegionsManager2::DefineRegions(), IsCheck(), and SetCheck().

◆ fIsPrint

G4bool TG4VRegionsManager::fIsPrint = false
protected

option to print all regions

Definition at line 131 of file TG4VRegionsManager.h.

Referenced by IsPrint(), and SetPrint().

◆ fIsSave

G4bool TG4VRegionsManager::fIsSave = false
protected

option to save all regions in a file

Definition at line 133 of file TG4VRegionsManager.h.

Referenced by IsSave(), TG4RegionsManager::SetLoad(), and SetSave().


The documentation for this class was generated from the following files: