CMS 3D CMS Logo

CSCDigiToPattern.cc
Go to the documentation of this file.
5 
7  d_token = consumes<CSCCorrelatedLCTDigiCollection>(conf.getParameter<edm::InputTag>("corrlctDigiTag"));
8 }
9 
11  // These declarations create handles to the types of records that you want
12  // to retrieve from event "e".
13  //
15  e.getByToken(d_token, correlatedlcts);
16 
17  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end(); j++) {
18  CSCDetId id = (*j).first;
19  std::cout << id << std::endl;
20  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiIt = (*j).second.first;
21  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
22  for (; digiIt != last; ++digiIt) {
23  uint16_t wire = digiIt->getKeyWG(); // 7 bits
24  uint16_t pattern = digiIt->getPattern(); // 4 bits
25  uint16_t quality = digiIt->getQuality(); // 4 bits
26  uint16_t valid = digiIt->isValid(); // 1 bit
27  uint16_t strip = digiIt->getStrip(); // 8 bits
28  uint16_t bend = digiIt->getBend(); // 1 bit
29  uint16_t syncErr = digiIt->getSyncErr(); // 1 bit
30  uint16_t bx = digiIt->getBX(); // 1 bit
31  uint16_t bx0 = digiIt->getBX0(); // 1 bit
32  uint16_t cscId = digiIt->getCSCID(); // 4 bits
33  // __
34  // 32 bits in total
35  long unsigned int mpc = ((cscId & 0xF) << 28) | ((bx0 & 0x1) << 27) | ((bx & 0x1) << 26) |
36  ((syncErr & 0x1) << 25) | ((bend & 0x1) << 24) | ((strip & 0xFF) << 16) |
37  ((valid & 0x1) << 15) | ((quality & 0xF) << 11) | ((pattern & 0xF) << 7) | (wire & 0x7F);
38  std::cout << "MPC" << digiIt->getTrknmb() << " " << std::hex << mpc << std::dec << std::endl;
39  }
40  }
41 }
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCCorrelatedLCTDigi.h
edm::Handle< CSCCorrelatedLCTDigiCollection >
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
CSCDetId.h
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
CSCDigiToPattern::d_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > d_token
Definition: CSCDigiToPattern.h:24
dqmdumpme.last
last
Definition: dqmdumpme.py:56
CSCDigiToPattern::analyze
void analyze(edm::Event const &e, edm::EventSetup const &iSetup) override
Definition: CSCDigiToPattern.cc:10
edm::ParameterSet
Definition: ParameterSet.h:36
CSCDetId
Definition: CSCDetId.h:26
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CSCDigiToPattern.h
edm::EventSetup
Definition: EventSetup.h:57
CSCDigiToPattern::CSCDigiToPattern
CSCDigiToPattern(edm::ParameterSet const &conf)
Definition: CSCDigiToPattern.cc:6
InputTag.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:160
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DigiContainerIterator
Definition: MuonDigiCollection.h:30
edm::Event
Definition: Event.h:73
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37