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