Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
23class TGeoMedium : public TNamed {
24public:
26
27protected:
28 Int_t fId; // unique Id
29 Double_t fParams[20]; // parameters
30 TGeoMaterial *fMaterial; // pointer to material
31
32 // methods
33 TGeoMedium(const TGeoMedium &);
35
36public:
37 // constructors
38 TGeoMedium();
39 TGeoMedium(const char *name, Int_t numed, const TGeoMaterial *mat, Double_t *params = nullptr);
40 TGeoMedium(const char *name, Int_t numed, Int_t imat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
41 Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
42 ~TGeoMedium() override;
43 // methods
44 virtual Int_t GetByteCount() const { return sizeof(*this); }
45 Int_t GetId() const { return fId; }
46 Double_t GetParam(Int_t i) const { return fParams[i]; }
47 void SetParam(Int_t i, Double_t val) { fParams[i] = val; }
48 const char *GetPointerName() const;
49 TGeoMaterial *GetMaterial() const { return fMaterial; }
50 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
51 void SetId(Int_t id) { fId = id; }
52 void SetMaterial(TGeoMaterial *mat) { fMaterial = mat; }
53 virtual void SetCerenkovProperties(TObject *cerenkov) { fMaterial->SetCerenkovProperties(cerenkov); }
54 ClassDefOverride(TGeoMedium, 1) // tracking medium
55};
56
57#endif
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
char name[80]
Definition TGX11.cxx:110
Base class describing materials.
virtual void SetCerenkovProperties(TObject *cerenkov)
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:30
void SetId(Int_t id)
Definition TGeoMedium.h:51
Int_t GetId() const
Definition TGeoMedium.h:45
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t fParams[20]
Definition TGeoMedium.h:29
@ kMedSavePrimitive
Definition TGeoMedium.h:25
TGeoMedium & operator=(const TGeoMedium &)
assignment operator
void SetParam(Int_t i, Double_t val)
Definition TGeoMedium.h:47
TGeoMaterial * GetMaterial() const
Definition TGeoMedium.h:49
Int_t fId
Definition TGeoMedium.h:28
const char * GetPointerName() const
Provide a pointer name containing uid.
Double_t GetParam(Int_t i) const
Definition TGeoMedium.h:46
TGeoMedium()
Default constructor.
virtual Int_t GetByteCount() const
Definition TGeoMedium.h:44
~TGeoMedium() override
Destructor.
void SetMaterial(TGeoMaterial *mat)
Definition TGeoMedium.h:52
virtual void SetCerenkovProperties(TObject *cerenkov)
Definition TGeoMedium.h:53
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41