Ignore:
Timestamp:
03/23/05 09:42:31 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpointing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc

    r6346 r6874  
    1717!
    1818!   Author(s): Thomas Bretz 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    19 !             Abelardo Moralejo 1/2005 <mailto:moralejo@pd.infn.it>
     19!   Author(s): Abelardo Moralejo 1/2005 <mailto:moralejo@pd.infn.it>
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2004
     
    9090MSrcPosCalc::MSrcPosCalc(const char *name, const char *title)
    9191    : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fSrcPosCam(NULL),
    92     fGeom(NULL), fTime(NULL)
     92    fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fIsWobbleMode(kFALSE)
    9393{
    9494    fName  = name  ? name  : "MSrcPosCalc";
     
    149149    fSrcPosCam = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam");
    150150    if (!fSrcPosCam)
     151        return kFALSE;
     152
     153    fSrcPosAnti = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam", "MSrcPosAnti");
     154    if (!fSrcPosAnti)
    151155        return kFALSE;
    152156
     
    260264  // coordinates, since this transformation ignores precession and nutation effects.
    261265  const MAstroSky2Local conv(*fTime, *fObservatory);
    262 
    263266  pos *= conv;
    264267
     
    284287  // Calculate source position in camera, and convert to mm:
    285288  TVector2 v = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000;
    286 
    287   fSrcPosCam->SetXY(v);
     289  if (fIsWobbleMode)
     290  {
     291      fSrcPosAnti->SetXY(v);
     292      v *= -1;
     293      fSrcPosCam->SetXY(v);
     294  }
     295  else
     296  {
     297      fSrcPosCam->SetXY(v);
     298      v *= -1;
     299      fSrcPosAnti->SetXY(v);
     300  }
    288301
    289302  //     v *= fGeom->GetConvMm2Deg();
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h

    r6346 r6874  
    2828    MPointingPos *fSourcePos;
    2929    MSrcPosCam   *fSrcPosCam;
     30    MSrcPosCam   *fSrcPosAnti;
    3031    MGeomCam     *fGeom;
    3132    MTime        *fTime;
     33
     34    Bool_t fIsWobbleMode;
    3235
    3336    // MSrcPosCalc
     
    5255    void SetSourcePos(Double_t ra, Double_t dec);
    5356    void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos
     57    void SetWobbleMode(Bool_t b=kTRUE) { fIsWobbleMode = b; }
    5458
    5559    ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
Note: See TracChangeset for help on using the changeset viewer.