CMS 3D CMS Logo

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