File indexing completed on 2025-01-18 10:11:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGeoMedium
0013 #define ROOT_TGeoMedium
0014
0015 #include "TGeoMaterial.h"
0016
0017
0018
0019
0020
0021
0022
0023 class TGeoMedium : public TNamed {
0024 public:
0025 enum EGeoMedium { kMedSavePrimitive = BIT(18) };
0026
0027 protected:
0028 Int_t fId;
0029 Double_t fParams[20];
0030 TGeoMaterial *fMaterial;
0031
0032
0033 TGeoMedium(const TGeoMedium &);
0034 TGeoMedium &operator=(const TGeoMedium &);
0035
0036 public:
0037
0038 TGeoMedium();
0039 TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params = nullptr);
0040 TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
0041 Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
0042 ~TGeoMedium() override;
0043
0044 virtual Int_t GetByteCount() const { return sizeof(*this); }
0045 Int_t GetId() const { return fId; }
0046 Double_t GetParam(Int_t i) const { return fParams[i]; }
0047 void SetParam(Int_t i, Double_t val) { fParams[i] = val; }
0048 const char *GetPointerName() const;
0049 TGeoMaterial *GetMaterial() const { return fMaterial; }
0050 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0051 void SetId(Int_t id) { fId = id; }
0052 void SetMaterial(TGeoMaterial *mat) { fMaterial = mat; }
0053 virtual void SetCerenkovProperties(TObject *cerenkov) { fMaterial->SetCerenkovProperties(cerenkov); }
0054 ClassDefOverride(TGeoMedium, 1)
0055 };
0056
0057 #endif