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

#ifndef _PHADRONDECAYM2_H_
#define _PHADRONDECAYM2_H_

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

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

    Bool_t Init(void);
    Bool_t Prepare(void);
    void   SubPrint(Int_t opt) const;
    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 PHadronDecayM1::GetWeight;   
    Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
    int      GetDepth(int i=0);

 
 protected:

    Double_t dynamic_mass1, dynamic_mass2; //return value from sampleM2

    bool sampleM2(const double &ecm);

    ClassDef(PHadronDecayM2, 0)  // Hadron decay in 2 unstable products
};

#endif


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