Changeset 3365 for trunk


Ignore:
Timestamp:
03/01/04 10:59:46 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3364 r3365  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6 2004/03/01: Wolfgang Wittek
     7 
     8   * mhist/MHStarMap.[h,cc]
     9     - remove bugs
     10     - change GetRotationAngle() such that it can be called from outside
     11
     12
    613 2004/03/01: Thomas Bretz
    714
  • trunk/MagicSoft/Mars/mhist/MHStarMap.cc

    r3340 r3365  
    5454#include "MParList.h"
    5555
     56#include "MAstro.h"
    5657#include "MGeomCam.h"
    5758#include "MHillas.h"
     
    187188    fCosLat = TMath::Cos(obs->GetPhi());
    188189
     190    *fLog << "fSinLat, fCosLat = " << fSinLat << ",  "
     191          << fCosLat << endl;
     192
    189193    return kTRUE;
    190194}
     
    200204// (see TDAS 00-11, eqs. (18) and (20))
    201205//
    202 void MHStarMap::GetRotationAngle(Double_t &cosal, Double_t &sinal)
    203 {
    204     const Double_t theta = fMcEvt->GetTelescopeTheta();
    205     const Double_t phi   = fMcEvt->GetTelescopePhi();
     206void MHStarMap::GetRotationAngle(const Double_t &theta, const Double_t &phi,
     207                                 Double_t &cosal, Double_t &sinal)
     208{
    206209
    207210    const Double_t sint = TMath::Sin(theta);
     
    216219    const Double_t denom =  1./ TMath::Sqrt(v1*v1 + v2*v2);
    217220
    218     cosal = (fSinLat * sint) + fCosLat * cost * cosp * denom;
    219     sinal = (fCosLat * sinp) * denom;
     221    cosal =  (fSinLat * sint - fCosLat * cost * cosp) * denom;
     222    sinal =   fCosLat * sinp                          * denom;
    220223}
    221224
     
    261264    //   - and perform a rotation to compensate the rotation of the
    262265    //     sky image in the camera
     266
     267    const Double_t theta = fMcEvt->GetTelescopeTheta();
     268    const Double_t phi   = fMcEvt->GetTelescopePhi();
     269
    263270    Double_t cosal;
    264271    Double_t sinal;
    265     GetRotationAngle(cosal, sinal);
     272    GetRotationAngle(theta, phi, cosal, sinal);
    266273
    267274    if (m>-1 && m<1)
  • trunk/MagicSoft/Mars/mhist/MHStarMap.h

    r3340 r3365  
    3030    void Paint(Option_t *opt="");
    3131
    32     void GetRotationAngle(Double_t &cosangle, Double_t &sinangle);
    3332
    3433    Bool_t SetupFill(const MParList *pList);
     
    4746    TH2F *GetHist() { return fStarMap; }
    4847
     48    void GetRotationAngle(const Double_t &thetatel, const Double_t &phitel,
     49                          Double_t &cosangle, Double_t &sinangle);
     50
    4951    void Draw(Option_t *opt=NULL);
    5052    TObject *DrawClone(Option_t *opt=NULL) const;
Note: See TracChangeset for help on using the changeset viewer.