10 orbitBuffer_ = std::vector<std::vector<l1ScoutingRun3::Muon>>(3565);
16 produces<l1ScoutingRun3::MuonOrbitCollection>(
"Muon").setBranchAlias(
"MuonOrbitCollection");
29 size_t orbitSize = sourceRawData.
size();
62 uint32_t mAcount = (
header & header_masks::mAcount) >> header_shifts::mAcount;
63 uint32_t mBcount = (
header & header_masks::mBcount) >> header_shifts::mBcount;
67 pos += 4 + 4 + (mAcount + mBcount) * 12;
70 uint32_t orbit = bl->
orbit & 0x7FFFFFFF;
74 std::cout <<
"GMT Orbit " << orbit <<
", BX -> " <<
bx <<
", nMuons -> " << mAcount + mBcount << std::endl;
80 for (
unsigned int i = 0;
i < mAcount + mBcount;
i++) {
81 uint32_t interm = (bl->
mu[
i].
extra >> ugmt::shiftsMuon::interm) & ugmt::masksMuon::interm;
84 std::cout <<
" -> Excluding intermediate muon\n";
90 uint32_t ietaextu = (bl->
mu[
i].
f >> ugmt::shiftsMuon::etaext) & ugmt::masksMuon::etaextv;
92 if (((bl->
mu[
i].
f >> ugmt::shiftsMuon::etaext) & ugmt::masksMuon::etaexts) != 0) {
93 ietaext = ietaextu -= 256;
99 int32_t iptuncon = (bl->
mu[
i].
s >> ugmt::shiftsMuon::ptuncon) & ugmt::masksMuon::ptuncon;
104 uint32_t qual = (bl->
mu[
i].
f >> ugmt::shiftsMuon::qual) & ugmt::masksMuon::qual;
107 int32_t iphiext = ((bl->
mu[
i].
f >> ugmt::shiftsMuon::phiext) & ugmt::masksMuon::phiext);
115 if (((bl->
mu[
i].
s >> ugmt::shiftsMuon::chrgv) & ugmt::masksMuon::chrgv) == 1)
116 chrg = ((bl->
mu[
i].
s >> ugmt::shiftsMuon::chrg) & ugmt::masksMuon::chrg) == 1 ? -1 : 1;
142 l1ScoutingRun3::Muon muon(ipt,
ieta,
iphi, qual, chrg, chrg != 0,
iso,
index, ietaext, iphiext, iptuncon, idxy);
162 desc.add<
bool>(
"skipInterm",
true);
163 desc.addUntracked<
bool>(
"debug",
false);
164 descriptions.
add(
"ScGMTRawToDigi",
desc);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
void unpackOrbit(const unsigned char *buf, size_t len)
edm::InputTag srcInputTag
void printMuon(const Muon &muon, std::ostream &outs=std::cout)
const FEDRawData & FEDData(int sourceId) const
size_t size() const
Lenght of the data buffer in bytes.
std::vector< std::vector< l1ScoutingRun3::Muon > > orbitBuffer_
void produce(edm::Event &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
~ScGMTRawToDigi() override
ScGMTRawToDigi(const edm::ParameterSet &)
static constexpr int GmtSDSID
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.