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 15 of file OmtfMuonUnpacker.h.

Member Function Documentation

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

Definition at line 10 of file OmtfMuonUnpacker.cc.

References funct::abs(), omtf::MuonDataWord64::bxNum(), omtf::MuonDataWord64::ch(), omtf::MuonDataWord64::eta(), l1t::RegionalMuonCand::hwPt(), omtf::MuonDataWord64::layers(), LogTrace, l1t::omtf_neg, l1t::omtf_pos, muon::overlap(), omtf::MuonDataWord64::phi(), omtf::MuonDataWord64::pT(), BXVector< T >::push_back(), omtf::MuonDataWord64::quality(), l1t::RegionalMuonCand::setHwEta(), l1t::RegionalMuonCand::setHwPhi(), l1t::RegionalMuonCand::setHwPt(), l1t::RegionalMuonCand::setHwQual(), l1t::RegionalMuonCand::setHwSign(), l1t::RegionalMuonCand::setHwSignValid(), l1t::RegionalMuonCand::setTFIdentifiers(), l1t::RegionalMuonCand::setTrackAddress(), omtf::MuonDataWord64::vch(), and omtf::MuonDataWord64::weight_lowBits().

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

11 {
12  LogTrace("") <<"OMTF->MUON " << std::endl;
13  LogTrace("") << data << std::endl;
15  unsigned int iProcessor = amc-1; //0-5
17  digi.setHwPt(data.pT());
18  digi.setHwEta(data.eta());
19  digi.setHwPhi(data.phi());
20  digi.setHwSign(data.ch());
21  digi.setHwSignValid(data.vch());
22  digi.setHwQual(data.quality());
23  std::map<int, int> trackAddr;
24  trackAddr[0]=data.layers();
25  trackAddr[1]=0;
26  trackAddr[2]=data.weight_lowBits();
27  digi.setTrackAddress(trackAddr);
28  digi.setTFIdentifiers(iProcessor, overlap);
29  int bx = data.bxNum()-3;
30  LogTrace("") <<"OMTF Muon, BX="<<bx<<", hwPt="<<digi.hwPt()<< std::endl;
31  if(std::abs(bx) <= 3) producedMuonDigis->push_back(bx,digi);
32 }
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
void setTrackAddress(const std::map< int, int > &address)
Set the whole track address.
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define LogTrace(id)
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
Definition: AMCSpec.h:8
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))