CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1RCTCrate Class Reference

#include <L1RCTCrate.h>

Public Member Functions

int crateNumber ()
 
void fillElectronIsolationCards ()
 
void fillJetSummaryCard ()
 
std::vector< unsigned short > getBarrelRegions ()
 
std::vector< unsigned short > getHFFineGrainBits ()
 
std::vector< unsigned short > getHFRegions ()
 
std::vector< unsigned short > getIsolatedEGObjects ()
 
std::vector< unsigned short > getJetRegions ()
 
unsigned short getMIPBits ()
 
std::vector< unsigned short > getNonisolatedEGObjects ()
 
unsigned short getOverFlowBits ()
 
unsigned short getQuietBits ()
 
L1RCTReceiverCardgetReceiverCard (int i)
 
unsigned short getTauBits ()
 
void input (const std::vector< std::vector< unsigned short >> &RCInput, const std::vector< unsigned short > &HFInput)
 
 L1RCTCrate (int crtNo, const L1RCTLookupTables *rctLookupTables)
 
void print ()
 
void printEIC (int i)
 
void printEICEdges (int i)
 
void printJSC ()
 
void printRC (int i)
 
void processElectronIsolationCards ()
 
void processJetSummaryCard ()
 
void processReceiverCards ()
 
 ~L1RCTCrate ()
 

Private Member Functions

 L1RCTCrate ()=delete
 

Private Attributes

int crtNo
 
std::vector< L1RCTElectronIsolationCardelectronCards
 
L1RCTJetSummaryCard jetSummaryCard
 
const L1RCTLookupTablesrctLookupTables_
 
std::vector< L1RCTReceiverCardreceiverCards
 

Detailed Description

Definition at line 11 of file L1RCTCrate.h.

Constructor & Destructor Documentation

L1RCTCrate::L1RCTCrate ( int  crtNo,
const L1RCTLookupTables rctLookupTables 
)

Definition at line 4 of file L1RCTCrate.cc.

References electronCards, mps_fire::i, and receiverCards.

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 }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCTCrate.h:92
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
L1RCTCrate::~L1RCTCrate ( )

Definition at line 15 of file L1RCTCrate.cc.

15 {}
L1RCTCrate::L1RCTCrate ( )
privatedelete

Member Function Documentation

int L1RCTCrate::crateNumber ( )
inline

Definition at line 18 of file L1RCTCrate.h.

References crtNo.

18 { return crtNo; }
void L1RCTCrate::fillElectronIsolationCards ( )

Definition at line 36 of file L1RCTCrate.cc.

References electronCards, mps_fire::i, and receiverCards.

Referenced by getReceiverCard().

36  {
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 }
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
void L1RCTCrate::fillJetSummaryCard ( )

Definition at line 47 of file L1RCTCrate.cc.

References electronCards, L1RCTJetSummaryCard::fillIsolatedEGObjects(), L1RCTJetSummaryCard::fillMIPBits(), L1RCTJetSummaryCard::fillNonIsolatedEGObjects(), L1RCTJetSummaryCard::fillOverFlowBits(), L1RCTJetSummaryCard::fillRegionSums(), L1RCTJetSummaryCard::fillTauBits(), mps_fire::i, jetSummaryCard, and receiverCards.

Referenced by getReceiverCard().

47  {
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 }
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
void fillRegionSums(const std::vector< unsigned short > &regSums)
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
void fillOverFlowBits(const std::vector< unsigned short > &overflow)
void fillTauBits(const std::vector< unsigned short > &tau)
void fillNonIsolatedEGObjects(const std::vector< unsigned short > &nonIsoElectrons)
void fillMIPBits(const std::vector< unsigned short > &mip)
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
std::vector<unsigned short> L1RCTCrate::getBarrelRegions ( )
inline

Definition at line 54 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getBarrelRegions(), and jetSummaryCard.

54  {
56  }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< unsigned short > getBarrelRegions()
std::vector<unsigned short> L1RCTCrate::getHFFineGrainBits ( )
inline

Definition at line 75 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getHFFineGrainBits(), and jetSummaryCard.

75  {
77  }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< unsigned short > getHFFineGrainBits()
std::vector<unsigned short> L1RCTCrate::getHFRegions ( )
inline

Definition at line 57 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getHFRegions(), and jetSummaryCard.

57  {
59  }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< unsigned short > getHFRegions()
std::vector<unsigned short> L1RCTCrate::getIsolatedEGObjects ( )
inline

