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
L1RCTJetSummaryCard::mipBits
unsigned short mipBits
Definition: L1RCTJetSummaryCard.h:99
L1RCTJetSummaryCard::quietThresholdEndcap
unsigned quietThresholdEndcap
Definition: L1RCTJetSummaryCard.h:108
L1RCTJetSummaryCard::getMIPBits
unsigned short getMIPBits()
Definition: L1RCTJetSummaryCard.h:64
metsig::tau
Definition: SignAlgoResolutions.h:49
L1RCTJetSummaryCard::asicCompare
void asicCompare(std::vector< unsigned short > &array)
Definition: L1RCTJetSummaryCard.cc:257
L1RCTJetSummaryCard::getBarrelRegions
std::vector< unsigned short > getBarrelRegions()
Definition: L1RCTJetSummaryCard.h:52
mps_check.array
array
Definition: mps_check.py:216
L1RCTJetSummaryCard::getHFRegions
std::vector< unsigned short > getHFRegions()
Definition: L1RCTJetSummaryCard.h:53
L1RCTJetSummaryCard::L1RCTJetSummaryCard
L1RCTJetSummaryCard()=delete
L1RCTJetSummaryCard::crtNo
int crtNo
Definition: L1RCTJetSummaryCard.h:87
L1RCTJetSummaryCard::overFlowBits
unsigned short overFlowBits
Definition: L1RCTJetSummaryCard.h:102
L1RCTJetSummaryCard::hfFineGrainBits
std::vector< unsigned short > hfFineGrainBits
Definition: L1RCTJetSummaryCard.h:104
L1RCTJetSummaryCard::nonisolatedEGObjects
std::vector< unsigned short > nonisolatedEGObjects
Definition: L1RCTJetSummaryCard.h:92
L1RCTJetSummaryCard
Definition: L1RCTJetSummaryCard.h:8
L1RCTJetSummaryCard::quietBits
unsigned short quietBits
Definition: L1RCTJetSummaryCard.h:100
L1RCTLookupTables
Definition: L1RCTLookupTables.h:11
L1RCTJetSummaryCard::fillTauBits
void fillTauBits(const std::vector< unsigned short > &tau)
Definition: L1RCTJetSummaryCard.cc:174
L1RCTJetSummaryCard::asicSort
void asicSort(std::vector< unsigned short > &electrons)
Definition: L1RCTJetSummaryCard.cc:213
L1RCTJetSummaryCard::getJetRegions
std::vector< unsigned short > getJetRegions()
Definition: L1RCTJetSummaryCard.h:51
L1RCTJetSummaryCard::fillOverFlowBits
void fillOverFlowBits(const std::vector< unsigned short > &overflow)
Definition: L1RCTJetSummaryCard.cc:181
L1RCTJetSummaryCard::getOverFlowBits
unsigned short getOverFlowBits()
Definition: L1RCTJetSummaryCard.h:68
L1RCTJetSummaryCard::fillHFRegionSums
void fillHFRegionSums(const std::vector< unsigned short > &hfRegionSums)
Definition: L1RCTJetSummaryCard.cc:29
L1RCTJetSummaryCard::jetRegions
std::vector< unsigned short > jetRegions
Definition: L1RCTJetSummaryCard.h:93
L1RCTJetSummaryCard::isolatedEGObjects
std::vector< unsigned short > isolatedEGObjects
Definition: L1RCTJetSummaryCard.h:91
L1RCTJetSummaryCard::crateNumber
int crateNumber()
Definition: L1RCTJetSummaryCard.h:15
L1RCTJetSummaryCard::getQuietBits
unsigned short getQuietBits()
Definition: L1RCTJetSummaryCard.h:65
L1RCTJetSummaryCard::fillIsolatedEGObjects
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
Definition: L1RCTJetSummaryCard.cc:85
L1RCTJetSummaryCard::fillQuietBits
void fillQuietBits()
Definition: L1RCTJetSummaryCard.cc:188
pwdgSkimBPark_cfi.electrons
electrons
Definition: pwdgSkimBPark_cfi.py:6
L1RCTJetSummaryCard::print
void print()
Definition: L1RCTJetSummaryCard.cc:273
L1RCTJetSummaryCard::getHFFineGrainBits
std::vector< unsigned short > getHFFineGrainBits()
Definition: L1RCTJetSummaryCard.h:70
L1RCTJetSummaryCard::fillJetRegions
void fillJetRegions()
Definition: L1RCTJetSummaryCard.cc:40
L1RCTJetSummaryCard::rctLookupTables_
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCTJetSummaryCard.h:89
L1RCTJetSummaryCard::HFRegions
std::vector< unsigned short > HFRegions
Definition: L1RCTJetSummaryCard.h:95
L1RCTJetSummaryCard::fillRegionSums
void fillRegionSums(const std::vector< unsigned short > &regSums)
Definition: L1RCTJetSummaryCard.h:73
L1RCTJetSummaryCard::barrelRegions
std::vector< unsigned short > barrelRegions
Definition: L1RCTJetSummaryCard.h:96
L1RCTJetSummaryCard::tauBits
unsigned short tauBits
Definition: L1RCTJetSummaryCard.h:101
L1RCTJetSummaryCard::fillNonIsolatedEGObjects
void fillNonIsolatedEGObjects(const std::vector< unsigned short > &nonIsoElectrons)
Definition: L1RCTJetSummaryCard.cc:126
L1RCTJetSummaryCard::fillMIPBits
void fillMIPBits(const std::vector< unsigned short > &mip)
Definition: L1RCTJetSummaryCard.cc:167
L1RCTJetSummaryCard::getIsolatedEGObjects
std::vector< unsigned short > getIsolatedEGObjects()
Definition: L1RCTJetSummaryCard.h:25
L1RCTJetSummaryCard::quietThresholdBarrel
unsigned quietThresholdBarrel
Definition: L1RCTJetSummaryCard.h:107
L1RCTJetSummaryCard::getNonisolatedEGObjects
std::vector< unsigned short > getNonisolatedEGObjects()
Definition: L1RCTJetSummaryCard.h:26
L1RCTJetSummaryCard::getTauBits
unsigned short getTauBits()
Definition: L1RCTJetSummaryCard.h:67