Using TGeo to retrieve the mean material budget between two points (M.Ivanov)
[u/mrichter/AliRoot.git] / Flugg / FlukaMaterial.hh
CommitLineData
26d97e06 1#ifndef FLUKAMATERIAL_HH
2#define FLUKAMATERIAL_HH 1
3
4#include "G4String.hh"
5
6class FlukaLowMat;
7
8#include <map>
9
10class FlukaMaterial;
0edf14e7 11typedef std::map<G4String, FlukaMaterial*, std::less<G4String> > FlukaMaterialsTable;
12typedef std::map<G4String, FlukaMaterial*, std::less<G4String> >::const_iterator FlukaMaterialsIterator;
13typedef std::map<G4int, FlukaMaterial*, std::less<G4int> > FlukaMaterialsIndexTable;
14typedef std::map<G4int, FlukaMaterial*, std::less<G4int> >::const_iterator FlukaMaterialsIndexIterator;
26d97e06 15
16class FlukaMaterial {
17public:
18
19 //Constructor
20 FlukaMaterial(const G4String& name,
21 G4int Z, G4double A,
22 G4double density,
23 G4int N=0);
24 virtual ~FlukaMaterial();
25
26 //Getters
27 G4int GetZ() const {return fZ;}
28 G4double GetA() const {return fA;}
29 G4double GetDensity() const {return fDensity;}
30 G4int GetN() const {return fN;}
31 G4String GetName() const {return fName;}
32 G4String GetRealName() const;
33 G4int GetIndex() const {return fIndex;}
34 const FlukaLowMat* GetLowMat() const {return fFlukaLowMat;}
35
36
37 //Setters
38 void SetZ(G4int Z) {fZ = Z;}
39 void SetA(G4double A) {fA = A;}
40 void SetDensity(G4double d) {fDensity = d;}
41 void SetN(G4int N) {fN = N;}
42 void SetName(const G4String& n) {fName = n;}
43
44 //Static
45 static const FlukaMaterialsTable* GetMaterialTable() {
46 return &fFlukaMaterials;}
47 static FlukaMaterial* GetFlukaMaterial(const G4String& name) {
48 return fFlukaMaterials[name];}
0edf14e7 49 static std::ostream& PrintMaterialsByName(std::ostream& os);
50 static std::ostream& PrintMaterialsByIndex(std::ostream& os);
26d97e06 51
52protected:
53 //Other
54 void AddLowMat(const G4String& name);
55
56public:
57 G4String fName;
58 G4int fZ;
59 G4double fA;
60 G4double fDensity;
61 G4int fN; //Isotope number
62 FlukaLowMat* fFlukaLowMat;
63
64 size_t fIndex;
65
66 static FlukaMaterialsTable fFlukaMaterials; //Map of name/material
67 static FlukaMaterialsIndexTable fFlukaIndexMaterials; //Map index/material
68
69};
70
0edf14e7 71std::ostream& operator<<(std::ostream& os, const FlukaMaterial& material);
26d97e06 72
73
74#endif