Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:09

0001 #ifndef CSCWireDigi_CSCWireDigi_h
0002 #define CSCWireDigi_CSCWireDigi_h
0003 
0004 /**\class CSCWireDigi
0005  *
0006  * Digi for CSC anode wires. 
0007  *
0008  */
0009 
0010 #include <vector>
0011 #include <iosfwd>
0012 #include <cstdint>
0013 
0014 class CSCWireDigi {
0015 public:
0016   /// Constructors
0017 
0018   CSCWireDigi(int wire, unsigned int tbinb);  /// wiregroup#, tbin bit word
0019   CSCWireDigi();                              /// default
0020 
0021   /// return wiregroup number. counts from 1.
0022   int getWireGroup() const { return wire_; }
0023   /// return BX assigned for the wire group (16 upper bits from the wire group number)
0024   int getWireGroupBX() const { return wireBX_; }
0025   /// return BX-wiregroup number combined
0026   /// (16 upper bits - BX + 16 lower bits - wire group number)
0027   int getBXandWireGroup() const { return wireBXandWires_; }
0028   /// return the word with time bins bits
0029   unsigned int getTimeBinWord() const { return tbinb_; }
0030   /// return tbin number, (obsolete, use getTimeBin() instead)
0031   int getBeamCrossingTag() const;
0032   /// return first tbin ON number
0033   int getTimeBin() const;
0034   /// return vector of time bins ON
0035   std::vector<int> getTimeBinsOn() const;
0036 
0037   /// Print content of digi
0038   void print() const;
0039 
0040   /// set wiregroup number
0041   void setWireGroup(unsigned int wiregroup) { wire_ = wiregroup; }
0042 
0043 private:
0044   int wire_;
0045   uint32_t tbinb_;
0046   /// BX in the wire digis (16 upper bits from the wire group number)
0047   int wireBXandWires_;
0048   int wireBX_;
0049 };
0050 
0051 std::ostream& operator<<(std::ostream& o, const CSCWireDigi& digi);
0052 
0053 #endif