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

#ifndef _PMASSAMPLING_H_
#define _PMASSAMPLING_H_



#include "TF1.h"
#include "TF2.h"
#include "PHadronModel.h"


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

    using PDistribution::GetWeight;   
    Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);

    using PDistribution::SampleMass;
    Bool_t   SampleMass(Double_t *mass, Int_t *didx=NULL);

    void     SetSamplingFunction(TF1 * f) {shape1=f;};

 private:
  
    TF1 *shape1;  //mass sampling shape as a function of resonance mass (=x)

    ClassDef(PMassSampling, 0)  // General purpose mass sampling model
};

#endif


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