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

#ifndef _PDALITZDISTRIBUTION_H_
#define _PDALITZDISTRIBUTION_H_

#include "TF1.h"
#include "TF2.h"
#include "PDistribution.h"
#include "PProjector.h"


class PDalitzDistribution : public PDistribution  {
  
 public:
    PDalitzDistribution();
    PDalitzDistribution(const Char_t *id, const Char_t *de);
    PDistribution* Clone(const char *delme=NULL) const;

    Bool_t Init(void);
    Bool_t Prepare(void);
    Bool_t Finalize(void);
    Bool_t IsNotRejected(void);
    Bool_t CheckAbort(void);

    void SetSlopes(Double_t myslope1, Double_t myslope2) {slope1=myslope1;slope2=myslope2;};
    Bool_t AddEquation(const char *command);
    Bool_t AddHistogram(TH2 *histo, const char *command = "");
    Bool_t Do(char *command) {
	return AddEquation(command);
    };
    Bool_t Do(TH2 *histo, const char *command = "") {
	return AddHistogram(histo, command);
    };

    void SetMax(Double_t mymax) {
	max = mymax;
    };

 private:
    PParticle *side_particle[2]; //2 additional particles
    PParticle *primary;
    PParticle *parent;

    PParticle *vprimary, *vs1, *vs2;
    Double_t  *vf;

    Double_t slope1, slope2,max;
    PProjector *projector;

    void MakeVars(void);

    ClassDef(PDalitzDistribution, 0)  //Dalitz plane decay slopes for a->b+c+d 
};

#endif


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