source: trunk/MagicSoft/Mars/mgui/MGeomPix.h@ 733

Last change on this file since 733 was 715, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#ifndef MGEOMPIX_H
2#define MGEOMPIX_H
3
4#ifndef MAGIC_H
5#include "MAGIC.h"
6#endif
7
8class MGeomPix : public TObject
9{
10private:
11 Float_t fX; // the x coordinate
12 Float_t fY; // the y coordinate
13 Float_t fR; // the r coordinate
14
15 Byte_t fNumNeighbors; // number of valid neighbors
16 Short_t fNeighbors[6]; // the IDs of the pixel next to it
17 // we are assuming an hexagonal geometry
18
19public:
20 MGeomPix(Float_t x=0. , Float_t y=0., Float_t r=0.) ;
21
22 void Print(Option_t *opt=NULL) ;
23
24 void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }
25
26 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
27 Short_t i3=-1, Short_t i4=-1, Short_t i5=-1);
28
29 void SetX (Float_t x) { fX = x; }
30 void SetY (Float_t y) { fY = y; }
31 void SetR (Float_t r) { fR = r; }
32
33 Float_t GetX() const { return fX; }
34 Float_t GetY() const { return fY; }
35 Float_t GetR() const { return fR; }
36
37 Byte_t GetNumNeighbors() const { return fNumNeighbors; }
38 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; }
39
40 ClassDef(MGeomPix, 1) // Geometric class for one pixel
41} ;
42
43#endif
44
Note: See TracBrowser for help on using the repository browser.