CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TMuonEndCapTrackProducer Class Reference

#include <L1TMuonEndCapTrackProducer.h>

Inheritance diagram for L1TMuonEndCapTrackProducer:
edm::stream::EDProducer<>

Public Member Functions

 L1TMuonEndCapTrackProducer (const edm::ParameterSet &)
 
 ~L1TMuonEndCapTrackProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::unique_ptr< TrackFindertrack_finder_
 
std::unique_ptr< MicroGMTConverteruGMT_converter_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 19 of file L1TMuonEndCapTrackProducer.h.

Constructor & Destructor Documentation

◆ L1TMuonEndCapTrackProducer()

L1TMuonEndCapTrackProducer::L1TMuonEndCapTrackProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 3 of file L1TMuonEndCapTrackProducer.cc.

4  : track_finder_(new TrackFinder(iConfig, consumesCollector())), uGMT_converter_(new MicroGMTConverter()) {
5  // Make output products
6  produces<EMTFHitCollection>(""); // All CSC LCTs and RPC clusters received by EMTF
7  produces<EMTFTrackCollection>(""); // All output EMTF tracks, in same format as unpacked data
8  produces<l1t::RegionalMuonCandBxCollection>("EMTF"); // EMTF tracks output to uGMT
9 }
std::unique_ptr< MicroGMTConverter > uGMT_converter_
std::unique_ptr< TrackFinder > track_finder_

◆ ~L1TMuonEndCapTrackProducer()

L1TMuonEndCapTrackProducer::~L1TMuonEndCapTrackProducer ( )
override

Definition at line 11 of file L1TMuonEndCapTrackProducer.cc.

11 {}

Member Function Documentation

◆ fillDescriptions()

void L1TMuonEndCapTrackProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 50 of file L1TMuonEndCapTrackProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

50  {
51  // The following says we do not know what parameters are allowed so do no validation
52  // Please change this to state exactly what you do use, even if it is no parameters
54  desc.setUnknown();
55  descriptions.addDefault(desc);
56 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

void L1TMuonEndCapTrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 13 of file L1TMuonEndCapTrackProducer.cc.

References h, iEvent, eostools::move(), track_finder_, and uGMT_converter_.

13  {
14  // Create pointers to output products
15  auto out_hits_tmp = std::make_unique<EMTFHitCollection>(); // before zero suppression
16  auto out_hits = std::make_unique<EMTFHitCollection>(); // after zero suppression
17  auto out_tracks = std::make_unique<EMTFTrackCollection>();
18  auto out_cands = std::make_unique<l1t::RegionalMuonCandBxCollection>();
19 
20  // Main EMTF emulator process, produces tracks from hits in each sector in each event
21  track_finder_->process(iEvent, iSetup, *out_hits_tmp, *out_tracks);
22 
23  // Apply zero suppression: only sectors with at least one CSC LCT are read out
24  // In Run 2, it means RPC hits are only saved if there is at least one CSC LCT in the sector
25  emtf::sector_array<bool> good_sectors;
26  good_sectors.fill(false);
27 
28  for (const auto& h : *out_hits_tmp) {
29  if (h.Is_CSC()) {
30  good_sectors.at(h.Sector_idx()) = true;
31  }
32  }
33 
34  for (const auto& h : *out_hits_tmp) {
35  if (good_sectors.at(h.Sector_idx())) {
36  out_hits->push_back(h);
37  }
38  }
39 
40  // Convert into uGMT format
41  uGMT_converter_->convert_all(iEvent, *out_tracks, *out_cands);
42 
43  // Fill the output products
44  iEvent.put(std::move(out_hits), "");
45  iEvent.put(std::move(out_tracks), "");
46  iEvent.put(std::move(out_cands), "EMTF");
47 }
std::unique_ptr< MicroGMTConverter > uGMT_converter_
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< TrackFinder > track_finder_
std::array< T, NUM_SECTORS > sector_array
Definition: Common.h:63
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ track_finder_

std::unique_ptr<TrackFinder> L1TMuonEndCapTrackProducer::track_finder_
private

Definition at line 37 of file L1TMuonEndCapTrackProducer.h.

Referenced by produce().

◆ uGMT_converter_

std::unique_ptr<MicroGMTConverter> L1TMuonEndCapTrackProducer::uGMT_converter_
private

Definition at line 38 of file L1TMuonEndCapTrackProducer.h.

Referenced by produce().