00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoMedium
00013 #define ROOT_TGeoMedium
00014
00015 #ifndef ROOT_TGeoMaterial
00016 #include "TGeoMaterial.h"
00017 #endif
00018
00019
00020
00021
00022
00023
00024
00025 class TGeoMedium : public TNamed
00026 {
00027 public:
00028 enum EGeoMedium {
00029 kMedSavePrimitive = BIT(18)
00030 };
00031
00032 protected:
00033 Int_t fId;
00034 Double_t fParams[20];
00035 TGeoMaterial *fMaterial;
00036
00037
00038 TGeoMedium(const TGeoMedium&);
00039 TGeoMedium& operator=(const TGeoMedium&);
00040
00041 public:
00042
00043 TGeoMedium();
00044 TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params=0);
00045 TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield,
00046 Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
00047 virtual ~TGeoMedium();
00048
00049 virtual Int_t GetByteCount() const {return sizeof(*this);}
00050 Int_t GetId() const {return fId;}
00051 Double_t GetParam(Int_t i) const {return fParams[i];}
00052 void SetParam(Int_t i, Double_t val) {fParams[i] = val;}
00053 char *GetPointerName() const;
00054 TGeoMaterial *GetMaterial() const {return fMaterial;}
00055 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00056 void SetId(Int_t id) {fId = id;}
00057 void SetMaterial(TGeoMaterial *mat) {fMaterial = mat;}
00058 virtual void SetCerenkovProperties(TObject* cerenkov) {fMaterial->SetCerenkovProperties(cerenkov);}
00059 ClassDef(TGeoMedium, 1)
00060
00061 };
00062
00063 #endif
00064