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

#ifndef _PFIXEDDECAY_H_
#define _PFIXEDDECAY_H_

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

#define MAX_FIXED_NUM 10

class PFixedDecay : public PChannelModel  {
  
 public:
    PFixedDecay();
    PFixedDecay(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);

    int      GetDepth(int i=0);

    Bool_t   GetWidth(Double_t mass, Double_t *width, Int_t didx=-1);

 protected:

    PParticle *parent, *daughter[MAX_FIXED_NUM];
    int    parent_id, d_id[MAX_FIXED_NUM];          //PIDs
    double parent_mass, dmass[MAX_FIXED_NUM]; //Static Masses
    int    n_daughters;

    ClassDef(PFixedDecay, 0)  // Decay of A -> a+b+c+... with fixed product masses
};

#endif


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