src
EventFilter
L1TRawToDigi
src
OmtfCscUnpacker.cc
Go to the documentation of this file.
1
#include "
EventFilter/L1TRawToDigi/interface/OmtfCscUnpacker.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
DataFormats/MuonDetId/interface/CSCDetId.h
"
4
#include "
DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h
"
5
#include "
DataFormats/CSCDigi/interface/CSCConstants.h
"
6
#include "
DataFormats/L1TMuon/interface/OMTF/OmtfCscDataWord64.h
"
7
8
namespace
omtf
{
9
10
void
CscUnpacker::init
() {
theOmtf2CscDet
=
mapEleIndex2CscDet
(); }
11
12
void
CscUnpacker::unpack
(
unsigned
int
fed,
13
unsigned
int
amc
,
14
const
CscDataWord64
&
data
,
15
CSCCorrelatedLCTDigiCollection
*
prod
) {
16
EleIndex
omtfEle(fed,
amc
,
data
.linkNum());
17
std::map<EleIndex, CSCDetId>::const_iterator icsc =
theOmtf2CscDet
.find(omtfEle);
18
if
(icsc ==
theOmtf2CscDet
.end()) {
19
LogTrace
(
" "
) <<
" CANNOT FIND key: "
<< omtfEle << std::endl;
20
return
;
21
}
22
CSCDetId
cscId =
theOmtf2CscDet
[omtfEle];
23
LogTrace
(
""
) <<
"OMTF->CSC "
<< cscId << std::endl;
24
LogTrace
(
""
) <<
data
<< std::endl;
25
if
(
data
.linkNum() >= 30) {
26
LogTrace
(
" "
) <<
" data from overlap, skip digi "
<< std::endl;
27
return
;
28
}
29
CSCCorrelatedLCTDigi
digi(
data
.hitNum(),
//trknmb
30
data
.valid(),
31
data
.quality(),
32
data
.wireGroup(),
33
data
.halfStrip(),
34
data
.clctPattern(),
35
data
.bend(),
36
data
.bxNum() + (
CSCConstants::LCT_CENTRAL_BX
- 3));
37
LogTrace
(
""
) << digi << std::endl;
38
//producedCscLctDigis->insertDigi( cscId, digi);
39
prod
->insertDigi(cscId, digi);
40
}
41
42
}
// namespace omtf
CSCConstants::LCT_CENTRAL_BX
Definition:
CSCConstants.h:148
CSCCorrelatedLCTDigi.h
MessageLogger.h
omtf::EleIndex
Definition:
OmtfEleIndex.h:9
OmtfCscDataWord64.h
CSCDetId.h
CSCDetId
Definition:
CSCDetId.h:26
omtf::CscUnpacker::unpack
void unpack(unsigned int fed, unsigned int amc, const CscDataWord64 &raw, CSCCorrelatedLCTDigiCollection *prod)
Definition:
OmtfCscUnpacker.cc:12
CSCConstants.h
omtf::CscDataWord64
Definition:
OmtfCscDataWord64.h:9
dumpMFGeometry_cfg.prod
prod
Definition:
dumpMFGeometry_cfg.py:24
LogTrace
#define LogTrace(id)
Definition:
MessageLogger.h:234
CSCCorrelatedLCTDigiCollection
omtf::CscUnpacker::theOmtf2CscDet
MapEleIndex2CscDet theOmtf2CscDet
Definition:
OmtfCscUnpacker.h:24
OmtfCscUnpacker.h
omtf::mapEleIndex2CscDet
MapEleIndex2CscDet mapEleIndex2CscDet()
Definition:
OmtfLinkMappingCsc.cc:5
omtf
Definition:
OmtfCscDataWord64.h:7
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
amc
Definition:
AMCSpec.h:8
CSCCorrelatedLCTDigi
Definition:
CSCCorrelatedLCTDigi.h:19
omtf::CscUnpacker::init
void init()
Definition:
OmtfCscUnpacker.cc:10
Generated for CMSSW Reference Manual by
1.8.14