CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Phase2L1TGMTTkMuonProducer Class Reference
Inheritance diagram for Phase2L1TGMTTkMuonProducer:
edm::stream::EDProducer<>

Public Member Functions

 Phase2L1TGMTTkMuonProducer (const edm::ParameterSet &)
 
 ~Phase2L1TGMTTkMuonProducer () 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 beginStream (edm::StreamID) override
 
void endStream () override
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

int bxMax_
 
int bxMin_
 
int minTrackStubs_
 
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
 
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollectionsrcTracks_
 
std::unique_ptr< TPStps_
 

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 Phase2L1TGMTTkMuonProducer.cc.

Constructor & Destructor Documentation

◆ Phase2L1TGMTTkMuonProducer()

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

Definition at line 38 of file Phase2L1TGMTTkMuonProducer.cc.

39  : tps_(new TPS(iConfig)),
40  srcTracks_(consumes<l1t::TrackerMuon::L1TTTrackCollection>(iConfig.getParameter<edm::InputTag>("srcTracks"))),
41  srcStubs_(consumes<std::vector<l1t::MuonStub> >(iConfig.getParameter<edm::InputTag>("srcStubs"))),
42  minTrackStubs_(iConfig.getParameter<int>("minTrackStubs")),
43  bxMin_(iConfig.getParameter<int>("muonBXMin")),
44  bxMax_(iConfig.getParameter<int>("muonBXMax"))
45 
46 {
47  produces<std::vector<l1t::TrackerMuon> >();
48 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollection > srcTracks_

◆ ~Phase2L1TGMTTkMuonProducer()

Phase2L1TGMTTkMuonProducer::~Phase2L1TGMTTkMuonProducer ( )
override

Definition at line 50 of file Phase2L1TGMTTkMuonProducer.cc.

50  {
51  // do anything here that needs to be done at destruction time
52  // (e.g. close files, deallocate resources etc.)
53 }

Member Function Documentation

◆ beginStream()

void Phase2L1TGMTTkMuonProducer::beginStream ( edm::StreamID  )
overrideprivate

Definition at line 87 of file Phase2L1TGMTTkMuonProducer.cc.

87 {}

◆ endStream()

void Phase2L1TGMTTkMuonProducer::endStream ( )
overrideprivate

Definition at line 90 of file Phase2L1TGMTTkMuonProducer.cc.

90 {}

◆ fillDescriptions()

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

Definition at line 92 of file Phase2L1TGMTTkMuonProducer.cc.

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

92  {
93  //The following says we do not know what parameters are allowed so do no validation
94  // Please change this to state exactly what you do use, even if it is no parameters
96  desc.setUnknown();
97  descriptions.addDefault(desc);
98 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 60 of file Phase2L1TGMTTkMuonProducer.cc.

References mps_fire::i, iEvent, createfilelist::int, minTrackStubs_, eostools::move(), MillePedeFileConverter_cfg::out, PointingDoubleMultiSkim_cfg::out1, srcStubs_, srcTracks_, tps_, HLT_2024v13_cff::track, DiMuonV_cfg::tracks, and parallelization::uint.

60  {
61  using namespace edm;
63  iEvent.getByToken(srcTracks_, trackHandle);
64  std::vector<edm::Ptr<l1t::TrackerMuon::L1TTTrackType> > tracks;
65  for (uint i = 0; i < trackHandle->size(); ++i) {
67  if (track->momentum().transverse() < 2.0)
68  continue;
69  if (track->getStubRefs().size() >= (unsigned int)(minTrackStubs_))
70  tracks.push_back(track);
71  }
72 
73  l1t::MuonStubRefVector muonStubs;
75  iEvent.getByToken(srcStubs_, stubHandle);
76  for (size_t i = 0; i < stubHandle->size(); ++i) {
77  MuonStubRef stub(stubHandle, i);
78  muonStubs.push_back(stub);
79  }
80 
81  std::vector<l1t::TrackerMuon> out = tps_->processEvent(tracks, muonStubs);
82  std::unique_ptr<std::vector<l1t::TrackerMuon> > out1 = std::make_unique<std::vector<l1t::TrackerMuon> >(out);
83  iEvent.put(std::move(out1));
84 }
std::vector< edm::Ref< MuonStubCollection > > MuonStubRefVector
Definition: MuonStub.h:44
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollection > srcTracks_
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ bxMax_

int Phase2L1TGMTTkMuonProducer::bxMax_
private

Definition at line 35 of file Phase2L1TGMTTkMuonProducer.cc.

◆ bxMin_

int Phase2L1TGMTTkMuonProducer::bxMin_
private

Definition at line 34 of file Phase2L1TGMTTkMuonProducer.cc.

◆ minTrackStubs_

int Phase2L1TGMTTkMuonProducer::minTrackStubs_
private

Definition at line 33 of file Phase2L1TGMTTkMuonProducer.cc.

Referenced by produce().

◆ srcStubs_

edm::EDGetTokenT<std::vector<l1t::MuonStub> > Phase2L1TGMTTkMuonProducer::srcStubs_
private

Definition at line 32 of file Phase2L1TGMTTkMuonProducer.cc.

Referenced by produce().

◆ srcTracks_

edm::EDGetTokenT<l1t::TrackerMuon::L1TTTrackCollection> Phase2L1TGMTTkMuonProducer::srcTracks_
private

Definition at line 31 of file Phase2L1TGMTTkMuonProducer.cc.

Referenced by produce().

◆ tps_

std::unique_ptr<TPS> Phase2L1TGMTTkMuonProducer::tps_
private

Definition at line 30 of file Phase2L1TGMTTkMuonProducer.cc.

Referenced by produce().