CMS 3D CMS Logo

CosmicMuonProducer.cc
Go to the documentation of this file.
2 
13 // system include files
14 #include <memory>
15 
16 // user include files
19 
22 
24 
28 
30 
35 
37 
38 using namespace edm;
39 
40 //
41 // constructors and destructor
42 //
44  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
45 
46  theSeedCollectionToken =
47  consumes<edm::View<TrajectorySeed> >(iConfig.getParameter<std::string>("MuonSeedCollectionLabel"));
48 
49  // service parameters
50  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
51 
52  // TrackLoader parameters
53  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
54 
55  // the services
56 
57  edm::ConsumesCollector iC = consumesCollector();
58 
59  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
60  theTrackFinder =
61  std::make_unique<MuonTrackFinder>(std::make_unique<CosmicMuonTrajectoryBuilder>(tbpar, theService.get(), iC),
62  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()));
63 
64  produces<reco::TrackCollection>();
65  produces<TrackingRecHitCollection>();
66  produces<reco::TrackExtraCollection>();
67  produces<std::vector<Trajectory> >();
68  produces<TrajTrackAssociationCollection>();
69 }
70 
72 
73 // ------------ method called to produce the data ------------
75  LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id();
76 
78  iEvent.getByToken(theSeedCollectionToken, seeds);
79 
80  // Update the services
81  theService->update(iSetup);
82  theTrackFinder->reconstruct(seeds, iEvent, iSetup);
83 }
MessageLogger.h
CosmicMuonProducer.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::LogInfo
Definition: MessageLogger.h:254
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
Track.h
CosmicMuonProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CosmicMuonProducer.cc:74
MuonTrackLoader.h
TrajTrackAssociation.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:232
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
CosmicMuonProducer::~CosmicMuonProducer
~CosmicMuonProducer() override
Definition: CosmicMuonProducer.cc:71
iEvent
int iEvent
Definition: GenABIO.cc:224
CosmicMuonTrajectoryBuilder.h
MuonTrackFinder.h
edm::EventSetup
Definition: EventSetup.h:57
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Frameworkfwd.h
CosmicMuonProducer::CosmicMuonProducer
CosmicMuonProducer(const edm::ParameterSet &)
Definition: CosmicMuonProducer.cc:43
MuonServiceProxy.h
EventSetup.h
ConsumesCollector.h
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:39