Changeset 6874 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 03/23/05 09:42:31 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r6346 r6874 17 17 ! 18 18 ! Author(s): Thomas Bretz 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 19 ! Author(s): Abelardo Moralejo 1/2005 <mailto:moralejo@pd.infn.it> 20 20 ! 21 21 ! Copyright: MAGIC Software Development, 2000-2004 … … 90 90 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title) 91 91 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fSrcPosCam(NULL), 92 f Geom(NULL), fTime(NULL)92 fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fIsWobbleMode(kFALSE) 93 93 { 94 94 fName = name ? name : "MSrcPosCalc"; … … 149 149 fSrcPosCam = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam"); 150 150 if (!fSrcPosCam) 151 return kFALSE; 152 153 fSrcPosAnti = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam", "MSrcPosAnti"); 154 if (!fSrcPosAnti) 151 155 return kFALSE; 152 156 … … 260 264 // coordinates, since this transformation ignores precession and nutation effects. 261 265 const MAstroSky2Local conv(*fTime, *fObservatory); 262 263 266 pos *= conv; 264 267 … … 284 287 // Calculate source position in camera, and convert to mm: 285 288 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 } 288 301 289 302 // v *= fGeom->GetConvMm2Deg(); -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r6346 r6874 28 28 MPointingPos *fSourcePos; 29 29 MSrcPosCam *fSrcPosCam; 30 MSrcPosCam *fSrcPosAnti; 30 31 MGeomCam *fGeom; 31 32 MTime *fTime; 33 34 Bool_t fIsWobbleMode; 32 35 33 36 // MSrcPosCalc … … 52 55 void SetSourcePos(Double_t ra, Double_t dec); 53 56 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; } 54 58 55 59 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
Note:
See TracChangeset
for help on using the changeset viewer.