1 |
#include "IsoMassLine.h"
|
2 |
#include "TGraph.h"
|
3 |
#include "SusyScan.h"
|
4 |
|
5 |
#include <cmath>
|
6 |
#include <algorithm>
|
7 |
|
8 |
|
9 |
template<class T>
|
10 |
TGraph * IsoMassLine<T>::get( double(*x)(const T*), double(*y)(const T*),
|
11 |
double(*func)(const T*), const double mass, const double diff )
|
12 |
{
|
13 |
TGraph * result = new TGraph(1);
|
14 |
std::sort(_scan->begin(),_scan->end(),sort_by(x));
|
15 |
int i=0;
|
16 |
for (typename std::vector<T*>::const_iterator it=_scan->begin();it!=_scan->end();++it){
|
17 |
if ( fabs(func( *it)-mass)<diff )
|
18 |
result->SetPoint(i++, x(*it), y(*it));
|
19 |
}
|
20 |
return result;
|
21 |
}
|
22 |
|
23 |
template class IsoMassLine<SusyScan>;
|