// @(#)root/geom:$Id$
// Author: Rene Brun   26/12/02

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGeoMedium
#define ROOT_TGeoMedium

#ifndef ROOT_TGeoMaterial
#include "TGeoMaterial.h"
#endif

////////////////////////////////////////////////////////////////////////////
//                                                                        //
// TGeoMedium - base class describing tracking media                      //
//                                                                        //
////////////////////////////////////////////////////////////////////////////

class TGeoMedium : public TNamed
{
public:
   enum EGeoMedium {
      kMedSavePrimitive = BIT(18)
   };

protected:
   Int_t                    fId;         // unique Id
   Double_t                 fParams[20]; // parameters
   TGeoMaterial            *fMaterial;   // pointer to material

// methods
   TGeoMedium(const TGeoMedium&);
   TGeoMedium& operator=(const TGeoMedium&);

public:
   // constructors
   TGeoMedium();
   TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params=0);
   TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield,
              Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
   virtual ~TGeoMedium();
   // methods
   virtual Int_t            GetByteCount() const {return sizeof(*this);}
   Int_t                    GetId()   const     {return fId;}
   Double_t                 GetParam(Int_t i) const {return fParams[i];}
   void                     SetParam(Int_t i, Double_t val)   {fParams[i] = val;}
   char                    *GetPointerName() const;
   TGeoMaterial            *GetMaterial() const {return fMaterial;}
   virtual void             SavePrimitive(std::ostream &out, Option_t *option = "");
   void                     SetId(Int_t id)     {fId = id;}
   void                     SetMaterial(TGeoMaterial *mat) {fMaterial = mat;}
   virtual void             SetCerenkovProperties(TObject* cerenkov) {fMaterial->SetCerenkovProperties(cerenkov);}
   ClassDef(TGeoMedium, 1)              // tracking medium

};

#endif

 TGeoMedium.h:1
 TGeoMedium.h:2
 TGeoMedium.h:3
 TGeoMedium.h:4
 TGeoMedium.h:5
 TGeoMedium.h:6
 TGeoMedium.h:7
 TGeoMedium.h:8
 TGeoMedium.h:9
 TGeoMedium.h:10
 TGeoMedium.h:11
 TGeoMedium.h:12
 TGeoMedium.h:13
 TGeoMedium.h:14
 TGeoMedium.h:15
 TGeoMedium.h:16
 TGeoMedium.h:17
 TGeoMedium.h:18
 TGeoMedium.h:19
 TGeoMedium.h:20
 TGeoMedium.h:21
 TGeoMedium.h:22
 TGeoMedium.h:23
 TGeoMedium.h:24
 TGeoMedium.h:25
 TGeoMedium.h:26
 TGeoMedium.h:27
 TGeoMedium.h:28
 TGeoMedium.h:29
 TGeoMedium.h:30
 TGeoMedium.h:31
 TGeoMedium.h:32
 TGeoMedium.h:33
 TGeoMedium.h:34
 TGeoMedium.h:35
 TGeoMedium.h:36
 TGeoMedium.h:37
 TGeoMedium.h:38
 TGeoMedium.h:39
 TGeoMedium.h:40
 TGeoMedium.h:41
 TGeoMedium.h:42
 TGeoMedium.h:43
 TGeoMedium.h:44
 TGeoMedium.h:45
 TGeoMedium.h:46
 TGeoMedium.h:47
 TGeoMedium.h:48
 TGeoMedium.h:49
 TGeoMedium.h:50
 TGeoMedium.h:51
 TGeoMedium.h:52
 TGeoMedium.h:53
 TGeoMedium.h:54
 TGeoMedium.h:55
 TGeoMedium.h:56
 TGeoMedium.h:57
 TGeoMedium.h:58
 TGeoMedium.h:59
 TGeoMedium.h:60
 TGeoMedium.h:61
 TGeoMedium.h:62
 TGeoMedium.h:63
 TGeoMedium.h:64