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));
109 subsector = (link != 6 ? link : 0);
110 neighbor = (link == 6 ? 1 : 0);
111 layer = (cluster_id % 8);
132 bool run3_DAQ_format =
135 bool reducedDAQWindow =
139 int nTPs = run3_DAQ_format ? 2 : 1;
154 for (
int i = 1;
i <= nTPs;
i++) {
159 int iOut =
res->size() - 1;
167 res_GEM =
static_cast<EMTFCollections*
>(coll)->getEMTFGEMPadClusters();
172 if (run3_DAQ_format) {
178 if (reducedDAQWindow)
191 if (reducedDAQWindow)
219 int _station, _ring, _sector, _subsector, _neighbor, _layer;
226 (
res->at(iOut)).PtrEventHeader()->Sector(),
232 int _sector_gem = _sector;
234 int _subsector_gem = ((_subsector + 1) % 6) + 1;
236 int _chamber = (_sector_gem - 1) * 6 + _subsector_gem;
238 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
248 ImportGEM(Hit_, GEM_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
255 bool exact_duplicate =
false;
256 for (
auto const& iHit : *res_hit) {
257 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
258 Hit_.
Chamber() == iHit.Chamber()) {
259 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
260 (iHit.Is_GEM() == 1)) {
261 if (Hit_.
Neighbor() == iHit.Neighbor()) {
263 if (iHit.Is_GEM() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Roll() == Hit_.
Roll() &&
264 iHit.Pad() == Hit_.
Pad()) {
265 exact_duplicate =
true;
273 if (Hit_.
BX() > 3
or Hit_.
BX() < -3) {
274 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked GEM digis with out-of-range BX! BX " << Hit_.
BX()
275 <<
", endcap " << Hit_.
Endcap() <<
", station " << Hit_.
Station()
276 <<
", neighbor " << Hit_.
Neighbor() <<
", ring " << Hit_.
Ring() <<
", chamber " 277 << Hit_.
Chamber() <<
", roll " << Hit_.
Roll() <<
", pad " << Hit_.
Pad()
289 (
res->at(iOut)).push_GEM(GEM_);
290 if (!exact_duplicate and Hit_.
Valid())
291 res_hit->push_back(Hit_);
293 if (!exact_duplicate and Hit_.
Valid())
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)
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.