Pluto v6.3.0
Loading...
Searching...
No Matches
PFunction.h
Go to the documentation of this file.
1// Author: I. Froehlich
2// Written: 07.4.2008
3// Revised:
4
5#ifndef _PFUNCTION_H_
6#define _PFUNCTION_H_
7
8
9#include "TF1.h"
10#include "TF2.h"
11#include "TF3.h"
12#include "PChannelModel.h"
13
14#include "PBatch.h"
15
16
17class PFunction : public PChannelModel {
18
19 public:
21 PFunction(const Char_t *id, const Char_t *de, Int_t key);
22 PDistribution *Clone(const char *delme=NULL) const;
23
24 Bool_t Init(void);
25
27 Double_t GetWeight(Double_t *mass, Int_t *didx=NULL);
28
29 using TF1::SetFunction;
30 void SetFunction(TF1 *my_tf1) {tf1 = my_tf1;};
31 void SetFunction(TF2 *my_tf2) {tf2 = my_tf2;};
32 void SetFunction(TF3 *my_tf3) {tf2 = my_tf3;};
33 void SetFunction(Double_t c) {constant = c;};
34 Bool_t AddEquation(const char *command);
35
37 Bool_t SampleMass(Double_t *mass, Int_t *didx=NULL);
38
39 private:
40
41 TF1 *tf1;
42 TF2 *tf2;
43 TF3 *tf3;
44 Double_t constant, *vf, *vx;
45 PBatch *batch;
46
47 ClassDef(PFunction, 0) //Function wrapper (e.g. for model pathes)
48
49};
50
51#endif
52
53
virtual Bool_t SampleMass(void)
virtual Double_t GetWeight(void)
void SetFunction(TF3 *my_tf3)
Definition PFunction.h:32
Bool_t Init(void)
PFunction(const Char_t *id, const Char_t *de, Int_t key)
void SetFunction(TF1 *my_tf1)
Definition PFunction.h:30
void SetFunction(Double_t c)
Definition PFunction.h:33
PDistribution * Clone(const char *delme=NULL) const
Bool_t SampleMass(Double_t *mass, Int_t *didx=NULL)
Double_t GetWeight(Double_t *mass, Int_t *didx=NULL)
void SetFunction(TF2 *my_tf2)
Definition PFunction.h:31
Bool_t AddEquation(const char *command)
PChannel * c[]
Double_t mass