CMS 3D CMS Logo

OmtfCscPacker.cc
Go to the documentation of this file.
2 
6 
7 namespace omtf {
8 
10 
12  const CSCCorrelatedLCTDigiCollection& cscDigis = *prod;
13  for (const auto& chDigis : cscDigis) {
14  CSCDetId chamberId = CSCDetId(chDigis.first).chamberId();
15  for (auto digi = chDigis.second.first; digi != chDigis.second.second; digi++) {
17  data.hitNum_ = digi->getTrknmb();
18  data.vp_ = digi->isValid();
19  data.bxNum_ = digi->getBX() - (CSCConstants::LCT_CENTRAL_BX - 3);
20  data.halfStrip_ = digi->getStrip();
21  data.clctPattern_ = digi->getPattern();
22  data.keyWG_ = digi->getKeyWG();
23  data.lr_ = digi->getBend();
24  data.quality_ = digi->getQuality();
25  auto im = theCsc2Omtf.find(chamberId);
26  if (im != theCsc2Omtf.end()) {
27  std::vector<EleIndex> links = {im->second.first, im->second.second};
28  for (const auto& link : links) {
29  unsigned int fed = link.fed();
30  if (fed == 0)
31  continue;
32  data.station_ = chamberId.station() - 1;
33  data.linkNum_ = link.link();
34  data.cscID_ = chamberId.chamber() - (link.amc() - 1) * 6;
35  unsigned int amc = link.amc() * 2 - 1;
36  raws[std::make_pair(fed, amc)].push_back(data.rawData);
37  LogTrace("") << "ADDED RAW: fed: " << fed << " amc: " << amc << " CSC DATA: " << data << std::endl;
38  }
39  }
40  }
41  }
42  }
43 
44 } // namespace omtf
MessageLogger.h
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
omtf::CscPacker::theCsc2Omtf
MapCscDet2EleIndex theCsc2Omtf
Definition: OmtfCscPacker.h:22
OmtfCscDataWord64.h
CSCConstants::LCT_CENTRAL_BX
Definition: CSCConstants.h:79
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
CSCConstants.h
omtf::FedAmcRawsMap
std::map< std::pair< unsigned int, unsigned int >, std::vector< Word64 > > FedAmcRawsMap
Definition: OmtfDataWord64.h:13
omtf::mapCscDet2EleIndex
MapCscDet2EleIndex mapCscDet2EleIndex()
Definition: OmtfLinkMappingCsc.cc:247
CSCDetId
Definition: CSCDetId.h:26
CSCDetId::chamberId
CSCDetId chamberId() const
Definition: CSCDetId.h:47
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
CSCCorrelatedLCTDigiCollection
electronStore.links
links
Definition: electronStore.py:149
OmtfCscPacker.h
amc
Definition: AMCSpec.h:8
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
omtf::CscPacker::pack
void pack(const CSCCorrelatedLCTDigiCollection *prod, FedAmcRawsMap &raws)
Definition: OmtfCscPacker.cc:11
omtf::CscDataWord64
Definition: OmtfCscDataWord64.h:9
omtf::CscPacker::init
void init()
Definition: OmtfCscPacker.cc:9
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
omtf
Definition: OmtfCscDataWord64.h:7