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, const std::vector< ParameterSet > &parSet)
 
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...
 
- 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

◆ resolutionFunction57()

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

Definition at line 230 of file MuScleFitCorrector_Functions.h.

230 { this->parNum_ = 17; }

References resolutionFunctionBase< T >::parNum_.

Member Function Documentation

◆ centralParabola()

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.

245  {
246  return parval[4] + parval[5] * eta * eta;
247  }

References PVValHelper::eta.

Referenced by resolutionFunction57< T >::getMSC().

◆ getGEO()

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  }

References PVValHelper::eta.

Referenced by resolutionFunction57< T >::sigmaPt().

◆ getMSC()

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  }

References resolutionFunction57< T >::centralParabola(), PVValHelper::eta, resolutionFunction57< T >::leftLine(), resolutionFunction57< T >::leftParabola(), resolutionFunction57< T >::middleParabola(), DiDispStaMuonMonitor_cfi::pt, resolutionFunction57< T >::rightLine(), and resolutionFunction57< T >::rightParabola().

Referenced by resolutionFunction57< T >::sigmaPt().

◆ leftLine()

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  }

References PVValHelper::eta, resolutionFunction57< T >::leftParabola(), resolutionFunction57< T >::middleParabola(), and DiDispStaMuonMonitor_cfi::pt.

Referenced by resolutionFunction57< T >::getMSC().

◆ leftParabola()

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  }

References PVValHelper::eta.

Referenced by resolutionFunction57< T >::getMSC(), and resolutionFunction57< T >::leftLine().

◆ middleParabola()

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.

249  {
250  return parval[15] + parval[16] * eta * eta;
251  }

References PVValHelper::eta.

Referenced by resolutionFunction57< T >::getMSC(), resolutionFunction57< T >::leftLine(), and resolutionFunction57< T >::rightLine().

◆ rightLine()

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  }

References PVValHelper::eta, resolutionFunction57< T >::middleParabola(), DiDispStaMuonMonitor_cfi::pt, and resolutionFunction57< T >::rightParabola().

Referenced by resolutionFunction57< T >::getMSC().

◆ rightParabola()

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  }

References PVValHelper::eta.

Referenced by resolutionFunction57< T >::getMSC(), and resolutionFunction57< T >::rightLine().

◆ sigmaPt()

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.

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  }

References PVValHelper::eta, resolutionFunction57< T >::getGEO(), resolutionFunction57< T >::getMSC(), funct::pow(), DiDispStaMuonMonitor_cfi::pt, and mathSSE::sqrt().

resolutionFunction57::centralParabola
double centralParabola(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:245
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
resolutionFunction57::rightParabola
double rightParabola(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:257
resolutionFunction57::getMSC
double getMSC(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:277
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
resolutionFunction57::middleParabola
double middleParabola(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:249
resolutionFunction57::getGEO
double getGEO(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:232
resolutionFunction57::rightLine
double rightLine(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:269
resolutionFunction57::leftParabola
double leftParabola(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:253
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
resolutionFunctionBase::parNum_
int parNum_
Definition: Functions.h:868
resolutionFunction57::leftLine
double leftLine(const double &pt, const double &eta, const T &parval)
Definition: MuScleFitCorrector_Functions.h:261