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 }
L1RCTCrate::input
void input(const std::vector< std::vector< unsigned short >> &RCInput, const std::vector< unsigned short > &HFInput)
Definition: L1RCTCrate.cc:16
L1RCTCrate::crtNo
int crtNo
Definition: L1RCTCrate.h:77
L1RCTCrate::print
void print()
Definition: L1RCTCrate.cc:79
mps_fire.i
i
Definition: mps_fire.py:428
L1RCTCrate::~L1RCTCrate
~L1RCTCrate()
Definition: L1RCTCrate.cc:14
L1RCTReceiverCard
Definition: L1RCTReceiverCard.h:14
L1RCTCrate::electronCards
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:72
L1RCTCrate::fillElectronIsolationCards
void fillElectronIsolationCards()
Definition: L1RCTCrate.cc:35
L1RCTCrate::receiverCards
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:71
L1RCTLookupTables
Definition: L1RCTLookupTables.h:11
L1RCTJetSummaryCard::fillTauBits
void fillTauBits(const std::vector< unsigned short > &tau)
Definition: L1RCTJetSummaryCard.cc:174
L1RCTJetSummaryCard::fillOverFlowBits
void fillOverFlowBits(const std::vector< unsigned short > &overflow)
Definition: L1RCTJetSummaryCard.cc:181
L1RCTCrate::processJetSummaryCard
void processJetSummaryCard()
Definition: L1RCTCrate.cc:74
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
L1RCTJetSummaryCard::fillHFRegionSums
void fillHFRegionSums(const std::vector< unsigned short > &hfRegionSums)
Definition: L1RCTJetSummaryCard.cc:29
L1RCTLookupTables.h
L1RCTJetSummaryCard::fillIsolatedEGObjects
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
Definition: L1RCTJetSummaryCard.cc:85
L1RCTCrate.h
L1RCTJetSummaryCard::fillQuietBits
void fillQuietBits()
Definition: L1RCTJetSummaryCard.cc:188
L1RCTJetSummaryCard::print
void print()
Definition: L1RCTJetSummaryCard.cc:273
L1RCTCrate::processElectronIsolationCards
void processElectronIsolationCards()
Definition: L1RCTCrate.cc:42
L1RCTJetSummaryCard::fillJetRegions
void fillJetRegions()
Definition: L1RCTJetSummaryCard.cc:40
L1RCTCrate::L1RCTCrate
L1RCTCrate()=delete
L1RCTCrate::processReceiverCards
void processReceiverCards()
Definition: L1RCTCrate.cc:28
L1RCTCrate::jetSummaryCard
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
L1RCTJetSummaryCard::fillRegionSums
void fillRegionSums(const std::vector< unsigned short > &regSums)
Definition: L1RCTJetSummaryCard.h:73
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1RCTJetSummaryCard::fillNonIsolatedEGObjects
void fillNonIsolatedEGObjects(const std::vector< unsigned short > &nonIsoElectrons)
Definition: L1RCTJetSummaryCard.cc:126
L1RCTJetSummaryCard::fillMIPBits
void fillMIPBits(const std::vector< unsigned short > &mip)
Definition: L1RCTJetSummaryCard.cc:167
L1RCTCrate::fillJetSummaryCard
void fillJetSummaryCard()
Definition: L1RCTCrate.cc:46
L1RCTElectronIsolationCard
Definition: L1RCTElectronIsolationCard.h:19