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

#ifndef _PINCLUSIVEMODEL_H_
#define _PINCLUSIVEMODEL_H_

#define INCLUSIVE_MAX_DAUGHTERS 3

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

class PInclusiveModel : public PChannelModel  {
  
 public:

    PInclusiveModel();
    PInclusiveModel(const Char_t *id, const Char_t *de, Int_t key);
    PDistribution* Clone(const char*delme=NULL) const;

    Bool_t Init(void);
    using PChannelModel::SampleMass;

    using PChannelModel::GetWeight;
    Double_t GetWeight(void);
    
    Bool_t SampleMass(void);
    int    GetDepth(int i=0);

    void   SetSampleFunction(TF1 *f) {sample=f;};
    void   SetSampleFunction(Double_t f) {sample_d=f;};

 private:
    PParticle *parent, *daughters[INCLUSIVE_MAX_DAUGHTERS], *primary; 
    PChannelModel *daughter_models[INCLUSIVE_MAX_DAUGHTERS];
    int daughter_pos;
    TF1 *sample;
    Double_t sample_d;
    Double_t weight;

    void Setup();
  
    ClassDef(PInclusiveModel, 0)  //Model for mass sampling for X in a->b+c+X
};



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