00001
00002
00003
00004
00005
00006
00007
00011 #ifndef COMMONDEFS_H_
00012 #define COMMONDEFS_H_
00013
00015 const int CUTOK = -1;
00016
00021 enum DETECTORCODE {
00022 TRK = 1,
00023 CALO = 2,
00024 TOF = 4,
00025 AC = 8,
00026 TRIG = 16,
00027 ORB = 32,
00028 ALL = 63,
00029 CALO_L1 = 64
00030 };
00031
00035 const int TOFNPADLAYER[6] = { 8, 6, 2, 2, 3, 3 };
00036
00044 template<class T>
00045 class SimpleMatrix {
00046
00047 public:
00058 SimpleMatrix(unsigned int nRows, unsigned int nCols, T elements = T()) :
00059 _matrix(nRows, std::vector<T>(nCols, elements)), _nRows(nRows), _nCols(nCols) {
00060
00061 }
00062
00068 std::vector<T>& operator[](int i) {
00069 return _matrix[i];
00070 }
00071
00076 unsigned int GetNRows() {
00077 return _nRows;
00078 }
00079
00084 unsigned int GetNCols() {
00085 return _nCols;
00086 }
00087
00088 private:
00089
00090 std::vector<std::vector<T> > _matrix;
00091 unsigned int _nRows, _nCols;
00092 };
00093
00094 #endif