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  public:
9  int convert(int item) const { return theOffset + theSlope * item; }
10  int inverse(int item) const { return (item - theOffset) / theSlope; }
11  int offset() const { return theOffset; }
12  int slope() const { return theSlope; }
13 
14  private:
16  };
17 
18 } // namespace sipixelobjects
19 #endif
sipixelobjects::LinearConversion::inverse
int inverse(int item) const
Definition: LinearConversion.h:10
sipixelobjects::LinearConversion::theOffset
int theOffset
Definition: LinearConversion.h:15
sipixelobjects::LinearConversion::theSlope
int theSlope
Definition: LinearConversion.h:15
sipixelobjects
Definition: CablingPathToDetUnit.h:4
sipixelobjects::LinearConversion::convert
int convert(int item) const
Definition: LinearConversion.h:9
sipixelobjects::LinearConversion
Definition: LinearConversion.h:6
sipixelobjects::LinearConversion::offset
int offset() const
Definition: LinearConversion.h:11
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
sipixelobjects::LinearConversion::LinearConversion
LinearConversion(int offset=0, int slope=1)
Definition: LinearConversion.h:8
sipixelobjects::LinearConversion::slope
int slope() const
Definition: LinearConversion.h:12