CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

L1RCTCrate Class Reference

#include <L1RCTCrate.h>

List of all members.

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 (std::vector< std::vector< unsigned short > > RCInput, 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 ()

Private Attributes

int crtNo
std::vector
< L1RCTElectronIsolationCard
electronCards
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, i, and receiverCards.

                                                                          : 
  jetSummaryCard(crtNo, rctLookupTables),
  crtNo(crtNo),
  rctLookupTables_(rctLookupTables)
{
  for(int i = 0; i <7; i++){
    L1RCTReceiverCard rc(crtNo,i,rctLookupTables);
    L1RCTElectronIsolationCard eic(crtNo,i,rctLookupTables);
    receiverCards.push_back(rc);
    electronCards.push_back(eic);
  }
}
L1RCTCrate::~L1RCTCrate ( )

Definition at line 17 of file L1RCTCrate.cc.

{

}
L1RCTCrate::L1RCTCrate ( ) [private]

Member Function Documentation

int L1RCTCrate::crateNumber ( ) [inline]

Definition at line 18 of file L1RCTCrate.h.

References crtNo.

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

Definition at line 42 of file L1RCTCrate.cc.

References electronCards, i, j, and receiverCards.

                                           {
  for(int i = 0; i<7; i++){
    for(int j = 0; j<2; j++){
      electronCards.at(i).setRegion(j,*receiverCards.at(i).getRegion(j));
    }
  }
}
void L1RCTCrate::fillJetSummaryCard ( )

Definition at line 53 of file L1RCTCrate.cc.

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

                                   {
  std::vector<unsigned short> barrelSums(14);
  std::vector<unsigned short> isoElectrons(14);
  std::vector<unsigned short> nonIsoElectrons(14);
  std::vector<unsigned short> mipBits(14);
  std::vector<unsigned short> overFlowBits(14);
  std::vector<unsigned short> tauBits(14);
  for(int i = 0; i<7;i++){
    mipBits.at(2*i) = receiverCards.at(i).getMuonBitRegion(0);
    mipBits.at(2*i+1) = receiverCards.at(i).getMuonBitRegion(1);
    isoElectrons.at(2*i) = electronCards.at(i).getIsoElectrons(0);
    isoElectrons.at(2*i+1) = electronCards.at(i).getIsoElectrons(1) + 1;  // the +1 adds region info
    nonIsoElectrons.at(2*i) = electronCards.at(i).getNonIsoElectrons(0);
    nonIsoElectrons.at(2*i+1) = electronCards.at(i).getNonIsoElectrons(1) + 1;  // +1 adds region info
    barrelSums.at(2*i) = receiverCards.at(i).getEtIn10BitsRegion(0);
    barrelSums.at(2*i+1) = receiverCards.at(i).getEtIn10BitsRegion(1);
    overFlowBits.at(2*i) = receiverCards.at(i).getOverFlowBitRegion(0);
    overFlowBits.at(2*i+1) = receiverCards.at(i).getOverFlowBitRegion(1);
    tauBits.at(2*i) = receiverCards.at(i).getTauBitRegion(0);
    tauBits.at(2*i+1) = receiverCards.at(i).getTauBitRegion(1);
  }
  jetSummaryCard.fillIsolatedEGObjects(isoElectrons);
  jetSummaryCard.fillNonIsolatedEGObjects(nonIsoElectrons);
  jetSummaryCard.fillRegionSums(barrelSums);
  jetSummaryCard.fillMIPBits(mipBits);
  jetSummaryCard.fillTauBits(tauBits);
  jetSummaryCard.fillOverFlowBits(overFlowBits);
}
std::vector<unsigned short> L1RCTCrate::getBarrelRegions ( ) [inline]

Definition at line 62 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getBarrelRegions(), and jetSummaryCard.

std::vector<unsigned short> L1RCTCrate::getHFFineGrainBits ( ) [inline]
std::vector<unsigned short> L1RCTCrate::getHFRegions ( ) [inline]

Definition at line 65 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getHFRegions(), and jetSummaryCard.

std::vector<unsigned short> L1RCTCrate::getIsolatedEGObjects ( ) [inline]
std::vector<unsigned short> L1RCTCrate::getJetRegions ( ) [inline]

Definition at line 59 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getJetRegions(), and jetSummaryCard.

unsigned short L1RCTCrate::getMIPBits ( ) [inline]

Definition at line 81 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getMIPBits(), and jetSummaryCard.

                             {
    return jetSummaryCard.getMIPBits();
  }
std::vector<unsigned short> L1RCTCrate::getNonisolatedEGObjects ( ) [inline]
unsigned short L1RCTCrate::getOverFlowBits ( ) [inline]

Definition at line 84 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getOverFlowBits(), and jetSummaryCard.

unsigned short L1RCTCrate::getQuietBits ( ) [inline]

Definition at line 87 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getQuietBits(), and jetSummaryCard.

L1RCTReceiverCard* L1RCTCrate::getReceiverCard ( int  i) [inline]

Definition at line 25 of file L1RCTCrate.h.

References receiverCards.

{ return &receiverCards.at(i);}
unsigned short L1RCTCrate::getTauBits ( ) [inline]

Definition at line 78 of file L1RCTCrate.h.

References L1RCTJetSummaryCard::getTauBits(), and jetSummaryCard.

                             {
    return jetSummaryCard.getTauBits();
  }
void L1RCTCrate::input ( std::vector< std::vector< unsigned short > >  RCInput,
std::vector< unsigned short >  HFInput 
)

Definition at line 22 of file L1RCTCrate.cc.

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

{
  //std::cout << "Crate.input() entered" << std::endl;
  for(int i =0; i<7; i++){
    //std::cout << "calling RC.fillInput() for RC " << i << std::endl;
    receiverCards.at(i).fillInput(RCInput.at(i));
    //std::cout << "RC " << i << " filled" << std::endl;
  }
  //std::cout << "calling JSC.fillHFRegionSums()" << std::endl;
  jetSummaryCard.fillHFRegionSums(HFInput);
  //std::cout << "JSC.fillHF called" << std::endl;
} 
void L1RCTCrate::print ( void  )

Definition at line 86 of file L1RCTCrate.cc.

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

                      {
  for(int i=0;i<7;i++){
    receiverCards.at(i).print();
    electronCards.at(i).print();
  }
  jetSummaryCard.print();
}
void L1RCTCrate::printEIC ( int  i) [inline]

Definition at line 51 of file L1RCTCrate.h.

References electronCards.

                      {
    electronCards.at(i).print();
  }
void L1RCTCrate::printEICEdges ( int  i) [inline]

Definition at line 54 of file L1RCTCrate.h.

References electronCards.

                           {
    electronCards.at(i).printEdges();
  }
void L1RCTCrate::printJSC ( ) [inline]

Definition at line 45 of file L1RCTCrate.h.

References jetSummaryCard, and L1RCTJetSummaryCard::print().

void L1RCTCrate::printRC ( int  i) [inline]

Definition at line 48 of file L1RCTCrate.h.

References receiverCards.

                     {
    receiverCards.at(i).print();
  }
void L1RCTCrate::processElectronIsolationCards ( )

Definition at line 49 of file L1RCTCrate.cc.

References electronCards, and i.

                                              {
  for(int i = 0; i<7;i++)
    electronCards.at(i).fillElectronCandidates();
}
void L1RCTCrate::processJetSummaryCard ( )
void L1RCTCrate::processReceiverCards ( )

Definition at line 35 of file L1RCTCrate.cc.

References i, and receiverCards.

                                     {
  for(int i=0; i<7;i++){
    receiverCards.at(i).fillTauBits();
    receiverCards.at(i).fillRegionSums();
    receiverCards.at(i).fillMuonBits();
  }
}

Member Data Documentation

int L1RCTCrate::crtNo [private]

Definition at line 107 of file L1RCTCrate.h.

Referenced by crateNumber().

Definition at line 108 of file L1RCTCrate.h.