#include <RecoMuon/CosmicMuonProducer/src/CosmicMuonProducer.h>
Public Member Functions | |
CosmicMuonProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~CosmicMuonProducer () | |
Private Attributes | |
std::string | theSeedCollectionLabel |
MuonServiceProxy * | theService |
the event setup proxy, it takes care the services update | |
MuonTrackFinder * | theTrackFinder |
Implementation:
Definition at line 16 of file CosmicMuonProducer.h.
CosmicMuonProducer::CosmicMuonProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 45 of file CosmicMuonProducer.cc.
References edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, theSeedCollectionLabel, theService, and theTrackFinder.
00046 { 00047 ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters"); 00048 theSeedCollectionLabel = iConfig.getParameter<std::string>("MuonSeedCollectionLabel"); 00049 00050 // service parameters 00051 ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters"); 00052 00053 // TrackLoader parameters 00054 ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters"); 00055 00056 // the services 00057 theService = new MuonServiceProxy(serviceParameters); 00058 00059 theTrackFinder = new MuonTrackFinder(new CosmicMuonTrajectoryBuilder(tbpar,theService), 00060 new MuonTrackLoader(trackLoaderParameters, theService)); 00061 00062 produces<reco::TrackCollection>(); 00063 produces<TrackingRecHitCollection>(); 00064 produces<reco::TrackExtraCollection>(); 00065 produces<std::vector<Trajectory> >(); 00066 produces<TrajTrackAssociationCollection>(); 00067 00068 }
CosmicMuonProducer::~CosmicMuonProducer | ( | ) |
Definition at line 71 of file CosmicMuonProducer.cc.
References theService, and theTrackFinder.
00072 { 00073 if (theService) delete theService; 00074 if (theTrackFinder) delete theTrackFinder; 00075 }
void CosmicMuonProducer::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 80 of file CosmicMuonProducer.cc.
References edm::Event::getByLabel(), edm::Event::id(), MuonTrackFinder::reconstruct(), theSeedCollectionLabel, theService, and theTrackFinder.
00081 { 00082 LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id(); 00083 00084 Handle<View<TrajectorySeed> > seeds; 00085 iEvent.getByLabel(theSeedCollectionLabel,seeds); 00086 00087 // Update the services 00088 theService->update(iSetup); 00089 theTrackFinder->reconstruct(seeds,iEvent); 00090 }
std::string CosmicMuonProducer::theSeedCollectionLabel [private] |
Definition at line 25 of file CosmicMuonProducer.h.
Referenced by CosmicMuonProducer(), and produce().
MuonServiceProxy* CosmicMuonProducer::theService [private] |
the event setup proxy, it takes care the services update
Definition at line 29 of file CosmicMuonProducer.h.
Referenced by CosmicMuonProducer(), produce(), and ~CosmicMuonProducer().
Definition at line 26 of file CosmicMuonProducer.h.
Referenced by CosmicMuonProducer(), produce(), and ~CosmicMuonProducer().