Detector.h 1.74 KB
Newer Older
clantz's avatar
clantz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** @file Detector
 *  @brief Function prototypes for Detector
 *
 *  This contains the prototypes and members 
 *  for Detector
 *
 *  @author Chad Lantz
 *  @bug No known bugs.
 */

#ifndef DETECTOR_H
#define DETECTOR_H

#include <vector>
15
#include <string>
16

clantz's avatar
clantz committed
17
#include "Containers.h"
18
#include "TTree.h"
clantz's avatar
clantz committed
19
20
21
22

class Detector{

 public:
23
  Detector( );
24
  Detector( std::vector< Channel* > _element ){ m_Element = _element;}
25
  virtual ~Detector( );
26

clantz's avatar
clantz committed
27
  
28
  virtual Channel* GetElement  (int row, int column);
clantz's avatar
clantz committed
29
  virtual Channel* GetElement  (std::string _name);
30
  virtual std::vector < Channel* > GetChannelsVector () { return m_Element; }
31
32
33
  virtual double*  GetPosition ( ) { return m_Position; }
  virtual double*  GetAngle    ( ) { return m_Angle; }

34
  virtual void     SetNSamples ( int _nSamples )  { m_nSamp = _nSamples; }
35
36
37
  virtual void     SetElement  ( Channel* _entry) { m_Element.push_back(_entry); }
  virtual void     SetPosition (double x, double y, double z) { m_Position[0] = x; m_Position[1] = y; m_Position[2] = z; }
  virtual void     SetAngle    (double _cosx = 0, double _cosy = 0, double _cosz = 0) { m_Angle[0] = _cosx; m_Angle[1] = _cosy; m_Angle[2] = _cosz; }
38
  virtual void     SetBranches ( TTree* _dataTree );
39
40
  virtual void     DeclareHistograms ( );
  virtual void     FillHistograms ( );
41

42
  virtual void     PrintMap    ( ) = 0;
clantz's avatar
clantz committed
43
44
  
  private:
45
46
  /** Vector of channels associated to the dector **/
  std::vector< Channel* > m_Element;
47
  /** Three element array with x, y, and z of some pre-defined point on the detector **/
48
  double m_Position[3];
49
  /** Three element array of angle about the x, y, and z axis **/
50
  double m_Angle[3];
51
52
53
  /** Number of samples per channel **/
  int m_nSamp = 1024;

clantz's avatar
clantz committed
54
55
56
  };

#endif