Main Page
Namespaces
Classes
Package Documentation
DataFormats
ParticleFlowReco
interface
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
6
#include "
DataFormats/ParticleFlowReco/interface/CalibrationProvenance.h
"
7
8
namespace
pftools
{
9
18
class
CalibrationResultWrapper
{
19
public
:
20
21
// typedef boost::shared_ptr<CalibrationResultWrapper>
22
// CalibrationResultWrapperPtr;
23
24
CalibrationResultWrapper
() {
25
reset
();
26
}
27
28
virtual
~CalibrationResultWrapper
() {
29
}
30
31
32
void
reset
() {
33
resetCore
();
34
}
35
36
37
void
compute
() {
38
computeCore
();
39
}
40
41
double
bias
()
const
{
42
return
(
particleEnergy_
-
truthEnergy_
) /
truthEnergy_
;
43
}
44
45
double
ratio
()
const
{
46
return
(
particleEnergy_
/
truthEnergy_
);
47
}
48
49
/*
50
* Which calibrator made this?
51
*/
52
CalibrationProvenance
provenance_
;
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
*/
71
double
particleEnergy_
;
72
73
/*
74
* What objects did this optimise on?
75
*/
76
CalibrationTarget
target_
;
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
*/
91
double
targetFuncContrib_
;
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_*/
pftools::CalibrationResultWrapper::b_
double b_
Definition:
CalibrationResultWrapper.h:94
pftools::CalibrationResultWrapper::computeCore
virtual void computeCore()
Definition:
CalibrationResultWrapper.h:99
pftools::CalibrationResultWrapper::ratio
double ratio() const
Definition:
CalibrationResultWrapper.h:45
pftools::CalibrationResultWrapper::compute
void compute()
Definition:
CalibrationResultWrapper.h:37
pftools::CalibrationTarget
CalibrationTarget
Definition:
CalibrationProvenance.h:16
pftools::CalibrationResultWrapper::bias_
double bias_
Definition:
CalibrationResultWrapper.h:81
pftools::CalibrationResultWrapper::CalibrationResultWrapper
CalibrationResultWrapper()
Definition:
CalibrationResultWrapper.h:24
pftools::CalibrationResultWrapper::truthEnergy_
double truthEnergy_
Definition:
CalibrationResultWrapper.h:56
pftools::CalibrationResultWrapper::resetCore
virtual void resetCore()
Definition:
CalibrationResultWrapper.h:104
pftools::CalibrationResultWrapper::c_
double c_
Definition:
CalibrationResultWrapper.h:95
pftools::CalibrationProvenance
CalibrationProvenance
Definition:
CalibrationProvenance.h:12
pftools::CalibrationResultWrapper::hcalEnergy_
double hcalEnergy_
Definition:
CalibrationResultWrapper.h:66
pftools::CalibrationResultWrapper::a_
double a_
Definition:
CalibrationResultWrapper.h:93
pftools
Definition:
Calibratable.h:15
pftools::CalibrationResultWrapper
A small class designed to hold the result of a calibration of a SingleParticleWrapper.
Definition:
CalibrationResultWrapper.h:18
pftools::CalibrationResultWrapper::particleEnergy_
double particleEnergy_
Definition:
CalibrationResultWrapper.h:71
pftools::CalibrationResultWrapper::targetFuncContrib_
double targetFuncContrib_
Definition:
CalibrationResultWrapper.h:91
CalibrationProvenance.h
pftools::CalibrationResultWrapper::ratio_
double ratio_
Definition:
CalibrationResultWrapper.h:86
pftools::CalibrationResultWrapper::provenance_
CalibrationProvenance provenance_
Definition:
CalibrationResultWrapper.h:52
pftools::CalibrationResultWrapper::~CalibrationResultWrapper
virtual ~CalibrationResultWrapper()
Definition:
CalibrationResultWrapper.h:28
pftools::UNDEFINED
Definition:
CalibrationProvenance.h:17
pftools::CalibrationResultWrapper::ecalEnergy_
double ecalEnergy_
Definition:
CalibrationResultWrapper.h:61
pftools::CalibrationResultWrapper::target_
CalibrationTarget target_
Definition:
CalibrationResultWrapper.h:76
pftools::UNCALIBRATED
Definition:
CalibrationProvenance.h:13
pftools::CalibrationResultWrapper::bias
double bias() const
Definition:
CalibrationResultWrapper.h:41
pftools::CalibrationResultWrapper::reset
void reset()
Definition:
CalibrationResultWrapper.h:32
Generated for CMSSW Reference Manual by
1.8.11