1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#ifndef CastorPedestalWidth_h
#define CastorPedestalWidth_h
/**
\class CastorPedestalWidth
\author Fedor Ratnikov (UMd)
POOL object to store PedestalWidth values 4xCapId
$Author: ratnikov
$Date: 2009/03/24 16:05:29 $
$Revision: 1.10 $
Adapted for CASTOR by L. Mundim
*/
#include "CondFormats/Serialization/interface/Serializable.h"
#include <cstdint>
class CastorPedestalWidth {
public:
/// get value for all capId = 0..3, 10 values in total
const float* getValues() const { return &mSigma00; }
/// get width (sqrt(sigma_i_i)) for capId = 0..3
float getWidth(int fCapId) const;
/// get correlation element for capId1/2 = 0..3
float getSigma(int fCapId1, int fCapId2) const;
// functions below are not supposed to be used by consumer applications
CastorPedestalWidth(int fId = 0);
void setSigma(int fCapId1, int fCapId2, float fSigma);
uint32_t rawId() const { return mId; }
// produces pedestal noise in assumption of near correlations and small variations
void makeNoise(unsigned fFrames, const double* fGauss, double* fNoise) const;
private:
uint32_t mId;
float mSigma00;
float mSigma01;
float mSigma02;
float mSigma03;
float mSigma10;
float mSigma11;
float mSigma12;
float mSigma13;
float mSigma20;
float mSigma21;
float mSigma22;
float mSigma23;
float mSigma30;
float mSigma31;
float mSigma32;
float mSigma33;
COND_SERIALIZABLE;
};
#endif
|