// Author: I. Froehlich
// Written: 27.5.2007
// Revised: 

#ifndef _PEEDIRECTDECAY_H_
#define _PEEDIRECTDECAY_H_

#include "TF1.h"
#include "TF2.h"
#include "PChannelModel.h"
#include "PDynamicData.h"
#include "PKinematics.h"

class PEEDirectDecay : public PChannelModel  {
  
 public:
    PEEDirectDecay();
    PEEDirectDecay(const Char_t *id, const Char_t *de, Int_t key=-1);
    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);
    int GetDepth(int i=0);

    virtual Double_t Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const;
    //TF1 wrapper

    void SetPiCutoff(int i) {
	use_pi_cutoff=i;
    };
    void SetHadronicPS(int i) {
	use_hadronic_ps=i;
    };

 protected:
  
    PParticle *parent, *e1, *e2;
    
    int use_pi_cutoff, use_hadronic_ps;
    int parent_id;
    double cv, mlep;

    ClassDef(PEEDirectDecay, 0)  // Direct decays of vector mesons -> dilepton/dimuon
};

#endif


 PEEDirectDecay.h:1
 PEEDirectDecay.h:2
 PEEDirectDecay.h:3
 PEEDirectDecay.h:4
 PEEDirectDecay.h:5
 PEEDirectDecay.h:6
 PEEDirectDecay.h:7
 PEEDirectDecay.h:8
 PEEDirectDecay.h:9
 PEEDirectDecay.h:10
 PEEDirectDecay.h:11
 PEEDirectDecay.h:12
 PEEDirectDecay.h:13
 PEEDirectDecay.h:14
 PEEDirectDecay.h:15
 PEEDirectDecay.h:16
 PEEDirectDecay.h:17
 PEEDirectDecay.h:18
 PEEDirectDecay.h:19
 PEEDirectDecay.h:20
 PEEDirectDecay.h:21
 PEEDirectDecay.h:22
 PEEDirectDecay.h:23
 PEEDirectDecay.h:24
 PEEDirectDecay.h:25
 PEEDirectDecay.h:26
 PEEDirectDecay.h:27
 PEEDirectDecay.h:28
 PEEDirectDecay.h:29
 PEEDirectDecay.h:30
 PEEDirectDecay.h:31
 PEEDirectDecay.h:32
 PEEDirectDecay.h:33
 PEEDirectDecay.h:34
 PEEDirectDecay.h:35
 PEEDirectDecay.h:36
 PEEDirectDecay.h:37
 PEEDirectDecay.h:38
 PEEDirectDecay.h:39
 PEEDirectDecay.h:40
 PEEDirectDecay.h:41
 PEEDirectDecay.h:42
 PEEDirectDecay.h:43
 PEEDirectDecay.h:44
 PEEDirectDecay.h:45
 PEEDirectDecay.h:46
 PEEDirectDecay.h:47
 PEEDirectDecay.h:48
 PEEDirectDecay.h:49
 PEEDirectDecay.h:50
 PEEDirectDecay.h:51
 PEEDirectDecay.h:52
 PEEDirectDecay.h:53
 PEEDirectDecay.h:54