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 
21 public:
23  const L1RCTLookupTables *rctLookupTables);
25 
26  int crateNumber() { return crtNo; }
27  int cardNumber() { return cardNo; }
28 
30  void setRegion(int i, const L1RCTRegion &region) { regions.at(i) = region; }
31  // Valid arguments to the following two functions are 0 or 1,
32  // corresponding to region0 or region1
33  unsigned short getIsoElectrons(int i) { return isoElectrons.at(i); }
34 
35  unsigned short getNonIsoElectrons(int i) { return nonIsoElectrons.at(i); }
36  void print();
37  void printEdges() {
38  regions.at(0).printEdges();
39  regions.at(1).printEdges();
40  }
41 
42 private:
43  std::vector<unsigned short> calcElectronCandidates(const L1RCTRegion &region,
44  int regionNum);
45  unsigned short calcMaxSum(unsigned short primaryEt, unsigned short northEt,
46  unsigned short southEt, 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  L1RCTElectronIsolationCard() = delete;
61 };
62 
63 #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)