00001 #ifndef L1RCTJetSummaryCard_h 00002 #define L1RCTJetSummaryCard_h 00003 00004 #include <vector> 00005 00006 class L1RCTLookupTables; 00007 00008 class L1RCTJetSummaryCard 00009 { 00010 public: 00011 00012 //There is no default constructor. 00013 //It is required to have a crate number attached to it 00014 //for bookeeping purposes. 00015 L1RCTJetSummaryCard(int crtNo, const L1RCTLookupTables* rctLookupTables); 00016 00017 int crateNumber() {return crtNo;} 00018 00019 // eGamma Objects 00020 // The object is defined by a 6 bit rank (temporarily set to 7 bit linear ET) 00021 // And a position defined by (crdNo and rgnNo) 00022 // The top four from each crate are returned 00023 // The order of the candidates is not defined in hardware 00024 // although, in the case of the emulator they may always be in 00025 // the descending order of rank 00026 00027 std::vector<unsigned short> getIsolatedEGObjects() {return isolatedEGObjects;} 00028 std::vector<unsigned short> getNonisolatedEGObjects() {return nonisolatedEGObjects;} 00029 00030 // Region sums 10-bit energy (bits 0-9),overflow (bit 10) 00031 // bit 11 is tau bit 00032 00033 // Except for the HF regions, the data is only 8-bit wide 00034 // packed non-linearly with no interpretation of bits by RCT 00035 // However, temporarily, we set this to be 10-bit ET as well 00036 // in bits 0-9 00037 00038 // The following Jet Summary Card output data are packed 00039 // in unsigned 16 bit words although in reality they 00040 // are limited to lower number of bits 00041 00042 // There are 22 total regions (2 phi x 11 eta) including 00043 // HB, HE and HF 00044 00045 // The data are arranged in the vector such that first 00046 // 11 unsigned values are for lower phi and the next 00047 // 11 unsigned values are for higher phi in the crate 00048 00049 // Further, the order of placement in the vector is such 00050 // that the eta decreases from -5 to 0 for crates 0-8 00051 // and increases from 0 to +5 for crates 9-17 00052 00053 std::vector<unsigned short> getJetRegions() {return jetRegions;} 00054 std::vector<unsigned short> getBarrelRegions() {return barrelRegions;} 00055 std::vector<unsigned short> getHFRegions() {return HFRegions;} 00056 00057 // Muon bits consist of 14 quiet bits and 14 MIP bits 00058 // These are packed into one unsigned short each 00059 // The labeling of the bits is in the order 00060 // (crdNo0, rgnNo0), (crdNo0, rgnNo1) 00061 // (crdNo1, rgnNo0), (crdNo1, rgnNo1) 00062 // ... 00063 // (crdNo6, rgnNo0), (crdNo6, rgnNo1) 00064 // The same ordering is true for Quiet bits also 00065 00066 unsigned short getMIPBits() {return mipBits;} 00067 unsigned short getQuietBits() {return quietBits;} 00068 00069 unsigned short getTauBits() {return tauBits;} 00070 unsigned short getOverFlowBits() {return overFlowBits;} 00071 00072 std::vector<unsigned short> getHFFineGrainBits() {return hfFineGrainBits;} 00073 00074 void fillHFRegionSums(std::vector<unsigned short> hfRegionSums); 00075 void fillRegionSums(std::vector<unsigned short> regSums){ 00076 barrelRegions = regSums; 00077 } 00078 void fillJetRegions(); 00079 00080 void fillIsolatedEGObjects(std::vector<unsigned short> isoElectrons); 00081 void fillNonIsolatedEGObjects(std::vector<unsigned short> nonIsoElectrons); 00082 00083 void fillMIPBits(std::vector<unsigned short> mip); 00084 void fillTauBits(std::vector<unsigned short> tau); 00085 void fillOverFlowBits(std::vector<unsigned short> overflow); 00086 void fillQuietBits(); 00087 00088 void print(); 00089 private: 00090 00091 int crtNo; 00092 00093 const L1RCTLookupTables* rctLookupTables_; 00094 00095 std::vector<unsigned short> isolatedEGObjects; 00096 std::vector<unsigned short> nonisolatedEGObjects; 00097 std::vector<unsigned short> jetRegions; 00098 00099 std::vector<unsigned short> HFRegions; // 8-bit et + fine grain? 00100 std::vector<unsigned short> barrelRegions; // no, this is 10-bit et, not (activityBit)(etIn9Bits)(HE_FGBit)(etIn7Bits) 00101 00102 unsigned short mipBits; 00103 unsigned short quietBits; 00104 unsigned short tauBits; 00105 unsigned short overFlowBits; 00106 00107 std::vector<unsigned short> hfFineGrainBits; 00108 00109 //unsigned quietThreshold; 00110 unsigned quietThresholdBarrel; 00111 unsigned quietThresholdEndcap; 00112 00113 void asicSort(std::vector<unsigned short>& electrons); 00114 void asicCompare(std::vector<unsigned short>& array); 00115 00116 // Disabled constructors and operators 00117 00118 L1RCTJetSummaryCard(); 00119 }; 00120 #endif