#include <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 |
Description: CosmicMuonProducer for muons from cosmic rays
Implementation:
Original Author: Chang Liu Created: Tue Jun 13 02:46:17 CEST 2006
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(), 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; }
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); }
std::string CosmicMuonProducer::theSeedCollectionLabel [private] |
Definition at line 25 of file CosmicMuonProducer.h.
MuonServiceProxy* CosmicMuonProducer::theService [private] |
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.