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 != 4 ? evt_sector : (evt_sector == 1 ? 6 : evt_sector - 1));
109 subsector = (link < 4 ? link : (link == 4 ? 5 : link - 1));
110 neighbor = (link == 4 ? 1 : 0);
111 layer = (cluster_id / 4) % 2 + 1;
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;
166 res_GEM =
static_cast<EMTFCollections*
>(coll)->getEMTFGEMPadClusters();
171 if (run3_DAQ_format) {
177 if (reducedDAQWindow)
190 if (reducedDAQWindow)
217 int _station, _ring, _sector, _subsector, _neighbor, _layer;
224 (
res->at(iOut)).PtrEventHeader()->Sector(),
228 int _sector_gem = _sector;
229 int _subsector_gem = _subsector;
230 int _chamber = ((_sector_gem - 1) * 6 + _subsector_gem + 2) % 36 + 1;
232 int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2);
243 ImportGEM(Hit_, GEM_, (
res->at(iOut)).PtrEventHeader()->Endcap(), (
res->at(iOut)).PtrEventHeader()->Sector());
250 bool exact_duplicate =
false;
251 for (
auto const& iHit : *res_hit) {
252 if (Hit_.
BX() == iHit.BX() && Hit_.
Endcap() == iHit.Endcap() && Hit_.
Station() == iHit.Station() &&
253 Hit_.
Chamber() == iHit.Chamber()) {
254 if ((iHit.Is_CSC() == 1 && iHit.Ring() == 2) ||
255 (iHit.Is_GEM() == 1)) {
256 if (Hit_.
Neighbor() == iHit.Neighbor()) {
258 if (iHit.Is_GEM() == 1 && iHit.Ring() == Hit_.
Ring() && iHit.Roll() == Hit_.
Roll() &&
259 iHit.Pad() == Hit_.
Pad()) {
260 exact_duplicate =
true;
268 if (Hit_.
BX() > 3
or Hit_.
BX() < -3) {
269 edm::LogWarning(
"L1T|EMTF") <<
"EMTF unpacked GEM digis with out-of-range BX! BX " << Hit_.
BX()
270 <<
", endcap " << Hit_.
Endcap() <<
", station " << Hit_.
Station()
271 <<
", neighbor " << Hit_.
Neighbor() <<
", ring " << Hit_.
Ring() <<
", chamber " 272 << Hit_.
Chamber() <<
", roll " << Hit_.
Roll() <<
", pad " << Hit_.
Pad()
284 (
res->at(iOut)).push_GEM(GEM_);
285 if (!exact_duplicate and Hit_.
Valid())
286 res_hit->push_back(Hit_);
288 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.