Definition at line 62 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getIsolatedEGObjects(), and jetSummaryCard.

62  {
64  }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< unsigned short > getIsolatedEGObjects()
std::vector<unsigned short> L1RCTCrate::getJetRegions ( )
inline

Definition at line 51 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getJetRegions(), and jetSummaryCard.

51  {
53  }
std::vector< unsigned short > getJetRegions()
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
unsigned short L1RCTCrate::getMIPBits ( )
inline

Definition at line 71 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getMIPBits(), and jetSummaryCard.

71 { return jetSummaryCard.getMIPBits(); }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
unsigned short getMIPBits()
std::vector<unsigned short> L1RCTCrate::getNonisolatedEGObjects ( )
inline

Definition at line 65 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getNonisolatedEGObjects(), and jetSummaryCard.

65  {
67  }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< unsigned short > getNonisolatedEGObjects()
unsigned short L1RCTCrate::getOverFlowBits ( )
inline

Definition at line 72 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getOverFlowBits(), and jetSummaryCard.

72 { return jetSummaryCard.getOverFlowBits(); }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
unsigned short getOverFlowBits()
unsigned short L1RCTCrate::getQuietBits ( )
inline

Definition at line 73 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getQuietBits(), and jetSummaryCard.

73 { return jetSummaryCard.getQuietBits(); }
unsigned short getQuietBits()
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
L1RCTReceiverCard* L1RCTCrate::getReceiverCard ( int  i)
inline
unsigned short L1RCTCrate::getTauBits ( )
inline

Definition at line 70 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getTauBits(), and jetSummaryCard.

70 { return jetSummaryCard.getTauBits(); }
unsigned short getTauBits()
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
void L1RCTCrate::input ( const std::vector< std::vector< unsigned short >> &  RCInput,
const std::vector< unsigned short > &  HFInput 
)

Definition at line 17 of file L1RCTCrate.cc.

References L1RCTJetSummaryCard::fillHFRegionSums(), mps_fire::i, jetSummaryCard, and receiverCards.

Referenced by getReceiverCard().

18  {
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 }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
void fillHFRegionSums(const std::vector< unsigned short > &hfRegionSums)
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
void L1RCTCrate::print ( void  )

Definition at line 82 of file L1RCTCrate.cc.

References electronCards, mps_fire::i, jetSummaryCard, L1RCTJetSummaryCard::print(), and receiverCards.

Referenced by getReceiverCard().

82  {
83  for (int i = 0; i < 7; i++) {
84  receiverCards.at(i).print();
85  electronCards.at(i).print();
86  }
88 }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
void L1RCTCrate::printEIC ( int  i)
inline

Definition at line 47 of file L1RCTCrate.h.

References electronCards.

47 { electronCards.at(i).print(); }
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
void L1RCTCrate::printEICEdges ( int  i)
inline

Definition at line 48 of file L1RCTCrate.h.

References electronCards.

48 { electronCards.at(i).printEdges(); }
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
void L1RCTCrate::printJSC ( )
inline

Definition at line 45 of file L1RCTCrate.h.

References jetSummaryCard, and L1RCTJetSummaryCard::print().

45 { jetSummaryCard.print(); }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:89
void L1RCTCrate::printRC ( int  i)
inline

Definition at line 46 of file L1RCTCrate.h.

References receiverCards.

46 { receiverCards.at(i).print(); }
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85
void L1RCTCrate::processElectronIsolationCards ( )

Definition at line 43 of file L1RCTCrate.cc.

References electronCards, and mps_fire::i.

Referenced by getReceiverCard().

43  {
44  for (int i = 0; i < 7; i++)
45  electronCards.at(i).fillElectronCandidates();
46 }
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:86
void L1RCTCrate::processJetSummaryCard ( )
void L1RCTCrate::processReceiverCards ( )

Definition at line 29 of file L1RCTCrate.cc.

References mps_fire::i, and receiverCards.

Referenced by getReceiverCard().

29  {
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 }
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:85

Member Data Documentation

int L1RCTCrate::crtNo
private

Definition at line 91 of file L1RCTCrate.h.

Referenced by crateNumber().

std::vector<L1RCTElectronIsolationCard> L1RCTCrate::electronCards
private
L1RCTJetSummaryCard L1RCTCrate::jetSummaryCard
private
const L1RCTLookupTables* L1RCTCrate::rctLookupTables_
private

Definition at line 92 of file L1RCTCrate.h.

std::vector<L1RCTReceiverCard> L1RCTCrate::receiverCards
private