#include <CondFormats/HcalObjects/interface/HcalPedestalWidth.h>
Public Member Functions | |
float | getSigma (int fCapId1, int fCapId2) const |
get correlation element for capId1/2 = 0..3 | |
const float * | getValues () const |
get value for all capId = 0..3, 10 values in total | |
float | getWidth (int fCapId) const |
get width (sqrt(sigma_i_i)) for capId = 0..3 | |
HcalPedestalWidth (int fId=0) | |
void | makeNoise (unsigned fFrames, const double *fGauss, double *fNoise) const |
uint32_t | rawId () const |
void | setSigma (int fCapId1, int fCapId2, float fSigma) |
Private Attributes | |
uint32_t | mId |
float | mSigma00 |
float | mSigma10 |
float | mSigma11 |
float | mSigma20 |
float | mSigma21 |
float | mSigma22 |
float | mSigma30 |
float | mSigma31 |
float | mSigma32 |
float | mSigma33 |
Definition at line 14 of file HcalPedestalWidth.h.
HcalPedestalWidth::HcalPedestalWidth | ( | int | fId = 0 |
) |
get correlation element for capId1/2 = 0..3
Definition at line 33 of file HcalPedestalWidth.cc.
References getValues(), and offset.
Referenced by XMLDocument::addData(), HcalDeadCellMonitor::createMaps(), HcalHotCellMonitor::createMaps(), dumpData(), HcalPedestalMonitor::fillDBValues(), XMLDocument::makeData(), makeNoise(), and HcalRecHitsMaker::noiseInfCfromDB().
const float* HcalPedestalWidth::getValues | ( | ) | const [inline] |
get value for all capId = 0..3, 10 values in total
Definition at line 17 of file HcalPedestalWidth.h.
References mSigma00.
Referenced by HcalPedestalWidthsCheck::analyze(), getSigma(), and getWidth().
00017 {return &mSigma00;}
float HcalPedestalWidth::getWidth | ( | int | fCapId | ) | const |
get width (sqrt(sigma_i_i)) for capId = 0..3
Definition at line 29 of file HcalPedestalWidth.cc.
References getValues(), offset, and funct::sqrt().
Referenced by HcalDbService::makeHcalCalibrationWidth(), and HcalDigiTester::reco().
void HcalPedestalWidth::makeNoise | ( | unsigned | fFrames, | |
const double * | fGauss, | |||
double * | fNoise | |||
) | const |
Definition at line 42 of file HcalPedestalWidth.cc.
References getSigma(), i, and funct::sqrt().
Referenced by HcalAmplifier::amplify().
00042 { 00043 00044 double s_xx_mean = (getSigma (0,0) + getSigma (1,1) + getSigma (2,2) + getSigma (3,3)) / 4; 00045 00046 // S. Abdullin, 22.09.2008 00047 // replacing this sum (not quite correct, anyway, as it should be 00048 // (0,1), (1,2), (2,3), (3,0) from the full *asymmetric* matrix. 00049 // double s_xy_mean = (getSigma (1,0) + getSigma (2,1) 00050 // + getSigma (3,2) + getSigma (3,0)) / 4; 00051 // with just a (fixed as optimal) fraction of diagonal elements: 00052 double s_xy_mean = -0.5 * s_xx_mean; 00053 00054 // added a simple protection against negative sqrt() arguments in case of 00055 // improperly big off-diaigonal terms (S.Abdullin, 27.03.2008) 00056 double term = s_xx_mean*s_xx_mean - 2.*s_xy_mean*s_xy_mean; 00057 if (term < 0.) term = 1.e-50 ; 00058 double sigma = sqrt (0.5 * (s_xx_mean + sqrt(term))); 00059 double corr = sigma == 0. ? 0. : 0.5*s_xy_mean / sigma; 00060 00061 for (unsigned i = 0; i < fFrames; i++) { 00062 fNoise [i] = fGauss[i]*sigma; 00063 if (i > 0) fNoise [i] += fGauss[i-1]*corr; 00064 if (i < fFrames-1) fNoise [i] += fGauss[i+1]*corr; 00065 } 00066 }
uint32_t HcalPedestalWidth::rawId | ( | ) | const [inline] |
Definition at line 37 of file HcalPedestalWidth.cc.
References mSigma00, and offset.
Referenced by HcalDbXml::dumpObject(), HcalDbOnline::getObject(), HcalPedestalAnalysis::HcalPedVal(), and HcalPedestalsAnalysis::~HcalPedestalsAnalysis().
uint32_t HcalPedestalWidth::mId [private] |
float HcalPedestalWidth::mSigma00 [private] |
Definition at line 36 of file HcalPedestalWidth.h.
Referenced by getValues(), HcalPedestalWidth(), and setSigma().
float HcalPedestalWidth::mSigma10 [private] |
Definition at line 37 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma11 [private] |
Definition at line 38 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma20 [private] |
Definition at line 39 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma21 [private] |
Definition at line 40 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma22 [private] |
Definition at line 41 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma30 [private] |
Definition at line 42 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma31 [private] |
Definition at line 43 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma32 [private] |
Definition at line 44 of file HcalPedestalWidth.h.
float HcalPedestalWidth::mSigma33 [private] |
Definition at line 45 of file HcalPedestalWidth.h.