CMS 3D CMS Logo

L1TMuonOverlapPhase1TrackProducer.cc
Go to the documentation of this file.
4 
9 
17 
18 #include <algorithm>
19 #include <iostream>
20 #include <memory>
21 
23  : muStubsInputTokens(
24  {consumes<L1MuDTChambPhContainer>(edmParameterSet.getParameter<edm::InputTag>("srcDTPh")),
25  consumes<L1MuDTChambThContainer>(edmParameterSet.getParameter<edm::InputTag>("srcDTTh")),
26  consumes<CSCCorrelatedLCTDigiCollection>(edmParameterSet.getParameter<edm::InputTag>("srcCSC")),
27  consumes<RPCDigiCollection>(edmParameterSet.getParameter<edm::InputTag>("srcRPC"))}),
28  omtfParamsEsToken(esConsumes<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd, edm::Transition::BeginRun>()),
29  muonGeometryTokens({esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>(),
30  esConsumes<CSCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>(),
31  esConsumes<DTGeometry, MuonGeometryRecord, edm::Transition::BeginRun>()}),
32  magneticFieldEsToken(esConsumes<MagneticField, IdealMagneticFieldRecord, edm::Transition::BeginRun>()),
33  propagatorEsToken(esConsumes<Propagator, TrackingComponentsRecord, edm::Transition::BeginRun>(
34  edm::ESInputTag("", "SteppingHelixPropagatorAlong"))),
35  //propagatorEsToken(esConsumes<Propagator, TrackingComponentsRecord, edm::Transition::BeginRun>(edmParameterSet.getParameter<edm::ESInputTag>("propagatorTag"))),
36  omtfReconstruction(edmParameterSet, muStubsInputTokens) {
37  produces<l1t::RegionalMuonCandBxCollection>("OMTF");
38 
39  if (edmParameterSet.exists("simTracksTag"))
40  mayConsume<edm::SimTrackContainer>(edmParameterSet.getParameter<edm::InputTag>("simTracksTag"));
41  if (edmParameterSet.exists("simVertexesTag"))
42  mayConsume<edm::SimVertexContainer>(edmParameterSet.getParameter<edm::InputTag>("simVertexesTag"));
43  if (edmParameterSet.exists("trackingParticleTag"))
44  mayConsume<TrackingParticleCollection>(edmParameterSet.getParameter<edm::InputTag>("trackingParticleTag"));
45 
46  if (edmParameterSet.exists("genParticleTag"))
47  mayConsume<reco::GenParticleCollection>(edmParameterSet.getParameter<edm::InputTag>("genParticleTag"));
48 
49  if (edmParameterSet.exists("rpcSimHitsInputTag"))
50  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("rpcSimHitsInputTag"));
51  if (edmParameterSet.exists("cscSimHitsInputTag"))
52  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("cscSimHitsInputTag"));
53  if (edmParameterSet.exists("dtSimHitsInputTag"))
54  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("dtSimHitsInputTag"));
55 
56  if (edmParameterSet.exists("rpcDigiSimLinkInputTag"))
58  edmParameterSet.getParameter<edm::InputTag>("rpcDigiSimLinkInputTag"));
59  if (edmParameterSet.exists("cscStripDigiSimLinksInputTag"))
61  edmParameterSet.getParameter<edm::InputTag>("cscStripDigiSimLinksInputTag"));
62  if (edmParameterSet.exists("dtDigiSimLinksInputTag"))
64  edmParameterSet.getParameter<edm::InputTag>("dtDigiSimLinksInputTag"));
65 }
80 }
84  std::ostringstream str;
85 
86  std::unique_ptr<l1t::RegionalMuonCandBxCollection> candidates = omtfReconstruction.reconstruct(iEvent, evSetup);
87 
88  iEvent.put(std::move(candidates), "OMTF");
89 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldEsToken
needed by tools/CandidateSimMuonMatcher.h
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorEsToken
void produce(edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &run, edm::EventSetup const &iSetup) override
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
edm::ESGetToken< L1TMuonOverlapParams, L1TMuonOverlapParamsRcd > omtfParamsEsToken
L1TMuonOverlapPhase1TrackProducer(const edm::ParameterSet &)
#define str(s)
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...