// Author: I. Froehlich
// Written: 7.05.2007
// Revised: 
// PMesh
// Linear Mesh

#ifndef _PMESH_H_
#define _PMESH_H_

#include "TObject.h"
#include "TF1.h"

class PMesh : public TF1 {

 private:

    Double_t *td;
    Double_t max, min;
    Int_t size;
    
 public:

    //constructor
    PMesh(Int_t size, const Char_t * name);
    ~PMesh();
    
    Int_t    GetSize(void) {return size;}; //meshsize
    void     SetMax(Double_t pmax) {max=pmax; fXmax=pmax;};
    void     SetMin(Double_t pmin) {min=pmin; fXmin=pmin;};
    Double_t GetMax(void) {return max;};
    Double_t GetMin(void) {return min;};
    
    void     SetNode(Int_t node, Double_t v);
    Double_t GetNode(Int_t node);

    Double_t GetLinearIP(Double_t m) const ;
    void     Print(const Option_t* = NULL) const;
  
    Double_t Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const;
    Double_t EvalPar(const Double_t *x, const Double_t *params);
    //TF1 wrapper
    
    ClassDef(PMesh, 0)  //The linear mesh array
};

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