#include <L1MuGMTReadoutRecord.h>
Public Member Functions | |
int | getBCERR () const |
std::vector< L1MuRegionalCand > | getBrlRPCCands () const |
get barrel RPC candidates vector | |
int | getBxCounter () const |
int | getBxInEvent () const |
int | getBxNr () const |
get counters | |
std::vector< L1MuRegionalCand > | getCSCCands () const |
get CSC candidates vector | |
std::vector< L1MuRegionalCand > | getDTBXCands () const |
get DT candidates vector | |
int | getEvNr () const |
std::vector< L1MuRegionalCand > | getFwdRPCCands () const |
get forward RPC candidates vector | |
std::vector< L1MuGMTExtendedCand > | getGMTBrlCands () const |
get GMT barrel candidates vector | |
std::vector < L1MuGMTExtendedCand > & | getGMTBrlCandsData () |
std::vector< L1MuGMTExtendedCand > | getGMTCands () const |
get GMT candidates vector | |
std::vector < L1MuGMTExtendedCand > & | getGMTCandsData () |
get GMT candidates vector as stored in data (no rank info) | |
std::vector< L1MuGMTExtendedCand > | getGMTFwdCands () const |
get GMT forward candidates vector | |
unsigned | getMIPbit (int eta, int phi) const |
get MIP bit | |
unsigned | getQuietbit (int eta, int phi) const |
get Quiet bit | |
L1MuGMTReadoutRecord () | |
constructors | |
L1MuGMTReadoutRecord (int bxie) | |
void | reset () |
reset the record | |
void | setBCERR (int bcerr) |
void | setBxCounter (int bxie) |
void | setBxInEvent (int bxie) |
void | setBxNr (int bxnr) |
set counters | |
void | setEvNr (int evnr) |
void | setGMTBrlCand (int nr, unsigned data, unsigned rank) |
set GMT barrel candidate | |
void | setGMTBrlCand (int nr, L1MuGMTExtendedCand const &cand) |
set GMT barrel candidate | |
void | setGMTCand (int nr, unsigned data) |
set GMT candidate (does not store rank) | |
void | setGMTCand (int nr, L1MuGMTExtendedCand const &cand) |
set GMT candidate (does not store rank) | |
void | setGMTFwdCand (int nr, unsigned data, unsigned rank) |
set GMT forward candidate | |
void | setGMTFwdCand (int nr, L1MuGMTExtendedCand const &cand) |
set GMT forward candidate | |
void | setInputCand (int nr, unsigned data) |
set Input muon | |
void | setInputCand (int nr, L1MuRegionalCand const &cand) |
set Input muon | |
void | setMIPbit (int eta, int phi) |
set MIP bit | |
void | setQuietbit (int eta, int phi) |
set Quiet bit | |
virtual | ~L1MuGMTReadoutRecord () |
destructor | |
Private Member Functions | |
unsigned | getBrlRank (int i) const |
get rank of brl cand i | |
unsigned | getFwdRank (int i) const |
get rank of fwd cand i | |
void | setBrlRank (int i, unsigned value) |
set rank of brl cand i | |
void | setFwdRank (int i, unsigned value) |
set rank of fwd cand i | |
Private Attributes | |
std::vector< L1MuGMTExtendedCand > | m_BarrelCands |
unsigned | m_BCERR |
unsigned | m_BxInEvent |
unsigned | m_BxNr |
unsigned | m_EvNr |
std::vector< L1MuGMTExtendedCand > | m_ForwardCands |
std::vector< L1MuGMTExtendedCand > | m_GMTCands |
std::vector< L1MuRegionalCand > | m_InputCands |
unsigned | m_MIPbits [8] |
unsigned | m_Quietbits [8] |
L1 Global Muon Trigger Readout Buffer
Contains the data that the GMT sends to readout for one bunch crossing.
Only simple data members are used so that it is easier to make the data persistent or use it in an other context.
L1 Global Muon Trigger Readout Record
Contains the data that the GMT will send to readout for one bunch crossing.
Definition at line 46 of file L1MuGMTReadoutRecord.h.
L1MuGMTReadoutRecord::L1MuGMTReadoutRecord | ( | ) |
constructors
Definition at line 51 of file L1MuGMTReadoutRecord.cc.
References reset().
: m_InputCands(16), m_BarrelCands(4), m_ForwardCands(4), m_GMTCands(4) { reset(); }
L1MuGMTReadoutRecord::L1MuGMTReadoutRecord | ( | int | bxie | ) |
Definition at line 56 of file L1MuGMTReadoutRecord.cc.
References m_BxInEvent, and reset().
: m_InputCands(16), m_BarrelCands(4), m_ForwardCands(4), m_GMTCands(4) { reset(); m_BxInEvent = bxie; }
L1MuGMTReadoutRecord::~L1MuGMTReadoutRecord | ( | ) | [virtual] |
int L1MuGMTReadoutRecord::getBCERR | ( | ) | const [inline] |
Definition at line 68 of file L1MuGMTReadoutRecord.h.
References m_BCERR.
Referenced by L1GTDigiToRaw::packGMT().
{ return (int) m_BCERR; };
unsigned L1MuGMTReadoutRecord::getBrlRank | ( | int | i | ) | const [private] |
get rank of brl cand i
Definition at line 292 of file L1MuGMTReadoutRecord.cc.
References i, and m_BarrelCands.
{ return m_BarrelCands[i].rank(); }
vector< L1MuRegionalCand > L1MuGMTReadoutRecord::getBrlRPCCands | ( | ) | const |
get barrel RPC candidates vector
Definition at line 173 of file L1MuGMTReadoutRecord.cc.
References i, and m_InputCands.
Referenced by L1GTDigiToRaw::packGMT(), and L2MuonSeedGenerator::produce().
{ vector<L1MuRegionalCand> cands; for (int i=0; i<4; i++) if(m_InputCands[i+4].getDataWord() != 0) cands.push_back( m_InputCands[i+4] ); return cands; }
int L1MuGMTReadoutRecord::getBxCounter | ( | ) | const [inline] |
Definition at line 65 of file L1MuGMTReadoutRecord.h.
References m_BxInEvent.
{ return (int) m_BxInEvent; }; // for backward compatibility, do not use
int L1MuGMTReadoutRecord::getBxInEvent | ( | ) | const [inline] |
Definition at line 66 of file L1MuGMTReadoutRecord.h.
References m_BxInEvent.
Referenced by L1GTDigiToRaw::packGMT().
{ return (int) m_BxInEvent; };
int L1MuGMTReadoutRecord::getBxNr | ( | ) | const [inline] |
get counters
Definition at line 64 of file L1MuGMTReadoutRecord.h.
References m_BxNr.
Referenced by L1GTDigiToRaw::packGMT().
{ return (int) m_BxNr; };
vector< L1MuRegionalCand > L1MuGMTReadoutRecord::getCSCCands | ( | ) | const |
get CSC candidates vector
Definition at line 161 of file L1MuGMTReadoutRecord.cc.
References i, and m_InputCands.
Referenced by L1GTDigiToRaw::packGMT(), and L2MuonSeedGenerator::produce().
{ vector<L1MuRegionalCand> cands; for (int i=0; i<4; i++) if(m_InputCands[i+8].getDataWord() != 0) cands.push_back( m_InputCands[i+8] ); return cands; }
vector< L1MuRegionalCand > L1MuGMTReadoutRecord::getDTBXCands | ( | ) | const |
get DT candidates vector
Definition at line 147 of file L1MuGMTReadoutRecord.cc.
References i, and m_InputCands.
Referenced by L1GTDigiToRaw::packGMT(), and L2MuonSeedGenerator::produce().
{ vector<L1MuRegionalCand> cands; for (int i=0; i<4; i++) if(m_InputCands[i].getDataWord() != 0) cands.push_back( m_InputCands[i] ); return cands; }
int L1MuGMTReadoutRecord::getEvNr | ( | ) | const [inline] |
Definition at line 67 of file L1MuGMTReadoutRecord.h.
References m_EvNr.
Referenced by L1GTDigiToRaw::packGMT().
{ return (int) m_EvNr; };
unsigned L1MuGMTReadoutRecord::getFwdRank | ( | int | i | ) | const [private] |
get rank of fwd cand i
Definition at line 300 of file L1MuGMTReadoutRecord.cc.
References i, and m_ForwardCands.
{ return m_ForwardCands[i].rank(); }
vector< L1MuRegionalCand > L1MuGMTReadoutRecord::getFwdRPCCands | ( | ) | const |
get forward RPC candidates vector
Definition at line 185 of file L1MuGMTReadoutRecord.cc.
References i, and m_InputCands.
Referenced by L1GTDigiToRaw::packGMT(), and L2MuonSeedGenerator::produce().
{ vector<L1MuRegionalCand> cands; for (int i=0; i<4; i++) if(m_InputCands[i+12].getDataWord() != 0) cands.push_back( m_InputCands[i+12] ); return cands; }
vector< L1MuGMTExtendedCand > L1MuGMTReadoutRecord::getGMTBrlCands | ( | ) | const |
get GMT barrel candidates vector
Definition at line 121 of file L1MuGMTReadoutRecord.cc.
References m_BarrelCands.
Referenced by L1GTDigiToRaw::packGMT().
{ vector<L1MuGMTExtendedCand> cands; std::vector<L1MuGMTExtendedCand>::const_iterator it; for(it = m_BarrelCands.begin(); it != m_BarrelCands.end(); it++) { if((*it).getDataWord()!=0) cands.push_back(*it); } return cands; }
std::vector<L1MuGMTExtendedCand>& L1MuGMTReadoutRecord::getGMTBrlCandsData | ( | ) | [inline] |
Definition at line 78 of file L1MuGMTReadoutRecord.h.
References m_BarrelCands.
{return m_BarrelCands;};
vector< L1MuGMTExtendedCand > L1MuGMTReadoutRecord::getGMTCands | ( | ) | const |
get GMT candidates vector
Definition at line 94 of file L1MuGMTReadoutRecord.cc.
References m_BarrelCands, and m_ForwardCands.
Referenced by L1GTDigiToRaw::packGMT().
{ vector<L1MuGMTExtendedCand> cands; std::vector<L1MuGMTExtendedCand>::const_iterator it; for(it = m_BarrelCands.begin(); it != m_BarrelCands.end(); it++) { if((*it).getDataWord()!=0) cands.push_back(*it); } for(it = m_ForwardCands.begin(); it != m_ForwardCands.end(); it++) { if((*it).getDataWord()!=0) cands.push_back(*it); } // sort by rank stable_sort( cands.begin(), cands.end(), L1MuGMTExtendedCand::RankRef() ); return cands; }
vector< L1MuGMTExtendedCand > & L1MuGMTReadoutRecord::getGMTCandsData | ( | ) |
get GMT candidates vector as stored in data (no rank info)
Definition at line 114 of file L1MuGMTReadoutRecord.cc.
References m_GMTCands.
{ return m_GMTCands; }
vector< L1MuGMTExtendedCand > L1MuGMTReadoutRecord::getGMTFwdCands | ( | ) | const |
get GMT forward candidates vector
Definition at line 134 of file L1MuGMTReadoutRecord.cc.
References m_ForwardCands.
Referenced by L1GTDigiToRaw::packGMT().
{ vector<L1MuGMTExtendedCand> cands; std::vector<L1MuGMTExtendedCand>::const_iterator it; for(it = m_ForwardCands.begin(); it != m_ForwardCands.end(); it++) { if((*it).getDataWord()!=0) cands.push_back(*it); } return cands; }
unsigned L1MuGMTReadoutRecord::getMIPbit | ( | int | eta, |
int | phi | ||
) | const |
get MIP bit
Definition at line 197 of file L1MuGMTReadoutRecord.cc.
References UserOptions_cff::idx, m_MIPbits, and phi.
unsigned L1MuGMTReadoutRecord::getQuietbit | ( | int | eta, |
int | phi | ||
) | const |
get Quiet bit
Definition at line 213 of file L1MuGMTReadoutRecord.cc.
References UserOptions_cff::idx, m_Quietbits, and phi.
{ if (phi<0 || phi > 17 || eta < 0 || eta > 13) return 0; int idx = eta * 18 + phi; int idx_word = idx / 32; int idx_bit = idx % 32; unsigned mask = 1 << (idx_bit-1); return( m_Quietbits[idx_word] & mask) ? 1 : 0; }
void L1MuGMTReadoutRecord::reset | ( | void | ) |
reset the record
Definition at line 73 of file L1MuGMTReadoutRecord.cc.
References i, m_BarrelCands, m_BCERR, m_BxInEvent, m_BxNr, m_EvNr, m_ForwardCands, m_GMTCands, m_InputCands, m_MIPbits, and m_Quietbits.
Referenced by L1MuGMTReadoutRecord().
{ m_BxNr = 0; m_BxInEvent = 0; m_EvNr = 0; m_BCERR = 0; std::vector<L1MuRegionalCand>::iterator itr; for(itr = m_InputCands.begin(); itr != m_InputCands.end(); itr++) (*itr).reset(); std::vector<L1MuGMTExtendedCand>::iterator itg; for(itg = m_BarrelCands.begin(); itg != m_BarrelCands.end(); itg++) (*itg).reset(); for(itg = m_ForwardCands.begin(); itg != m_ForwardCands.end(); itg++) (*itg).reset(); for(itg = m_GMTCands.begin(); itg != m_GMTCands.end(); itg++) (*itg).reset(); for(int i=0;i<8;i++) { m_MIPbits[i]=0; m_Quietbits[i]=0; } }
void L1MuGMTReadoutRecord::setBCERR | ( | int | bcerr | ) | [inline] |
Definition at line 111 of file L1MuGMTReadoutRecord.h.
References m_BCERR.
Referenced by L1GlobalTriggerRawToDigi::unpackGMT().
{ m_BCERR = (unsigned) bcerr; };
void L1MuGMTReadoutRecord::setBrlRank | ( | int | i, |
unsigned | value | ||
) | [private] |
set rank of brl cand i
Definition at line 307 of file L1MuGMTReadoutRecord.cc.
References i, and m_BarrelCands.
{ if (i>=0 && i<4) { m_BarrelCands[i].setRank(value); } }
void L1MuGMTReadoutRecord::setBxCounter | ( | int | bxie | ) | [inline] |
Definition at line 108 of file L1MuGMTReadoutRecord.h.
References m_BxInEvent.
{ m_BxInEvent = (unsigned) bxie; }; // for backward compatibility, do not use
void L1MuGMTReadoutRecord::setBxInEvent | ( | int | bxie | ) | [inline] |
Definition at line 109 of file L1MuGMTReadoutRecord.h.
References m_BxInEvent.
Referenced by L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ m_BxInEvent = (unsigned) bxie; };
void L1MuGMTReadoutRecord::setBxNr | ( | int | bxnr | ) | [inline] |
set counters
Definition at line 107 of file L1MuGMTReadoutRecord.h.
References m_BxNr.
Referenced by L1EmulBias::ModifyCollection(), L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ m_BxNr = (unsigned) bxnr; };
void L1MuGMTReadoutRecord::setEvNr | ( | int | evnr | ) | [inline] |
Definition at line 110 of file L1MuGMTReadoutRecord.h.
References m_EvNr.
Referenced by L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ m_EvNr = (unsigned) evnr; };
void L1MuGMTReadoutRecord::setFwdRank | ( | int | i, |
unsigned | value | ||
) | [private] |
set rank of fwd cand i
Definition at line 317 of file L1MuGMTReadoutRecord.cc.
References i, and m_ForwardCands.
{ if (i>=0 && i<4) { m_ForwardCands[i].setRank(value); } }
void L1MuGMTReadoutRecord::setGMTBrlCand | ( | int | nr, |
L1MuGMTExtendedCand const & | cand | ||
) |
set GMT barrel candidate
Definition at line 248 of file L1MuGMTReadoutRecord.cc.
References m_BarrelCands.
Referenced by L1MuGMTSorter::run(), L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ if (nr>=0 && nr<4) { m_BarrelCands[nr] = cand; } }
void L1MuGMTReadoutRecord::setGMTBrlCand | ( | int | nr, |
unsigned | data, | ||
unsigned | rank | ||
) |
set GMT barrel candidate
Definition at line 255 of file L1MuGMTReadoutRecord.cc.
References m_BarrelCands, and m_BxInEvent.
{ if (nr>=0 && nr<4) { m_BarrelCands[nr] = L1MuGMTExtendedCand(data,rank,m_BxInEvent); } }
void L1MuGMTReadoutRecord::setGMTCand | ( | int | nr, |
L1MuGMTExtendedCand const & | cand | ||
) |
set GMT candidate (does not store rank)
set GMT candidate
Definition at line 276 of file L1MuGMTReadoutRecord.cc.
References m_GMTCands.
Referenced by L1MuGMTSorter::run(), L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ if (nr>=0 && nr<4) { m_GMTCands[nr] = cand; } }
void L1MuGMTReadoutRecord::setGMTCand | ( | int | nr, |
unsigned | data | ||
) |
set GMT candidate (does not store rank)
set GMT candidate
Definition at line 283 of file L1MuGMTReadoutRecord.cc.
References m_BxInEvent, and m_GMTCands.
{ if (nr>=0 && nr<4) { m_GMTCands[nr] = L1MuGMTExtendedCand(data,0,m_BxInEvent); } }
void L1MuGMTReadoutRecord::setGMTFwdCand | ( | int | nr, |
unsigned | data, | ||
unsigned | rank | ||
) |
set GMT forward candidate
Definition at line 269 of file L1MuGMTReadoutRecord.cc.
References m_BxInEvent, and m_ForwardCands.
{ if (nr>=0 && nr<4) { m_ForwardCands[nr] = L1MuGMTExtendedCand(data,rank,m_BxInEvent); } }
void L1MuGMTReadoutRecord::setGMTFwdCand | ( | int | nr, |
L1MuGMTExtendedCand const & | cand | ||
) |
set GMT forward candidate
Definition at line 262 of file L1MuGMTReadoutRecord.cc.
References m_ForwardCands.
Referenced by L1MuGMTSorter::run(), L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ if (nr>=0 && nr<4) { m_ForwardCands[nr] = cand; } }
void L1MuGMTReadoutRecord::setInputCand | ( | int | nr, |
unsigned | data | ||
) |
set Input muon
set Regional Candidates
Definition at line 241 of file L1MuGMTReadoutRecord.cc.
References m_BxInEvent, and m_InputCands.
Referenced by L1MuGMTPSB::receiveData(), L1DummyProducer::SimpleDigi(), and L1GlobalTriggerRawToDigi::unpackGMT().
{ if (nr>=0 && nr < 16) { m_InputCands[nr] = L1MuRegionalCand(data,m_BxInEvent); } }
void L1MuGMTReadoutRecord::setInputCand | ( | int | nr, |
L1MuRegionalCand const & | cand | ||
) |
set Input muon
set Regional Candidates
Definition at line 234 of file L1MuGMTReadoutRecord.cc.
References m_InputCands.
{ if (nr>=0 && nr < 16) { m_InputCands[nr] = cand; } }
void L1MuGMTReadoutRecord::setMIPbit | ( | int | eta, |
int | phi | ||
) |
set MIP bit
Definition at line 326 of file L1MuGMTReadoutRecord.cc.
References UserOptions_cff::idx, m_MIPbits, and phi.
Referenced by L1MuGMTPSB::getCalo(), and L1DummyProducer::SimpleDigi().
void L1MuGMTReadoutRecord::setQuietbit | ( | int | eta, |
int | phi | ||
) |
set Quiet bit
Definition at line 342 of file L1MuGMTReadoutRecord.cc.
References UserOptions_cff::idx, m_Quietbits, and phi.
Referenced by L1MuGMTPSB::getCalo(), and L1DummyProducer::SimpleDigi().
{ if (phi<0 || phi > 17 || eta < 0 || eta > 13) return; int idx = eta * 18 + phi; int idx_word = idx / 32; int idx_bit = idx % 32; unsigned mask = 1 << (idx_bit-1); m_Quietbits[idx_word] |= mask; }
std::vector<L1MuGMTExtendedCand> L1MuGMTReadoutRecord::m_BarrelCands [private] |
Definition at line 159 of file L1MuGMTReadoutRecord.h.
Referenced by getBrlRank(), getGMTBrlCands(), getGMTBrlCandsData(), getGMTCands(), reset(), setBrlRank(), and setGMTBrlCand().
unsigned L1MuGMTReadoutRecord::m_BCERR [private] |
Definition at line 155 of file L1MuGMTReadoutRecord.h.
Referenced by getBCERR(), reset(), and setBCERR().
unsigned L1MuGMTReadoutRecord::m_BxInEvent [private] |
Definition at line 152 of file L1MuGMTReadoutRecord.h.
Referenced by getBxCounter(), getBxInEvent(), L1MuGMTReadoutRecord(), reset(), setBxCounter(), setBxInEvent(), setGMTBrlCand(), setGMTCand(), setGMTFwdCand(), and setInputCand().
unsigned L1MuGMTReadoutRecord::m_BxNr [private] |
Definition at line 151 of file L1MuGMTReadoutRecord.h.
unsigned L1MuGMTReadoutRecord::m_EvNr [private] |
Definition at line 153 of file L1MuGMTReadoutRecord.h.
std::vector<L1MuGMTExtendedCand> L1MuGMTReadoutRecord::m_ForwardCands [private] |
Definition at line 160 of file L1MuGMTReadoutRecord.h.
Referenced by getFwdRank(), getGMTCands(), getGMTFwdCands(), reset(), setFwdRank(), and setGMTFwdCand().
std::vector<L1MuGMTExtendedCand> L1MuGMTReadoutRecord::m_GMTCands [private] |
Definition at line 161 of file L1MuGMTReadoutRecord.h.
Referenced by getGMTCandsData(), reset(), and setGMTCand().
std::vector<L1MuRegionalCand> L1MuGMTReadoutRecord::m_InputCands [private] |
Definition at line 157 of file L1MuGMTReadoutRecord.h.
Referenced by getBrlRPCCands(), getCSCCands(), getDTBXCands(), getFwdRPCCands(), reset(), and setInputCand().
unsigned L1MuGMTReadoutRecord::m_MIPbits[8] [private] |
Definition at line 164 of file L1MuGMTReadoutRecord.h.
Referenced by getMIPbit(), reset(), and setMIPbit().
unsigned L1MuGMTReadoutRecord::m_Quietbits[8] [private] |
Definition at line 165 of file L1MuGMTReadoutRecord.h.
Referenced by getQuietbit(), reset(), and setQuietbit().