CMS 3D CMS Logo

Public Member Functions | Private Attributes

JetResolution Class Reference

#include <JetResolution.h>

List of all members.

Public Member Functions

void initialize (const std::string &fileName, bool doGaussian=false)
 JetResolution ()
 JetResolution (const std::string &fileName, bool doGaussian=false)
const std::string & name () const
TF1 * parameter (const std::string &parameterName, const std::vector< float > &x)
TF1 * parameterEta (const std::string &parameterName, float eta)
const JetCorrectorParametersparameters (int i) const
TF1 * resolution (const std::vector< float > &x, const std::vector< float > &y) const
TF1 * resolutionEtaPt (float eta, float pt) const
virtual ~JetResolution ()

Private Attributes

std::string name_
std::vector< TF1 * > parameterFncs_
std::vector
< JetCorrectorParameters * > 
parameters_
TF1 * resolutionFnc_

Detailed Description

Definition at line 13 of file JetResolution.h.


Constructor & Destructor Documentation

JetResolution::JetResolution ( )

Definition at line 40 of file JetResolution.cc.

References resolutionFnc_.

  : resolutionFnc_(0)
{
  resolutionFnc_ = new TF1();
}
JetResolution::JetResolution ( const std::string &  fileName,
bool  doGaussian = false 
)
JetResolution::~JetResolution ( ) [virtual]

Definition at line 56 of file JetResolution.cc.

References i, parameterFncs_, parameters_, and resolutionFnc_.

{
  delete resolutionFnc_;
  for (unsigned i=0;i<parameterFncs_.size();i++) delete parameterFncs_[i];
  for (unsigned i=0;i<parameters_.size();i++)    delete parameters_[i];
}

Member Function Documentation

void JetResolution::initialize ( const std::string &  fileName,
bool  doGaussian = false 
)
const std::string& JetResolution::name ( ) const [inline]

Definition at line 30 of file JetResolution.h.

References name_.

{ return name_; }
TF1* JetResolution::parameter ( const std::string &  parameterName,
const std::vector< float > &  x 
)

Referenced by parameterEta().

TF1 * JetResolution::parameterEta ( const std::string &  parameterName,
float  eta 
)

Definition at line 145 of file JetResolution.cc.

References parameter(), and x.

Referenced by main().

{
  vector<float> x; x.push_back(eta);
  return parameter(parameterName,x);
}
const JetCorrectorParameters& JetResolution::parameters ( int  i) const [inline]

Definition at line 38 of file JetResolution.h.

References i, and parameters_.

{ return *(parameters_[i]); }
TF1* JetResolution::resolution ( const std::vector< float > &  x,
const std::vector< float > &  y 
) const

Referenced by resolutionEtaPt().

TF1 * JetResolution::resolutionEtaPt ( float  eta,
float  pt 
) const

Definition at line 114 of file JetResolution.cc.

References resolution(), x, and detailsBasic3DVector::y.

Referenced by main().

{
  vector<float> x; x.push_back(eta);
  vector<float> y; y.push_back(pt);
  return resolution(x,y);
}

Member Data Documentation

std::string JetResolution::name_ [private]

Definition at line 45 of file JetResolution.h.

Referenced by name().

std::vector<TF1*> JetResolution::parameterFncs_ [private]
TF1* JetResolution::resolutionFnc_ [mutable, private]