ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/PrintTools.cc
Revision: 1.1
Committed: Wed Jun 22 15:11:53 2011 UTC (13 years, 10 months ago) by auterman
Content type: text/plain
Branch: MAIN
CVS Tags: JHEP2010, HEAD
Error occurred while calculating annotation data.
Log Message:
2010 RA2 paper

File Contents

# Content
1 #include "PrintTools.h"
2 #include "SusyScan.h"
3 #include "GeneratorMasses.h"
4
5 #include <cmath>
6 #include <algorithm>
7 #include <iostream>
8
9 #include "TGraph.h"
10 #include "TF1.h"
11 #include "TH2.h"
12 #include "TH2F.h"
13 #include "TObjArray.h"
14 #include "TPad.h"
15 #include "TCanvas.h"
16 #include "TRint.h"
17 #include "TROOT.h"
18
19
20 template<class T>
21 void PrintTools<T>::Print(double(*x)(const T*))
22 {
23 for (typename std::vector<T*>::const_iterator it=_scan->begin();it!=_scan->end();++it){
24 bool match=1;
25 for (typename std::vector<const Criteria*>::const_iterator crit=crits_.begin();crit!=crits_.end();++crit)
26 match *= (**crit)(*it);
27 if (!match) continue;
28
29 for (typename std::vector< double(*)(const T*) >::const_iterator vit=var_.begin();vit!=var_.end();++vit)
30 std::cout << (*vit)(*it) << ", ";
31 std::cout << std::endl;
32 }
33 }
34
35
36 template<class T>
37 void PrintTools<T>::Print(const TGraph *g,const std::string& x, const std::string& y){
38 for (int j=0; j<g->GetN(); ++j) {
39 double gx, gy;
40 g->GetPoint(j, gx, gy);
41
42 bool match=1;
43 for (typename std::vector<const Criteria*>::const_iterator crit=crits_.begin();crit!=crits_.end();++crit)
44 match *= (**crit)(gx, gy);
45 if (!match) continue;
46
47 std::cout << x << gx << y << gy << std::endl;
48 }
49 }
50
51
52 template class PrintTools<SusyScan>;
53 template class PrintTools<GeneratorMasses>;