#include <GlobalCosmicMuonProducer.h>
Public Member Functions | |
GlobalCosmicMuonProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~GlobalCosmicMuonProducer () | |
Private Attributes | |
MuonServiceProxy * | theService |
the event setup proxy, it takes care the services update | |
edm::InputTag | theTrackCollectionLabel |
MuonTrackFinder * | theTrackFinder |
reconstruct muons using dt,csc,rpc and tracker starting from cosmic muon tracks
Definition at line 20 of file GlobalCosmicMuonProducer.h.
GlobalCosmicMuonProducer::GlobalCosmicMuonProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 42 of file GlobalCosmicMuonProducer.cc.
References edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, theService, theTrackCollectionLabel, and theTrackFinder.
{ edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters"); theTrackCollectionLabel = iConfig.getParameter<edm::InputTag>("MuonCollectionLabel"); // service parameters edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters"); // TrackLoader parameters edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters"); // the services theService = new MuonServiceProxy(serviceParameters); theTrackFinder = new MuonTrackFinder(new GlobalCosmicMuonTrajectoryBuilder(tbpar,theService), new MuonTrackLoader(trackLoaderParameters, theService)); produces<reco::TrackCollection>(); produces<TrackingRecHitCollection>(); produces<reco::TrackExtraCollection>(); produces<std::vector<Trajectory> >(); produces<TrajTrackAssociationCollection>(); produces<reco::MuonTrackLinksCollection>(); }
GlobalCosmicMuonProducer::~GlobalCosmicMuonProducer | ( | ) |
Definition at line 71 of file GlobalCosmicMuonProducer.cc.
References theService, and theTrackFinder.
{ if (theService) delete theService; if (theTrackFinder) delete theTrackFinder; }
void GlobalCosmicMuonProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 80 of file GlobalCosmicMuonProducer.cc.
References edm::Event::getByLabel(), edm::HandleBase::isValid(), LogTrace, metname, position, MuonTrackFinder::reconstruct(), theService, theTrackCollectionLabel, theTrackFinder, and MuonServiceProxy::update().
{ const std::string metname = "Muon|RecoMuon|GlobalCosmicMuonProducer"; LogTrace(metname)<<"Global Cosmic Muon Reconstruction started"; edm::Handle<reco::TrackCollection> cosMuons; iEvent.getByLabel(theTrackCollectionLabel,cosMuons); if (!cosMuons.isValid()) { LogTrace(metname)<< "Muon Track collection is invalid!!!"; return; } // Update the services theService->update(iSetup); // Reconstruct the tracks in the tracker+muon system LogTrace(metname)<<"Track Reconstruction"; std::vector<MuonTrajectoryBuilder::TrackCand> cosTrackCands; for ( unsigned int position = 0; position != cosMuons->size(); ++position ) { reco::TrackRef cosTrackRef(cosMuons,position); MuonTrajectoryBuilder::TrackCand cosCand = MuonTrajectoryBuilder::TrackCand((Trajectory*)(0),cosTrackRef); cosTrackCands.push_back(cosCand); } theTrackFinder->reconstruct(cosTrackCands,iEvent); LogTrace(metname)<<"Event loaded"; }
the event setup proxy, it takes care the services update
Definition at line 33 of file GlobalCosmicMuonProducer.h.
Referenced by GlobalCosmicMuonProducer(), produce(), and ~GlobalCosmicMuonProducer().
Definition at line 29 of file GlobalCosmicMuonProducer.h.
Referenced by GlobalCosmicMuonProducer(), and produce().
Definition at line 30 of file GlobalCosmicMuonProducer.h.
Referenced by GlobalCosmicMuonProducer(), produce(), and ~GlobalCosmicMuonProducer().