RPD.h 1.92 KB
Newer Older
1
2
3
/** @file RPD
 *  @brief Function prototypes for RPD
 *
4
 *  This contains the prototypes and members
5
6
 *  for RPD
 *
7
 *  @author Chad Lantz, Riccardo Longo
8
9
10
11
12
13
 *  @bug No known bugs.
 */

#ifndef RPD_H
#define RPD_H

14
#include "Containers.h"
15
16
17
18
19
20
#include "Detector.h"

class RPD : public Detector{

 public:
  RPD( );
21
  RPD( std::vector< Channel* > _readOut, int _runNumber, std::string m_name );
22
  ~RPD( );
23

24
  Channel* GetElement(int row, int column);
25

26
27
  void SetnRows(int _rows){m_nRows = _rows; nElements = m_nRows * m_nColumns; ResizeSortedElements(); };
  void SetnCols(int _cols){m_nColumns= _cols; nElements = m_nRows * m_nColumns; ResizeSortedElements(); };
28
  void ResizeSortedElements();
29

30
  virtual void PrintMap( );
31

32
 private:
33

34
  /** Number of rows **/
35
  int m_nRows = 4;
36
  /** Number of columns **/
37
  int m_nColumns = 4;
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  /** Translation of row elements for 2018 testbeam
      Converts the tile mapping (row,col)
            (1,4) (1,3) (1,2) (1,1)          (0,0) (0,1) (0,2) (0,3)
      from  (2,4) (2,3) (2,2) (2,1)   to     (1,0) (1,1) (1,2) (1,3)
            (3,4) (3,3) (3,2) (3,1)          (2,0) (2,1) (2,2) (2,3)
            (4,4) (4,3) (4,2) (4,1)          (3,0) (3,1) (3,2) (3,3)

      As viewed from the beam souce
  **/
  int rowTranslation [4];
  /** Translation of column elements for 2018 testbeam
      Converts the tile mapping (row,col)
            (1,4) (1,3) (1,2) (1,1)          (0,0) (0,1) (0,2) (0,3)
      from  (2,4) (2,3) (2,2) (2,1)   to     (1,0) (1,1) (1,2) (1,3)
            (3,4) (3,3) (3,2) (3,1)          (2,0) (2,1) (2,2) (2,3)
            (4,4) (4,3) (4,2) (4,1)          (3,0) (3,1) (3,2) (3,3)

  As viewed from the beam souce**/
  int colTranslation [4];
57
  /** Total elements **/
58
  int nElements = m_nRows * m_nColumns;
59
60
  /** 2D vector of channels sorted in a [row][column] format **/
  std::vector< std::vector< Channel* > > m_SortedElements;
61

62
};
63
64

#endif