CMS 3D CMS Logo

List of all members | Public Member Functions
omtf::MuonUnpacker Class Reference

#include <OmtfMuonUnpacker.h>

Public Member Functions

void unpack (unsigned int fed, unsigned int amc, const MuonDataWord64 &raw, l1t::RegionalMuonCandBxCollection *muColl)
 

Detailed Description

Definition at line 16 of file OmtfMuonUnpacker.h.

Member Function Documentation

◆ unpack()

void omtf::MuonUnpacker::unpack ( unsigned int  fed,
unsigned int  amc,
const MuonDataWord64 raw,
l1t::RegionalMuonCandBxCollection muColl 
)

Definition at line 9 of file OmtfMuonUnpacker.cc.

12  {
13  LogTrace("") << "OMTF->MUON " << std::endl;
14  LogTrace("") << data << std::endl;
16  unsigned int iProcessor = amc - 1; //0-5
18  digi.setHwPt(data.pT());
19  digi.setHwEta(data.eta());
20  digi.setHwPhi(data.phi());
21  digi.setHwSign(data.ch());
22  digi.setHwSignValid(data.vch());
23  digi.setHwQual(data.quality());
24  std::map<int, int> trackAddr;
25  trackAddr[0] = data.layers();
26  trackAddr[1] = 0;
27  trackAddr[2] = data.weight_lowBits();
28  digi.setTrackAddress(trackAddr);
29  digi.setTFIdentifiers(iProcessor, overlap);
30  int bx = data.bxNum() - 3;
31  LogTrace("") << "OMTF Muon, BX=" << bx << ", hwPt=" << digi.hwPt() << ", link: " << digi.link() << std::endl;
32 
33  // add digi to collection, keep fixed ascending link orderi (insert in proper place)
34  l1t::RegionalMuonCandBxCollection::const_iterator itb = producedMuonDigis->begin(bx);
35  l1t::RegionalMuonCandBxCollection::const_iterator ite = producedMuonDigis->end(bx);
36  unsigned int indeks = 0;
37  while (indeks < ite - itb) {
38  if (digi.link() < (itb + indeks)->link())
39  break;
40  indeks++;
41  }
42  producedMuonDigis->insert(bx, indeks, digi);
43  }

References BXVector< T >::begin(), l1GtPatternGenerator_cfi::bx, data, BXVector< T >::end(), l1t::RegionalMuonCand::hwPt(), BXVector< T >::insert(), l1t::RegionalMuonCand::link(), MainPageGenerator::link, LogTrace, l1t::omtf_neg, l1t::omtf_pos, goodZToMuMu_cfi::overlap, l1t::RegionalMuonCand::setHwEta(), l1t::RegionalMuonCand::setHwPhi(), l1t::RegionalMuonCand::setHwPt(), l1t::RegionalMuonCand::setHwQual(), l1t::RegionalMuonCand::setHwSign(), l1t::RegionalMuonCand::setHwSignValid(), l1t::RegionalMuonCand::setTFIdentifiers(), and l1t::RegionalMuonCand::setTrackAddress().

Referenced by omtf::OmtfUnpacker::produce().

l1t::RegionalMuonCand::link
const int link() const
Get link on which the MicroGMT receives the candidate.
Definition: RegionalMuonCand.h:177
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
l1t::omtf_pos
Definition: RegionalMuonCandFwd.h:8
l1t::tftype
tftype
Definition: RegionalMuonCandFwd.h:8
l1t::RegionalMuonCand::setHwSign
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
Definition: RegionalMuonCand.h:136
BXVector< RegionalMuonCand >::const_iterator
std::vector< RegionalMuonCand >::const_iterator const_iterator
Definition: BXVector.h:18
l1t::RegionalMuonCand::setTrackAddress
void setTrackAddress(const std::map< int, int > &address)
Set the whole track address.
Definition: RegionalMuonCand.h:158
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
l1t::RegionalMuonCand::hwPt
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
Definition: RegionalMuonCand.h:161
l1t::RegionalMuonCand::setTFIdentifiers
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
Definition: RegionalMuonCand.cc:5
l1t::RegionalMuonCand::setHwPt
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
Definition: RegionalMuonCand.h:126
l1t::RegionalMuonCand::setHwEta
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
Definition: RegionalMuonCand.h:134
goodZToMuMu_cfi.overlap
overlap
Definition: goodZToMuMu_cfi.py:108
l1t::RegionalMuonCand::setHwQual
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
Definition: RegionalMuonCand.h:140
l1t::RegionalMuonCand::setHwSignValid
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
Definition: RegionalMuonCand.h:138
amc
Definition: AMCSpec.h:8
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
l1t::RegionalMuonCand::setHwPhi
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
Definition: RegionalMuonCand.h:132
l1t::omtf_neg
Definition: RegionalMuonCandFwd.h:8
l1t::RegionalMuonCand
Definition: RegionalMuonCand.h:8