Changeset 7355 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 09/16/05 14:57:22 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r7346 r7355 237 237 // -------------------------------------------------------------------------- 238 238 // 239 // Returns the angle between of pixels i wrt pixel j (default=0). The angle 240 // is returned in the range between -pi and pi (atan2) and 2*pi if i or j 241 // is out of range. 242 // 243 Float_t MGeomCam::GetAngle(UShort_t i, UShort_t j) const 244 { 245 if (i>=fNumPixels || j>=fNumPixels) 246 return TMath::TwoPi(); 247 248 return (*this)[i].GetAngle((*this)[j]); 249 } 250 251 // -------------------------------------------------------------------------- 252 // 239 253 // Have to call the radii of the subcameras starting to count from 1 240 254 // -
trunk/MagicSoft/Mars/mgeom/MGeomCam.h
r7346 r7355 67 67 68 68 Float_t GetDist(UShort_t i, UShort_t j=0) const; 69 Float_t GetAngle(UShort_t i, UShort_t j=0) const; 69 70 70 71 UInt_t GetNumSectors() const { return fNumSectors; } -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r7342 r7355 63 63 UInt_t GetSector() const { return fSector; } 64 64 65 Float_t GetDist(const MGeomPix & pix) const { return TMath::Hypot(fX-pix.fX, fY-pix.fY); } 65 Float_t GetDist(const MGeomPix &pix) const { return TMath::Hypot(fX-pix.fX, fY-pix.fY); } 66 Float_t GetAngle(const MGeomPix &pix) const { return TMath::ATan2(fX - pix.GetX(), fY - pix.GetY()); } 67 66 68 67 69 Float_t GetA() const { return fA; /*fD*fD*gsTan60/2;*/ }
Note:
See TracChangeset
for help on using the changeset viewer.