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() { return isolatedEGObjects; }
26  std::vector<unsigned short> getNonisolatedEGObjects() { return nonisolatedEGObjects; }
27 
28  // Region sums 10-bit energy (bits 0-9),overflow (bit 10)
29  // bit 11 is tau bit
30 
31  // Except for the HF regions, the data is only 8-bit wide
32  // packed non-linearly with no interpretation of bits by RCT
33  // However, temporarily, we set this to be 10-bit ET as well
34  // in bits 0-9
35 
36  // The following Jet Summary Card output data are packed
37  // in unsigned 16 bit words although in reality they
38  // are limited to lower number of bits
39 
40  // There are 22 total regions (2 phi x 11 eta) including
41  // HB, HE and HF
42 
43  // The data are arranged in the vector such that first
44  // 11 unsigned values are for lower phi and the next
45  // 11 unsigned values are for higher phi in the crate
46 
47  // Further, the order of placement in the vector is such
48  // that the eta decreases from -5 to 0 for crates 0-8
49  // and increases from 0 to +5 for crates 9-17
50 
51  std::vector<unsigned short> getJetRegions() { return jetRegions; }
52  std::vector<unsigned short> getBarrelRegions() { return barrelRegions; }
53  std::vector<unsigned short> getHFRegions() { return HFRegions; }
54 
55  // Muon bits consist of 14 quiet bits and 14 MIP bits
56  // These are packed into one unsigned short each
57  // The labeling of the bits is in the order
58  // (crdNo0, rgnNo0), (crdNo0, rgnNo1)
59  // (crdNo1, rgnNo0), (crdNo1, rgnNo1)
60  // ...
61  // (crdNo6, rgnNo0), (crdNo6, rgnNo1)
62  // The same ordering is true for Quiet bits also
63 
64  unsigned short getMIPBits() { return mipBits; }
65  unsigned short getQuietBits() { return quietBits; }
66 
67  unsigned short getTauBits() { return tauBits; }
68  unsigned short getOverFlowBits() { return overFlowBits; }
69 
70  std::vector<unsigned short> getHFFineGrainBits() { return hfFineGrainBits; }
71 
72  void fillHFRegionSums(const std::vector<unsigned short> &hfRegionSums);
73  void fillRegionSums(const std::vector<unsigned short> &regSums) { barrelRegions = regSums; }
74  void fillJetRegions();
75 
76  void fillIsolatedEGObjects(const std::vector<unsigned short> &isoElectrons);
77  void fillNonIsolatedEGObjects(const std::vector<unsigned short> &nonIsoElectrons);
78 
79  void fillMIPBits(const std::vector<unsigned short> &mip);
80  void fillTauBits(const std::vector<unsigned short> &tau);
81  void fillOverFlowBits(const std::vector<unsigned short> &overflow);
82  void fillQuietBits();
83 
84  void print();
85 
86 private:
87  int crtNo;
88 
90 
91  std::vector<unsigned short> isolatedEGObjects;
92  std::vector<unsigned short> nonisolatedEGObjects;
93  std::vector<unsigned short> jetRegions;
94 
95  std::vector<unsigned short> HFRegions; // 8-bit et + fine grain?
96  std::vector<unsigned short> barrelRegions; // no, this is 10-bit et, not
97  // (activityBit)(etIn9Bits)(HE_FGBit)(etIn7Bits)
98 
99  unsigned short mipBits;
100  unsigned short quietBits;
101  unsigned short tauBits;
102  unsigned short overFlowBits;
103 
104  std::vector<unsigned short> hfFineGrainBits;
105 
106  // unsigned quietThreshold;
109 
110  void asicSort(std::vector<unsigned short> &electrons);
111  void asicCompare(std::vector<unsigned short> &array);
112 
113  // Disabled constructors and operators
114 
115  L1RCTJetSummaryCard() = delete;
116 };
117 #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_