ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/PlotTools.h
Revision: 1.7
Committed: Wed Mar 2 13:31:33 2011 UTC (14 years, 2 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.6: +4 -0 lines
Log Message:
ARC review improvements

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    
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.7 TGraph * ChooseBest(TGraph*,TGraph*,TGraph*,TGraph*,double x=0,double y=0);
38    
39     TH2 * BinWiseOr(TH2*, TH2*);
40    
41 auterman 1.1 private:
42     std::vector<T*> * _scan;
43    
44     class sort_by{
45     public:
46     sort_by(double(*x)(const T*)):_f(x){}
47     bool operator()(const T*a, const T*b){ return _f(a)<_f(b); }
48     private:
49     double(*_f)(const T*);
50     };
51 auterman 1.3
52     class sort_TGraph{
53     public:
54     sort_TGraph(){}
55     bool operator()(const TGraph*g1, const TGraph*g2);
56     };
57    
58 auterman 1.1 };
59    
60     #endif