#ifndef MARS_MSrcTranslate
#define MARS_MSrcTranslate

#ifndef MARS_MSrcPlace
#include "MSrcPlace.h"
#endif

class MSrcTranslate : public MSrcPlace
{
 private:
  
  Double_t fShiftX;
  Double_t fShiftY;
  Bool_t   fTranslationIsRelative;
  
  Int_t PreProcess(MParList *plist);

 public:
  MSrcTranslate(const char* srcIn="MSrcPosCam", const char* srcOut="MSrcPosCam", 
		const char* name=NULL, const char* title=NULL);
  
  void SetTranslation(Double_t x=0.,Double_t y=0) {fShiftX=x,fShiftY=y;};
  void SetRelativeTranslation(Bool_t inp=kTRUE) {fTranslationIsRelative=inp;};
  virtual Int_t ComputeNewSrcPosition();

  ClassDef(MSrcTranslate, 0) // task to set the position of the source within the camera in an event by event basis
};

#endif

