Changeset 8908 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
06/02/08 09:58:38 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.cc

    r8756 r8908  
    1919!   Author(s): Harald Kornmayer 1/2001
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2003
     21!   Copyright: MAGIC Software Development, 2000-2008
    2222!
    2323!
     
    139139// ------------------------------------------------------------------------
    140140//
     141// Return distance of center to coordinate origin: hypot(fX,fY)
     142//
     143Float_t MGeomPix::GetDist() const
     144{
     145    return TMath::Hypot(fX, fY);
     146}
     147
     148// ------------------------------------------------------------------------
     149//
     150// Return distance of center to center of pix: hypot(fX-pix.fX,fY-pix.fY)
     151//
     152Float_t MGeomPix::GetDist(const MGeomPix &pix) const
     153{
     154    return TMath::Hypot(fX-pix.fX, fY-pix.fY);
     155}
     156
     157// ------------------------------------------------------------------------
     158//
     159// Return angle defined by the center and the center of pix:
     160//  atan2(fX-pix.fX,fY-pix.fY)
     161//
     162Float_t MGeomPix::GetAngle(const MGeomPix &pix) const
     163{
     164    return TMath::ATan2(fX - pix.GetX(), fY - pix.GetY());
     165}
     166
     167// ------------------------------------------------------------------------
     168//
    141169// compute the distance of a point (px,py) to the Hexagon center in
    142170// MGeomPix coordinates. Return kTRUE if inside.
Note: See TracChangeset for help on using the changeset viewer.