// $Header: LCDIPSmear.h $
// ??-??-2000 M.Iwasaki

#ifndef LCDIPSMEAR_H
#define LCDIPSMEAR_H

#include "TRandom.h"
#include "LCDEvent.h"
#include "LCDGetParameters.h"
#include "LCDRecModule.h"

//=========================================================
class LCDIPSmear : public LCDRecModule {

public:
  LCDIPSmear() : m_sigma_IPx(0), m_sigma_IPy(0), m_sigma_IPz(0) {}
  LCDIPSmear(LCDGetParameters* gp);
  ~LCDIPSmear(){};
  
  void Cleanup(LCDEvent* event) {}                // clean up  
  void Doit(LCDEvent* event);       // smear IP
  
  void SetLCDGetParameters(LCDGetParameters* gp);

  void SetSigmaX(Double_t s_x){ m_sigma_IPx = s_x; }
  void SetSigmaY(Double_t s_y){ m_sigma_IPy = s_y; }
  void SetSigmaZ(Double_t s_z){ m_sigma_IPz = s_z; }
  
private:
  Double_t m_sigma_IPx; // Sigma of the IP smearing x.
  Double_t m_sigma_IPy; // Sigma of the IP smearing y.
  Double_t m_sigma_IPz; // Sigma of the IP smearing z.
  
  TRandom m_random;  //random numbers for smearing.

public:
  ClassDef(LCDIPSmear,1)  // Manager class for Fast MC track generation
};

#endif
