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 
12 namespace edm {
13  class StreamID;
14 }
15 
17 {
18  double nRunMin;
19  double nRunMax;
20  double corrCat0;
21  double corrCat1;
22  double corrCat2;
23  double corrCat3;
24  double corrCat4;
25  double corrCat5;
26  double corrCat6;
27  double corrCat7;
28 };
29 
31 {
32  double ptMin;
33  double ptMax;
34  double corrCat0;
35  double corrCat1;
36  double corrCat2;
37  double corrCat3;
38  double corrCat4;
39  double corrCat5;
40 };
41 
43 {
44  public:
46  const std::string pathLinData,
47  const std::string dataset,
48  int correctionsType,
49  bool applyLinearityCorrection,
50  double lumiRatio,
51  bool isMC,
52  bool updateEnergyErrors,
53  bool verbose,
54  bool synchronization
55  ) :
56  pathData_(pathData),
57  pathLinData_(pathLinData),
58  dataset_(dataset),
59  correctionsType_(correctionsType),
60  applyLinearityCorrection_(applyLinearityCorrection),
61  lumiRatio_(lumiRatio),
62  isMC_(isMC),
63  updateEnergyErrors_(updateEnergyErrors),
64  verbose_(verbose),
65  synchronization_(synchronization)
66  {
67  init();
68  }
69 
72 
73  private:
74  void init();
75  void splitString( const std::string &fullstr,
76  std::vector<std::string> &elements,
77  const std::string &delimiter
78  );
79  double stringToDouble(const std::string &str);
80 
81  double newEnergy_ ;
82  double newEnergyError_ ;
83 
89  double lumiRatio_;
90  bool isMC_;
92  bool verbose_;
94 
99 };
100 
101 #endif
102 
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]
tuple dataset
Definition: dataset.py:859
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)