Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:57

0001 #ifndef CastorPedestalWidth_h
0002 #define CastorPedestalWidth_h
0003 
0004 /** 
0005 \class CastorPedestalWidth
0006 \author Fedor Ratnikov (UMd)
0007 POOL object to store PedestalWidth values 4xCapId
0008 $Author: ratnikov
0009 $Date: 2009/03/24 16:05:29 $
0010 $Revision: 1.10 $
0011 Adapted for CASTOR by L. Mundim
0012 */
0013 #include "CondFormats/Serialization/interface/Serializable.h"
0014 #include <cstdint>
0015 
0016 class CastorPedestalWidth {
0017 public:
0018   /// get value for all capId = 0..3, 10 values in total
0019   const float* getValues() const { return &mSigma00; }
0020 
0021   /// get width (sqrt(sigma_i_i)) for capId = 0..3
0022   float getWidth(int fCapId) const;
0023 
0024   /// get correlation element for capId1/2 = 0..3
0025   float getSigma(int fCapId1, int fCapId2) const;
0026 
0027   // functions below are not supposed to be used by consumer applications
0028   CastorPedestalWidth(int fId = 0);
0029   void setSigma(int fCapId1, int fCapId2, float fSigma);
0030 
0031   uint32_t rawId() const { return mId; }
0032 
0033   // produces pedestal noise in assumption of near correlations and small variations
0034   void makeNoise(unsigned fFrames, const double* fGauss, double* fNoise) const;
0035 
0036 private:
0037   uint32_t mId;
0038   float mSigma00;
0039   float mSigma01;
0040   float mSigma02;
0041   float mSigma03;
0042   float mSigma10;
0043   float mSigma11;
0044   float mSigma12;
0045   float mSigma13;
0046   float mSigma20;
0047   float mSigma21;
0048   float mSigma22;
0049   float mSigma23;
0050   float mSigma30;
0051   float mSigma31;
0052   float mSigma32;
0053   float mSigma33;
0054 
0055   COND_SERIALIZABLE;
0056 };
0057 
0058 #endif