CMS 3D CMS Logo

L1TMuonOverlapPhase1TrackProducer.cc
Go to the documentation of this file.
2 
5 
10 
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("rpcSimHitsInputTag"))
47  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("rpcSimHitsInputTag"));
48  if (edmParameterSet.exists("cscSimHitsInputTag"))
49  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("cscSimHitsInputTag"));
50  if (edmParameterSet.exists("dtSimHitsInputTag"))
51  mayConsume<edm::PSimHitContainer>(edmParameterSet.getParameter<edm::InputTag>("dtSimHitsInputTag"));
52 
53  if (edmParameterSet.exists("rpcDigiSimLinkInputTag"))
55  edmParameterSet.getParameter<edm::InputTag>("rpcDigiSimLinkInputTag"));
56  if (edmParameterSet.exists("cscStripDigiSimLinksInputTag"))
58  edmParameterSet.getParameter<edm::InputTag>("cscStripDigiSimLinksInputTag"));
59  if (edmParameterSet.exists("dtDigiSimLinksInputTag"))
61  edmParameterSet.getParameter<edm::InputTag>("dtDigiSimLinksInputTag"));
62 }
77 }
81  std::ostringstream str;
82 
83  std::unique_ptr<l1t::RegionalMuonCandBxCollection> candidates = omtfReconstruction.reconstruct(iEvent, evSetup);
84 
85  iEvent.put(std::move(candidates), "OMTF");
86 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldEsToken
needed by tools/CandidateSimMuonMatcher.h
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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 &)
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...