CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CosmicMuonProducer.cc
Go to the documentation of this file.
2 
15 // system include files
16 #include <memory>
17 
18 // user include files
20 
23 
25 
29 
32 
37 
39 
40 using namespace edm;
41 
42 //
43 // constructors and destructor
44 //
46 {
47  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
48  theSeedCollectionLabel = iConfig.getParameter<std::string>("MuonSeedCollectionLabel");
49 
50  // service parameters
51  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
52 
53  // TrackLoader parameters
54  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
55 
56  // the services
57  theService = new MuonServiceProxy(serviceParameters);
58 
59  theTrackFinder = new MuonTrackFinder(new CosmicMuonTrajectoryBuilder(tbpar,theService),
60  new MuonTrackLoader(trackLoaderParameters, theService));
61 
62  produces<reco::TrackCollection>();
63  produces<TrackingRecHitCollection>();
64  produces<reco::TrackExtraCollection>();
65  produces<std::vector<Trajectory> >();
66  produces<TrajTrackAssociationCollection>();
67 
68 }
69 
70 
72 {
73  if (theService) delete theService;
74  if (theTrackFinder) delete theTrackFinder;
75 }
76 
77 
78 // ------------ method called to produce the data ------------
79 void
81 {
82  LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id();
83 
85  iEvent.getByLabel(theSeedCollectionLabel,seeds);
86 
87  // Update the services
88  theService->update(iSetup);
89  theTrackFinder->reconstruct(seeds,iEvent);
90 }
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
CosmicMuonProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:243
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::EventID id() const
Definition: EventBase.h:56