File indexing completed on 2024-04-06 12:21:35
0001 #ifndef L1RCTElectronIsolationCard_h
0002 #define L1RCTElectronIsolationCard_h
0003
0004 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTRegion.h"
0005 #include <iostream>
0006 #include <vector>
0007
0008 #include "DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h"
0009
0010
0011
0012
0013
0014
0015
0016
0017 class L1RCTLookupTables;
0018
0019 class L1RCTElectronIsolationCard {
0020 public:
0021 L1RCTElectronIsolationCard(int crateNumber, int cardNumber, const L1RCTLookupTables *rctLookupTables);
0022 L1RCTElectronIsolationCard() = delete;
0023 ~L1RCTElectronIsolationCard();
0024
0025 int crateNumber() { return crtNo; }
0026 int cardNumber() { return cardNo; }
0027
0028 void fillElectronCandidates();
0029 void setRegion(int i, const L1RCTRegion ®ion) { regions.at(i) = region; }
0030
0031
0032 unsigned short getIsoElectrons(int i) { return isoElectrons.at(i); }
0033
0034 unsigned short getNonIsoElectrons(int i) { return nonIsoElectrons.at(i); }
0035 void print();
0036 void printEdges() {
0037 regions.at(0).printEdges();
0038 regions.at(1).printEdges();
0039 }
0040
0041 private:
0042 std::vector<unsigned short> calcElectronCandidates(const L1RCTRegion ®ion, int regionNum);
0043 unsigned short calcMaxSum(unsigned short primaryEt,
0044 unsigned short northEt,
0045 unsigned short southEt,
0046 unsigned short eastEt,
0047 unsigned short westEt);
0048
0049 unsigned short crtNo;
0050 unsigned short cardNo;
0051
0052 const L1RCTLookupTables *rctLookupTables_;
0053
0054 L1RCTRegion empty;
0055
0056 std::vector<unsigned short> isoElectrons;
0057 std::vector<unsigned short> nonIsoElectrons;
0058 std::vector<L1RCTRegion> regions;
0059 };
0060
0061 #endif