source: trunk/MagicSoft/Mars/mgeom/MGeomPix.h@ 1458

Last change on this file since 1458 was 1458, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.6 KB
Line 
1#ifndef MARS_MGeomPix
2#define MARS_MGeomPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MGeomCam;
9
10class MGeomPix : public MParContainer
11{
12private:
13 enum {
14 kIsInOutermostRing = BIT(14),
15 kIsInOuterRing = BIT(15)
16 };
17
18 Float_t fX; // [mm] the x coordinate of the center
19 Float_t fY; // [mm] the y coordinate of the center
20 Float_t fR; // [mm] the r coordinate of the pixel (dist between two parallel sides)
21
22 Byte_t fNumNeighbors; // number of valid neighbors
23 Short_t fNeighbors[6]; // the IDs of the pixel next to it (we are assuming an hexagonal geometry)
24
25public:
26 MGeomPix(Float_t x=0, Float_t y=0, Float_t r=0);
27
28 void Print(Option_t *opt=NULL) const;
29
30 void Set(Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }
31
32 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
33 Short_t i3=-1, Short_t i4=-1, Short_t i5=-1);
34
35 void CheckOuterRing(const MGeomCam &cam);
36
37 void SetX(Float_t x) { fX = x; }
38 void SetY(Float_t y) { fY = y; }
39 void SetR(Float_t r) { fR = r; }
40
41 Float_t GetX() const { return fX; }
42 Float_t GetY() const { return fY; }
43 Float_t GetR() const { return fR; }
44
45 Float_t GetA() const;
46
47 Byte_t GetNumNeighbors() const { return fNumNeighbors; }
48 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; }
49
50 Bool_t IsInOutermostRing() const { return TestBit(kIsInOutermostRing); }
51 Bool_t IsInOuterRing() const { return TestBit(kIsInOuterRing); }
52
53 ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel
54};
55
56#endif
57
Note: See TracBrowser for help on using the repository browser.