|
|
Go to the documentation of this file.
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";
107 sector = (
link != 6 ? evt_sector : (evt_sector == 1 ? 6 : evt_sector - 1));
109 neighbor = (
link == 6 ? 1 : 0);
110 layer = (cluster_id % 8);
144 res = static_cast<EMTFCollections*>(coll)->getEMTFDaqOuts();
145 int iOut =
res->size() - 1;
148 res_hit = static_cast<EMTFCollections*>(coll)->getEMTFHits();
153 res_GEM = static_cast<EMTFCollections*>(coll)->getEMTFGEMPadClusters();
176 int _station, _ring, _sector, _subsector, _neighbor, _layer;
183 (
res->at(iOut)).PtrEventHeader()->Sector(),
189 int _sector_gem = _sector;
191 int _subsector_gem = ((_subsector + 1) % 6) + 1;
193 int _chamber = (_sector_gem - 1) * 6 + _subsector_gem;
195 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
205 ImportGEM(Hit_, GEM_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
212 bool exact_duplicate =
false;
213 for (
auto const& iHit : *res_hit) {
214 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
215 Hit_.
Chamber() == iHit.Chamber()) {
216 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
217 (iHit.Is_GEM() == 1)) {
218 if (Hit_.
Neighbor() == iHit.Neighbor()) {
220 if (iHit.Is_GEM() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Roll() == Hit_.
Roll() &&
221 iHit.Pad() == Hit_.
Pad()) {
222 exact_duplicate =
true;
230 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked duplicate GEM digis: BX " << Hit_.
BX() <<
", endcap "
231 << Hit_.
Endcap() <<
", station " << Hit_.
Station() <<
", neighbor "
233 <<
", roll " << Hit_.
Roll() <<
", pad " << Hit_.
Pad() << std::endl;
235 (
res->at(iOut)).push_GEM(GEM_);
236 if (!exact_duplicate)
237 res_hit->push_back(Hit_);
239 if (!exact_duplicate)
std::vector< EMTFDaqOut > EMTFDaqOutCollection
void set_link(const int bits)
int Link() const
Returns the input link of the cluster.
void set_tbin(const int bits)
void ImportGEM(EMTFHit &_hit, const l1t::emtf::GEM &_GEM, const int _endcap, const int _evt_sector)
Log< level::Warning, false > LogWarning
int ClusterID() const
Returns the the cluster ID within the link.
GEMDetId GEM_DetId() const
void set_chamber(int bits)
void set_subsector(int bits)
GEMPadDigiCluster CreateGEMPadDigiCluster() const
void set_vp(const int bits)
void set_gem_bxn(const int bits)
void set_station(int bits)
void set_pad(const int bits)
int Pad() const
Repurpose "strip" as GEM pad for GEM sourced hits.
virtual int checkFormat(const Block &block)
void set_cluster_id(const int bits)
void set_bc0(const int bits)
void set_partition(const int bits)
void set_stub_num(int bits)
Log< level::Error, false > LogError
void set_neighbor(int bits)
void set_cluster_size(const int bits)
void set_sector(int bits)
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.
bool unpack(const Block &block, UnpackerCollections *coll) override
Unpack the GEM payload in the EMTF DAQ payload.
#define DEFINE_L1T_UNPACKER(type)
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
std::vector< EMTFHit > EMTFHitCollection