Ignore:
Timestamp:
09/13/04 08:57:58 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mastro
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r4566 r4966  
    3636
    3737#include "MTime.h"    // MTime::GetGmst
     38
     39#include "MAstroCatalog.h" // FIXME: replace by MVector3!
    3840
    3941using namespace std;
     
    540542    return (Int_t)TMath::Floor(period)-284;
    541543}
     544
     545// --------------------------------------------------------------------------
     546//
     547// Returns the distance in x,y between two polar-vectors (eg. Alt/Az, Ra/Dec)
     548// projected on aplain in a distance dist. For Magic this this the distance
     549// of the camera plain (1700mm) dist also determins the unit in which
     550// the TVector2 is returned.
     551//
     552// v0 is the reference vector (eg. the vector to the center of the camera)
     553// v1 is the vector to which we determin the distance on the plain
     554//
     555//  (see also MStarCamTrans::Loc0LocToCam())
     556//
     557TVector2 MAstro::GetDistOnPlain(const TVector3 &v0, TVector3 v1, Double_t dist)
     558{
     559    v1.RotateZ(-v0.Phi());
     560    v1.RotateY(-v0.Theta());
     561    v1.RotateZ(-TMath::Pi()/2); // exchange x and y
     562    v1 *= dist/v1.Z();
     563
     564    return v1.XYvector(); //TVector2(v1.Y(), -v1.X());//v1.XYvector();
     565}
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r4566 r4966  
    55#include <TROOT.h>
    66#endif
     7#ifndef ROOT_TVector2
     8#include <TVector2.h>
     9#endif
     10
     11class TVector3;
    712
    813class MAstro
     
    6065    static Int_t    GetMagicPeriod(Double_t mjd);
    6166
     67    static TVector2 GetDistOnPlain(const TVector3 &v0, TVector3 v1, Double_t dist=1);
     68
    6269    ClassDef(MAstro, 0)
    6370};
Note: See TracChangeset for help on using the changeset viewer.