17 event.getByToken(static_cast<const CaloLayer1Tokens*>(toks)->getEcalDigiToken(),
ecalDigis);
19 event.getByToken(static_cast<const CaloLayer1Tokens*>(toks)->getHcalDigiToken(),
hcalDigis);
21 event.getByToken(static_cast<const CaloLayer1Tokens*>(toks)->getCaloRegionToken(),
caloRegions);
23 std::vector<uint32_t>
load;
26 auto ctp7_phi =
board();
27 uint32_t* ptr =
load.data();
34 unsigned bx_per_l1a = 1;
37 unsigned calo_bxid = (
event.bunchCrossing() + 1) % 3564;
41 unsigned blockSize = 192;
43 unsigned blockFlags = ((bx_per_l1a & 0xf) << 16) | (calo_bxid & 0xfff);
56 for (uint32_t iPhi = 0; iPhi < 4; iPhi++) {
57 int cPhi = -1 + lPhi * 4 + iPhi;
63 edm::LogError(
"CaloLayer1Packer") <<
"Major error in makeECalTPGs" << std::endl;
66 for (
int cEta = -28; cEta <= 28; cEta++) {
68 bool negativeEta =
false;
77 const auto&
tp = ecalTPGs->
find(
id);
78 if (
tp != ecalTPGs->
end()) {
79 ctp7Data.
setET(cType, negativeEta,
iEta, iPhi,
tp->compressedEt());
80 ctp7Data.
setFB(cType, negativeEta,
iEta, iPhi,
tp->fineGrain());
91 for (uint32_t iPhi = 0; iPhi < 4; iPhi++) {
92 int cPhi = -1 + lPhi * 4 + iPhi;
98 edm::LogError(
"CaloLayer1Packer") <<
"Major error in makeHCalTPGs" << std::endl;
101 for (
int cEta = -28; cEta <= 28; cEta++) {
103 bool negativeEta =
false;
109 const auto tp = hcalTPGs->
find(
id);
110 if (
tp != hcalTPGs->
end()) {
111 ctp7Data.
setET(cType, negativeEta,
iEta, iPhi,
tp->SOI_compressedEt());
112 ctp7Data.
setFB(cType, negativeEta,
iEta, iPhi,
tp->SOI_fineGrain());
123 for (uint32_t side = 0; side <= 1; side++) {
124 bool negativeEta =
false;
128 for (uint32_t iPhi = 0; iPhi < 2; iPhi++) {
129 if (iPhi == 1 &&
iEta == 40)
131 int cPhi = 1 + lPhi * 4 + iPhi * 2;
134 cPhi = (cPhi + 69) % 72 + 1;
141 const auto tp = hcalTPGs->
find(
id);
142 if (
tp != hcalTPGs->
end()) {
143 ctp7Data.
setET(cType, negativeEta,
iEta, iPhi,
tp->SOI_compressedEt());
144 ctp7Data.
setFB(cType, negativeEta,
iEta, iPhi, ((
tp->SOI_fineGrain(1) << 1) |
tp->SOI_fineGrain(0)));
152 for (uint32_t side = 0; side <= 1; side++) {
153 bool negativeEta =
false;
157 uint32_t lEta = 10 -
region;
164 for (
const auto& rtp : *
regions) {
165 if (rtp.id() ==
id) {