CaloRawDigit.h
Go to the documentation of this file.
1 /** ****************************************************************************
2  * @file CaloRawDigit.h
3  * @brief Definition of basic calo raw digits
4  * @author eldwan.brianne@desy.de
5  * @see CaloRawDigit.cxx raw.h
6  * Created on the 08/27/18
7  *
8  * ****************************************************************************/
9 
10 #ifndef GAR_RAWDATA_CALORAWDIGIT_H
11 #define GAR_RAWDATA_CALORAWDIGIT_H
12 
13 // C/C++ standard libraries
14 #include <stdint.h> // uint32_t
15 #include <cstdlib> // size_t
16 #include <vector>
18 #include "RtypesCore.h" // ULong64_t
19 
20 /// Raw data description and utilities
21 namespace gar {
22  namespace raw {
23 
24  typedef long long int CellID_t;
25 
26  class CaloRawDigit {
27 
28  public:
29 
30  /// Default constructor: an empty raw digit with zeros put in for paraneters and an invalid channel
31  CaloRawDigit();
32 
33 #ifndef __GCCXML__
34  public:
35 
36  CaloRawDigit(unsigned int ADC, float time, float x, float y, float z, CellID_t cellID);
37  CaloRawDigit(unsigned int ADC, std::pair<float, float> time, float x, float y, float z, CellID_t cellID);
38  CaloRawDigit(std::pair<unsigned int, unsigned int> ADC, std::pair<float, float> time, float x, float y, float z, CellID_t cellID);
39 
40  //Copy constructor
41  CaloRawDigit(gar::raw::CaloRawDigit const&) = default;
42 
43  /// Reference to the compressed ADC count vector
44  std::pair<unsigned int, unsigned int> ADC() const;
45  /// Timestmap
46  std::pair<float, float> Time() const;
47  /// X position
48  float X() const;
49  /// Y position
50  float Y() const;
51  /// Z position
52  float Z() const;
53  /// cellID
54  CellID_t CellID() const;
55 
56 
57 #endif // !__GCCXML__
58  private:
59 
60  std::pair<unsigned int, unsigned int> fADC; ///< energy of the hit in ADC for both SiPM
61  std::pair<float, float> fTime; ///< time of the hit for both SiPM
62  float fX; ///< x of the hit
63  float fY; ///< y of the hit
64  float fZ; ///< z of the hit
65  CellID_t fCellID; ///< cellID1 of the hit based on 64 bits
66 
67  }; // class CaloRawDigit
68 
69 
70  } // namespace raw
71 } // gar
72 
73 //------------------------------------------------------------------------------
74 //--- inline implementation
75 //---
76 #ifndef __GCCXML__
77 
78 inline std::pair<unsigned int, unsigned int> gar::raw::CaloRawDigit::ADC() const {return fADC; }
79 inline std::pair<float, float> gar::raw::CaloRawDigit::Time() const {return fTime; }
80 inline float gar::raw::CaloRawDigit::X() const {return fX; }
81 inline float gar::raw::CaloRawDigit::Y() const {return fY; }
82 inline float gar::raw::CaloRawDigit::Z() const {return fZ; }
84 
85 #endif // !__GCCXML__
86 
87 #endif // GAR_RAWDATA_CALORAWDIGIT_H
88 
89 ////////////////////////////////////////////////////////////////////////
float fZ
z of the hit
Definition: CaloRawDigit.h:64
std::pair< float, float > Time() const
Timestmap.
Definition: CaloRawDigit.h:79
float Y() const
Y position.
Definition: CaloRawDigit.h:81
std::pair< unsigned int, unsigned int > ADC() const
Reference to the compressed ADC count vector.
Definition: CaloRawDigit.h:78
std::pair< unsigned int, unsigned int > fADC
energy of the hit in ADC for both SiPM
Definition: CaloRawDigit.h:60
float X() const
X position.
Definition: CaloRawDigit.h:80
Raw data description.
CaloRawDigit()
Default constructor: an empty raw digit with zeros put in for paraneters and an invalid channel...
CellID_t CellID() const
cellID
Definition: CaloRawDigit.h:83
float fX
x of the hit
Definition: CaloRawDigit.h:62
long long int CellID_t
Definition: CaloRawDigit.h:24
General GArSoft Utilities.
std::pair< float, float > fTime
time of the hit for both SiPM
Definition: CaloRawDigit.h:61
float fY
y of the hit
Definition: CaloRawDigit.h:63
CellID_t fCellID
cellID1 of the hit based on 64 bits
Definition: CaloRawDigit.h:65
list x
Definition: train.py:276
float Z() const
Z position.
Definition: CaloRawDigit.h:82