CMS 3D CMS Logo

CalibrationResultWrapper.h
Go to the documentation of this file.
1 #ifndef CALIBRATIONRESULTWRAPPER_H_
2 #define CALIBRATIONRESULTWRAPPER_H_
3 
4 //#include <boost/shared_ptr.hpp>
5 
7 
8 namespace pftools {
9 
19 public:
20 
21 // typedef boost::shared_ptr<CalibrationResultWrapper>
22 // CalibrationResultWrapperPtr;
23 
25  reset();
26  }
27 
29  }
30 
31 
32  void reset() {
33  resetCore();
34  }
35 
36 
37  void compute() {
38  computeCore();
39  }
40 
41  double bias() const {
43  }
44 
45  double ratio() const {
47  }
48 
49  /*
50  * Which calibrator made this?
51  */
53  /*
54  * What energy was this particle optimised to?
55  */
56  double truthEnergy_;
57 
58  /*
59  * Calibrated ecal deposition
60  */
61  double ecalEnergy_;
62 
63  /*
64  * Calibrated hcal deposition
65  */
66  double hcalEnergy_;
67 
68  /*
69  * Calibrated particle energy (not necessarily ecal + hcal!)
70  */
72 
73  /*
74  * What objects did this optimise on?
75  */
77 
78  /*
79  * (reco - truth)/truth
80  */
81  double bias_;
82 
83  /*
84  * reco/truth
85  */
86  double ratio_;
87 
88  /*
89  * Target function contribution
90  */
92 
93  double a_;
94  double b_;
95  double c_;
96 
97 private:
98 
99  virtual void computeCore() {
100  bias_ = bias();
101  ratio_ = ratio();
102  }
103 
104  virtual void resetCore() {
105  truthEnergy_ = 0;
106  ecalEnergy_ = 0;
107  hcalEnergy_ = 0;
108  particleEnergy_ = 0;
109  provenance_ = UNCALIBRATED;
110  target_ = UNDEFINED;
111  bias_ = 0;
112  ratio_ = 1.0;
113  targetFuncContrib_ = 0;
114  a_ = 0.0;
115  b_ = 1.0;
116  c_ = 1.0;
117  }
118 
119 };
120 
121 }
122 
123 #endif /*CALIBRATIONRESULTWRAPPER_H_*/
A small class designed to hold the result of a calibration of a SingleParticleWrapper.