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 |
|
|
template<class T>
|
11 |
|
|
class PlotTools {
|
12 |
|
|
public:
|
13 |
|
|
PlotTools(std::vector<T*> * scan):_scan(scan){}
|
14 |
|
|
|
15 |
|
|
TGraph * Line( double(*x)(const T*), double(*y)(const T*),
|
16 |
|
|
double(*func)(const T*), const double mass, const double diff=5.);
|
17 |
|
|
|
18 |
|
|
void Area( TH2*h, double(*x)(const T*), double(*y)(const T*),
|
19 |
|
|
double(*func)(const T*));
|
20 |
|
|
|
21 |
|
|
TGraph * GetContour(TH2*, int flag=0);
|
22 |
|
|
|
23 |
|
|
private:
|
24 |
|
|
std::vector<T*> * _scan;
|
25 |
|
|
|
26 |
|
|
class sort_by{
|
27 |
|
|
public:
|
28 |
|
|
sort_by(double(*x)(const T*)):_f(x){}
|
29 |
|
|
bool operator()(const T*a, const T*b){ return _f(a)<_f(b); }
|
30 |
|
|
private:
|
31 |
|
|
double(*_f)(const T*);
|
32 |
|
|
};
|
33 |
|
|
};
|
34 |
|
|
|
35 |
|
|
#endif
|