Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:50

0001 #include "FWCore/Framework/interface/Event.h"
0002 #include "EMTFCollections.h"
0003 
0004 namespace l1t {
0005   namespace stage2 {
0006     EMTFCollections::~EMTFCollections() {
0007       // std::cout << "Inside EMTFCollections.cc: ~EMTFCollections" << std::endl;
0008 
0009       // Sort by processor to match uGMT unpacked order
0010       L1TMuonEndCap::sort_uGMT_muons(*regionalMuonCands_);
0011 
0012       // Apply ZeroSuppression: Only save RPC hits if there is at least one CSC LCT in the sector
0013       bool has_LCT[12] = {false};
0014       for (int iSect = 0; iSect < 12; iSect++) {
0015         for (const auto& h : *EMTFHits_) {
0016           if (h.Is_CSC() && h.Sector_idx() == iSect) {
0017             has_LCT[iSect] = true;
0018             break;
0019           }
0020         }
0021       }
0022       for (const auto& h : *EMTFHits_) {
0023         if (has_LCT[h.Sector_idx()] || (h.Is_RPC() == 0 && h.Is_GEM() == 0)) {
0024           EMTFHits_ZS_->push_back(h);
0025         }
0026       }
0027       for (const auto& c : *EMTFCPPFs_) {
0028         int sect_idx = c.emtf_sector() - 1 + 6 * (c.rpcId().region() == -1);
0029         if (has_LCT[sect_idx]) {
0030           EMTFCPPFs_ZS_->push_back(c);
0031         }
0032       }
0033       // TODO: Do we need something equivalent for GEMs - JS 03.07.20
0034       // for (const auto& g : *EMTFGEMPadClusters_) {
0035       //   int sect_idx = g.emtf_sector() - 1 + 6 * (g.gemId().region() == -1);
0036       //   if (has_LCT[sect_idx]) {
0037       //     EMTFGEMPadClusters_ZS_->push_back(g);
0038       //   }
0039       // }
0040 
0041       event_.put(std::move(regionalMuonCands_));
0042       event_.put(std::move(regionalMuonShowers_));
0043       event_.put(std::move(EMTFDaqOuts_));
0044       event_.put(std::move(EMTFHits_ZS_));
0045       event_.put(std::move(EMTFTracks_));
0046       event_.put(std::move(EMTFLCTs_));
0047       event_.put(std::move(EMTFCSCShowers_));
0048       event_.put(std::move(EMTFCPPFs_ZS_));
0049       event_.put(std::move(EMTFGEMPadClusters_));
0050       // event_.put(std::move(EMTFGEMPadClusters_ZS_));
0051     }
0052   }  // namespace stage2
0053 }  // namespace l1t