Changeset 9219 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 01/14/09 12:31:37 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r8921 r9219 517 517 // search for the neighbor in the given direction 518 518 // 519 int i; 520 for (i=0; i<pix.GetNumNeighbors(); i++) 519 for (int i=0; i<pix.GetNumNeighbors(); i++) 521 520 if (GetDirection(idx, pix.GetNeighbor(i))==dir) 522 521 return pix.GetNeighbor(i); -
trunk/MagicSoft/Mars/mgeom/MGeomCamDwarf.h
r9148 r9219 1 #ifndef MARS_MGeomCamDw qarf1 #ifndef MARS_MGeomCamDwarf 2 2 #define MARS_MGeomCamDwarf 3 3 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.cc
r8923 r9219 55 55 56 56 #include <TMath.h> 57 #include <TVector2.h> 57 58 58 59 #include "MLog.h" … … 77 78 Set(x, y, r, s, a); 78 79 SetNeighbors(); 80 } 81 82 // -------------------------------------------------------------------------- 83 // 84 // Return position as TVector2(fX, fY) 85 // 86 TVector2 MGeomPix::GetP() const 87 { 88 return TVector2(fX, fY); 79 89 } 80 90 … … 186 196 // more, rotated with respect to that one by +- 60 degrees. 187 197 // 188 if (TMath::Abs(dx) *2>fD)198 if (TMath::Abs(dx)>fD/2) 189 199 return kFALSE; 190 200 … … 194 204 const static Double_t sin60 = TMath::Sin(60/kRad2Deg); 195 205 196 const Double_t dx2 = dx*cos60 + dy*sin60; 197 if (TMath::Abs(dx2)*2>fD) 206 const Double_t dxc = dx*cos60; 207 const Double_t dys = dy*sin60; 208 209 if (TMath::Abs(dxc + dys)>fD/2) 198 210 return kFALSE; 199 211 200 const Double_t dx3 = dx*cos60 - dy*sin60; 201 if (TMath::Abs(dx3)*2>fD) 212 if (TMath::Abs(dxc - dys)>fD/2) 202 213 return kFALSE; 203 214 … … 218 229 const Double_t y2 = pix.GetY(); 219 230 220 if (x1>=x2 && y1>y2) return kRightTop; 221 if (x1>=x2 && y1<y2) return kRightBottom; 222 if (x1<=x2 && y1>y2) return kLeftTop; 223 if (x1<=x2 && y1<y2) return kLeftBottom; 224 if (x1>x2) return kRight; 225 if (x1<x2) return kLeft; 231 if (x1<=x2 && y1<y2) return kRightTop; 232 if (x1<=x2 && y1>y2) return kRightBottom; 233 if (x1>=x2 && y1<y2) return kLeftTop; 234 if (x1>=x2 && y1>y2) return kLeftBottom; 235 if (x1<x2) return kRight; 236 if (x1>x2) return kLeft; 237 238 cout << -1 << endl; 226 239 227 240 return -1; -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r8923 r9219 7 7 8 8 class MGeomCam; 9 class TVector2; 9 10 10 11 class MGeomPix : public MParContainer … … 77 78 UInt_t GetSector() const { return fSector; } 78 79 80 TVector2 GetP() const; 81 79 82 Float_t GetDist() const; 80 83 Float_t GetDist(const MGeomPix &pix) const;
Note:
See TracChangeset
for help on using the changeset viewer.