Changeset 1458 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 07/31/02 11:10:37 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r1438 r1458 78 78 // -------------------------------------------------------------------------- 79 79 // 80 // Set the kIsOuterRing flag for all pixels which have a outermost pixel 81 // as Next Neighbor and don't have the kIsOutermostRing flag itself. 82 // 83 void MGeomCam::InitOuterRing() 84 { 85 for (UInt_t i=0; i<fNumPixels; i++) 86 (*this)[i].CheckOuterRing(*this); 87 } 88 89 // -------------------------------------------------------------------------- 90 // 80 91 // Calculate the maximum radius of the camera. This is ment for GUI layout. 81 92 // -
trunk/MagicSoft/Mars/mgeom/MGeomCam.h
r1436 r1458 24 24 protected: 25 25 void CalcMaxRadius(); 26 void InitOuterRing(); 26 27 27 28 public: 28 29 29 MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL); 30 30 -
trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc
r1436 r1458 200 200 (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2], 201 201 nn[i][3], nn[i][4], nn[i][5]); 202 203 InitOuterRing(); 202 204 } 203 205 -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
r1436 r1458 896 896 (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2], 897 897 nn[i][3], nn[i][4], nn[i][5]); 898 899 InitOuterRing(); 898 900 } -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.h
r1436 r1458 13 13 14 14 public: 15 16 15 MGeomCamMagic(const char *name=NULL); 17 16 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.cc
r1436 r1458 39 39 #include "MLog.h" 40 40 #include "MLogManip.h" 41 42 #include "MGeomCam.h" 41 43 42 44 ClassImp(MGeomPix); … … 83 85 84 86 fNumNeighbors = i; 87 88 if (fNumNeighbors<5) 89 SetBit(kIsInOutermostRing); 90 } 91 92 // -------------------------------------------------------------------------- 93 // 94 // Set the kIsOuterRing flag if this pixel has a outermost pixel 95 // as Next Neighbor and don't have the kIsOutermostRing flag itself. 96 // 97 void MGeomPix::CheckOuterRing(const MGeomCam &cam) 98 { 99 if (IsInOutermostRing()) 100 return; 101 102 for (int i=0; i<fNumNeighbors; i++) 103 if (cam[fNeighbors[i]].IsInOutermostRing()) 104 { 105 SetBit(kIsInOuterRing); 106 return; 107 } 85 108 } 86 109 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r1436 r1458 6 6 #endif 7 7 8 class MGeomCam; 9 8 10 class MGeomPix : public MParContainer 9 11 { 10 12 private: 13 enum { 14 kIsInOutermostRing = BIT(14), 15 kIsInOuterRing = BIT(15) 16 }; 17 11 18 Float_t fX; // [mm] the x coordinate of the center 12 19 Float_t fY; // [mm] the y coordinate of the center … … 14 21 15 22 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 23 Short_t fNeighbors[6]; // the IDs of the pixel next to it (we are assuming an hexagonal geometry) 18 24 19 25 public: … … 26 32 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1, 27 33 Short_t i3=-1, Short_t i4=-1, Short_t i5=-1); 34 35 void CheckOuterRing(const MGeomCam &cam); 28 36 29 37 void SetX(Float_t x) { fX = x; } … … 40 48 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; } 41 49 50 Bool_t IsInOutermostRing() const { return TestBit(kIsInOutermostRing); } 51 Bool_t IsInOuterRing() const { return TestBit(kIsInOuterRing); } 52 42 53 ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel 43 54 };
Note:
See TracChangeset
for help on using the changeset viewer.