00001 #ifndef L1RCTElectronIsolationCard_h 00002 #define L1RCTElectronIsolationCard_h 00003 00004 #include <vector> 00005 #include <iostream> 00006 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTRegion.h" 00007 00008 #include "DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h" 00009 00010 //This class handles the electron isolation card. Duh. 00011 //Each card has a crate and a cardnumber to identify it when 00012 //being called. 00013 //The class does not actually have instances of L1RCTRegions but 00014 //rather has pointers to regions that were created in L1RCTReceiverCard 00015 //for efficiency purposes. 00016 00017 class L1RCTLookupTables; 00018 00019 class L1RCTElectronIsolationCard { 00020 00021 public: 00022 00023 L1RCTElectronIsolationCard(int crateNumber, 00024 int cardNumber, 00025 const L1RCTLookupTables *rctLookupTables); 00026 ~L1RCTElectronIsolationCard(); 00027 00028 int crateNumber() {return crtNo;} 00029 int cardNumber() {return cardNo;} 00030 00031 void fillElectronCandidates(); 00032 void setRegion(int i, const L1RCTRegion& region){ 00033 regions.at(i) = region; 00034 } 00035 //Valid arguments to the following two functions are 0 or 1, 00036 //corresponding to region0 or region1 00037 unsigned short getIsoElectrons(int i) { 00038 return isoElectrons.at(i); 00039 } 00040 00041 unsigned short getNonIsoElectrons(int i) { 00042 return nonIsoElectrons.at(i); 00043 } 00044 void print(); 00045 void printEdges(){ 00046 regions.at(0).printEdges(); 00047 regions.at(1).printEdges(); 00048 } 00049 00050 private: 00051 std::vector<unsigned short> calcElectronCandidates(const L1RCTRegion& region, int regionNum); 00052 unsigned short calcMaxSum(unsigned short primaryEt,unsigned short northEt, 00053 unsigned short southEt, unsigned short eastEt, 00054 unsigned short westEt); 00055 00056 unsigned short crtNo; // changed from int 00057 unsigned short cardNo; // changed from int 00058 00059 const L1RCTLookupTables* rctLookupTables_; 00060 00061 L1RCTRegion empty; 00062 00063 std::vector<unsigned short> isoElectrons; 00064 std::vector<unsigned short> nonIsoElectrons; 00065 std::vector<L1RCTRegion> regions; 00066 00067 L1RCTElectronIsolationCard(); 00068 }; 00069 00070 #endif