1 |
auterman |
1.1 |
#ifndef PLOTTOOLS_H
|
2 |
|
|
#define PLOTTOOLS_H
|
3 |
|
|
|
4 |
|
|
#include <vector>
|
5 |
|
|
|
6 |
|
|
class TGraph;
|
7 |
|
|
class SusyScan;
|
8 |
|
|
class TH2;
|
9 |
|
|
|
10 |
auterman |
1.4 |
TGraph * MakeBand(TGraph *g1, TGraph *g2, bool b=false);
|
11 |
|
|
|
12 |
auterman |
1.6 |
void Smooth(TGraph * g, int n=3);
|
13 |
|
|
|
14 |
auterman |
1.1 |
template<class T>
|
15 |
|
|
class PlotTools {
|
16 |
|
|
public:
|
17 |
|
|
PlotTools(std::vector<T*> * scan):_scan(scan){}
|
18 |
|
|
|
19 |
|
|
TGraph * Line( double(*x)(const T*), double(*y)(const T*),
|
20 |
auterman |
1.4 |
double(*func)(const T*), const double mass, const double diff=5.);
|
21 |
auterman |
1.1 |
|
22 |
|
|
void Area( TH2*h, double(*x)(const T*), double(*y)(const T*),
|
23 |
|
|
double(*func)(const T*));
|
24 |
|
|
|
25 |
auterman |
1.3 |
void Graph( TGraph*g, double(*x)(const T*), double(*y)(const T*), double ymin=-999. );
|
26 |
|
|
|
27 |
auterman |
1.2 |
TGraph * GetContour(TH2*, int ncont=20, int flag=0);
|
28 |
|
|
std::vector<TGraph *> GetContours(TH2*, int ncont=20);
|
29 |
auterman |
1.1 |
|
30 |
auterman |
1.4 |
TGraph * GetContour(TH2*,double(*x)(const T*), double(*y)(const T*),
|
31 |
|
|
double(*func)(const T*), int ncont=20, int flag=0,
|
32 |
|
|
int color=1, int style=1);
|
33 |
|
|
|
34 |
auterman |
1.5 |
void Print(double(*x)(const T*), double(*x)(const T*), double(*y)(const T*),
|
35 |
|
|
TGraph*, double p=10.);
|
36 |
|
|
|
37 |
auterman |
1.1 |
private:
|
38 |
|
|
std::vector<T*> * _scan;
|
39 |
|
|
|
40 |
|
|
class sort_by{
|
41 |
|
|
public:
|
42 |
|
|
sort_by(double(*x)(const T*)):_f(x){}
|
43 |
|
|
bool operator()(const T*a, const T*b){ return _f(a)<_f(b); }
|
44 |
|
|
private:
|
45 |
|
|
double(*_f)(const T*);
|
46 |
|
|
};
|
47 |
auterman |
1.3 |
|
48 |
|
|
class sort_TGraph{
|
49 |
|
|
public:
|
50 |
|
|
sort_TGraph(){}
|
51 |
|
|
bool operator()(const TGraph*g1, const TGraph*g2);
|
52 |
|
|
};
|
53 |
|
|
|
54 |
auterman |
1.1 |
};
|
55 |
|
|
|
56 |
|
|
#endif
|