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

Last change on this file since 1270 was 1270, checked in by tbretz, 22 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#ifndef MARS_MGeomPix
2#define MARS_MGeomPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MGeomPix : public MParContainer
9{
10private:
11 Float_t fX; // [mm] the x coordinate of the center
12 Float_t fY; // [mm] the y coordinate of the center
13 Float_t fR; // [mm] the r coordinate of the pixel (dist between two parallel sides)
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) const;
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 Float_t GetA() const;
38
39 Byte_t GetNumNeighbors() const { return fNumNeighbors; }
40 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; }
41
42 ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel
43};
44
45#endif
46
Note: See TracBrowser for help on using the repository browser.