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