|
| 1 | +#ifndef CondFormats_PhysicsToolsObjects_DeDxCalibration_h |
| 2 | +#define CondFormats_PhysicsToolsObjects_DeDxCalibration_h |
| 3 | +#include "CondFormats/Serialization/interface/Serializable.h" |
| 4 | + |
| 5 | +#include <vector> |
| 6 | +class DeDxCalibration { |
| 7 | +public: |
| 8 | + DeDxCalibration(); |
| 9 | + virtual ~DeDxCalibration() {} |
| 10 | + |
| 11 | + typedef std::pair<uint32_t, unsigned char> ChipId; |
| 12 | + DeDxCalibration(const std::vector<double>& thr, |
| 13 | + const std::vector<double>& alpha, |
| 14 | + const std::vector<double>& sigma, |
| 15 | + const std::map<ChipId, float>& gain) |
| 16 | + : thr_(thr), alpha_(alpha), sigma_(sigma), gain_(gain){}; |
| 17 | + |
| 18 | + const std::vector<double>& thr() const { return thr_; } |
| 19 | + const std::vector<double>& alpha() const { return alpha_; } |
| 20 | + const std::vector<double>& sigma() const { return sigma_; } |
| 21 | + const std::map<ChipId, float>& gain() const { return gain_; } |
| 22 | + |
| 23 | + void setThr(const std::vector<double>& v) { thr_ = v; } |
| 24 | + void setAlpha(const std::vector<double>& v) { alpha_ = v; } |
| 25 | + void setSigma(const std::vector<double>& v) { sigma_ = v; } |
| 26 | + void setGain(const std::map<ChipId, float>& v) { gain_ = v; } |
| 27 | + |
| 28 | +private: |
| 29 | + std::vector<double> thr_; |
| 30 | + std::vector<double> alpha_; |
| 31 | + std::vector<double> sigma_; |
| 32 | + std::map<ChipId, float> gain_; |
| 33 | + |
| 34 | + COND_SERIALIZABLE; |
| 35 | +}; |
| 36 | +#endif |
0 commit comments