ME

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
// Class for Muon Endcap (ME) Data Record

#ifndef __l1t_emtf_ME_h__
#define __l1t_emtf_ME_h__

#include <vector>
#include <cstdint>

namespace l1t {
  namespace emtf {
    class ME {
    public:
      explicit ME(uint64_t dataword);

      ME()
          : wire(-99),
            quality(-99),
            clct_pattern(-99),
            bc0(-99),
            bxe(-99),
            lr(-99),
            csc_ID(-99),
            strip(-99),
            afff(-99),
            cik(-99),
            nit(-99),
            me_bxn(-99),
            afef(-99),
            se(-99),
            sm(-99),
            epc(-99),
            af(-99),
            station(-99),
            vp(-99),
            tbin(-99),
            // Run 3 OTMB data
            frame(-99),
            quarter_strip(-99),
            eighth_strip(-99),
            slope(-99),
            run3_pattern(-99),
            // Run 3 muon shower data
            musv(-99),
            mus_inTime(-99),
            mus_outOfTime(-99),
            // metadata
            stub_num(-99),
            format_errors(0),
            dataword(-99) {}

      virtual ~ME() {}

      void set_wire(int bits) { wire = bits; }
      void set_quality(int bits) { quality = bits; }
      void set_clct_pattern(int bits) { clct_pattern = bits; }
      void set_bc0(int bits) { bc0 = bits; }
      void set_bxe(int bits) { bxe = bits; }
      void set_lr(int bits) { lr = bits; }
      void set_csc_ID(int bits) { csc_ID = bits; }
      void set_strip(int bits) { strip = bits; }
      void set_afff(int bits) { afff = bits; }
      void set_cik(int bits) { cik = bits; }
      void set_nit(int bits) { nit = bits; }
      void set_me_bxn(int bits) { me_bxn = bits; }
      void set_afef(int bits) { afef = bits; }
      void set_se(int bits) { se = bits; }
      void set_sm(int bits) { sm = bits; }
      void set_epc(int bits) { epc = bits; }
      void set_af(int bits) { af = bits; }
      void set_station(int bits) { station = bits; }
      void set_vp(int bits) { vp = bits; }
      void set_tbin(int bits) { tbin = bits; }
      // Run 3 OTMB
      void set_frame(int bits) { frame = bits; }
      void set_quarter_strip(int bits) { quarter_strip = bits; }
      void set_eighth_strip(int bits) { eighth_strip = bits; }
      void set_slope(int bits) { slope = bits; }
      void set_run3_pattern(int bits) { run3_pattern = bits; }
      // Run 3 muon shower
      void set_musv(int bits) { musv = bits; }
      void set_mus_inTime(int bits) { mus_inTime = bits; }
      void set_mus_outOfTime(int bits) { mus_outOfTime = bits; }
      // meta data
      void set_stub_num(int bits) { stub_num = bits; }
      void add_format_error() { format_errors += 1; }
      void set_dataword(uint64_t bits) { dataword = bits; }

      int Wire() const { return wire; }
      int Quality() const { return quality; }
      int CLCT_pattern() const { return clct_pattern; }
      int BC0() const { return bc0; }
      int BXE() const { return bxe; }
      int LR() const { return lr; }
      int CSC_ID() const { return csc_ID; }
      int Strip() const { return strip; }
      int AFFF() const { return afff; }
      int CIK() const { return cik; }
      int NIT() const { return nit; }
      int ME_BXN() const { return me_bxn; }
      int AFEF() const { return afef; }
      int SE() const { return se; }
      int SM() const { return sm; }
      int EPC() const { return epc; }
      int AF() const { return af; }
      int Station() const { return station; }
      int VP() const { return vp; }
      int TBIN() const { return tbin; }
      // Run 3 OTMB
      int Frame() const { return frame; }
      int Quarter_strip() const { return quarter_strip; }
      int Eighth_strip() const { return eighth_strip; }
      int Slope() const { return slope; }
      int Run3_pattern() const { return run3_pattern; }
      // Run 3 muon shower
      int MUSV() const { return musv; }
      int MUS_inTime() const { return mus_inTime; }
      int MUS_outOfTime() const { return mus_outOfTime; }
      // metadata
      int Stub_num() const { return stub_num; }
      int Format_errors() const { return format_errors; }
      uint64_t Dataword() const { return dataword; }

    private:
      int wire;
      int quality;
      int clct_pattern;
      int bc0;
      int bxe;
      int lr;
      int csc_ID;
      int strip;
      int afff;
      int cik;
      int nit;
      int me_bxn;
      int afef;
      int se;
      int sm;
      int epc;
      int af;
      int station;
      int vp;
      int tbin;
      // Run 3 OTMB
      int frame;
      int quarter_strip;
      int eighth_strip;
      int slope;
      int run3_pattern;
      // Run 3 muon shower
      int musv;
      int mus_inTime;
      int mus_outOfTime;
      // metadata
      int stub_num;
      int format_errors;
      uint64_t dataword;

    };  // End of class ME

    // Define a vector of ME
    typedef std::vector<ME> MECollection;

  }  // End of namespace emtf
}  // End of namespace l1t

#endif /* define __l1t_emtf_ME_h__ */