Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MicromegasDefs.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MicromegasDefs.h
1 // Tell emacs that this is a C++ source
2 // This file is really -*- C++ -*-.
3 
4 #ifndef MICROMEGAS_MICROMEGASDEFS_H
5 #define MICROMEGAS_MICROMEGASDEFS_H
6 
12 #include <trackbase/TrkrDefs.h>
13 
14 #include <array>
15 
16 namespace MicromegasDefs
17 {
18 
20  enum class SegmentationType: uint8_t
21  {
24  };
25 
27 
28  enum class DriftDirection: uint8_t
29  {
30  INWARD,
31  OUTWARD
32  };
33 
42  static constexpr unsigned int kBitShiftSegmentation __attribute__((unused)) = 8;
43  static constexpr unsigned int kBitShiftTileId __attribute__((unused)) = 0;
44 
46  static constexpr unsigned int kBitShiftStrip __attribute__((unused)) = 0;
47 
57  TrkrDefs::hitsetkey genHitSetKey(uint8_t layer, SegmentationType segmentation, uint8_t tile );
58 
65 
72 
77  TrkrDefs::hitkey genHitKey(uint16_t strip );
78 
80  uint16_t getStrip(TrkrDefs::hitkey);
81 
88 
95 
97 
104  static constexpr int m_npackets = 3;
105  static constexpr std::array<unsigned int,m_npackets> m_packet_ids = {5000, 5001, 5002};
106 
108  static constexpr int m_nchannels_fee = 256;
109 
111  static constexpr int m_nfee = 16;
112 
114  static constexpr int m_nchannels_total = m_nfee*m_nchannels_fee;
115 
117  static constexpr int m_max_adc = 1024;
118 
119 }
120 
121 #endif