#ifndef QinvCorrFctnSmeared_hh
#define QinvCorrFctnSmeared_hh

#include "StHbtMaker/Base/StHbtCorrFctn.hh"
#include "StHbtMaker/Base/StHbtPairCut.h"

class QinvCorrFctnSmeared : public StHbtCorrFctn {
 public: 

  QinvCorrFctnSmeared(char* title,
		      const int& nbins, const float& QinvLo, 
		      const float& QinvHi);
  
  virtual ~QinvCorrFctnSmeared();

  virtual StHbtString Report();
  virtual void AddRealPair(const StHbtPair*);
  virtual void AddMixedPair(const StHbtPair*);

  virtual void Finish();

  void SetPt(double a, double b, double c) {mPt[0]=a; mPt[1]=b; mPt[3]=c;}
  void SetPtAlpha(double a) {mPtAlpha = a;}
  void SetTheta(double a, double b) {mTheta[0]=a; mTheta[1]=b;}
  void SetThetaAlpha(double a) {mThetaAlpha=a;}
  void SetPhi(double a, double b) {mPhi[0]=a; mPhi[1]=b;}
  void SetPhiAlpha(double a) {mPhiAlpha=a;}
  void SetA(double a, double b, double c) {mA[0]=a; mA[1]=b; mA[2]=c;}
  void SetB(double a, double b, double c) {mB[0]=a; mB[1]=b; mB[2]=c;}
  void SetC(double a, double b, double c) {mC[0]=a; mC[1]=b; mC[2]=c;}
  void SetParicleMasses(double a, double b) {mMass1=a; mMass2=b;}
  void SetCharges(double a, double b) {mCharge1=a; mCharge2=b;}
  void SetRadii(double a, double b, double c) {mRadii[0]=a; mRadii[1]=b; mRadii[2]=c;}
  void SetLambda(double a) {mLambda=a;}
  StHbt1DHisto* MixedQinv();
  StHbt1DHisto* MixedQinvWeight();
  StHbt1DHisto* MixedQinvSmeared();
  StHbt1DHisto* MixedQinvSmearedWeight();

 private:
  StHbt1DHisto* mMixedQinv;
  StHbt1DHisto* mMixedQinvWeight;
  StHbt1DHisto* mMixedQinvSmeared;
  StHbt1DHisto* mMixedQinvSmearedWeight;

  //Smearing parameters
  double mPt[3];
  double mPtAlpha;

  double mTheta[2];
  double mThetaAlpha;
  double mPhi[2];
  double mPhiAlpha;

  double mA[3];
  double mB[3];
  double mC[3];

  //FSI parameters
  double mMass1;
  double mMass2;
  double mCharge1;
  double mCharge2;

  Int_t mITest;
  Int_t mCalcCoul;
  Int_t mCalcStrong;
  Int_t mCalcQS;
  Int_t mPartCoulomb;

  //Radii and lambda
  Double_t mRadii[3];
  Double_t mLambda;
  

#ifdef __ROOT__
  ClassDef(QinvCorrFctnSmeared, 1)
#endif

};

inline StHbt1DHisto* QinvCorrFctnSmeared::MixedQinv() { return mMixedQinv; }
inline StHbt1DHisto* QinvCorrFctnSmeared::MixedQinvWeight() { return mMixedQinvWeight; }
inline StHbt1DHisto* QinvCorrFctnSmeared::MixedQinvSmeared() { return mMixedQinvSmeared;}
inline StHbt1DHisto* QinvCorrFctnSmeared::MixedQinvSmearedWeight() { 
  return mMixedQinvSmearedWeight; }
#endif
