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

#ifndef _PF1_H_
#define _PF1_H_

#include "TF1.h"
#include "PProjector.h"


class PF1: public TF1 {

 public:

    
    //Standard ROOT ctors
    PF1();
    PF1(const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1);
    //PF1(const char *name, void *fcn, Double_t xmin=0, Double_t xmax=1, Int_t npar=0);

    PF1(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0);
    PF1(const char *name, Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0);
    PF1(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Int_t npar = 0);  
    PF1(const PF1 &f1);
  
    //Pluto ctor
    PF1(const char *name, Double_t xmin, Double_t xmax);

    virtual Double_t EvalPar(const Double_t *x, const Double_t *params);
    //TF wrapper

  
    Bool_t Add(char *command);
    Bool_t Add(TH1  *histo, const char *command = "");
    Bool_t Add(TH2  *histo, const char *command = "");
    Bool_t Add(TH3  *histo, const char *command = "");
    Bool_t Add(TGraph *graph, const char *command = "");
    Bool_t Add(TGraph2D *graph, const char *command = "");


 protected:

    PProjector *projector;
    Double_t   *vf, *vx, *vy;


    ClassDef(PF1, 0)  // Pluto TF1 extension

};

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