CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 68 of file SigmaPtDiff.h.

Constructor & Destructor Documentation

SigmaPtDiff::SigmaPtDiff ( )
inline

Definition at line 71 of file SigmaPtDiff.h.

References benchmark_cfg::errors, Parameters::parameters, SigmaPt::setParErr(), and sigmaPt.

72  {
73  std::vector<double> parameters;
74  std::vector<double> errors;
75  parameters.push_back(1.66);
76  parameters.push_back(0.021);
77  parameters.push_back(0.);
78  parameters.push_back(0.);
79  parameters.push_back(0.);
80  parameters.push_back(0.0058);
81  parameters.push_back(0.);
82  parameters.push_back(0.03);
83  parameters.push_back(1.8);
84  parameters.push_back(0.);
85  parameters.push_back(0.);
86  parameters.push_back(0.);
87  parameters.push_back(0.);
88  parameters.push_back(0.);
89  parameters.push_back(0.);
90  errors.push_back(0.09);
91  errors.push_back(0.002);
92  errors.push_back(0.);
93  errors.push_back(0.);
94  errors.push_back(0.);
95  errors.push_back(0.0009);
96  errors.push_back(0.);
97  errors.push_back(0.03);
98  errors.push_back(0.3);
99  errors.push_back(0.);
100  errors.push_back(0.);
101  errors.push_back(0.);
102  errors.push_back(0.);
103  errors.push_back(0.);
104  errors.push_back(0.);
105 
106  sigmaPt.setParErr( parameters, errors );
107  }
dictionary parameters
Definition: Parameters.py:2
void setParErr(const std::vector< double > &parameters, const std::vector< double > &errors)
Definition: SigmaPtDiff.h:15
SigmaPt sigmaPt
Definition: SigmaPtDiff.h:145

Member Function Documentation

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

Definition at line 108 of file SigmaPtDiff.h.

Referenced by squaredDiff().

109  {
110  if( eta <= -2.2 ) return 0.0233989;
111  else if( eta <= -2.0 ) return 0.0197057;
112  else if( eta <= -1.8 ) return 0.014693;
113  else if( eta <= -1.6 ) return 0.0146727;
114  else if( eta <= -1.4 ) return 0.0141323;
115  else if( eta <= -1.2 ) return 0.0159712;
116  else if( eta <= -1.0 ) return 0.0117224;
117  else if( eta <= -0.8 ) return 0.010726;
118  else if( eta <= -0.6 ) return 0.0104777;
119  else if( eta <= -0.4 ) return 0.00814458;
120  else if( eta <= -0.2 ) return 0.00632501;
121  else if( eta <= 0.0 ) return 0.00644172;
122  else if( eta <= 0.2 ) return 0.00772645;
123  else if( eta <= 0.4 ) return 0.010103;
124  else if( eta <= 0.6 ) return 0.0099275;
125  else if( eta <= 0.8 ) return 0.0100309;
126  else if( eta <= 1.0 ) return 0.0125116;
127  else if( eta <= 1.2 ) return 0.0147211;
128  else if( eta <= 1.4 ) return 0.0151623;
129  else if( eta <= 1.6 ) return 0.015259;
130  else if( eta <= 1.8 ) return 0.014499;
131  else if( eta <= 2.0 ) return 0.0165215;
132  else if( eta <= 2.2 ) return 0.0212348;
133  return 0.0227285;
134  }
T eta() const
double SigmaPtDiff::squaredDiff ( const double &  eta)
inline

Definition at line 136 of file SigmaPtDiff.h.

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

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

137  {
138  double sigmaPtPlus = sigmaPt(eta) + sigmaPt.sigma(eta);
139  double sigmaPtMinus = sigmaPt(eta) - sigmaPt.sigma(eta);
140  if( fabs(sigmaPtPlus*sigmaPtPlus - etaByPoints(eta)*etaByPoints(eta)) > fabs(sigmaPtMinus*sigmaPtMinus - etaByPoints(eta)*etaByPoints(eta)) ) {
141  return( fabs(sigmaPtPlus*sigmaPtPlus - etaByPoints(eta)*etaByPoints(eta)) );
142  }
143  return( fabs(sigmaPtMinus*sigmaPtMinus - etaByPoints(eta)*etaByPoints(eta)) );
144  }
T eta() const
double etaByPoints(const double &eta)
Definition: SigmaPtDiff.h:108
double sigma(const double &eta)
Definition: SigmaPtDiff.h:38
SigmaPt sigmaPt
Definition: SigmaPtDiff.h:145

Member Data Documentation

SigmaPt SigmaPtDiff::sigmaPt

Definition at line 145 of file SigmaPtDiff.h.

Referenced by SigmaPtDiff(), and squaredDiff().