1 |
#ifndef JETRESOLUTION_H
|
2 |
#define JETRESOLUTION_H
|
3 |
|
4 |
#include <string>
|
5 |
#include <vector>
|
6 |
|
7 |
#include <TF1.h>
|
8 |
|
9 |
|
10 |
class JetCorrectorParameters;
|
11 |
|
12 |
|
13 |
class JetResolution
|
14 |
{
|
15 |
//
|
16 |
// construction / destruction
|
17 |
//
|
18 |
public:
|
19 |
JetResolution();
|
20 |
JetResolution(const std::string& fileName,bool doGaussian=false);
|
21 |
virtual ~JetResolution();
|
22 |
|
23 |
|
24 |
//
|
25 |
// member functions
|
26 |
//
|
27 |
public:
|
28 |
void initialize(const std::string& fileName,bool doGaussian=false);
|
29 |
|
30 |
const std::string& name() const { return name_; }
|
31 |
|
32 |
TF1* resolutionEtaPt(float eta,float pt) const;
|
33 |
TF1* resolution(const std::vector<float>&x, const std::vector<float>&y) const;
|
34 |
|
35 |
TF1* parameterEta(const std::string& parameterName,float eta);
|
36 |
TF1* parameter(const std::string& parameterName,const std::vector<float>&x);
|
37 |
|
38 |
const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }
|
39 |
|
40 |
|
41 |
//
|
42 |
// data members
|
43 |
//
|
44 |
private:
|
45 |
std::string name_;
|
46 |
mutable TF1* resolutionFnc_;
|
47 |
std::vector<TF1*> parameterFncs_;
|
48 |
std::vector<JetCorrectorParameters*> parameters_;
|
49 |
|
50 |
};
|
51 |
|
52 |
|
53 |
#endif
|