TGeoMedium.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoMedium.h 35651 2010-09-23 13:31:47Z agheata $
00002 // Author: Rene Brun   26/12/02
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
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 // TGeoMedium - base class describing tracking media                      //
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;         // unique Id
00034    Double_t                 fParams[20]; // parameters
00035    TGeoMaterial            *fMaterial;   // pointer to material
00036  
00037 // methods
00038    TGeoMedium(const TGeoMedium&);
00039    TGeoMedium& operator=(const TGeoMedium&);
00040 
00041 public:
00042    // constructors
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    // methods
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)              // tracking medium
00060 
00061 };
00062 
00063 #endif
00064 

Generated on Tue Jul 5 14:12:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1