CMS 3D CMS Logo

L1RCTElectronIsolationCard.h
Go to the documentation of this file.
1 #ifndef L1RCTElectronIsolationCard_h
2 #define L1RCTElectronIsolationCard_h
3 
5 #include <iostream>
6 #include <vector>
7 
9 
10 // This class handles the electron isolation card. Duh.
11 // Each card has a crate and a cardnumber to identify it when
12 // being called.
13 // The class does not actually have instances of L1RCTRegions but
14 // rather has pointers to regions that were created in L1RCTReceiverCard
15 // for efficiency purposes.
16 
17 class L1RCTLookupTables;
18 
20 public:
21  L1RCTElectronIsolationCard(int crateNumber, int cardNumber, const L1RCTLookupTables *rctLookupTables);
22  L1RCTElectronIsolationCard() = delete;
24 
25  int crateNumber() { return crtNo; }
26  int cardNumber() { return cardNo; }
27 
29  void setRegion(int i, const L1RCTRegion &region) { regions.at(i) = region; }
30  // Valid arguments to the following two functions are 0 or 1,
31  // corresponding to region0 or region1
32  unsigned short getIsoElectrons(int i) { return isoElectrons.at(i); }
33 
34  unsigned short getNonIsoElectrons(int i) { return nonIsoElectrons.at(i); }
35  void print();
36  void printEdges() {
37  regions.at(0).printEdges();
38  regions.at(1).printEdges();
39  }
40 
41 private:
42  std::vector<unsigned short> calcElectronCandidates(const L1RCTRegion &region, int regionNum);
43  unsigned short calcMaxSum(unsigned short primaryEt,
44  unsigned short northEt,
45  unsigned short southEt,
46  unsigned short eastEt,
47  unsigned short westEt);
48 
49  unsigned short crtNo; // changed from int
50  unsigned short cardNo; // changed from int
51 
53 
55 
56  std::vector<unsigned short> isoElectrons;
57  std::vector<unsigned short> nonIsoElectrons;
58  std::vector<L1RCTRegion> regions;
59 };
60 
61 #endif
void setRegion(int i, const L1RCTRegion &region)
std::vector< L1RCTRegion > regions
const L1RCTLookupTables * rctLookupTables_
unsigned short getNonIsoElectrons(int i)
std::vector< unsigned short > nonIsoElectrons
std::vector< unsigned short > isoElectrons
std::vector< unsigned short > calcElectronCandidates(const L1RCTRegion &region, int regionNum)
unsigned short calcMaxSum(unsigned short primaryEt, unsigned short northEt, unsigned short southEt, unsigned short eastEt, unsigned short westEt)