CMS 3D CMS Logo

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

#include <MuScleFitCorrector_Functions.h>

Inheritance diagram for heppy::resolutionFunction57< T >:
heppy::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 heppy::resolutionFunctionBase< T >
virtual int parNum () const
 
 resolutionFunctionBase ()
 
virtual ~resolutionFunctionBase ()=0
 

Additional Inherited Members

- Protected Attributes inherited from heppy::resolutionFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class heppy::resolutionFunction57< T >

Definition at line 230 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

◆ resolutionFunction57()

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

Member Function Documentation

◆ centralParabola()

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

Definition at line 247 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

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

247  {
248  return parval[4] + parval[5] * eta * eta;
249  }

◆ getGEO()

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

Definition at line 234 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

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

234  {
235  // geometrical term
236  double qGEO(0);
237  if (eta < parval[0]) {
238  qGEO = parval[10] * (eta - parval[0]) * (eta - parval[0]) + parval[11];
239  } else if (parval[0] <= eta && eta < parval[3]) {
240  qGEO = parval[11];
241  } else {
242  qGEO = parval[12] * (eta - parval[3]) * (eta - parval[3]) + parval[11];
243  }
244  return qGEO;
245  }

◆ getMSC()

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

Definition at line 279 of file MuScleFitCorrector_Functions.h.

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

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

279  {
280  // MSC term
281  double qMSC(0);
282  if (eta < parval[0]) {
283  qMSC = leftParabola(pt, eta, parval);
284  } else if (parval[0] <= eta && eta < parval[13]) {
285  qMSC = leftLine(pt, eta, parval);
286  } else if (parval[13] <= eta && eta < parval[1]) {
287  qMSC = middleParabola(pt, eta, parval);
288  } else if (parval[1] <= eta && eta < parval[2]) {
289  qMSC = centralParabola(pt, eta, parval);
290  } else if (parval[2] <= eta && eta < parval[14]) {
291  qMSC = middleParabola(pt, eta, parval);
292  } else if (parval[14] <= eta && eta < parval[3]) {
293  qMSC = rightLine(pt, eta, parval);
294  } else {
295  qMSC = rightParabola(pt, eta, parval);
296  }
297  return qMSC;
298  }
double rightParabola(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 centralParabola(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)

◆ leftLine()

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

Definition at line 263 of file MuScleFitCorrector_Functions.h.

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

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

263  {
264  double x_1 = parval[13];
265  double y_1 = middleParabola(pt, parval[13], parval);
266  double x_2 = parval[0];
267  double y_2 = leftParabola(pt, parval[0], parval);
268  return ((eta - x_1) * (y_2 - y_1) / (x_2 - x_1) + y_1);
269  }
double middleParabola(const double &pt, const double &eta, const T &parval)
double leftParabola(const double &pt, const double &eta, const T &parval)

◆ leftParabola()

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

Definition at line 255 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

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

255  {
256  return parval[6] + parval[7] * (eta - parval[0]) * (eta - parval[0]);
257  }

◆ middleParabola()

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

◆ rightLine()

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

Definition at line 271 of file MuScleFitCorrector_Functions.h.

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

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

271  {
272  double x_1 = parval[14];
273  double y_1 = middleParabola(pt, parval[14], parval);
274  double x_2 = parval[3];
275  double y_2 = rightParabola(pt, parval[3], parval);
276  return ((eta - x_1) * (y_2 - y_1) / (x_2 - x_1) + y_1);
277  }
double rightParabola(const double &pt, const double &eta, const T &parval)
double middleParabola(const double &pt, const double &eta, const T &parval)

◆ rightParabola()

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

Definition at line 259 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

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

259  {
260  return parval[8] + parval[9] * (eta - parval[3]) * (eta - parval[3]);
261  }

◆ sigmaPt()

template<class T >
virtual double heppy::resolutionFunction57< T >::sigmaPt ( const double &  pt,
const double &  eta,
const T parval 
)
inlinevirtual

Implements heppy::resolutionFunctionBase< T >.

Definition at line 300 of file MuScleFitCorrector_Functions.h.

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

300  {
301  double qGEO = getGEO(pt, eta, parval);
302  double qMSC = getMSC(pt, eta, parval);
303  return sqrt(pow(qGEO * pt, 2) + pow(qMSC, 2));
304  }
constexpr int pow(int x)
Definition: conifer.h:24
T sqrt(T t)
Definition: SSEVec.h:19
double getGEO(const double &pt, const double &eta, const T &parval)
double getMSC(const double &pt, const double &eta, const T &parval)