ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/PlotTools.h
Revision: 1.3
Committed: Wed Jan 26 15:23:05 2011 UTC (14 years, 3 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.2: +9 -0 lines
Log Message:
A lot of 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     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 auterman 1.3 void Graph( TGraph*g, double(*x)(const T*), double(*y)(const T*), double ymin=-999. );
22    
23 auterman 1.2 TGraph * GetContour(TH2*, int ncont=20, int flag=0);
24     std::vector<TGraph *> GetContours(TH2*, int ncont=20);
25 auterman 1.1
26     private:
27     std::vector<T*> * _scan;
28    
29     class sort_by{
30     public:
31     sort_by(double(*x)(const T*)):_f(x){}
32     bool operator()(const T*a, const T*b){ return _f(a)<_f(b); }
33     private:
34     double(*_f)(const T*);
35     };
36 auterman 1.3
37     class sort_TGraph{
38     public:
39     sort_TGraph(){}
40     bool operator()(const TGraph*g1, const TGraph*g2);
41     };
42    
43 auterman 1.1 };
44    
45     #endif