Ignore:
Timestamp:
09/16/05 14:57:22 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mgeom
Files:
3 edited

Legend:

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

    r7346 r7355  
    237237// --------------------------------------------------------------------------
    238238//
     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//
     243Float_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//
    239253// Have to call the radii of the subcameras starting to count from 1
    240254//
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.h

    r7346 r7355  
    6767
    6868    Float_t GetDist(UShort_t i, UShort_t j=0) const;
     69    Float_t GetAngle(UShort_t i, UShort_t j=0) const;
    6970
    7071    UInt_t  GetNumSectors()                const  { return fNumSectors; }
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.h

    r7342 r7355  
    6363    UInt_t  GetSector() const { return fSector; }
    6464
    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
    6668
    6769    Float_t GetA() const    { return fA; /*fD*fD*gsTan60/2;*/ }
Note: See TracChangeset for help on using the changeset viewer.