CMS 3D CMS Logo

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

Public Member Functions

 Phase2L1TGMTProducer (const edm::ParameterSet &)
 
 ~Phase2L1TGMTProducer () 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

edm::EDGetTokenT< BXVector< RegionalMuonCand > > bmtfTracks_
 
int bxMax_
 
int bxMin_
 
edm::EDGetTokenT< BXVector< RegionalMuonCand > > emtfTracks_
 
int minTrackStubs_
 
std::unique_ptr< Nodenode_
 
edm::EDGetTokenT< BXVector< RegionalMuonCand > > omtfTracks_
 
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
 
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollectionsrcTracks_
 

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

Constructor & Destructor Documentation

◆ Phase2L1TGMTProducer()

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

Definition at line 41 of file Phase2L1TGMTProducer.cc.

42  : node_(new Node(iConfig)),
43  srcTracks_(consumes<l1t::TrackerMuon::L1TTTrackCollection>(iConfig.getParameter<edm::InputTag>("srcTracks"))),
44  srcStubs_(consumes<std::vector<l1t::MuonStub> >(iConfig.getParameter<edm::InputTag>("srcStubs"))),
45  bmtfTracks_(consumes<BXVector<RegionalMuonCand> >(iConfig.getParameter<edm::InputTag>("srcBMTF"))),
46  emtfTracks_(consumes<BXVector<RegionalMuonCand> >(iConfig.getParameter<edm::InputTag>("srcEMTF"))),
47  omtfTracks_(consumes<BXVector<RegionalMuonCand> >(iConfig.getParameter<edm::InputTag>("srcOMTF"))),
48  minTrackStubs_(iConfig.getParameter<int>("minTrackStubs")),
49  bxMin_(iConfig.getParameter<int>("muonBXMin")),
50  bxMax_(iConfig.getParameter<int>("muonBXMax"))
51 
52 {
53  produces<std::vector<l1t::TrackerMuon> >();
54 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< BXVector< RegionalMuonCand > > omtfTracks_
TGeoNode Node
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollection > srcTracks_
edm::EDGetTokenT< BXVector< RegionalMuonCand > > emtfTracks_
std::unique_ptr< Node > node_
edm::EDGetTokenT< BXVector< RegionalMuonCand > > bmtfTracks_

◆ ~Phase2L1TGMTProducer()

Phase2L1TGMTProducer::~Phase2L1TGMTProducer ( )
override

Definition at line 56 of file Phase2L1TGMTProducer.cc.

56  {
57  // do anything here that needs to be done at destruction time
58  // (e.g. close files, deallocate resources etc.)
59 }

Member Function Documentation

◆ beginStream()

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

Definition at line 122 of file Phase2L1TGMTProducer.cc.

122 {}

◆ endStream()

void Phase2L1TGMTProducer::endStream ( )
overrideprivate

Definition at line 125 of file Phase2L1TGMTProducer.cc.

125 {}

◆ fillDescriptions()

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

Definition at line 127 of file Phase2L1TGMTProducer.cc.

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

127  {
128  //The following says we do not know what parameters are allowed so do no validation
129  // Please change this to state exactly what you do use, even if it is no parameters
131  desc.setUnknown();
132  descriptions.addDefault(desc);
133 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 66 of file Phase2L1TGMTProducer.cc.

References bmtfTracks_, simKBmtfDigis_cfi::bx, bxMax_, bxMin_, emtfTracks_, mps_fire::i, iEvent, createfilelist::int, minTrackStubs_, eostools::move(), HLT_2022v15_cff::muon, ALCARECOTkAlDQM_cff::muonTracks, node_, omtfTracks_, MillePedeFileConverter_cfg::out, PointingDoubleMultiSkim_cfg::out1, srcStubs_, srcTracks_, HLT_2022v15_cff::track, tracks, and parallelization::uint.

66  {
67  using namespace edm;
69  iEvent.getByToken(srcTracks_, trackHandle);
70  std::vector<edm::Ptr<l1t::TrackerMuon::L1TTTrackType> > tracks;
71  for (uint i = 0; i < trackHandle->size(); ++i) {
73  if (track->momentum().transverse() < 2.0)
74  continue;
75  if (track->getStubRefs().size() >= (unsigned int)(minTrackStubs_))
76  tracks.push_back(track);
77  }
78 
80  iEvent.getByToken(srcStubs_, stubHandle);
82  for (uint i = 0; i < stubHandle->size(); ++i) {
83  l1t::MuonStubRef stub(stubHandle, i);
84  if (stub->bxNum() >= bxMin_ && stub->bxNum() <= bxMax_)
85  stubs.push_back(stub);
86  }
87 
89  // BXVector<RegionalMuonCand> muonTracks;
90 
92  iEvent.getByToken(bmtfTracks_, bmtfHandle);
94  iEvent.getByToken(emtfTracks_, emtfHandle);
96  iEvent.getByToken(omtfTracks_, omtfHandle);
97 
98  for (int bx = bxMin_; bx <= bxMax_; ++bx) {
99  if (bx >= bmtfHandle->getFirstBX() && bx <= bmtfHandle->getLastBX())
100  for (size_t i = 0; i < bmtfHandle->size(bx); ++i) {
101  RegionalMuonCandRef muon(bmtfHandle, i);
102  muonTracks.push_back(bx, muon);
103  }
104  if (bx >= omtfHandle->getFirstBX() && bx <= omtfHandle->getLastBX())
105  for (size_t i = 0; i < omtfHandle->size(bx); ++i) {
106  RegionalMuonCandRef muon(omtfHandle, i);
107  muonTracks.push_back(bx, muon);
108  }
109  if (bx >= emtfHandle->getFirstBX() && bx <= emtfHandle->getLastBX())
110  for (size_t i = 0; i < emtfHandle->size(bx); ++i) {
111  RegionalMuonCandRef muon(emtfHandle, i);
112  muonTracks.push_back(bx, muon);
113  }
114  }
115 
116  std::vector<l1t::TrackerMuon> out = node_->processEvent(tracks, muonTracks, stubs);
117  std::unique_ptr<std::vector<l1t::TrackerMuon> > out1 = std::make_unique<std::vector<l1t::TrackerMuon> >(out);
118  iEvent.put(std::move(out1));
119 }
edm::EDGetTokenT< BXVector< RegionalMuonCand > > omtfTracks_
std::vector< edm::Ref< MuonStubCollection > > MuonStubRefVector
Definition: MuonStub.h:44
int iEvent
Definition: GenABIO.cc:224
auto const & tracks
cannot be loose
HLT enums.
edm::EDGetTokenT< std::vector< l1t::MuonStub > > srcStubs_
edm::EDGetTokenT< l1t::TrackerMuon::L1TTTrackCollection > srcTracks_
edm::EDGetTokenT< BXVector< RegionalMuonCand > > emtfTracks_
def move(src, dest)
Definition: eostools.py:511
std::unique_ptr< Node > node_
edm::EDGetTokenT< BXVector< RegionalMuonCand > > bmtfTracks_

Member Data Documentation

◆ bmtfTracks_

edm::EDGetTokenT<BXVector<RegionalMuonCand> > Phase2L1TGMTProducer::bmtfTracks_
private

Definition at line 33 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ bxMax_

int Phase2L1TGMTProducer::bxMax_
private

Definition at line 38 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ bxMin_

int Phase2L1TGMTProducer::bxMin_
private

Definition at line 37 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ emtfTracks_

edm::EDGetTokenT<BXVector<RegionalMuonCand> > Phase2L1TGMTProducer::emtfTracks_
private

Definition at line 34 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ minTrackStubs_

int Phase2L1TGMTProducer::minTrackStubs_
private

Definition at line 36 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ node_

std::unique_ptr<Node> Phase2L1TGMTProducer::node_
private

Definition at line 30 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ omtfTracks_

edm::EDGetTokenT<BXVector<RegionalMuonCand> > Phase2L1TGMTProducer::omtfTracks_
private

Definition at line 35 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ srcStubs_

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

Definition at line 32 of file Phase2L1TGMTProducer.cc.

Referenced by produce().

◆ srcTracks_

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

Definition at line 31 of file Phase2L1TGMTProducer.cc.

Referenced by produce().