JetResolution

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#ifndef JETRESOLUTION_H
#define JETRESOLUTION_H

#include <string>
#include <vector>

#include <TF1.h>

class JetCorrectorParameters;

class JetResolution {
  //
  // construction / destruction
  //
public:
  JetResolution();
  JetResolution(const std::string& fileName, bool doGaussian = false);
  virtual ~JetResolution();

  double parameterEtaEval(const std::string& parameterName, float eta, float pt);

  //
  // member functions
  //
public:
  void initialize(const std::string& fileName, bool doGaussian = false);

  const std::string& name() const { return name_; }

  TF1* resolutionEtaPt(float eta, float pt) const;
  TF1* resolution(const std::vector<float>& x, const std::vector<float>& y) const;

  TF1* parameterEta(const std::string& parameterName, float eta);
  TF1* parameter(const std::string& parameterName, const std::vector<float>& x);

  const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }

  //
  // data members
  //
private:
  std::string name_;
  mutable TF1* resolutionFnc_;
  std::vector<TF1*> parameterFncs_;
  std::vector<JetCorrectorParameters*> parameters_;
};

#endif