CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
SigmaPt Class Reference

#include <SigmaPtDiff.h>

Public Member Functions

double operator() (const double &eta)
 
void setParErr (const std::vector< double > &parameters, const std::vector< double > &errors)
 
double sigma (const double &eta)
 
 SigmaPt (const std::vector< double > &parameters_, const std::vector< double > &errors_)
 
 SigmaPt ()
 

Protected Attributes

double b_0
 
double b_1
 
double b_2
 
double b_3
 
double b_4
 
double c
 
double sb_0
 
double sb_1
 
double sb_2
 
double sb_3
 
double sb_4
 

Detailed Description

Definition at line 7 of file SigmaPtDiff.h.

Constructor & Destructor Documentation

SigmaPt::SigmaPt ( const std::vector< double > &  parameters_,
const std::vector< double > &  errors_ 
)
inline

Definition at line 10 of file SigmaPtDiff.h.

References setParErr().

12  {
13  setParErr(parameters_, errors_);
14  }
void setParErr(const std::vector< double > &parameters, const std::vector< double > &errors)
Definition: SigmaPtDiff.h:18
SigmaPt::SigmaPt ( )
inline

Definition at line 16 of file SigmaPtDiff.h.

16 {};

Member Function Documentation

double SigmaPt::operator() ( const double &  eta)
inline

Definition at line 34 of file SigmaPtDiff.h.

References b_0, b_1, b_2, b_3, b_4, and c.

35  {
36  if( fabs(eta) <= b_0 ) {
37  return( c + b_1*eta*eta );
38  }
39  return( b_2 + b_3*(fabs(eta) - b_4)*(fabs(eta) - b_4) );
40  }
double b_1
Definition: SigmaPtDiff.h:57
double b_0
Definition: SigmaPtDiff.h:56
double b_4
Definition: SigmaPtDiff.h:60
double c
Definition: SigmaPtDiff.h:61
double b_3
Definition: SigmaPtDiff.h:59
double b_2
Definition: SigmaPtDiff.h:58
void SigmaPt::setParErr ( const std::vector< double > &  parameters,
const std::vector< double > &  errors 
)
inline

Definition at line 18 of file SigmaPtDiff.h.

References b_0, b_1, b_2, b_3, b_4, c, sb_0, sb_1, sb_2, sb_3, and sb_4.

Referenced by SigmaPt().

20  {
21  b_0 = parameters[0];
22  b_1 = parameters[5];
23  b_2 = parameters[1];
24  b_3 = parameters[7];
25  b_4 = parameters[8];
26  sb_0 = errors[0];
27  sb_1 = errors[5];
28  sb_2 = errors[1];
29  sb_3 = errors[7];
30  sb_4 = errors[8];
31  c = b_2 + b_3*(b_0 - b_4)*(b_0 - b_4) - b_1*b_0*b_0;
32  }
double b_1
Definition: SigmaPtDiff.h:57
double sb_0
Definition: SigmaPtDiff.h:63
double b_0
Definition: SigmaPtDiff.h:56
double b_4
Definition: SigmaPtDiff.h:60
double c
Definition: SigmaPtDiff.h:61
double sb_3
Definition: SigmaPtDiff.h:66
double b_3
Definition: SigmaPtDiff.h:59
Definition: errors.py:1
double b_2
Definition: SigmaPtDiff.h:58
double sb_4
Definition: SigmaPtDiff.h:67
double sb_1
Definition: SigmaPtDiff.h:64
double sb_2
Definition: SigmaPtDiff.h:65
double SigmaPt::sigma ( const double &  eta)
inline

Definition at line 41 of file SigmaPtDiff.h.

References b_0, b_1, b_3, b_4, funct::pow(), sb_0, sb_1, sb_2, sb_3, sb_4, and mathSSE::sqrt().

42  {
43  if( fabs(eta) <= b_0 ) {
44  return sqrt( (eta*eta - b_0*b_0)*(eta*eta - b_0*b_0)*sb_1*sb_1 +
45  sb_2*sb_2 +
46  pow(b_0 - b_4, 4)*sb_3*sb_3 +
47  pow(-2*b_3*pow(b_0-b_4,2), 2)*sb_4*sb_4 +
48  pow(2*b_3*(b_0 - b_4) - 2*b_1*b_0, 2)*sb_0*sb_0 );
49  }
50  return sqrt( sb_2*sb_2 +
51  pow(fabs(eta) - b_4, 4)*sb_3*sb_3 +
52  pow(-2*b_3*pow(fabs(eta)-b_4,2), 2)*sb_4*sb_4 );
53  }
double b_1
Definition: SigmaPtDiff.h:57
double sb_0
Definition: SigmaPtDiff.h:63
double b_0
Definition: SigmaPtDiff.h:56
double b_4
Definition: SigmaPtDiff.h:60
T sqrt(T t)
Definition: SSEVec.h:18
double sb_3
Definition: SigmaPtDiff.h:66
double b_3
Definition: SigmaPtDiff.h:59
double sb_4
Definition: SigmaPtDiff.h:67
double sb_1
Definition: SigmaPtDiff.h:64
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double sb_2
Definition: SigmaPtDiff.h:65

Member Data Documentation

double SigmaPt::b_0
protected

Definition at line 56 of file SigmaPtDiff.h.

Referenced by operator()(), setParErr(), and sigma().

double SigmaPt::b_1
protected

Definition at line 57 of file SigmaPtDiff.h.

Referenced by operator()(), setParErr(), and sigma().

double SigmaPt::b_2
protected

Definition at line 58 of file SigmaPtDiff.h.

Referenced by operator()(), and setParErr().

double SigmaPt::b_3
protected

Definition at line 59 of file SigmaPtDiff.h.

Referenced by operator()(), setParErr(), and sigma().

double SigmaPt::b_4
protected

Definition at line 60 of file SigmaPtDiff.h.

Referenced by operator()(), setParErr(), and sigma().

double SigmaPt::c
protected

Definition at line 61 of file SigmaPtDiff.h.

Referenced by operator()(), and setParErr().

double SigmaPt::sb_0
protected

Definition at line 63 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

double SigmaPt::sb_1
protected

Definition at line 64 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

double SigmaPt::sb_2
protected

Definition at line 65 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

double SigmaPt::sb_3
protected

Definition at line 66 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

double SigmaPt::sb_4
protected

Definition at line 67 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().