Logo ROOT   6.10/09
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 #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 {
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&);
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 
Double_t fParams[20]
Definition: TGeoMedium.h:32
const char Option_t
Definition: RtypesCore.h:62
TGeoMaterial * GetMaterial() const
Definition: TGeoMedium.h:52
#define BIT(n)
Definition: Rtypes.h:75
virtual void SetCerenkovProperties(TObject *cerenkov)
Definition: TGeoMedium.h:56
Int_t GetId() const
Definition: TGeoMedium.h:48
Base class describing materials.
Definition: TGeoMaterial.h:29
int Int_t
Definition: RtypesCore.h:41
#define ClassDef(name, id)
Definition: Rtypes.h:297
void SetMaterial(TGeoMaterial *mat)
Definition: TGeoMedium.h:55
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
void SetParam(Int_t i, Double_t val)
Definition: TGeoMedium.h:50
Int_t fId
Definition: TGeoMedium.h:31
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:54
double Double_t
Definition: RtypesCore.h:55
virtual ~TGeoMedium()
Destructor.
Definition: TGeoMedium.cxx:120
virtual Int_t GetByteCount() const
Definition: TGeoMedium.h:47
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:23
TGeoMaterial * fMaterial
Definition: TGeoMedium.h:33
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:115
Double_t GetParam(Int_t i) const
Definition: TGeoMedium.h:49