CMS 3D CMS Logo

LinearConversion.h
Go to the documentation of this file.
1 #ifndef SiPixelObjects_LinearConversion_H
2 #define SiPixelObjects_LinearConversion_H
3 
4 namespace sipixelobjects {
5 
7 
8 public:
10  int convert( int item) const { return theOffset+theSlope*item; }
11  int inverse( int item) const { return (item - theOffset)/theSlope; }
12  int offset() const { return theOffset; }
13  int slope() const { return theSlope; }
14 
15 private:
17 };
18 
19 }
20 #endif
LinearConversion(int offset=0, int slope=1)