CMS 3D CMS Logo

DiamondVFATFrame.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of the TOTEM offline software.
4 * Authors:
5 * Seyed Mohsen Etesami (setesami@cern.ch)
6 * Nicola Minafra
7 *
8 ****************************************************************************/
9 
10 #ifndef EventFilter_CTPPSRawToDigi_DiamondVFATFrame
11 #define EventFilter_CTPPSRawToDigi_DiamondVFATFrame
12 
13 #include <vector>
14 #include <cstddef>
15 #include <cstdint>
16 
18 
19 
24 {
25 
26  public:
27  DiamondVFATFrame(const word* inputData = nullptr)
28  {}
29  ~DiamondVFATFrame() override {}
30 
32  uint32_t getLeadingEdgeTime() const
33  {
34  uint32_t time = ((data[7]&0x1f)<<16)+data[8];
35  time = (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; //HPTDC inperpolation bits are MSB but should be LSB.... ask HPTDC designers...
36  return time;
37  }
38 
39  uint32_t getTrailingEdgeTime() const
40  {
41  uint32_t time = ((data[5]&0x1f)<<16)+data[6];
42  time = (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; //HPTDC inperpolation bits are MSB but should be LSB.... ask HPTDC designers...
43  return time;
44  }
45 
46  uint32_t getThresholdVoltage() const
47  {
48  return ((data[3]&0x7ff)<<16)+data[4];
49  }
50 
52  {
53  return data[2] & 0x01;
54  }
55 
57  {
58  return data[1] & 0xFFFF;
59  }
60 
61 };
62 
63 #endif
word data[12]
Definition: VFATFrame.h:173
uint32_t getLeadingEdgeTime() const
get timing infromation
uint16_t word
Definition: VFATFrame.h:22
uint32_t getThresholdVoltage() const
VFATFrame::word getMultihit() const
DiamondVFATFrame(const word *inputData=nullptr)
uint32_t getTrailingEdgeTime() const
VFATFrame::word getHptdcErrorFlag() const
~DiamondVFATFrame() override