#if !defined(AMP_R)
#define AMP_R

#include "IUAmpTools/Amplitude.h"
#include "IUAmpTools/UserAmplitude.h"
#include "IUAmpTools/AmpParameter.h"
#include "GPUManager/GPUCustomTypes.h"

#include "TH1D.h"
#include <string>
#include <complex>
#include <vector>

using std::complex;
using namespace std;

// A class for describing the angular portion of the decay R->12
// in the reflectivity basis for photon beams: m can be negative!
// particles 1 and 2 are pseudoscalars
//
class Kinematics;

class Amp_R : public UserAmplitude< Amp_R >
{
    
public:
	
	Amp_R() : UserAmplitude< Amp_R >() { };
	Amp_R( const vector< string >& args );
	
	string name() const { return "Amp_R"; }
    
	complex< GDouble > calcAmplitude( GDouble** pKin ) const;
	
 private:
	
	int nArgs;
        
	int m_j;
	int m_m;
	int m_l;
	int m_r;
	int m_s;
	int m_e;
	
	AmpParameter polAngle;
	
	double polFraction;
	AmpParameter bwCenter;
	AmpParameter bwWidth;
	TH1D *polFrac_vs_E;
	string particle_decay;
	
};

#endif
