Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EventFilter_L1TRawToDigi_Omtf_MuonDataWord64_H
0002 #define EventFilter_L1TRawToDigi_Omtf_MuonDataWord64_H
0003 
0004 #include <iostream>
0005 #include "DataFormats/L1TMuon/interface/OMTF/OmtfDataWord64.h"
0006 
0007 namespace omtf {
0008   class MuonDataWord64 {
0009   public:
0010     MuonDataWord64(Word64 data = 0) : rawData(data) {}
0011     unsigned int weight_lowBits() const { return weight_; }
0012     unsigned int layers() const { return layers_; }
0013     unsigned int ch() const { return ch_; }
0014     unsigned int vch() const { return vch_; }
0015     int phi() const { return phi_; }
0016     int eta() const { return eta_; }
0017     unsigned int pT() const { return pT_; }
0018     unsigned int quality() const { return quality_; }
0019     unsigned int bxNum() const { return bxNum_; }
0020     unsigned int type() const { return type_; }
0021     friend std::ostream &operator<<(std::ostream &out, const MuonDataWord64 &o);
0022 
0023   private:
0024     union {
0025       uint64_t rawData;
0026       struct {
0027         uint64_t pT_ : 9;
0028         uint64_t quality_ : 4;
0029         int64_t eta_ : 9;
0030         uint64_t empty_ : 1;  //not used, orig h/f
0031         int64_t phi_ : 8;
0032         uint64_t bc0_ : 1;
0033         uint64_t ch_ : 1;
0034         uint64_t vch_ : 1;
0035         uint64_t layers_ : 18;
0036         uint64_t weight_ : 5;
0037         uint64_t bxNum_ : 3;
0038         uint64_t type_ : 4;
0039       };
0040     };
0041   };
0042 
0043 }  //namespace omtf
0044 #endif