CMS 3D CMS Logo

Public Member Functions | Private Attributes

CosmicMuonProducer Class Reference

#include <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(), and MuonServiceProxy_cff::MuonServiceProxy.

{
  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
  theSeedCollectionLabel = iConfig.getParameter<std::string>("MuonSeedCollectionLabel");

  // service parameters
  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
  
  // TrackLoader parameters
  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
  
  // the services
  theService = new MuonServiceProxy(serviceParameters);

  theTrackFinder = new MuonTrackFinder(new CosmicMuonTrajectoryBuilder(tbpar,theService),
                                       new MuonTrackLoader(trackLoaderParameters, theService));

  produces<reco::TrackCollection>();
  produces<TrackingRecHitCollection>();
  produces<reco::TrackExtraCollection>();
  produces<std::vector<Trajectory> >();
  produces<TrajTrackAssociationCollection>();

}
CosmicMuonProducer::~CosmicMuonProducer ( )

Definition at line 71 of file CosmicMuonProducer.cc.

{
  if (theService) delete theService;
  if (theTrackFinder) delete theTrackFinder;
}

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(), and edm::EventBase::id().

{
  LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id();

  Handle<View<TrajectorySeed> > seeds; 
  iEvent.getByLabel(theSeedCollectionLabel,seeds);
  
  // Update the services
  theService->update(iSetup);
  theTrackFinder->reconstruct(seeds,iEvent);
}

Member Data Documentation

Definition at line 25 of file CosmicMuonProducer.h.

the event setup proxy, it takes care the services update

Definition at line 29 of file CosmicMuonProducer.h.

Definition at line 26 of file CosmicMuonProducer.h.