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  //
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
const std::string & name() const
Definition: JetResolution.h:30
int i
Definition: DBlmapReader.cc:9
void initialize(const std::string &fileName, bool doGaussian=false)
std::string name_
Definition: JetResolution.h:45
TF1 * resolutionFnc_
Definition: JetResolution.h:46
TF1 * parameterEta(const std::string &parameterName, float eta)
std::vector< TF1 * > parameterFncs_
Definition: JetResolution.h:47
virtual ~JetResolution()
std::vector< JetCorrectorParameters * > parameters_
Definition: JetResolution.h:48
T eta() const
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:38
Definition: DDAxes.h:10
TF1 * resolutionEtaPt(float eta, float pt) const