CMS 3D CMS Logo

L1TMuonOverlapPhase2TrackProducer.cc
Go to the documentation of this file.
15 
16 #include <algorithm>
17 #include <iostream>
18 #include <memory>
19 
21  : muStubsInputTokens(
22  {consumes<L1MuDTChambPhContainer>(edmParameterSet.getParameter<edm::InputTag>("srcDTPh")),
23  consumes<L1MuDTChambThContainer>(edmParameterSet.getParameter<edm::InputTag>("srcDTTh")),
24  consumes<CSCCorrelatedLCTDigiCollection>(edmParameterSet.getParameter<edm::InputTag>("srcCSC")),
25  consumes<RPCDigiCollection>(edmParameterSet.getParameter<edm::InputTag>("srcRPC"))}),
26  omtfParamsEsToken(esConsumes<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd, edm::Transition::BeginRun>()),
27  muonGeometryTokens({esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>(),
28  esConsumes<CSCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>(),
29  esConsumes<DTGeometry, MuonGeometryRecord, edm::Transition::BeginRun>()}),
30  //needed for pattern generation and RootDataDumper
31  magneticFieldEsToken(esConsumes<MagneticField, IdealMagneticFieldRecord, edm::Transition::BeginRun>()),
32  propagatorEsToken(esConsumes<Propagator, TrackingComponentsRecord, edm::Transition::BeginRun>(
33  edm::ESInputTag("", "SteppingHelixPropagatorAlong"))),
34  omtfEmulation(edmParameterSet,
35  muStubsInputTokens,
36  consumes<L1Phase2MuDTPhContainer>(edmParameterSet.getParameter<edm::InputTag>("srcDTPhPhase2"))) {
37  produces<l1t::RegionalMuonCandBxCollection>("OMTF");
38 
39  //it is needed for pattern generation and RootDataDumper
40  if (edmParameterSet.exists("simTracksTag"))
41  mayConsume<edm::SimTrackContainer>(edmParameterSet.getParameter<edm::InputTag>("simTracksTag"));
42  if (edmParameterSet.exists("simVertexesTag"))
43  mayConsume<edm::SimVertexContainer>(edmParameterSet.getParameter<edm::InputTag>("simVertexesTag"));
44 }
45 
56 }
60  std::ostringstream str;
61 
62  std::unique_ptr<l1t::RegionalMuonCandBxCollection> candidates = omtfEmulation.reconstruct(iEvent, evSetup);
63 
64  iEvent.put(std::move(candidates), "OMTF");
65 }
void beginRun(edm::Run const &run, edm::EventSetup const &iSetup) override
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
L1TMuonOverlapPhase2TrackProducer(const edm::ParameterSet &)
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorEsToken
void produce(edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< L1TMuonOverlapParams, L1TMuonOverlapParamsRcd > omtfParamsEsToken
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< l1t::RegionalMuonCandBxCollection > reconstruct(const edm::Event &, const edm::EventSetup &)
void beginRun(edm::Run const &, edm::EventSetup const &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
#define str(s)
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldEsToken
needed by tools/CandidateSimMuonMatcher.h