EM.h 1.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/** @file EM
 *  @brief Function prototypes for EM
 *
 *  This contains the prototypes and members
 *  for EM
 *
 *  @author Aric Tate
 *  @bug No known bugs.
 */

#ifndef EM_H
#define EM_H

#include "Containers.h"
#include "Detector.h"

class EM : public Detector{

 public:
  EM( );
  EM( std::vector< Channel* > _readOut, int _runNumber, std::string _name );
  ~EM( );

  Channel* GetElement(int row, int column);

  void SetnRows(int rows){ m_nRows=rows; m_nElements = m_nRows * m_nColumns; ResizeSortedElements(); };
  void SetnCols(int cols){ m_nColumns=cols; m_nElements = m_nRows * m_nColumns; ResizeSortedElements(); };
  int GetnRows() { return m_nRows ; };
  int GetnCols() { return m_nColumns ; };
  void ResizeSortedElements();

  virtual void PrintMap( );

 private:
  /** Number of rows **/
  int m_nRows = 3;
  /** Number of columns **/
  int m_nColumns = 3;
  /** Total elements **/
  int m_nElements = m_nRows * m_nColumns;
  /** 2D vector of channels sorted in a [row][column] format **/
  std::vector< std::vector< Channel* > > m_SortedElements;

  /** Translation of row elements for 2021 testbeam
      Converts the tile mapping (row,col)
            (1,4) (1,3) (1,2)          (0,0) (0,1) (0,2) (0,3)
      from  (2,4) (2,3) (2,2)   to     (1,0) (1,1) (1,2) (1,3)
            (3,4) (3,3) (3,2)          (2,0) (2,1) (2,2) (2,3)


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


  As viewed from the beam source**/
  int colTranslation [5];


};

#endif