40 edm::LogError(
"L1T|EMTF") <<
"Payload size in 'GEM Data Record' is different than expected";
44 for (
size_t i = 0;
i < 4; ++
i) {
47 edm::LogError(
"L1T|EMTF") <<
"Payload[" <<
i <<
"] has more than 16 bits in 'GEM Data Record'";
59 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in GEMa are incorrect";
63 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in GEMb are incorrect";
67 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in GEMc are incorrect";
71 edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in GEMd are incorrect";
108 sector = (
link != 6 ? evt_sector : (evt_sector == 1 ? 6 : evt_sector - 1));
110 neighbor = (
link == 6 ? 1 : 0);
111 layer = (cluster_id % 8);
132 bool run3_DAQ_format =
136 int nTPs = run3_DAQ_format ? 2 : 1;
151 for (
int i = 1;
i <= nTPs;
i++) {
156 int iOut =
res->size() - 1;
164 res_GEM =
static_cast<EMTFCollections*
>(coll)->getEMTFGEMPadClusters();
169 if (run3_DAQ_format) {
210 int _station, _ring, _sector, _subsector, _neighbor, _layer;
217 (
res->at(iOut)).PtrEventHeader()->Sector(),
223 int _sector_gem = _sector;
225 int _subsector_gem = ((_subsector + 1) % 6) + 1;
227 int _chamber = (_sector_gem - 1) * 6 + _subsector_gem;
229 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
239 ImportGEM(Hit_, GEM_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
246 bool exact_duplicate =
false;
247 for (
auto const& iHit : *res_hit) {
248 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
249 Hit_.
Chamber() == iHit.Chamber()) {
250 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
251 (iHit.Is_GEM() == 1)) {
252 if (Hit_.
Neighbor() == iHit.Neighbor()) {
254 if (iHit.Is_GEM() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Roll() == Hit_.
Roll() &&
255 iHit.Pad() == Hit_.
Pad()) {
256 exact_duplicate =
true;
264 if (Hit_.
BX() > 3
or Hit_.
BX() < -3) {
265 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked GEM digis with out-of-range BX! BX " << Hit_.
BX()
266 <<
", endcap " << Hit_.
Endcap() <<
", station " << Hit_.
Station()
267 <<
", neighbor " << Hit_.
Neighbor() <<
", ring " << Hit_.
Ring() <<
", chamber " 268 << Hit_.
Chamber() <<
", roll " << Hit_.
Roll() <<
", pad " << Hit_.
Pad()
280 (
res->at(iOut)).push_GEM(GEM_);
281 if (!exact_duplicate)
282 res_hit->push_back(Hit_);
284 if (!exact_duplicate)
void set_neighbor(int bits)
unsigned int getAlgoVersion()
void set_stub_num(int bits)
void set_station(int bits)
void set_gem_bxn(const int bits)
GEMPadDigiCluster CreateGEMPadDigiCluster() const
virtual int checkFormat(const Block &block)
Log< level::Error, false > LogError
void ImportGEM(EMTFHit &_hit, const l1t::emtf::GEM &_GEM, const int _endcap, const int _evt_sector)
constexpr std::array< uint8_t, layerIndexSize > layer
int Pad() const
Repurpose "strip" as GEM pad for GEM sourced hits.
void set_bc0(const int bits)
void set_link(const int bits)
void set_tbin(const 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
void set_cluster_id(const int bits)
int ClusterID() const
Returns the the cluster ID within the link.
std::vector< EMTFDaqOut > EMTFDaqOutCollection
void set_partition(const int bits)
bool unpack(const Block &block, UnpackerCollections *coll) override
Unpack the GEM payload in the EMTF DAQ payload.
void set_vp(const int bits)
void set_pad(const int bits)
void set_sector(int bits)
GEMDetId GEM_DetId() const
void convert_GEM_location(int &station, int &ring, int §or, int &subsector, int &neighbor, int &layer, const int evt_sector, const int cluster_id, const int link)
Converts station, ring, sector, subsector, neighbor, and segment from the GEM output.
#define DEFINE_L1T_UNPACKER(type)
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
Log< level::Warning, false > LogWarning
void set_chamber(int bits)
void set_subsector(int bits)
void set_cluster_size(const int bits)
int Link() const
Returns the input link of the cluster.