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), 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 }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCTCrate.h:78
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:71
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:72
L1RCTCrate::~L1RCTCrate ( )

Definition at line 14 of file L1RCTCrate.cc.

14 {}
L1RCTCrate::L1RCTCrate ( )
privatedelete

Member Function Documentation

int L1RCTCrate::crateNumber ( )
inline

Definition at line 17 of file L1RCTCrate.h.

References crtNo.

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

Definition at line 35 of file L1RCTCrate.cc.

References electronCards, mps_fire::i, dqmiolumiharvest::j, and receiverCards.

Referenced by getReceiverCard().

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

Definition at line 46 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().

46  {
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 }
void fillIsolatedEGObjects(const std::vector< unsigned short > &isoElectrons)
void fillRegionSums(const std::vector< unsigned short > &regSums)
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
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:71
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:72
std::vector<unsigned short> L1RCTCrate::getBarrelRegions ( )
inline

Definition at line 50 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getBarrelRegions(), and jetSummaryCard.

50 { return jetSummaryCard.getBarrelRegions(); }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
std::vector< unsigned short > getBarrelRegions()
std::vector<unsigned short> L1RCTCrate::getHFFineGrainBits ( )
inline

Definition at line 63 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getHFFineGrainBits(), and jetSummaryCard.

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

Definition at line 51 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getHFRegions(), and jetSummaryCard.

51 { return jetSummaryCard.getHFRegions(); }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
std::vector< unsigned short > getHFRegions()
std::vector<unsigned short> L1RCTCrate::getIsolatedEGObjects ( )
inline

Definition at line 54 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getIsolatedEGObjects(), and jetSummaryCard.

L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
std::vector< unsigned short > getIsolatedEGObjects()
std::vector<unsigned short> L1RCTCrate::getJetRegions ( )
inline

Definition at line 49 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getJetRegions(), and jetSummaryCard.

49 { return jetSummaryCard.getJetRegions(); }
std::vector< unsigned short > getJetRegions()
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
unsigned short L1RCTCrate::getMIPBits ( )
inline

Definition at line 59 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getMIPBits(), and jetSummaryCard.

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

Definition at line 55 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getNonisolatedEGObjects(), and jetSummaryCard.

L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
std::vector< unsigned short > getNonisolatedEGObjects()
unsigned short L1RCTCrate::getOverFlowBits ( )
inline

Definition at line 60 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getOverFlowBits(), and jetSummaryCard.

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

Definition at line 61 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getQuietBits(), and jetSummaryCard.

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

Definition at line 58 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getTauBits(), and jetSummaryCard.

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

Definition at line 16 of file L1RCTCrate.cc.

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

Referenced by getReceiverCard().

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

Definition at line 79 of file L1RCTCrate.cc.

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

Referenced by getReceiverCard().

79  {
80  for (int i = 0; i < 7; i++) {
81  receiverCards.at(i).print();
82  electronCards.at(i).print();
83  }
85 }
L1RCTJetSummaryCard jetSummaryCard
Definition: L1RCTCrate.h:75
std::vector< L1RCTReceiverCard > receiverCards
Definition: L1RCTCrate.h:71
std::vector< L1RCTElectronIsolationCard > electronCards
Definition: L1RCTCrate.h:72
void L1RCTCrate::printEIC ( int  i)
inline

Definition at line 45 of file L1RCTCrate.h.

References electronCards.

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

Definition at line 46 of file L1RCTCrate.h.

References electronCards.

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

Definition at line 43 of file L1RCTCrate.h.

References jetSummaryCard, and L1RCTJetSummaryCard::print().

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

Definition at line 44 of file L1RCTCrate.h.

References receiverCards.

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

Definition at line 42 of file L1RCTCrate.cc.

References electronCards, and mps_fire::i.

Referenced by getReceiverCard().

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

Definition at line 28 of file L1RCTCrate.cc.

References mps_fire::i, and receiverCards.

Referenced by getReceiverCard().

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

Member Data Documentation

int L1RCTCrate::crtNo
private

Definition at line 77 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 78 of file L1RCTCrate.h.

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