CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetResolution.h
Go to the documentation of this file.
1 #ifndef JETRESOLUTION_H
2 #define JETRESOLUTION_H
3 
4 #include <string>
5 #include <vector>
6 
7 #include <TF1.h>
8 
9 
11 
12 
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  double parameterEtaEval(const std::string& parameterName,float eta, float pt);
25 
26  //
27  // member functions
28  //
29 public:
30  void initialize(const std::string& fileName,bool doGaussian=false);
31 
32  const std::string& name() const { return name_; }
33 
34  TF1* resolutionEtaPt(float eta,float pt) const;
35  TF1* resolution(const std::vector<float>&x, const std::vector<float>&y) const;
36 
37  TF1* parameterEta(const std::string& parameterName,float eta);
38  TF1* parameter(const std::string& parameterName,const std::vector<float>&x);
39 
40  const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }
41 
42 
43  //
44  // data members
45  //
46 private:
48  mutable TF1* resolutionFnc_;
49  std::vector<TF1*> parameterFncs_;
50  std::vector<JetCorrectorParameters*> parameters_;
51 
52 };
53 
54 
55 #endif
const std::string & name() const
Definition: JetResolution.h:32
int i
Definition: DBlmapReader.cc:9
void initialize(const std::string &fileName, bool doGaussian=false)
std::string name_
Definition: JetResolution.h:47
TF1 * resolutionFnc_
Definition: JetResolution.h:48
TF1 * parameterEta(const std::string &parameterName, float eta)
std::vector< TF1 * > parameterFncs_
Definition: JetResolution.h:49
virtual ~JetResolution()
std::vector< JetCorrectorParameters * > parameters_
Definition: JetResolution.h:50
T eta() const
double parameterEtaEval(const std::string &parameterName, float eta, float pt)
TF1 * resolution(const std::vector< float > &x, const std::vector< float > &y) const
TF1 * parameter(const std::string &parameterName, const std::vector< float > &x)
const JetCorrectorParameters & parameters(int i) const
Definition: JetResolution.h:40
Definition: DDAxes.h:10
TF1 * resolutionEtaPt(float eta, float pt) const