CMS 3D CMS Logo

List of all members | Public Member Functions
resolutionFunction57< T > Class Template Reference

#include <MuScleFitCorrector_Functions.h>

Inheritance diagram for resolutionFunction57< T >:
resolutionFunctionBase< T >

Public Member Functions

double centralParabola (const double &pt, const double &eta, const T &parval)
 
double getGEO (const double &pt, const double &eta, const T &parval)
 
double getMSC (const double &pt, const double &eta, const T &parval)
 
double leftLine (const double &pt, const double &eta, const T &parval)
 
double leftParabola (const double &pt, const double &eta, const T &parval)
 
double middleParabola (const double &pt, const double &eta, const T &parval)
 
 resolutionFunction57 ()
 
double rightLine (const double &pt, const double &eta, const T &parval)
 
double rightParabola (const double &pt, const double &eta, const T &parval)
 
virtual double sigmaPt (const double &pt, const double &eta, const T &parval)
 
- Public Member Functions inherited from resolutionFunctionBase< T >
virtual double covPt1Pt2 (const double &pt1, const double &eta1, const double &pt2, const double &eta2, const T &parval)
 
virtual int parNum () const
 
virtual int parNum () const
 
 resolutionFunctionBase ()
 
 resolutionFunctionBase ()
 
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const int muonType)
 This method is used to differentiate parameters among the different functions. More...
 
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const std::vector< double > &parStep, const std::vector< double > &parMin, const std::vector< double > &parMax, const int muonType)
 
virtual double sigmaCotgTh (const double &pt, const double &eta, const T &parval)=0
 
virtual double sigmaPhi (const double &pt, const double &eta, const T &parval)=0
 
virtual double sigmaPtError (const double &pt, const double &eta, const T &parval, const T &parError)
 
virtual ~resolutionFunctionBase ()=0
 
virtual ~resolutionFunctionBase ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from resolutionFunctionBase< T >
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, double *thisStep, double *thisMini, double *thisMaxi, TString *thisParName)
 This method sets the parameters. More...
 
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const std::vector< ParameterSet > &parSet)
 
- Protected Attributes inherited from resolutionFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class resolutionFunction57< T >

Definition at line 228 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

template<class T >
resolutionFunction57< T >::resolutionFunction57 ( )
inline

Definition at line 230 of file MuScleFitCorrector_Functions.h.

230 { this->parNum_ = 17; }

Member Function Documentation

template<class T >
double resolutionFunction57< T >::centralParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 245 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

245  {
246  return parval[4] + parval[5] * eta * eta;
247  }
template<class T >
double resolutionFunction57< T >::getGEO ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 232 of file MuScleFitCorrector_Functions.h.

232  {
233  // geometrical term
234  double qGEO(0);
235  if (eta < parval[0]) {
236  qGEO = parval[10] * (eta - parval[0]) * (eta - parval[0]) + parval[11];
237  } else if (parval[0] <= eta && eta < parval[3]) {
238  qGEO = parval[11];
239  } else {
240  qGEO = parval[12] * (eta - parval[3]) * (eta - parval[3]) + parval[11];
241  }
242  return qGEO;
243  }
template<class T >
double resolutionFunction57< T >::getMSC ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 277 of file MuScleFitCorrector_Functions.h.

277  {
278  // MSC term
279  double qMSC(0);
280  if (eta < parval[0]) {
281  qMSC = leftParabola(pt, eta, parval);
282  } else if (parval[0] <= eta && eta < parval[13]) {
283  qMSC = leftLine(pt, eta, parval);
284  } else if (parval[13] <= eta && eta < parval[1]) {
285  qMSC = middleParabola(pt, eta, parval);
286  } else if (parval[1] <= eta && eta < parval[2]) {
287  qMSC = centralParabola(pt, eta, parval);
288  } else if (parval[2] <= eta && eta < parval[14]) {
289  qMSC = middleParabola(pt, eta, parval);
290  } else if (parval[14] <= eta && eta < parval[3]) {
291  qMSC = rightLine(pt, eta, parval);
292  } else {
293  qMSC = rightParabola(pt, eta, parval);
294  }
295  return qMSC;
296  }
double centralParabola(const double &pt, const double &eta, const T &parval)
double rightParabola(const double &pt, const double &eta, const T &parval)
double leftLine(const double &pt, const double &eta, const T &parval)
double middleParabola(const double &pt, const double &eta, const T &parval)
double rightLine(const double &pt, const double &eta, const T &parval)
double leftParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::leftLine ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 261 of file MuScleFitCorrector_Functions.h.

261  {
262  double x_1 = parval[13];
263  double y_1 = middleParabola(pt, parval[13], parval);
264  double x_2 = parval[0];
265  double y_2 = leftParabola(pt, parval[0], parval);
266  return ((eta - x_1) * (y_2 - y_1) / (x_2 - x_1) + y_1);
267  }
double middleParabola(const double &pt, const double &eta, const T &parval)
double leftParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::leftParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 253 of file MuScleFitCorrector_Functions.h.

253  {
254  return parval[6] + parval[7] * (eta - parval[0]) * (eta - parval[0]);
255  }
template<class T >
double resolutionFunction57< T >::middleParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 249 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

249  {
250  return parval[15] + parval[16] * eta * eta;
251  }
template<class T >
double resolutionFunction57< T >::rightLine ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 269 of file MuScleFitCorrector_Functions.h.

269  {
270  double x_1 = parval[14];
271  double y_1 = middleParabola(pt, parval[14], parval);
272  double x_2 = parval[3];
273  double y_2 = rightParabola(pt, parval[3], parval);
274  return ((eta - x_1) * (y_2 - y_1) / (x_2 - x_1) + y_1);
275  }
double rightParabola(const double &pt, const double &eta, const T &parval)
double middleParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::rightParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 257 of file MuScleFitCorrector_Functions.h.

257  {
258  return parval[8] + parval[9] * (eta - parval[3]) * (eta - parval[3]);
259  }
template<class T >
virtual double resolutionFunction57< T >::sigmaPt ( const double &  pt,
const double &  eta,
const T parval 
)
inlinevirtual

Implements resolutionFunctionBase< T >.

Definition at line 298 of file MuScleFitCorrector_Functions.h.

References funct::pow(), and mathSSE::sqrt().

298  {
299  double qGEO = getGEO(pt, eta, parval);
300  double qMSC = getMSC(pt, eta, parval);
301  return sqrt(pow(qGEO * pt, 2) + pow(qMSC, 2));
302  }
double getMSC(const double &pt, const double &eta, const T &parval)
T sqrt(T t)
Definition: SSEVec.h:19
double getGEO(const double &pt, const double &eta, const T &parval)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30