Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4MediumMap.h
Go to the documentation of this file.
1#ifndef TG4_MEDIUM_MAP_H
2#define TG4_MEDIUM_MAP_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "globals.hh"
19
20#include <map>
21#include <vector>
22
23class TG4Medium;
24
25class G4LogicalVolume;
26class G4Material;
27
32
34{
35 public:
38
39 // methods
40 TG4Medium* AddMedium(G4int mediumID, G4bool warn = true);
41 void MapMedium(G4LogicalVolume* lv, G4int mediumID);
42 void MapMedium(const G4String& lvName, G4int mediumID);
43 void Print() const;
44
45 // get methods
46 G4int GetNofMedia() const;
47 TG4Medium* GetMedium(G4int mediumID, G4bool warn = true) const;
48 TG4Medium* GetMedium(const G4String& name, G4bool warn = true) const;
49 TG4Medium* GetMedium(G4LogicalVolume* lv, G4bool warn = true) const;
50 TG4Medium* GetMedium(const G4Material* material, G4bool warn = true) const;
51 void GetMedia(const G4String& namePattern, std::vector<TG4Medium*>& media,
52 G4bool warn = true) const;
53
54 private:
59
60 //
61 // data members
62
64 std::map<G4int, TG4Medium*> fIdMap;
65
67 std::map<G4LogicalVolume*, TG4Medium*> fLVMap;
68
70 std::map<const G4Material*, TG4Medium*> fMaterialMap;
71};
72
73#endif // TG4_MEDIUM_MAP_H
The map of media to logical volumes.
TG4MediumMap & operator=(const TG4MediumMap &right)
Not implemented.
void MapMedium(G4LogicalVolume *lv, G4int mediumID)
TG4Medium * AddMedium(G4int mediumID, G4bool warn=true)
std::map< G4int, TG4Medium * > fIdMap
map of medias to their IDs
G4int GetNofMedia() const
TG4MediumMap(const TG4MediumMap &right)
Not implemented.
TG4Medium * GetMedium(G4int mediumID, G4bool warn=true) const
void Print() const
std::map< const G4Material *, TG4Medium * > fMaterialMap
map of materials to medias
std::map< G4LogicalVolume *, TG4Medium * > fLVMap
map of medias to the logical volumes
void GetMedia(const G4String &namePattern, std::vector< TG4Medium * > &media, G4bool warn=true) const
Helper class to keep medium data.
Definition TG4Medium.h:29