CMS 3D CMS Logo

L1RCTCrate.h
Go to the documentation of this file.
1 #ifndef L1RCTCrate_h
2 #define L1RCTCrate_h
3 
7 #include <vector>
8 
10 
11 class L1RCTCrate {
12 public:
13  L1RCTCrate(int crtNo, const L1RCTLookupTables *rctLookupTables);
14 
15  ~L1RCTCrate();
16 
17  int crateNumber() { return crtNo; }
18 
19  // For sharing information between crates.
20  // It passes the pointers to the cards rather than the copies of the cards
21  // because we need to modify the actual regions when setting their
22  // neighbors rather than just copies.
23  // Working in non garbage collected languages can really suck sometimes.
25  // L1RCTJetSummaryCard* getJetSummaryCard { return &jetSummaryCard;}
26 
27  // This method receives the input from the L1RCT class and distributes
28  // the RCInput to the 7 receiver cards and sends the HFInput straight
29  // to the JSC for this crate. The RCs never see the HF data. Instead
30  // the JSC acts like a primitive RC for these regions.
31  void input(const std::vector<std::vector<unsigned short>> &RCInput, const std::vector<unsigned short> &HFInput);
32  // The two following are methods for running the actual data processing
33  // in the RCs and the EICs. They're to be called for each card
34  // from the L1RCT process method
35  void processReceiverCards();
38  // Pulls the information from the RCs and EICs and sends it to the
39  // JSC.
40  void fillJetSummaryCard();
41  void processJetSummaryCard();
42  void print();
44  void printRC(int i) { receiverCards.at(i).print(); }
45  void printEIC(int i) { electronCards.at(i).print(); }
46  void printEICEdges(int i) { electronCards.at(i).printEdges(); }
47 
48  // region sums
49  std::vector<unsigned short> getJetRegions() { return jetSummaryCard.getJetRegions(); }
50  std::vector<unsigned short> getBarrelRegions() { return jetSummaryCard.getBarrelRegions(); }
51  std::vector<unsigned short> getHFRegions() { return jetSummaryCard.getHFRegions(); }
52 
53  // e-gamma objects
54  std::vector<unsigned short> getIsolatedEGObjects() { return jetSummaryCard.getIsolatedEGObjects(); }
55  std::vector<unsigned short> getNonisolatedEGObjects() { return jetSummaryCard.getNonisolatedEGObjects(); }
56 
57  // the bits
58  unsigned short getTauBits() { return jetSummaryCard.getTauBits(); }
59  unsigned short getMIPBits() { return jetSummaryCard.getMIPBits(); }
60  unsigned short getOverFlowBits() { return jetSummaryCard.getOverFlowBits(); }
61  unsigned short getQuietBits() { return jetSummaryCard.getQuietBits(); }
62  // hf bit
63  std::vector<unsigned short> getHFFineGrainBits() { return jetSummaryCard.getHFFineGrainBits(); }
64 
65 private:
66  // The seven RCs and EICs
67  // They are laid out according to CMS IN 2004/008
68  // Increasing number towards higher absolute eta
69  // The seventh card is always sideways with respect to the
70  // other six.
71  std::vector<L1RCTReceiverCard> receiverCards;
72  std::vector<L1RCTElectronIsolationCard> electronCards;
73  // The JSC receives the jet and electron information from the
74  // RCs and EICs. There is only one per crate.
76 
77  int crtNo;
79 
80  L1RCTCrate() = delete;
81 
82  // L1RCTJetCaptureCard jetCaptureCard;
83 };
84 #endif // L1RCTCrate_h
unsigned short getQuietBits()
unsigned short getQuietBits()
Definition: L1RCTCrate.h:61
std::vector< unsigned short > getJetRegions()
unsigned short getTauBits()
std::vector< unsigned short > getBarrelRegions()
Definition: L1RCTCrate.h:50
void fillElectronIsolationCards()
Definition: L1RCTCrate.cc:35
unsigned short getTauBits()
Definition: L1RCTCrate.h:58
std::vector< unsigned short > getIsolatedEGObjects()
Definition: L1RCTCrate.h:54
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
void processElectronIsolationCards()
Definition: L1RCTCrate.cc:42
std::vector< unsigned short > getNonisolatedEGObjects()
Definition: L1RCTCrate.h:55
std::vector< unsigned short > getHFFineGrainBits()
Definition: L1RCTCrate.h:63
void fillJetSummaryCard()
Definition: L1RCTCrate.cc:46
void processReceiverCards()
Definition: L1RCTCrate.cc:28
void printEIC(int i)
Definition: L1RCTCrate.h:45
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCTCrate.h:78
unsigned short getMIPBits()
std::vector< unsigned short > getNonisolatedEGObjects()
std::vector< unsigned short > getBarrelRegions()
void processJetSummaryCard()
Definition: L1RCTCrate.cc:74
std::vector< unsigned short > getHFFineGrainBits()
void printEICEdges(int i)
Definition: L1RCTCrate.h:46
unsigned short getOverFlowBits()
L1RCTReceiverCard * getReceiverCard(int i)
Definition: L1RCTCrate.h:24
std::vector< unsigned short > getIsolatedEGObjects()
std::vector< unsigned short > getHFRegions()
void printRC(int i)
Definition: L1RCTCrate.h:44
unsigned short getMIPBits()
Definition: L1RCTCrate.h:59
int crateNumber()
Definition: L1RCTCrate.h:17
L1RCTCrate()=delete
std::vector< unsigned short > getHFRegions()
Definition: L1RCTCrate.h:51
void print()
Definition: L1RCTCrate.cc:79
void printJSC()
Definition: L1RCTCrate.h:43
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:71
void input(const std::vector< std::vector< unsigned short >> &RCInput, const std::vector< unsigned short > &HFInput)
Definition: L1RCTCrate.cc:16
unsigned short getOverFlowBits()
Definition: L1RCTCrate.h:60
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:72
std::vector< unsigned short > getJetRegions()
Definition: L1RCTCrate.h:49