Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-04 02:02:47

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 // This class handles the electron isolation card.  Duh.
0011 // Each card has a crate and a cardnumber to identify it when
0012 // being called.
0013 // The class does not actually have instances of L1RCTRegions but
0014 // rather has pointers to regions that were created in L1RCTReceiverCard
0015 // for efficiency purposes.
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 &region) { regions.at(i) = region; }
0030   // Valid arguments to the following two functions are 0 or 1,
0031   // corresponding to region0 or region1
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 &region, 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;   // changed from int
0050   unsigned short cardNo;  // changed from int
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