ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/PlotTools.h
Revision: 1.9
Committed: Fri May 20 07:39:34 2011 UTC (13 years, 11 months ago) by auterman
Content type: text/plain
Branch: MAIN
CVS Tags: JHEP2010, HEAD
Changes since 1.8: +6 -1 lines
Log Message:
post CWR comments

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 void Smooth(TGraph * g, int n=3);
12 void Smooth2D(TGraph * g, int n=3);
13 TGraph* Close2D(TGraph * g);
14 //void MergeBins(TH1*);
15
16 template<class T>
17 class PlotTools {
18 public:
19 PlotTools(std::vector<T*> * scan):_scan(scan){}
20
21 TGraph * Line( double(*x)(const T*), double(*y)(const T*),
22 double(*func)(const T*), const double mass, const double diff=5.);
23
24 void Area( TH2*h, double(*x)(const T*), double(*y)(const T*),
25 double(*func)(const T*));
26
27 void Graph( TGraph*g, double(*x)(const T*), double(*y)(const T*), double ymin=-999. );
28
29 TGraph * GetContour(TH2*, int ncont=20, int flag=0);
30 std::vector<TGraph *> GetContours(TH2*, int ncont=20);
31
32 TGraph * GetContour005(TH2*, int ncont=20, int flag=0);
33 std::vector<TGraph *> GetContours005(TH2*, int ncont=20);
34
35 TGraph * GetContour(TH2*,double(*x)(const T*), double(*y)(const T*),
36 double(*func)(const T*), int ncont=20, int flag=0,
37 int color=1, int style=1);
38
39 TGraph * GetContour005(TH2*,double(*x)(const T*), double(*y)(const T*),
40 double(*func)(const T*), int ncont=20, int flag=0,
41 int color=1, int style=1);
42
43 void Print(double(*x)(const T*), double(*x)(const T*), double(*y)(const T*),
44 TGraph*, double p=10.);
45 void Print(double(*x)(const T*), double(*x)(const T*), double(*y)(const T*), double(*x)(const T*), double(*y)(const T*),
46 TGraph*, double p=10.);
47
48 TGraph * ChooseBest(TGraph*,TGraph*,TGraph*,TGraph*,double x=0,double y=0);
49
50 TH2 * BinWiseOr(TH2*, TH2*);
51
52 TGraph * ModifyExpSigma(TGraph*, TGraph*, TGraph*);
53 TGraph * ModifyExpSigmaY(TGraph*, TGraph*, TGraph*);
54
55 private:
56 std::vector<T*> * _scan;
57
58 class sort_by{
59 public:
60 sort_by(double(*x)(const T*)):_f(x){}
61 bool operator()(const T*a, const T*b){ return _f(a)<_f(b); }
62 private:
63 double(*_f)(const T*);
64 };
65
66 class sort_TGraph{
67 public:
68 sort_TGraph(){}
69 bool operator()(const TGraph*g1, const TGraph*g2);
70 };
71
72 };
73
74 #endif