#ifndef _PDALITZDECAY_H_
#define _PDALITZDECAY_H_
#include "TF1.h"
#include "TF2.h"
#include "PChannelModel.h"
#include "PDynamicData.h"
#include "PKinematics.h"
class PDalitzDecay : public PChannelModel {
public:
PDalitzDecay();
PDalitzDecay(const Char_t *id, const Char_t *de, Int_t key);
PDistribution *Clone(const char *delme=NULL) const;
Bool_t Init(void);
Bool_t SampleMass(void);
Bool_t SampleMass(Double_t *mass, Int_t *didx=NULL);
Bool_t GetWidth(Double_t mass, Double_t *width, Int_t didx=-1);
using PDistribution::GetWeight;
Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
Double_t GetWeight(void);
int GetDepth(int i=0);
Bool_t FreezeOut(void);
virtual Double_t Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const;
virtual Double_t EvalPar(const Double_t *x, const Double_t *params);
void SetUseQED(int t) {
useQED=t;
};
virtual void Print(const Option_t *delme=NULL) const ;
Double_t draw_parent_mass;
protected:
PParticle *parent, *dilepton, *other;
long double alpha;
double mass_pi0;
double mass_n;
double mass_eta;
double mass_p;
double p1;
double mass_e, mass_ee;
double p2;
double p3;
double mass_x;
double mass_parent;
int flag;
int sw;
double ml;
int rejection_flag;
int pi0, eta, eta_prime, w, Delta_0, Delta_plus, phi, S11_0, S11_plus;
int parent_id,dilepton_pid,other_pid;
int dilepton_position;
int others_position;
double photon_br;
int useQED;
int flatMD;
PMesh *integral;
PChannelModel *formfactor_model;
virtual double dGdM(const int &id, const double &m, const double &ecm);
double FDalitz(const int &id, const double &m, double ecm);
void sampleMD(const double &ecm, const int &id,
double &m, const double &m1);
double PhotonBR(const int &id);
ClassDef(PDalitzDecay, 0)
};
#endif