CMS 3D CMS Logo

L1RCTCrate.cc
Go to the documentation of this file.
3 
4 L1RCTCrate::L1RCTCrate(int crtNo, const L1RCTLookupTables *rctLookupTables)
5  : jetSummaryCard(crtNo, rctLookupTables), crtNo(crtNo),
6  rctLookupTables_(rctLookupTables) {
7  for (int i = 0; i < 7; i++) {
8  L1RCTReceiverCard rc(crtNo, i, rctLookupTables);
9  L1RCTElectronIsolationCard eic(crtNo, i, rctLookupTables);
10  receiverCards.push_back(rc);
11  electronCards.push_back(eic);
12  }
13 }
14 
16 
17 void L1RCTCrate::input(const std::vector<std::vector<unsigned short>> &RCInput,
18  const std::vector<unsigned short> &HFInput) {
19  // std::cout << "Crate.input() entered" << std::endl;
20  for (int i = 0; i < 7; i++) {
21  // std::cout << "calling RC.fillInput() for RC " << i << std::endl;
22  receiverCards.at(i).fillInput(RCInput.at(i));
23  // std::cout << "RC " << i << " filled" << std::endl;
24  }
25  // std::cout << "calling JSC.fillHFRegionSums()" << std::endl;
27  // std::cout << "JSC.fillHF called" << std::endl;
28 }
30  for (int i = 0; i < 7; i++) {
31  receiverCards.at(i).fillTauBits();
32  receiverCards.at(i).fillRegionSums();
33  receiverCards.at(i).fillMuonBits();
34  }
35 }
37  for (int i = 0; i < 7; i++) {
38  for (int j = 0; j < 2; j++) {
39  electronCards.at(i).setRegion(j, *receiverCards.at(i).getRegion(j));
40  }
41  }
42 }
44  for (int i = 0; i < 7; i++)
45  electronCards.at(i).fillElectronCandidates();
46 }
48  std::vector<unsigned short> barrelSums(14);
49  std::vector<unsigned short> isoElectrons(14);
50  std::vector<unsigned short> nonIsoElectrons(14);
51  std::vector<unsigned short> mipBits(14);
52  std::vector<unsigned short> overFlowBits(14);
53  std::vector<unsigned short> tauBits(14);
54  for (int i = 0; i < 7; i++) {
55  mipBits.at(2 * i) = receiverCards.at(i).getMuonBitRegion(0);
56  mipBits.at(2 * i + 1) = receiverCards.at(i).getMuonBitRegion(1);
57  isoElectrons.at(2 * i) = electronCards.at(i).getIsoElectrons(0);
58  isoElectrons.at(2 * i + 1) =
59  electronCards.at(i).getIsoElectrons(1) + 1; // the +1 adds region info
60  nonIsoElectrons.at(2 * i) = electronCards.at(i).getNonIsoElectrons(0);
61  nonIsoElectrons.at(2 * i + 1) =
62  electronCards.at(i).getNonIsoElectrons(1) + 1; // +1 adds region info
63  barrelSums.at(2 * i) = receiverCards.at(i).getEtIn10BitsRegion(0);
64  barrelSums.at(2 * i + 1) = receiverCards.at(i).getEtIn10BitsRegion(1);
65  overFlowBits.at(2 * i) = receiverCards.at(i).getOverFlowBitRegion(0);
66  overFlowBits.at(2 * i + 1) = receiverCards.at(i).getOverFlowBitRegion(1);
67  tauBits.at(2 * i) = receiverCards.at(i).getTauBitRegion(0);
68  tauBits.at(2 * i + 1) = receiverCards.at(i).getTauBitRegion(1);
69  }
72  jetSummaryCard.fillRegionSums(barrelSums);
73  jetSummaryCard.fillMIPBits(mipBits);
74  jetSummaryCard.fillTauBits(tauBits);
75  jetSummaryCard.fillOverFlowBits(overFlowBits);
76 }
80 }
81 
83  for (int i = 0; i < 7; i++) {
84  receiverCards.at(i).print();
85  electronCards.at(i).print();
86  }
88 }
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
void fillRegionSums(const std::vector< unsigned short > &regSums)
void fillElectronIsolationCards()
Definition: L1RCTCrate.cc:36
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
void processElectronIsolationCards()
Definition: L1RCTCrate.cc:43
void fillOverFlowBits(const std::vector< unsigned short > &overflow)
void fillJetSummaryCard()
Definition: L1RCTCrate.cc:47
void processReceiverCards()
Definition: L1RCTCrate.cc:29
void fillHFRegionSums(const std::vector< unsigned short > &hfRegionSums)
void processJetSummaryCard()
Definition: L1RCTCrate.cc:77
void fillTauBits(const std::vector< unsigned short > &tau)
L1RCTCrate()=delete
void print()
Definition: L1RCTCrate.cc:82
void fillNonIsolatedEGObjects(const std::vector< unsigned short > &nonIsoElectrons)
void fillMIPBits(const std::vector< unsigned short > &mip)
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
void input(const std::vector< std::vector< unsigned short >> &RCInput, const std::vector< unsigned short > &HFInput)
Definition: L1RCTCrate.cc:17
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86