CMS 3D CMS Logo

L1RCTJetSummaryCard.h
Go to the documentation of this file.
1 #ifndef L1RCTJetSummaryCard_h
2 #define L1RCTJetSummaryCard_h
3 
4 #include <vector>
5 
7 
9 public:
10  // There is no default constructor.
11  // It is required to have a crate number attached to it
12  // for bookeeping purposes.
13  L1RCTJetSummaryCard(int crtNo, const L1RCTLookupTables *rctLookupTables);
14 
15  int crateNumber() { return crtNo; }
16 
17  // eGamma Objects
18  // The object is defined by a 6 bit rank (temporarily set to 7 bit linear ET)
19  // And a position defined by (crdNo and rgnNo)
20  // The top four from each crate are returned
21  // The order of the candidates is not defined in hardware
22  // although, in the case of the emulator they may always be in
23  // the descending order of rank
24 
25  std::vector<unsigned short> getIsolatedEGObjects() {
26  return isolatedEGObjects;
27  }
28  std::vector<unsigned short> getNonisolatedEGObjects() {
29  return nonisolatedEGObjects;
30  }
31 
32  // Region sums 10-bit energy (bits 0-9),overflow (bit 10)
33  // bit 11 is tau bit
34 
35  // Except for the HF regions, the data is only 8-bit wide
36  // packed non-linearly with no interpretation of bits by RCT
37  // However, temporarily, we set this to be 10-bit ET as well
38  // in bits 0-9
39 
40  // The following Jet Summary Card output data are packed
41  // in unsigned 16 bit words although in reality they
42  // are limited to lower number of bits
43 
44  // There are 22 total regions (2 phi x 11 eta) including
45  // HB, HE and HF
46 
47  // The data are arranged in the vector such that first
48  // 11 unsigned values are for lower phi and the next
49  // 11 unsigned values are for higher phi in the crate
50 
51  // Further, the order of placement in the vector is such
52  // that the eta decreases from -5 to 0 for crates 0-8
53  // and increases from 0 to +5 for crates 9-17
54 
55  std::vector<unsigned short> getJetRegions() { return jetRegions; }
56  std::vector<unsigned short> getBarrelRegions() { return barrelRegions; }
57  std::vector<unsigned short> getHFRegions() { return HFRegions; }
58 
59  // Muon bits consist of 14 quiet bits and 14 MIP bits
60  // These are packed into one unsigned short each
61  // The labeling of the bits is in the order
62  // (crdNo0, rgnNo0), (crdNo0, rgnNo1)
63  // (crdNo1, rgnNo0), (crdNo1, rgnNo1)
64  // ...
65  // (crdNo6, rgnNo0), (crdNo6, rgnNo1)
66  // The same ordering is true for Quiet bits also
67 
68  unsigned short getMIPBits() { return mipBits; }
69  unsigned short getQuietBits() { return quietBits; }
70 
71  unsigned short getTauBits() { return tauBits; }
72  unsigned short getOverFlowBits() { return overFlowBits; }
73 
74  std::vector<unsigned short> getHFFineGrainBits() { return hfFineGrainBits; }
75 
76  void fillHFRegionSums(const std::vector<unsigned short> &hfRegionSums);
77  void fillRegionSums(const std::vector<unsigned short> &regSums) {
78  barrelRegions = regSums;
79  }
80  void fillJetRegions();
81 
82  void fillIsolatedEGObjects(const std::vector<unsigned short> &isoElectrons);
83  void
84  fillNonIsolatedEGObjects(const std::vector<unsigned short> &nonIsoElectrons);
85 
86  void fillMIPBits(const std::vector<unsigned short> &mip);
87  void fillTauBits(const std::vector<unsigned short> &tau);
88  void fillOverFlowBits(const std::vector<unsigned short> &overflow);
89  void fillQuietBits();
90 
91  void print();
92 
93 private:
94  int crtNo;
95 
97 
98  std::vector<unsigned short> isolatedEGObjects;
99  std::vector<unsigned short> nonisolatedEGObjects;
100  std::vector<unsigned short> jetRegions;
101 
102  std::vector<unsigned short> HFRegions; // 8-bit et + fine grain?
103  std::vector<unsigned short>
104  barrelRegions; // no, this is 10-bit et, not
105  // (activityBit)(etIn9Bits)(HE_FGBit)(etIn7Bits)
106 
107  unsigned short mipBits;
108  unsigned short quietBits;
109  unsigned short tauBits;
110  unsigned short overFlowBits;
111 
112  std::vector<unsigned short> hfFineGrainBits;
113 
114  // unsigned quietThreshold;
117 
118  void asicSort(std::vector<unsigned short> &electrons);
119  void asicCompare(std::vector<unsigned short> &array);
120 
121  // Disabled constructors and operators
122 
123  L1RCTJetSummaryCard() = delete;
124 };
125 #endif
unsigned short overFlowBits
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
unsigned short getQuietBits()
std::vector< unsigned short > nonisolatedEGObjects
std::vector< unsigned short > getJetRegions()
unsigned short getTauBits()
std::vector< unsigned short > isolatedEGObjects
std::vector< unsigned short > HFRegions
void fillRegionSums(const std::vector< unsigned short > &regSums)
void asicCompare(std::vector< unsigned short > &array)
void fillOverFlowBits(const std::vector< unsigned short > &overflow)
void fillHFRegionSums(const std::vector< unsigned short > &hfRegionSums)
std::vector< unsigned short > jetRegions
std::vector< unsigned short > barrelRegions
unsigned short getMIPBits()
std::vector< unsigned short > getNonisolatedEGObjects()
std::vector< unsigned short > getBarrelRegions()
std::vector< unsigned short > getHFFineGrainBits()
unsigned short getOverFlowBits()
std::vector< unsigned short > getIsolatedEGObjects()
std::vector< unsigned short > getHFRegions()
void fillTauBits(const std::vector< unsigned short > &tau)
void asicSort(std::vector< unsigned short > &electrons)
std::vector< unsigned short > hfFineGrainBits
void fillNonIsolatedEGObjects(const std::vector< unsigned short > &nonIsoElectrons)
void fillMIPBits(const std::vector< unsigned short > &mip)
L1RCTJetSummaryCard()=delete
const L1RCTLookupTables * rctLookupTables_