42 edm::LogError(
"L1T|EMTF") <<
"Payload size in 'RPC Data Record' is different than expected";
46 for (
unsigned int i = 0;
i < 4;
i++) {
49 edm::LogError(
"L1T|EMTF") <<
"Payload[" <<
i <<
"] has more than 16 bits in 'RPC Data Record'";
61 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in RPCa are incorrect";
65 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in RPCb are incorrect";
69 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in RPCc are incorrect";
73 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in RPCd are incorrect";
99 sector = (
link != 0 ? evt_sector : (evt_sector == 1 ? 6 : evt_sector - 1));
101 neighbor = (
link == 0 ? 1 : 0);
102 segment = (
word % 2);
107 }
else if (
frame == 1) {
110 }
else if (
frame == 2) {
138 res = static_cast<EMTFCollections*>(coll)->getEMTFDaqOuts();
139 int iOut =
res->size() - 1;
142 res_hit = static_cast<EMTFCollections*>(coll)->getEMTFHits();
146 res_CPPF = static_cast<EMTFCollections*>(coll)->getEMTFCPPFs();
168 int _station, _ring, _sector, _subsector, _neighbor, _segment;
175 (
res->at(iOut)).PtrEventHeader()->Sector(),
181 int _sector_rpc = (_subsector < 5) ? _sector : (_sector % 6) + 1;
183 int _subsector_rpc = ((_subsector + 1) % 6) + 1;
185 int _chamber = (_sector_rpc - 1) * 6 + _subsector_rpc;
187 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
202 ImportRPC(Hit_, RPC_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
209 bool exact_duplicate =
false;
210 for (
auto const& iHit : *res_hit) {
211 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
212 Hit_.
Chamber() == iHit.Chamber()) {
213 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
214 (iHit.Is_RPC() == 1)) {
215 if (Hit_.
Neighbor() == iHit.Neighbor()) {
217 if (iHit.Is_RPC() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Theta_fp() == Hit_.
Theta_fp() &&
218 iHit.Phi_fp() == Hit_.
Phi_fp()) {
219 exact_duplicate =
true;
227 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked duplicate CPPF digis: BX " << Hit_.
BX() <<
", endcap "
229 <<
", neighbor " << Hit_.
Neighbor() <<
", ring " << Hit_.
Ring() <<
", chamber "
231 << Hit_.
Phi_fp() / 4 << std::endl;
233 (
res->at(iOut)).push_RPC(RPC_);
234 if (!exact_duplicate)
235 res_hit->push_back(Hit_);
236 if (!exact_duplicate)