CMS 3D CMS Logo

GlobalCosmicMuonProducer Class Reference

reconstruct muons using dt,csc,rpc and tracker starting from cosmic muon tracks More...

#include <RecoMuon/CosmicMuonProducer/src/GlobalCosmicMuonProducer.h>

Inheritance diagram for GlobalCosmicMuonProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 GlobalCosmicMuonProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~GlobalCosmicMuonProducer ()

Private Attributes

MuonServiceProxytheService
 the event setup proxy, it takes care the services update
edm::InputTag theTrackCollectionLabel
MuonTrackFindertheTrackFinder


Detailed Description

reconstruct muons using dt,csc,rpc and tracker starting from cosmic muon tracks

Date
2008/09/16 12:06:29
Revision
1.9
Author:
: Chang Liu - Purdue University <Chang.Liu@cern.ch>

Definition at line 20 of file GlobalCosmicMuonProducer.h.


Constructor & Destructor Documentation

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.

00043 {
00044 
00045   edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters");
00046   theTrackCollectionLabel = iConfig.getParameter<edm::InputTag>("MuonCollectionLabel");
00047 
00048   // service parameters
00049   edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
00050   
00051   // TrackLoader parameters
00052   edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters");
00053   
00054   // the services
00055   theService = new MuonServiceProxy(serviceParameters);
00056   
00057   theTrackFinder = new MuonTrackFinder(new GlobalCosmicMuonTrajectoryBuilder(tbpar,theService),
00058                                        new MuonTrackLoader(trackLoaderParameters, theService));
00059 
00060   produces<reco::TrackCollection>();
00061   produces<TrackingRecHitCollection>();
00062   produces<reco::TrackExtraCollection>();
00063   produces<std::vector<Trajectory> >();
00064   produces<TrajTrackAssociationCollection>();
00065 
00066   produces<reco::MuonTrackLinksCollection>();
00067 
00068 }

GlobalCosmicMuonProducer::~GlobalCosmicMuonProducer (  ) 

Definition at line 71 of file GlobalCosmicMuonProducer.cc.

References theService, and theTrackFinder.

00072 {
00073   if (theService) delete theService;
00074   if (theTrackFinder) delete theTrackFinder;
00075 }


Member Function Documentation

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::Handle< T >::isValid(), LogTrace, MuonTrackFinder::reconstruct(), theService, theTrackCollectionLabel, and theTrackFinder.

00081 {
00082   const std::string metname = "Muon|RecoMuon|GlobalCosmicMuonProducer";  
00083   LogTrace(metname)<<"Global Cosmic Muon Reconstruction started";  
00084   
00085   edm::Handle<reco::TrackCollection> cosMuons;
00086   iEvent.getByLabel(theTrackCollectionLabel,cosMuons);
00087   if (!cosMuons.isValid()) {
00088     LogTrace(metname)<< "Muon Track collection is invalid!!!";
00089     return;
00090   }
00091   
00092   // Update the services
00093   theService->update(iSetup);
00094   
00095   // Reconstruct the tracks in the tracker+muon system
00096   LogTrace(metname)<<"Track Reconstruction";
00097 
00098   std::vector<MuonTrajectoryBuilder::TrackCand> cosTrackCands;
00099   for ( unsigned int position = 0; position != cosMuons->size(); ++position ) {
00100     reco::TrackRef cosTrackRef(cosMuons,position);
00101     MuonTrajectoryBuilder::TrackCand cosCand = MuonTrajectoryBuilder::TrackCand(0,cosTrackRef);
00102     cosTrackCands.push_back(cosCand); 
00103   }
00104   theTrackFinder->reconstruct(cosTrackCands,iEvent);
00105   LogTrace(metname)<<"Event loaded";
00106 
00107 }


Member Data Documentation

MuonServiceProxy* GlobalCosmicMuonProducer::theService [private]

the event setup proxy, it takes care the services update

Definition at line 33 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), produce(), and ~GlobalCosmicMuonProducer().

edm::InputTag GlobalCosmicMuonProducer::theTrackCollectionLabel [private]

Definition at line 29 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

MuonTrackFinder* GlobalCosmicMuonProducer::theTrackFinder [private]

Definition at line 30 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), produce(), and ~GlobalCosmicMuonProducer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:21:25 2009 for CMSSW by  doxygen 1.5.4