Changeset 4966 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 09/13/04 08:57:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r4566 r4966 36 36 37 37 #include "MTime.h" // MTime::GetGmst 38 39 #include "MAstroCatalog.h" // FIXME: replace by MVector3! 38 40 39 41 using namespace std; … … 540 542 return (Int_t)TMath::Floor(period)-284; 541 543 } 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 // 557 TVector2 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 5 5 #include <TROOT.h> 6 6 #endif 7 #ifndef ROOT_TVector2 8 #include <TVector2.h> 9 #endif 10 11 class TVector3; 7 12 8 13 class MAstro … … 60 65 static Int_t GetMagicPeriod(Double_t mjd); 61 66 67 static TVector2 GetDistOnPlain(const TVector3 &v0, TVector3 v1, Double_t dist=1); 68 62 69 ClassDef(MAstro, 0) 63 70 };
Note:
See TracChangeset
for help on using the changeset viewer.