Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4MediumMap Class Reference

The map of media to logical volumes. More...

#include <TG4MediumMap.h>

Public Member Functions

 TG4MediumMap ()
 
 ~TG4MediumMap ()
 
TG4MediumAddMedium (G4int mediumID, G4bool warn=true)
 
void MapMedium (G4LogicalVolume *lv, G4int mediumID)
 
void MapMedium (const G4String &lvName, G4int mediumID)
 
void Print () const
 
G4int GetNofMedia () const
 
TG4MediumGetMedium (G4int mediumID, G4bool warn=true) const
 
TG4MediumGetMedium (const G4String &name, G4bool warn=true) const
 
TG4MediumGetMedium (G4LogicalVolume *lv, G4bool warn=true) const
 
TG4MediumGetMedium (const G4Material *material, G4bool warn=true) const
 
void GetMedia (const G4String &namePattern, std::vector< TG4Medium * > &media, G4bool warn=true) const
 

Private Member Functions

 TG4MediumMap (const TG4MediumMap &right)
 Not implemented.
 
TG4MediumMapoperator= (const TG4MediumMap &right)
 Not implemented.
 

Private Attributes

std::map< G4int, TG4Medium * > fIdMap
 map of medias to their IDs
 
std::map< G4LogicalVolume *, TG4Medium * > fLVMap
 map of medias to the logical volumes
 
std::map< const G4Material *, TG4Medium * > fMaterialMap
 map of materials to medias
 

Detailed Description

The map of media to logical volumes.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 33 of file TG4MediumMap.h.

Constructor & Destructor Documentation

◆ TG4MediumMap() [1/2]

TG4MediumMap::TG4MediumMap ( )

Default constructor

Definition at line 26 of file TG4MediumMap.cxx.

◆ ~TG4MediumMap()

TG4MediumMap::~TG4MediumMap ( )

Destructor

Definition at line 32 of file TG4MediumMap.cxx.

◆ TG4MediumMap() [2/2]

TG4MediumMap::TG4MediumMap ( const TG4MediumMap & right)
private

Not implemented.

Member Function Documentation

◆ AddMedium()

TG4Medium * TG4MediumMap::AddMedium ( G4int mediumID,
G4bool warn = true )

Create a new medium with given mediumID and name if it is not yet present in the map, and add it to the map.

Definition at line 46 of file TG4MediumMap.cxx.

Referenced by TG4GeometryManager::FillMediumMapFromG3(), TG4GeometryManager::FillMediumMapFromG4(), and TG4GeometryManager::FillMediumMapFromRoot().

◆ MapMedium() [1/2]

void TG4MediumMap::MapMedium ( G4LogicalVolume * lv,
G4int mediumID )

Map the medium with the given mediumID to the given logical volume lv

Definition at line 69 of file TG4MediumMap.cxx.

Referenced by TG4GeometryManager::FillMediumMapFromG3(), TG4GeometryManager::FillMediumMapFromG4(), TG4GeometryManager::FillMediumMapFromRoot(), and MapMedium().

◆ MapMedium() [2/2]

void TG4MediumMap::MapMedium ( const G4String & lvName,
G4int mediumID )

Map the medium with the given mediumID to the logical volume with given name lvName

Definition at line 92 of file TG4MediumMap.cxx.

◆ Print()

void TG4MediumMap::Print ( ) const

Print the whole map.

Definition at line 110 of file TG4MediumMap.cxx.

Referenced by TG4GeometryServices::PrintMedia().

◆ GetNofMedia()

G4int TG4MediumMap::GetNofMedia ( ) const

Return the number of media registered in the map

Definition at line 128 of file TG4MediumMap.cxx.

Referenced by TG4GeometryManager::FinishGeometry(), TG4GeometryServices::PrintControls(), and TG4GeometryServices::PrintCuts().

◆ GetMedium() [1/4]

◆ GetMedium() [2/4]

TG4Medium * TG4MediumMap::GetMedium ( const G4String & name,
G4bool warn = true ) const

Return medium with the given name

Definition at line 156 of file TG4MediumMap.cxx.

◆ GetMedium() [3/4]

TG4Medium * TG4MediumMap::GetMedium ( G4LogicalVolume * lv,
G4bool warn = true ) const

Return medium for the given lv

Definition at line 173 of file TG4MediumMap.cxx.

◆ GetMedium() [4/4]

TG4Medium * TG4MediumMap::GetMedium ( const G4Material * material,
G4bool warn = true ) const

Return medium for the given material

Definition at line 191 of file TG4MediumMap.cxx.

◆ GetMedia()

void TG4MediumMap::GetMedia ( const G4String & namePattern,
std::vector< TG4Medium * > & media,
G4bool warn = true ) const

Fill the 'media' vector with media which name matches the pattern. Only ABC* pattern is supported.

Definition at line 212 of file TG4MediumMap.cxx.

Referenced by TG4ModelConfigurationManager::SetRegionsNames().

◆ operator=()

TG4MediumMap & TG4MediumMap::operator= ( const TG4MediumMap & right)
private

Not implemented.

Member Data Documentation

◆ fIdMap

std::map<G4int, TG4Medium*> TG4MediumMap::fIdMap
private

map of medias to their IDs

Definition at line 64 of file TG4MediumMap.h.

Referenced by AddMedium(), GetMedia(), GetMedium(), GetMedium(), GetNofMedia(), Print(), and ~TG4MediumMap().

◆ fLVMap

std::map<G4LogicalVolume*, TG4Medium*> TG4MediumMap::fLVMap
private

map of medias to the logical volumes

Definition at line 67 of file TG4MediumMap.h.

Referenced by GetMedium(), and MapMedium().

◆ fMaterialMap

std::map<const G4Material*, TG4Medium*> TG4MediumMap::fMaterialMap
private

map of materials to medias

Definition at line 70 of file TG4MediumMap.h.

Referenced by GetMedium(), and MapMedium().


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