#ifndef PRM_PAIRING_HH
#define PRM_PAIRING_HH

#include <iostream>
#include <vector>

#include "Nilsson.hh"


namespace PRM {
  class Pairing {
    //this is a class to handle solving the BCS equation with a
    //pairing + quadrupole force
  public:
    Nilsson &fNilPos;
    Nilsson &fNilNeg;
    int fNOdd;
    std::vector<double> fEnergies;
    std::vector<double> fQ;
    
    int fMaxIter;
    double fEfac;
    int fImin;
    int fImax;

    //pairing
    double fDelta;    
    double fEferm;
    double fG0;

    double fGN0;
    double fGN1;

    //quadrupole
    double fDelta2;
    double fG2;
    
    double fTolerance;

    Pairing(Nilsson &nilpos, Nilsson &nilneg);    
    void SetParams(double G, double G2);
    void SetGNParams(double GN0, double GN1);
    void Solve();
    void SetIPair(int ipair);
    void Solve(int ipair);
    void Solve(int imin, int imax);
    void PrintSummary(std::ostream &out);
    void PrintLevels(std::ostream &out, int ncols=4);
  };
}

#endif
