Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-13 03:16:00

0001 #ifndef L1Trigger_CSCTriggerPrimitives_PulseArray_h
0002 #define L1Trigger_CSCTriggerPrimitives_PulseArray_h
0003 
0004 /** \class PulseArray
0005  *
0006  */
0007 
0008 #include "DataFormats/CSCDigi/interface/CSCConstants.h"
0009 #include "L1Trigger/CSCTriggerPrimitives/interface/CSCPatternBank.h"
0010 
0011 class PulseArray {
0012 public:
0013   // constructor
0014   PulseArray();
0015 
0016   // set the dimensions
0017   void initialize(unsigned numberOfChannels);
0018 
0019   // clear the pulse array
0020   void clear();
0021 
0022   unsigned& operator()(const unsigned layer, const unsigned channel);
0023 
0024   unsigned bitsInPulse() const;
0025 
0026   // make the pulse at time "bx" with length "hit_persist"
0027   void extend(const unsigned layer, const unsigned channel, const unsigned bx, const unsigned hit_persist);
0028 
0029   // check "one shot" at this bx_time
0030   bool oneShotAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
0031 
0032   // check if "one shot" is high at this bx_time
0033   bool isOneShotHighAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
0034 
0035   // This loop is a quick check of a number of layers hit at bx_time: since
0036   // most of the time it is 0, this check helps to speed-up the execution
0037   // substantially.
0038   unsigned numberOfLayersAtBX(const unsigned bx) const;
0039 
0040 private:
0041   std::vector<std::vector<unsigned> > data_;
0042   unsigned numberOfChannels_;
0043 };
0044 
0045 #endif