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

# User Rev Content
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 auterman 1.6 void Smooth(TGraph * g, int n=3);
12 auterman 1.8 void Smooth2D(TGraph * g, int n=3);
13     TGraph* Close2D(TGraph * g);
14 auterman 1.9 //void MergeBins(TH1*);
15 auterman 1.6
16 auterman 1.1 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 auterman 1.4 double(*func)(const T*), const double mass, const double diff=5.);
23 auterman 1.1
24     void Area( TH2*h, double(*x)(const T*), double(*y)(const T*),
25     double(*func)(const T*));
26    
27 auterman 1.3 void Graph( TGraph*g, double(*x)(const T*), double(*y)(const T*), double ymin=-999. );
28    
29 auterman 1.2 TGraph * GetContour(TH2*, int ncont=20, int flag=0);
30     std::vector<TGraph *> GetContours(TH2*, int ncont=20);
31 auterman 1.1
32 auterman 1.8 TGraph * GetContour005(TH2*, int ncont=20, int flag=0);
33     std::vector<TGraph *> GetContours005(TH2*, int ncont=20);
34    
35 auterman 1.4 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 auterman 1.8 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 auterman 1.5 void Print(double(*x)(const T*), double(*x)(const T*), double(*y)(const T*),
44     TGraph*, double p=10.);
45 auterman 1.9 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 auterman 1.5
48 auterman 1.7 TGraph * ChooseBest(TGraph*,TGraph*,TGraph*,TGraph*,double x=0,double y=0);
49    
50     TH2 * BinWiseOr(TH2*, TH2*);
51 auterman 1.9
52     TGraph * ModifyExpSigma(TGraph*, TGraph*, TGraph*);
53     TGraph * ModifyExpSigmaY(TGraph*, TGraph*, TGraph*);
54 auterman 1.7
55 auterman 1.1 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 auterman 1.3
66     class sort_TGraph{
67     public:
68     sort_TGraph(){}
69     bool operator()(const TGraph*g1, const TGraph*g2);
70     };
71    
72 auterman 1.1 };
73    
74     #endif