CMS 3D CMS Logo

L1TMuonEndCapTrackProducer.cc
Go to the documentation of this file.
2 
4  : track_finder_(new TrackFinder(iConfig, consumesCollector())),
5  uGMT_converter_(new MicroGMTConverter()),
6  config_(iConfig) {
7  // Make output products
8  produces<EMTFHitCollection>(""); // All CSC LCTs and RPC clusters received by EMTF
9  produces<EMTFTrackCollection>(""); // All output EMTF tracks, in same format as unpacked data
10  produces<l1t::RegionalMuonCandBxCollection>("EMTF"); // EMTF tracks output to uGMT
11 }
12 
14 
16  // Create pointers to output products
17  auto out_hits_tmp = std::make_unique<EMTFHitCollection>(); // before zero suppression
18  auto out_hits = std::make_unique<EMTFHitCollection>(); // after zero suppression
19  auto out_tracks = std::make_unique<EMTFTrackCollection>();
20  auto out_cands = std::make_unique<l1t::RegionalMuonCandBxCollection>();
21 
22  // Main EMTF emulator process, produces tracks from hits in each sector in each event
23  track_finder_->process(iEvent, iSetup, *out_hits_tmp, *out_tracks);
24 
25  // Apply zero suppression: only sectors with at least one CSC LCT are read out
26  // In Run 2, it means RPC hits are only saved if there is at least one CSC LCT in the sector
27  emtf::sector_array<bool> good_sectors;
28  good_sectors.fill(false);
29 
30  for (const auto& h : *out_hits_tmp) {
31  if (h.Is_CSC()) {
32  good_sectors.at(h.Sector_idx()) = true;
33  }
34  }
35 
36  for (const auto& h : *out_hits_tmp) {
37  if (good_sectors.at(h.Sector_idx())) {
38  out_hits->push_back(h);
39  }
40  }
41 
42  // Convert into uGMT format
43  uGMT_converter_->convert_all(iEvent, *out_tracks, *out_cands);
44 
45  // Fill the output products
46  iEvent.put(std::move(out_hits), "");
47  iEvent.put(std::move(out_tracks), "");
48  iEvent.put(std::move(out_cands), "EMTF");
49 }
50 
51 // Fill 'descriptions' with the allowed parameters
53  // The following says we do not know what parameters are allowed so do no validation
54  // Please change this to state exactly what you do use, even if it is no parameters
56  desc.setUnknown();
57  descriptions.addDefault(desc);
58 }
59 
60 // Define this as a plug-in
L1TMuonEndCapTrackProducer::~L1TMuonEndCapTrackProducer
~L1TMuonEndCapTrackProducer() override
Definition: L1TMuonEndCapTrackProducer.cc:13
L1TMuonEndCapTrackProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonEndCapTrackProducer.cc:15
emtf::sector_array
std::array< T, NUM_SECTORS > sector_array
Definition: Common.h:63
TrackFinder
Definition: TrackFinder.h:16
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
L1TMuonEndCapTrackProducer::uGMT_converter_
std::unique_ptr< MicroGMTConverter > uGMT_converter_
Definition: L1TMuonEndCapTrackProducer.h:38
L1TMuonEndCapTrackProducer.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1TMuonEndCapTrackProducer
Definition: L1TMuonEndCapTrackProducer.h:19
MicroGMTConverter
Definition: MicroGMTConverter.h:11
h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
L1TMuonEndCapTrackProducer::L1TMuonEndCapTrackProducer
L1TMuonEndCapTrackProducer(const edm::ParameterSet &)
Definition: L1TMuonEndCapTrackProducer.cc:3
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TMuonEndCapTrackProducer::track_finder_
std::unique_ptr< TrackFinder > track_finder_
Definition: L1TMuonEndCapTrackProducer.h:37
edm::EventSetup
Definition: EventSetup.h:58
L1TMuonEndCapTrackProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: L1TMuonEndCapTrackProducer.cc:52
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99