Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGeoMedium.h
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Rene Brun 26/12/02
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoMedium
13 #define ROOT_TGeoMedium
14 
15 #include "TGeoMaterial.h"
16 
17 ////////////////////////////////////////////////////////////////////////////
18 // //
19 // TGeoMedium - base class describing tracking media //
20 // //
21 ////////////////////////////////////////////////////////////////////////////
22 
23 class TGeoMedium : public TNamed
24 {
25 public:
26  enum EGeoMedium {
27  kMedSavePrimitive = BIT(18)
28  };
29 
30 protected:
31  Int_t fId; // unique Id
32  Double_t fParams[20]; // parameters
33  TGeoMaterial *fMaterial; // pointer to material
34 
35 // methods
36  TGeoMedium(const TGeoMedium&);
37  TGeoMedium& operator=(const TGeoMedium&);
38 
39 public:
40  // constructors
41  TGeoMedium();
42  TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params=0);
43  TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield,
44  Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
45  virtual ~TGeoMedium();
46  // methods
47  virtual Int_t GetByteCount() const {return sizeof(*this);}
48  Int_t GetId() const {return fId;}
49  Double_t GetParam(Int_t i) const {return fParams[i];}
50  void SetParam(Int_t i, Double_t val) {fParams[i] = val;}
51  char *GetPointerName() const;
52  TGeoMaterial *GetMaterial() const {return fMaterial;}
53  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
54  void SetId(Int_t id) {fId = id;}
55  void SetMaterial(TGeoMaterial *mat) {fMaterial = mat;}
56  virtual void SetCerenkovProperties(TObject* cerenkov) {fMaterial->SetCerenkovProperties(cerenkov);}
57  ClassDef(TGeoMedium, 1) // tracking medium
58 
59 };
60 
61 #endif
62