Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:15:09

0001 #ifndef EventFilter_L1TRawToDigi_Omtf_DtDataWord64_H
0002 #define EventFilter_L1TRawToDigi_Omtf_DtDataWord64_H
0003 
0004 #include <iostream>
0005 #include "DataFormats/L1TMuon/interface/OMTF/OmtfDataWord64.h"
0006 
0007 namespace omtf {
0008 
0009   class DtDataWord64 {
0010   public:
0011     DtDataWord64(Word64 data) : rawData(data) {}
0012     DtDataWord64() : rawData(Word64(DataWord64::dt) << 60) {}
0013     int phi() const { return st_phi_; }
0014     int phiB() const { return st_phib_; }
0015     unsigned int quality() const { return st_q_; }
0016     unsigned int eta() const { return eta_hit_; }
0017     unsigned int etaQuality() const { return eta_qbit_; }
0018     unsigned int bcnt_st() const { return bcnt_st_; }
0019     unsigned int bcnt_e0() const { return bcnt_e0_; }
0020     unsigned int bcnt_e1() const { return bcnt_e1_; }
0021     unsigned int valid() const { return valid_; }
0022     unsigned int station() const { return st_; }
0023     unsigned int fiber() const { return fiber_; }
0024     unsigned int sector() const { return sector_; }
0025     unsigned int bxNum() const { return bxNum_; }
0026     unsigned int type() const { return type_; }
0027     friend class OmtfPacker;
0028     friend class DtPacker;
0029     friend std::ostream &operator<<(std::ostream &out, const DtDataWord64 &o);
0030 
0031   private:
0032     union {
0033       uint64_t rawData;
0034       struct {
0035         int64_t st_phi_ : 12;
0036         int64_t st_phib_ : 10;
0037         uint64_t st_q_ : 5;
0038         uint64_t st_cal_ : 1;
0039         uint64_t eta_qbit_ : 7;
0040         uint64_t eta_hit_ : 7;
0041         uint64_t dummy1_ : 1;
0042         uint64_t bcnt_st_ : 2;
0043         uint64_t bcnt_e0_ : 2;
0044         uint64_t bcnt_e1_ : 2;
0045         uint64_t valid_ : 3;
0046         uint64_t st_ : 2;
0047         uint64_t fiber_ : 1;
0048         uint64_t sector_ : 2;
0049         uint64_t bxNum_ : 3;
0050         uint64_t type_ : 4;
0051       };
0052     };
0053   };
0054 
0055 }  // namespace omtf
0056 #endif