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
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

const edm::ParameterSetconfig_
 
std::unique_ptr< TrackFindertrack_finder_
 
std::unique_ptr< MicroGMTConverteruGMT_converter_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 20 of file L1TMuonEndCapTrackProducer.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file L1TMuonEndCapTrackProducer.cc.

4  :
5  track_finder_(new TrackFinder(iConfig, consumesCollector())),
7  config_(iConfig)
8 {
9  // Make output products
10  // produces<l1t::CPPFDigiCollection> (""); // CPPF Digis emulated by EMTF using RPCDigis from Legacy RPC PAC
11  produces<EMTFHitCollection> (""); // All CSC LCTs and RPC clusters received by EMTF
12  produces<EMTFTrackCollection> (""); // All output EMTF tracks, in same format as unpacked data
13  produces<l1t::RegionalMuonCandBxCollection>("EMTF"); // EMTF tracks output to uGMT
14 }
std::unique_ptr< MicroGMTConverter > uGMT_converter_
const edm::ParameterSet & config_
std::unique_ptr< TrackFinder > track_finder_
L1TMuonEndCapTrackProducer::~L1TMuonEndCapTrackProducer ( )
override

Definition at line 16 of file L1TMuonEndCapTrackProducer.cc.

16  {
17 
18 }

Member Function Documentation

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

Definition at line 68 of file L1TMuonEndCapTrackProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setUnknown().

68  {
69  // The following says we do not know what parameters are allowed so do no validation
70  // Please change this to state exactly what you do use, even if it is no parameters
72  desc.setUnknown();
73  descriptions.addDefault(desc);
74 }
void addDefault(ParameterSetDescription const &psetDescription)
void L1TMuonEndCapTrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 20 of file L1TMuonEndCapTrackProducer.cc.

References h, eostools::move(), edm::Event::put(), track_finder_, and uGMT_converter_.

20  {
21  // Create pointers to output products
22  // auto out_cppfs = std::make_unique<l1t::CPPFDigiCollection>();
23  auto out_hits_tmp = std::make_unique<EMTFHitCollection>();
24  auto out_hits_ZS = std::make_unique<EMTFHitCollection>();
25  auto out_tracks = std::make_unique<EMTFTrackCollection>();
26  auto out_cands = std::make_unique<l1t::RegionalMuonCandBxCollection>();
27 
28  // Main EMTF emulator process, produces tracks from hits in each sector in each event
29  track_finder_->process(iEvent, iSetup, *out_hits_tmp, *out_tracks);
30 
31  // Apply ZeroSuppression: Only save RPC hits if there is at least one CSC LCT in the sector
32  bool has_LCT[12] = {false};
33  for (int iSect = 0; iSect < 12; iSect++) {
34  for (const auto& h : *out_hits_tmp) {
35  if (h.Is_CSC() && h.Sector_idx() == iSect) {
36  has_LCT[iSect] = true; break;
37  }
38  }
39  }
40  for (const auto& h : *out_hits_tmp) {
41  if (has_LCT[h.Sector_idx()] || h.Is_RPC() == 0) {
42  out_hits_ZS->push_back( h );
43  }
44  }
45 
46  // // Fill collection of emulated CPPFDigis
47  // for (const auto& h : *out_hits_ZS) {
48  // if (h.Is_RPC()) out_cppfs->push_back( h.CreateCPPFDigi() );
49  // }
50 
51  // Convert into uGMT format
52  uGMT_converter_->convert_all(iEvent, *out_tracks, *out_cands);
53 
54  // Fill the output products
55  // iEvent.put(std::move(out_cppfs), "");
56  iEvent.put(std::move(out_hits_ZS), "");
57  iEvent.put(std::move(out_tracks), "");
58  iEvent.put(std::move(out_cands), "EMTF");
59 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::unique_ptr< MicroGMTConverter > uGMT_converter_
std::unique_ptr< TrackFinder > track_finder_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

const edm::ParameterSet& L1TMuonEndCapTrackProducer::config_
private

Definition at line 41 of file L1TMuonEndCapTrackProducer.h.

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

Definition at line 38 of file L1TMuonEndCapTrackProducer.h.

Referenced by produce().

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

Definition at line 39 of file L1TMuonEndCapTrackProducer.h.

Referenced by produce().