CMS 3D CMS Logo

PulseArray.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_PulseArray_h
2 #define L1Trigger_CSCTriggerPrimitives_PulseArray_h
3 
10 
11 class PulseArray {
12 public:
13  // constructor
14  PulseArray();
15 
16  // set the dimensions
17  void initialize(unsigned numberOfChannels);
18 
19  // clear the pulse array
20  void clear();
21 
22  unsigned& operator()(const unsigned layer, const unsigned channel);
23 
24  unsigned bitsInPulse() const;
25 
26  // make the pulse at time "bx" with length "hit_persist"
27  void extend(const unsigned layer, const unsigned channel, const unsigned bx, const unsigned hit_persist);
28 
29  // check "one shot" at this bx_time
30  bool oneShotAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
31 
32  // check if "one shot" is high at this bx_time
33  bool isOneShotHighAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
34 
35  // This loop is a quick check of a number of layers hit at bx_time: since
36  // most of the time it is 0, this check helps to speed-up the execution
37  // substantially.
38  unsigned numberOfLayersAtBX(const unsigned bx) const;
39 
40 private:
41  std::vector<std::vector<unsigned> > data_;
43 };
44 
45 #endif
PulseArray::bitsInPulse
unsigned bitsInPulse() const
Definition: PulseArray.cc:25
PulseArray::extend
void extend(const unsigned layer, const unsigned channel, const unsigned bx, const unsigned hit_persist)
Definition: PulseArray.cc:27
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
PulseArray::PulseArray
PulseArray()
Definition: PulseArray.cc:3
PulseArray::numberOfLayersAtBX
unsigned numberOfLayersAtBX(const unsigned bx) const
Definition: PulseArray.cc:41
CSCConstants.h
PulseArray::numberOfChannels_
unsigned numberOfChannels_
Definition: PulseArray.h:42
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
PulseArray
Definition: PulseArray.h:11
CSCPatternBank.h
PulseArray::isOneShotHighAtBX
bool isOneShotHighAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const
Definition: PulseArray.cc:37
PulseArray::data_
std::vector< std::vector< unsigned > > data_
Definition: PulseArray.h:41
PulseArray::operator()
unsigned & operator()(const unsigned layer, const unsigned channel)
Definition: PulseArray.cc:23
PulseArray::oneShotAtBX
bool oneShotAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const
Definition: PulseArray.cc:33
PulseArray::clear
void clear()
Definition: PulseArray.cc:14
PulseArray::initialize
void initialize(unsigned numberOfChannels)
Definition: PulseArray.cc:5