#include <EventFilter/CSCRawToDigi/src/CSCDigiToPattern.h>
Public Member Functions | |
virtual void | analyze (edm::Event const &e, edm::EventSetup const &iSetup) |
CSCDigiToPattern (edm::ParameterSet const &conf) |
Definition at line 17 of file CSCDigiToPattern.h.
CSCDigiToPattern::CSCDigiToPattern | ( | edm::ParameterSet const & | conf | ) | [explicit] |
Definition at line 6 of file CSCDigiToPattern.cc.
00006 { 00007 00008 // If your module takes parameters, here is where you would define 00009 // their names and types, and access them to initialize internal 00010 // variables. Example as follows: 00011 // 00012 }
void CSCDigiToPattern::analyze | ( | edm::Event const & | e, | |
edm::EventSetup const & | iSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 14 of file CSCDigiToPattern.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::Event::getByLabel(), j, prof2calltree::last, strip(), and TrackValidation_HighPurity_cff::valid.
00014 { 00015 00016 // These declarations create handles to the types of records that you want 00017 // to retrieve from event "e". 00018 // 00019 edm::Handle<CSCCorrelatedLCTDigiCollection> correlatedlcts; 00020 e.getByLabel("muonCSCDigis","MuonCSCCorrelatedLCTDigi",correlatedlcts); 00021 for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=correlatedlcts->begin(); j!=correlatedlcts->end(); j++) { 00022 CSCDetId id=(*j).first; 00023 std::cout<<id<<std::endl; 00024 std::vector<CSCCorrelatedLCTDigi>::const_iterator digiIt = (*j).second.first; 00025 std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second; 00026 for( ; digiIt != last; ++digiIt) { 00027 uint16_t wire = digiIt->getKeyWG(); // 7 bits 00028 uint16_t pattern = digiIt->getPattern(); // 4 bits 00029 uint16_t quality = digiIt->getQuality(); // 4 bits 00030 uint16_t valid = digiIt->isValid(); // 1 bit 00031 uint16_t strip = digiIt->getStrip(); // 8 bits 00032 uint16_t bend = digiIt->getBend(); // 1 bit 00033 uint16_t syncErr = digiIt->getSyncErr(); // 1 bit 00034 uint16_t bx = digiIt->getBX(); // 1 bit 00035 uint16_t bx0 = digiIt->getBX0(); // 1 bit 00036 uint16_t cscId = digiIt->getCSCID(); // 4 bits 00037 // __ 00038 // 32 bits in total 00039 long unsigned int mpc = 00040 ((cscId&0xF)<<28) | ((bx0&0x1)<<27) | ((bx&0x1)<<26) | 00041 ((syncErr&0x1)<<25) | ((bend&0x1)<<24) | ((strip&0xFF)<<16) | 00042 ((valid&0x1)<<15) | ((quality&0xF)<<11) | ((pattern&0xF)<<7) | 00043 (wire&0x7F); 00044 std::cout <<"MPC"<<digiIt->getTrknmb()<< " " << std::hex << mpc <<std::dec <<std::endl; 00045 } 00046 } 00047 }