Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:55

0001 #ifndef CSCObjects_CSCDBCrosstalk_h
0002 #define CSCObjects_CSCDBCrosstalk_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include <iosfwd>
0007 #include <vector>
0008 
0009 class CSCDBCrosstalk {
0010 public:
0011   CSCDBCrosstalk() {}
0012   ~CSCDBCrosstalk() {}
0013 
0014   struct Item {
0015     short int xtalk_slope_right;
0016     short int xtalk_intercept_right;
0017     short int xtalk_slope_left;
0018     short int xtalk_intercept_left;
0019 
0020     COND_SERIALIZABLE;
0021   };
0022   int factor_slope;
0023   int factor_intercept;
0024 
0025   enum factors { FSLOPE = 10000000, FINTERCEPT = 100000 };
0026 
0027   typedef std::vector<Item> CrosstalkContainer;
0028   CrosstalkContainer crosstalk;
0029 
0030   const Item& item(int index) const { return crosstalk[index]; }
0031   short int rslope(int index) const { return crosstalk[index].xtalk_slope_right; }
0032   short int rinter(int index) const { return crosstalk[index].xtalk_intercept_right; }
0033   short int lslope(int index) const { return crosstalk[index].xtalk_slope_left; }
0034   short int linter(int index) const { return crosstalk[index].xtalk_intercept_left; }
0035   int sscale() const { return factor_slope; }
0036   int iscale() const { return factor_intercept; }
0037 
0038   COND_SERIALIZABLE;
0039 };
0040 
0041 std::ostream& operator<<(std::ostream& os, const CSCDBCrosstalk& cscdb);
0042 
0043 #endif