CMS 3D CMS Logo

CosmicMuonProducer Class Reference

Description: CosmicMuonProducer for muons from cosmic rays. More...

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

Inheritance diagram for CosmicMuonProducer:

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

List of all members.

Public Member Functions

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

Private Attributes

std::string theSeedCollectionLabel
MuonServiceProxytheService
 the event setup proxy, it takes care the services update
MuonTrackFindertheTrackFinder


Detailed Description

Description: CosmicMuonProducer for muons from cosmic rays.

Implementation:

Date
2009/04/16 10:43:39
Revision
1.16
Original Author: Chang Liu Created: Tue Jun 13 02:46:17 CEST 2006

Definition at line 16 of file CosmicMuonProducer.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

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().

MuonTrackFinder* CosmicMuonProducer::theTrackFinder [private]

Definition at line 26 of file CosmicMuonProducer.h.

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


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