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) {
126 bool run3_DAQ_format =
129 bool reducedDAQWindow =
133 int nTPs = run3_DAQ_format ? 2 : 1;
147 for (
int i = 1;
i <= nTPs;
i++) {
152 int iOut =
res->size() - 1;
165 if (run3_DAQ_format) {
171 if (reducedDAQWindow)
184 if (reducedDAQWindow)
211 int _station, _ring, _sector, _subsector, _neighbor, _segment;
218 (
res->at(iOut)).PtrEventHeader()->Sector(),
224 int _sector_rpc = (_subsector < 5) ? _sector : (_sector % 6) + 1;
226 int _subsector_rpc = ((_subsector + 1) % 6) + 1;
228 int _chamber = (_sector_rpc - 1) * 6 + _subsector_rpc;
230 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
245 ImportRPC(Hit_, RPC_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
252 bool exact_duplicate =
false;
253 for (
auto const& iHit : *res_hit) {
254 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
255 Hit_.
Chamber() == iHit.Chamber()) {
256 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
257 (iHit.Is_RPC() == 1)) {
258 if (Hit_.
Neighbor() == iHit.Neighbor()) {
260 if (iHit.Is_RPC() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Theta_fp() == Hit_.
Theta_fp() &&
261 iHit.Phi_fp() == Hit_.
Phi_fp()) {
262 exact_duplicate =
true;
270 if (Hit_.
BX() > 3
or Hit_.
BX() < -3) {
271 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked CPPF digis with out-of-range BX! BX " << Hit_.
BX()
272 <<
", endcap " << Hit_.
Endcap() <<
", station " << Hit_.
Station() <<
", sector " 275 <<
", phi " << Hit_.
Phi_fp() / 4 << std::endl;
280 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked duplicate CPPF digis: BX " << Hit_.
BX() <<
", endcap " 281 << Hit_.
Endcap() <<
", station " << Hit_.
Station() <<
", sector " 284 <<
", phi " << Hit_.
Phi_fp() / 4 << std::endl;
286 (
res->at(iOut)).push_RPC(RPC_);
287 if (!exact_duplicate and Hit_.
Valid())
288 res_hit->push_back(Hit_);
289 if (!exact_duplicate and Hit_.
Valid())
void set_subsector_RPC(int bits)
void set_neighbor(int bits)
unsigned int getAlgoVersion()
void set_stub_num(int bits)
void set_station(int bits)
void convert_RPC_location(int &station, int &ring, int §or, int &subsector, int &neighbor, int &segment, const int evt_sector, const int frame, const int word, const int link)
bool unpack(const Block &block, UnpackerCollections *coll) override
Log< level::Error, false > LogError
void ImportRPC(EMTFHit &_hit, const l1t::emtf::RPC _RPC, const int _endcap, const int _evt_sector)
CPPFDigi CreateCPPFDigi() const
void set_bt_segment(int bits)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< EMTFHit > EMTFHitCollection
std::vector< EMTFDaqOut > EMTFDaqOutCollection
void set_pc_segment(int bits)
void set_fs_segment(int bits)
void set_sector_RPC(int bits)
void set_sector(int bits)
#define DEFINE_L1T_UNPACKER(type)
void set_rpc_bxn(int bits)
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
Log< level::Warning, false > LogWarning
void set_chamber(int bits)
virtual int checkFormat(const Block &block)
void set_subsector(int bits)
std::vector< CPPFDigi > CPPFDigiCollection