CondFormats
HcalObjects
src
HcalPedestalWidth.cc
Go to the documentation of this file.
1
10
#include <cmath>
11
#include <iostream>
12
13
#include "
CondFormats/HcalObjects/interface/HcalPedestalWidth.h
"
14
15
namespace
{
16
int
offset
(
int
fCapId1,
int
fCapId2) {
17
// static int offsets [4] = {0, 1, 3, 6};
18
// if (fCapId1 < fCapId2) { // swap
19
// int tmp = fCapId1; fCapId1 = fCapId2; fCapId2 = tmp;
20
// }
21
// return offsets [fCapId1] + fCapId2;
22
return
fCapId1 * 4 + fCapId2;
23
}
24
}
// namespace
25
26
HcalPedestalWidth::HcalPedestalWidth
(
int
fId) : mId(fId) {
27
for
(
int
i
= 16; --
i
>= 0; *(&
mSigma00
+
i
) = 0) {
28
}
29
}
30
31
float
HcalPedestalWidth::getWidth
(
int
fCapId)
const
{
return
sqrt
(*(
getValues
() +
offset
(fCapId, fCapId))); }
32
33
float
HcalPedestalWidth::getSigma
(
int
fCapId1,
int
fCapId2)
const
{
return
*(
getValues
() +
offset
(fCapId1, fCapId2)); }
34
35
void
HcalPedestalWidth::setSigma
(
int
fCapId1,
int
fCapId2,
float
fSigma) {
36
*(&
mSigma00
+
offset
(fCapId1, fCapId2)) = fSigma;
37
}
HcalPedestalWidth::HcalPedestalWidth
HcalPedestalWidth(int fId=0)
Definition:
HcalPedestalWidth.cc:26
mps_fire.i
i
Definition:
mps_fire.py:428
HcalPedestalWidth::setSigma
void setSigma(int fCapId1, int fCapId2, float fSigma)
Definition:
HcalPedestalWidth.cc:35
HcalPedestalWidth::getSigma
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
Definition:
HcalPedestalWidth.cc:33
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
HcalPedestalWidth.h
HcalPedestalWidth::getValues
const float * getValues() const
get value for all capId = 0..3, 10 values in total
Definition:
HcalPedestalWidth.h:18
HcalPedestalWidth::getWidth
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
Definition:
HcalPedestalWidth.cc:31
HcalPedestalWidth::mSigma00
float mSigma00
Definition:
HcalPedestalWidth.h:34
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
Generated for CMSSW Reference Manual by
1.8.16