// $Header: LCDIPSmear.h $

#ifndef LCDIPSMEAR_H
#define LCDIPSMEAR_H

#include "TRandom.h"
#include "TMath.h"
#include "LCDEvent.h"
#include "LCDBeam.h"
#include "LCDGetParameters.h"
#include "LCDRecModule.h"
#include "math.h"

//=========================================================
class LCDIPSmear : public LCDRecModule 
{
private:

  LCDGetParameters* m_parameters; // parameters
  LCDEvent* m_event; // event
  LCDBeam* m_beam;
  
  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:
  LCDIPSmear(LCDGetParameters* gp);
  ~LCDIPSmear(){};
  
  // Implicit copy constructor
  // Implicit assignment operator
  
  void doit(LCDEvent* event);       // smear IP
  void cleanup() {};                // clean up  
  void spew(FILE* ofile)const; // output to ascii file

  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; }

  LCDBeam* GetIP() {return m_beam;} // returns LCDBeam ptr


  ClassDef(LCDIPSmear,1)  // Manager class for Fast MC track generation
};

#endif
