Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TGeoMaterial
16 #include "TGeoMaterial.h"
17 #endif
18 
19 ////////////////////////////////////////////////////////////////////////////
20 // //
21 // TGeoMedium - base class describing tracking media //
22 // //
23 ////////////////////////////////////////////////////////////////////////////
24 
25 class TGeoMedium : public TNamed
26 {
27 public:
28  enum EGeoMedium {
30  };
31 
32 protected:
33  Int_t fId; // unique Id
34  Double_t fParams[20]; // parameters
35  TGeoMaterial *fMaterial; // pointer to material
36 
37 // methods
38  TGeoMedium(const TGeoMedium&);
40 
41 public:
42  // constructors
43  TGeoMedium();
44  TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params=0);
45  TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield,
46  Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
47  virtual ~TGeoMedium();
48  // methods
49  virtual Int_t GetByteCount() const {return sizeof(*this);}
50  Int_t GetId() const {return fId;}
51  Double_t GetParam(Int_t i) const {return fParams[i];}
52  void SetParam(Int_t i, Double_t val) {fParams[i] = val;}
53  char *GetPointerName() const;
54  TGeoMaterial *GetMaterial() const {return fMaterial;}
55  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
56  void SetId(Int_t id) {fId = id;}
57  void SetMaterial(TGeoMaterial *mat) {fMaterial = mat;}
58  virtual void SetCerenkovProperties(TObject* cerenkov) {fMaterial->SetCerenkovProperties(cerenkov);}
59  ClassDef(TGeoMedium, 1) // tracking medium
60 
61 };
62 
63 #endif
64 
Double_t fParams[20]
Definition: TGeoMedium.h:34
const char Option_t
Definition: RtypesCore.h:62
TGeoMaterial * GetMaterial() const
Definition: TGeoMedium.h:54
#define BIT(n)
Definition: Rtypes.h:120
virtual void SetCerenkovProperties(TObject *cerenkov)
Definition: TGeoMedium.h:58
Int_t GetId() const
Definition: TGeoMedium.h:50
Base class describing materials.
Definition: TGeoMaterial.h:35
int Int_t
Definition: RtypesCore.h:41
#define ClassDef(name, id)
Definition: Rtypes.h:254
void SetMaterial(TGeoMaterial *mat)
Definition: TGeoMedium.h:57
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
void SetParam(Int_t i, Double_t val)
Definition: TGeoMedium.h:52
Int_t fId
Definition: TGeoMedium.h:33
XFontStruct * id
Definition: TGX11.cxx:108
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoMedium.cxx:137
TGeoMedium()
Default constructor.
Definition: TGeoMedium.cxx:36
void SetId(Int_t id)
Definition: TGeoMedium.h:56
double Double_t
Definition: RtypesCore.h:55
virtual ~TGeoMedium()
Destructor.
Definition: TGeoMedium.cxx:120
virtual Int_t GetByteCount() const
Definition: TGeoMedium.h:49
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:25
TGeoMaterial * fMaterial
Definition: TGeoMedium.h:35
Mother of all ROOT objects.
Definition: TObject.h:37
char * GetPointerName() const
Provide a pointer name containing uid.
Definition: TGeoMedium.cxx:127
TGeoMedium & operator=(const TGeoMedium &)
assignment operator
Definition: TGeoMedium.cxx:106
virtual void SetCerenkovProperties(TObject *cerenkov)
Definition: TGeoMaterial.h:121
Double_t GetParam(Int_t i) const
Definition: TGeoMedium.h:51
char name[80]
Definition: TGX11.cxx:109