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 ()
 
 SigmaPt (const std::vector< double > &parameters_, const std::vector< double > &errors_)
 

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() [1/2]

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

Definition at line 9 of file SigmaPtDiff.h.

9  {
10  setParErr(parameters_, errors_);
11  }

References setParErr().

◆ SigmaPt() [2/2]

SigmaPt::SigmaPt ( )
inline

Definition at line 13 of file SigmaPtDiff.h.

13 {};

Member Function Documentation

◆ operator()()

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

Definition at line 29 of file SigmaPtDiff.h.

29  {
30  if (fabs(eta) <= b_0) {
31  return (c + b_1 * eta * eta);
32  }
33  return (b_2 + b_3 * (fabs(eta) - b_4) * (fabs(eta) - b_4));
34  }

References b_0, b_1, b_2, b_3, b_4, c, and PVValHelper::eta.

◆ setParErr()

void SigmaPt::setParErr ( const std::vector< double > &  parameters,
const std::vector< double > &  errors 
)
inline

Definition at line 15 of file SigmaPtDiff.h.

15  {
16  b_0 = parameters[0];
17  b_1 = parameters[5];
18  b_2 = parameters[1];
19  b_3 = parameters[7];
20  b_4 = parameters[8];
21  sb_0 = errors[0];
22  sb_1 = errors[5];
23  sb_2 = errors[1];
24  sb_3 = errors[7];
25  sb_4 = errors[8];
26  c = b_2 + b_3 * (b_0 - b_4) * (b_0 - b_4) - b_1 * b_0 * b_0;
27  }

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(), and SigmaPtDiff::SigmaPtDiff().

◆ sigma()

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

Definition at line 35 of file SigmaPtDiff.h.

35  {
36  if (fabs(eta) <= b_0) {
37  return sqrt((eta * eta - b_0 * b_0) * (eta * eta - b_0 * b_0) * sb_1 * sb_1 + sb_2 * sb_2 +
38  pow(b_0 - b_4, 4) * sb_3 * sb_3 + pow(-2 * b_3 * pow(b_0 - b_4, 2), 2) * sb_4 * sb_4 +
39  pow(2 * b_3 * (b_0 - b_4) - 2 * b_1 * b_0, 2) * sb_0 * sb_0);
40  }
41  return sqrt(sb_2 * sb_2 + pow(fabs(eta) - b_4, 4) * sb_3 * sb_3 +
42  pow(-2 * b_3 * pow(fabs(eta) - b_4, 2), 2) * sb_4 * sb_4);
43  }

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

Referenced by SigmaPtDiff::squaredDiff().

Member Data Documentation

◆ b_0

double SigmaPt::b_0
protected

Definition at line 46 of file SigmaPtDiff.h.

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

◆ b_1

double SigmaPt::b_1
protected

Definition at line 47 of file SigmaPtDiff.h.

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

◆ b_2

double SigmaPt::b_2
protected

Definition at line 48 of file SigmaPtDiff.h.

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

◆ b_3

double SigmaPt::b_3
protected

Definition at line 49 of file SigmaPtDiff.h.

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

◆ b_4

double SigmaPt::b_4
protected

Definition at line 50 of file SigmaPtDiff.h.

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

◆ c

double SigmaPt::c
protected

Definition at line 51 of file SigmaPtDiff.h.

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

◆ sb_0

double SigmaPt::sb_0
protected

Definition at line 53 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

◆ sb_1

double SigmaPt::sb_1
protected

Definition at line 54 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

◆ sb_2

double SigmaPt::sb_2
protected

Definition at line 55 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

◆ sb_3

double SigmaPt::sb_3
protected

Definition at line 56 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

◆ sb_4

double SigmaPt::sb_4
protected

Definition at line 57 of file SigmaPtDiff.h.

Referenced by setParErr(), and sigma().

BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
SigmaPt::sb_3
double sb_3
Definition: SigmaPtDiff.h:56
SigmaPt::b_4
double b_4
Definition: SigmaPtDiff.h:50
SigmaPt::b_1
double b_1
Definition: SigmaPtDiff.h:47
SigmaPt::sb_0
double sb_0
Definition: SigmaPtDiff.h:53
errors
Definition: errors.py:1
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SigmaPt::b_0
double b_0
Definition: SigmaPtDiff.h:46
SigmaPt::sb_2
double sb_2
Definition: SigmaPtDiff.h:55
SigmaPt::sb_4
double sb_4
Definition: SigmaPtDiff.h:57
SigmaPt::setParErr
void setParErr(const std::vector< double > &parameters, const std::vector< double > &errors)
Definition: SigmaPtDiff.h:15
SigmaPt::c
double c
Definition: SigmaPtDiff.h:51
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
SigmaPt::sb_1
double sb_1
Definition: SigmaPtDiff.h:54
SigmaPt::b_2
double b_2
Definition: SigmaPtDiff.h:48
SigmaPt::b_3
double b_3
Definition: SigmaPtDiff.h:49