test
CMS 3D CMS Logo

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