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