CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ElectronEnergyCalibrator.h
Go to the documentation of this file.
1 #ifndef ElectronEnergyCalibrator_H
2 #define ElectronEnergyCalibrator_H
3 
5 #include <string>
6 #include <vector>
7 #include <fstream>
8 #include <sstream>
9 #include <iostream>
10 
11 using std::string;
12 using std::vector;
13 using std::ifstream;
14 using std::istringstream;
15 using std::cout;
16 
18 {
19  double nRunMin;
20  double nRunMax;
21  double corrCat0;
22  double corrCat1;
23  double corrCat2;
24  double corrCat3;
25  double corrCat4;
26  double corrCat5;
27  double corrCat6;
28  double corrCat7;
29 };
30 
32 {
33  double ptMin;
34  double ptMax;
35  double corrCat0;
36  double corrCat1;
37  double corrCat2;
38  double corrCat3;
39  double corrCat4;
40  double corrCat5;
41 };
42 
44 {
45  public:
46  ElectronEnergyCalibrator( const std::string pathData,
47  const std::string pathLinData,
48  const std::string dataset,
49  int correctionsType,
50  bool applyLinearityCorrection,
51  double lumiRatio,
52  bool isMC,
53  bool updateEnergyErrors,
54  bool verbose,
55  bool synchronization
56  ) :
57  pathData_(pathData),
58  pathLinData_(pathLinData),
59  dataset_(dataset),
60  correctionsType_(correctionsType),
61  applyLinearityCorrection_(applyLinearityCorrection),
62  lumiRatio_(lumiRatio),
63  isMC_(isMC),
64  updateEnergyErrors_(updateEnergyErrors),
65  verbose_(verbose),
66  synchronization_(synchronization)
67  {
68  init();
69  }
70 
73 
74  private:
75  void init();
76  void splitString( const string &fullstr,
77  vector<string> &elements,
78  const string &delimiter
79  );
80  double stringToDouble(const string &str);
81 
82  double newEnergy_ ;
83  double newEnergyError_ ;
84 
85  std::string pathData_;
86  std::string pathLinData_;
87  std::string dataset_;
90  double lumiRatio_;
91  bool isMC_;
93  bool verbose_;
95 
100 };
101 
102 #endif
103 
correctionValues corrValArray[100]
void calibrate(SimpleElectron &electron)
list elements
Definition: asciidump.py:414
void splitString(const string &fullstr, vector< string > &elements, const string &delimiter)
double stringToDouble(const string &str)
void correctLinearity(SimpleElectron &electron)
linearityCorrectionValues linCorrValArray[100]
tuple dataset
Definition: dataset.py:393
tuple cout
Definition: gather_cfg.py:121
ElectronEnergyCalibrator(const std::string pathData, const std::string pathLinData, const std::string dataset, int correctionsType, bool applyLinearityCorrection, double lumiRatio, bool isMC, bool updateEnergyErrors, bool verbose, bool synchronization)