ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/PlotTools.h
Revision: 1.6
Committed: Tue Feb 22 13:59:19 2011 UTC (14 years, 2 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -0 lines
Log Message:
NLO updates

File Contents

# Content
1 #ifndef PLOTTOOLS_H
2 #define PLOTTOOLS_H
3
4 #include <vector>
5
6 class TGraph;
7 class SusyScan;
8 class TH2;
9
10 TGraph * MakeBand(TGraph *g1, TGraph *g2, bool b=false);
11
12 void Smooth(TGraph * g, int n=3);
13
14 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 double(*func)(const T*), const double mass, const double diff=5.);
21
22 void Area( TH2*h, double(*x)(const T*), double(*y)(const T*),
23 double(*func)(const T*));
24
25 void Graph( TGraph*g, double(*x)(const T*), double(*y)(const T*), double ymin=-999. );
26
27 TGraph * GetContour(TH2*, int ncont=20, int flag=0);
28 std::vector<TGraph *> GetContours(TH2*, int ncont=20);
29
30 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 void Print(double(*x)(const T*), double(*x)(const T*), double(*y)(const T*),
35 TGraph*, double p=10.);
36
37 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
48 class sort_TGraph{
49 public:
50 sort_TGraph(){}
51 bool operator()(const TGraph*g1, const TGraph*g2);
52 };
53
54 };
55
56 #endif