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 namespace edm {
12  class StreamID;
13 }
14 
16 {
17  double nRunMin;
18  double nRunMax;
19  double corrCat0;
20  double corrCat1;
21  double corrCat2;
22  double corrCat3;
23  double corrCat4;
24  double corrCat5;
25  double corrCat6;
26  double corrCat7;
27 };
28 
30 {
31  double ptMin;
32  double ptMax;
33  double corrCat0;
34  double corrCat1;
35  double corrCat2;
36  double corrCat3;
37  double corrCat4;
38  double corrCat5;
39 };
40 
42 {
43  public:
45  const std::string pathLinData,
46  const std::string dataset,
47  int correctionsType,
48  bool applyLinearityCorrection,
49  double lumiRatio,
50  bool isMC,
51  bool updateEnergyErrors,
52  bool verbose,
53  bool synchronization
54  ) :
55  pathData_(pathData),
56  pathLinData_(pathLinData),
57  dataset_(dataset),
58  correctionsType_(correctionsType),
59  applyLinearityCorrection_(applyLinearityCorrection),
60  lumiRatio_(lumiRatio),
61  isMC_(isMC),
62  updateEnergyErrors_(updateEnergyErrors),
63  verbose_(verbose),
64  synchronization_(synchronization) {
65  init();
66  }
67 
70 
71  private:
72  void init();
73  void splitString( const std::string &fullstr,
74  std::vector<std::string> &elements,
75  const std::string &delimiter
76  );
77  double stringToDouble(const std::string &str);
78 
79  double newEnergy_ ;
80  double newEnergyError_ ;
81 
87  double lumiRatio_;
88  bool isMC_;
90  bool verbose_;
92 
97 };
98 
99 #endif
100 
correctionValues corrValArray[100]
void calibrate(SimpleElectron &electron, edm::StreamID const &)
double stringToDouble(const std::string &str)
dictionary elements
void correctLinearity(SimpleElectron &electron)
linearityCorrectionValues linCorrValArray[100]
void splitString(const std::string &fullstr, std::vector< std::string > &elements, const std::string &delimiter)
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)