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 
27 
29 
34 
36 
37 using namespace edm;
38 
39 //
40 // constructors and destructor
41 //
43  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
44 
45  theSeedCollectionToken =
46  consumes<edm::View<TrajectorySeed> >(iConfig.getParameter<std::string>("MuonSeedCollectionLabel"));
47 
48  // service parameters
49  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
50 
51  // TrackLoader parameters
52  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
53 
54  // the services
55 
56  edm::ConsumesCollector iC = consumesCollector();
57 
58  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
59  theTrackFinder =
60  std::make_unique<MuonTrackFinder>(std::make_unique<CosmicMuonTrajectoryBuilder>(tbpar, theService.get(), iC),
61  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
62  iC);
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void produce(edm::Event &, const edm::EventSetup &) override
CosmicMuonProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:224
Log< level::Info, false > LogInfo
HLT enums.
~CosmicMuonProducer() override