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

#ifndef _PHADRONDECAYM3_H_
#define _PHADRONDECAYM3_H_

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

class PHadronDecayM3 : public PChannelModel  {
  
 public:
    PHadronDecayM3();
    PHadronDecayM3(const Char_t *id, const Char_t *de, Int_t key);
    PDistribution *Clone(const char *delme=NULL) const;


    Bool_t Prepare(void);
    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);

    Double_t GetWeight(void);
    Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
    int      GetDepth(int i=0);

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

    void SubPrint(Int_t opt) const ;  //Print sub-models

 protected:

    Double_t parent_mass, mass1, mass2, mass3;
    int parent_id, id1, id2, id3;
    PChannelModel *model1, *model2, *model3;
    PParticle *parent, *daughter1, *daughter2, *daughter3;
    int didx1, didx2, didx3;

    ClassDef(PHadronDecayM3, 0)  // Decay of Hadron -> 3*Hadron
};

#endif


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