CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
SigmaPtDiff Class Reference

Returns ( sigmaPt/Pt(data)^2 - sigmaPt/Pt(MC)^2 ) More...

#include <SigmaPtDiff.h>

Public Member Functions

double etaByPoints (const double &eta)
 
 SigmaPtDiff ()
 
double squaredDiff (const double &eta)
 

Public Attributes

SigmaPt sigmaPt
 

Detailed Description

Returns ( sigmaPt/Pt(data)^2 - sigmaPt/Pt(MC)^2 )

Definition at line 61 of file SigmaPtDiff.h.

Constructor & Destructor Documentation

◆ SigmaPtDiff()

SigmaPtDiff::SigmaPtDiff ( )
inline

Definition at line 63 of file SigmaPtDiff.h.

References nano_mu_digi_cff::errors, SigmaPt::setParErr(), and sigmaPt.

63  {
64  std::vector<double> parameters;
65  std::vector<double> errors;
66  parameters.push_back(1.66);
67  parameters.push_back(0.021);
68  parameters.push_back(0.);
69  parameters.push_back(0.);
70  parameters.push_back(0.);
71  parameters.push_back(0.0058);
72  parameters.push_back(0.);
73  parameters.push_back(0.03);
74  parameters.push_back(1.8);
75  parameters.push_back(0.);
76  parameters.push_back(0.);
77  parameters.push_back(0.);
78  parameters.push_back(0.);
79  parameters.push_back(0.);
80  parameters.push_back(0.);
81  errors.push_back(0.09);
82  errors.push_back(0.002);
83  errors.push_back(0.);
84  errors.push_back(0.);
85  errors.push_back(0.);
86  errors.push_back(0.0009);
87  errors.push_back(0.);
88  errors.push_back(0.03);
89  errors.push_back(0.3);
90  errors.push_back(0.);
91  errors.push_back(0.);
92  errors.push_back(0.);
93  errors.push_back(0.);
94  errors.push_back(0.);
95  errors.push_back(0.);
96 
98  }
void setParErr(const std::vector< double > &parameters, const std::vector< double > &errors)
Definition: SigmaPtDiff.h:15
Definition: errors.py:1
SigmaPt sigmaPt
Definition: SigmaPtDiff.h:158

Member Function Documentation

◆ etaByPoints()

double SigmaPtDiff::etaByPoints ( const double &  eta)
inline

Definition at line 99 of file SigmaPtDiff.h.

References PVValHelper::eta.

Referenced by squaredDiff().

99  {
100  if (eta <= -2.2)
101  return 0.0233989;
102  else if (eta <= -2.0)
103  return 0.0197057;
104  else if (eta <= -1.8)
105  return 0.014693;
106  else if (eta <= -1.6)
107  return 0.0146727;
108  else if (eta <= -1.4)
109  return 0.0141323;
110  else if (eta <= -1.2)
111  return 0.0159712;
112  else if (eta <= -1.0)
113  return 0.0117224;
114  else if (eta <= -0.8)
115  return 0.010726;
116  else if (eta <= -0.6)
117  return 0.0104777;
118  else if (eta <= -0.4)
119  return 0.00814458;
120  else if (eta <= -0.2)
121  return 0.00632501;
122  else if (eta <= 0.0)
123  return 0.00644172;
124  else if (eta <= 0.2)
125  return 0.00772645;
126  else if (eta <= 0.4)
127  return 0.010103;
128  else if (eta <= 0.6)
129  return 0.0099275;
130  else if (eta <= 0.8)
131  return 0.0100309;
132  else if (eta <= 1.0)
133  return 0.0125116;
134  else if (eta <= 1.2)
135  return 0.0147211;
136  else if (eta <= 1.4)
137  return 0.0151623;
138  else if (eta <= 1.6)
139  return 0.015259;
140  else if (eta <= 1.8)
141  return 0.014499;
142  else if (eta <= 2.0)
143  return 0.0165215;
144  else if (eta <= 2.2)
145  return 0.0212348;
146  return 0.0227285;
147  }

◆ squaredDiff()

double SigmaPtDiff::squaredDiff ( const double &  eta)
inline

Definition at line 149 of file SigmaPtDiff.h.

References PVValHelper::eta, etaByPoints(), SigmaPt::sigma(), and sigmaPt.

Referenced by ErrorsPropagationAnalyzer::fillHistograms(), and smearFunctionType7::smear().

149  {
150  double sigmaPtPlus = sigmaPt(eta) + sigmaPt.sigma(eta);
151  double sigmaPtMinus = sigmaPt(eta) - sigmaPt.sigma(eta);
152  if (fabs(sigmaPtPlus * sigmaPtPlus - etaByPoints(eta) * etaByPoints(eta)) >
153  fabs(sigmaPtMinus * sigmaPtMinus - etaByPoints(eta) * etaByPoints(eta))) {
154  return (fabs(sigmaPtPlus * sigmaPtPlus - etaByPoints(eta) * etaByPoints(eta)));
155  }
156  return (fabs(sigmaPtMinus * sigmaPtMinus - etaByPoints(eta) * etaByPoints(eta)));
157  }
double etaByPoints(const double &eta)
Definition: SigmaPtDiff.h:99
double sigma(const double &eta)
Definition: SigmaPtDiff.h:35
SigmaPt sigmaPt
Definition: SigmaPtDiff.h:158

Member Data Documentation

◆ sigmaPt

SigmaPt SigmaPtDiff::sigmaPt

Definition at line 158 of file SigmaPtDiff.h.

Referenced by SigmaPtDiff(), and squaredDiff().