Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:40

0001 #ifndef CondFormats_PhysicsToolsObjects_DeDxCalibration_h
0002 #define CondFormats_PhysicsToolsObjects_DeDxCalibration_h
0003 #include "CondFormats/Serialization/interface/Serializable.h"
0004 
0005 #include <vector>
0006 class DeDxCalibration {
0007 public:
0008   DeDxCalibration();
0009   virtual ~DeDxCalibration() {}
0010 
0011   typedef std::pair<uint32_t, unsigned char> ChipId;
0012   DeDxCalibration(const std::vector<double>& thr,
0013                   const std::vector<double>& alpha,
0014                   const std::vector<double>& sigma,
0015                   const std::map<ChipId, float>& gain)
0016       : thr_(thr), alpha_(alpha), sigma_(sigma), gain_(gain) {}
0017 
0018   const std::vector<double>& thr() const { return thr_; }
0019   const std::vector<double>& alpha() const { return alpha_; }
0020   const std::vector<double>& sigma() const { return sigma_; }
0021   const std::map<ChipId, float>& gain() const { return gain_; }
0022 
0023   void setThr(const std::vector<double>& v) { thr_ = v; }
0024   void setAlpha(const std::vector<double>& v) { alpha_ = v; }
0025   void setSigma(const std::vector<double>& v) { sigma_ = v; }
0026   void setGain(const std::map<ChipId, float>& v) { gain_ = v; }
0027 
0028 private:
0029   std::vector<double> thr_;
0030   std::vector<double> alpha_;
0031   std::vector<double> sigma_;
0032   std::map<ChipId, float> gain_;
0033 
0034   COND_SERIALIZABLE;
0035 };
0036 #endif