Ignore:
Timestamp:
04/19/10 13:11:19 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mgeom
Files:
2 edited

Legend:

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

    r9385 r9571  
    158158// ------------------------------------------------------------------------
    159159//
     160// Return distance squared of center to center of pix:
     161//  (fX-pix.fX)^2+(fY-pix.fY)^2
     162//
     163Float_t MGeom::GetDist2(const MGeom &pix) const
     164{
     165    const Double_t dx = fX-pix.fX;
     166    const Double_t dy = fY-pix.fY;
     167    return dx*dx + dy*dy;
     168}
     169
     170// ------------------------------------------------------------------------
     171//
    160172// Return angle defined by the center and the center of pix:
    161173//  atan2(fX-pix.fX,fY-pix.fY)
  • trunk/MagicSoft/Mars/mgeom/MGeom.h

    r9385 r9571  
    8787    Float_t GetDist() const;
    8888    Float_t GetDist(const MGeom &pix) const;
     89    Float_t GetDist2(const MGeom &pix) const;
    8990    Float_t GetAngle(const MGeom &pix) const;
    9091
Note: See TracChangeset for help on using the changeset viewer.