CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CosmicMuonProducer Class Reference

#include <CosmicMuonProducer.h>

Inheritance diagram for CosmicMuonProducer:
edm::stream::EDProducer<>

Public Member Functions

 CosmicMuonProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~CosmicMuonProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

edm::EDGetTokenT< edm::View< TrajectorySeed > > theSeedCollectionToken
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
MuonTrackFindertheTrackFinder
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: CosmicMuonProducer for muons from cosmic rays

Implementation:

Original Author: Chang Liu Created: Tue Jun 13 02:46:17 CEST 2006

Definition at line 15 of file CosmicMuonProducer.h.

Constructor & Destructor Documentation

CosmicMuonProducer::CosmicMuonProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 42 of file CosmicMuonProducer.cc.

References edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, and AlCaHLTBitMon_QueryRunRegistry::string.

43 {
44  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
45 
46  theSeedCollectionToken =consumes<edm::View<TrajectorySeed> >( iConfig.getParameter<std::string>("MuonSeedCollectionLabel"));
47 
48  // service parameters
49  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
50 
51  // TrackLoader parameters
52  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
53 
54  // the services
55 
56  edm::ConsumesCollector iC = consumesCollector();
57 
58  theService = new MuonServiceProxy(serviceParameters);
60  new MuonTrackLoader(trackLoaderParameters,iC, theService));
61 
62  produces<reco::TrackCollection>();
63  produces<TrackingRecHitCollection>();
64  produces<reco::TrackExtraCollection>();
65  produces<std::vector<Trajectory> >();
66  produces<TrajTrackAssociationCollection>();
67 
68 }
T getParameter(std::string const &) const
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
edm::EDGetTokenT< edm::View< TrajectorySeed > > theSeedCollectionToken
CosmicMuonProducer::~CosmicMuonProducer ( )
override

Definition at line 71 of file CosmicMuonProducer.cc.

72 {
73  if (theService) delete theService;
74  if (theTrackFinder) delete theTrackFinder;
75 }
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder

Member Function Documentation

void CosmicMuonProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 80 of file CosmicMuonProducer.cc.

References edm::Event::getByToken(), and edm::EventBase::id().

81 {
82  LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id();
83 
85  iEvent.getByToken(theSeedCollectionToken,seeds);
86 
87  // Update the services
88  theService->update(iSetup);
89  theTrackFinder->reconstruct(seeds,iEvent,iSetup);
90 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
edm::EventID id() const
Definition: EventBase.h:59
edm::OrphanHandle< reco::TrackCollection > reconstruct(const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &, const edm::EventSetup &)
reconstruct standalone tracks starting from a collection of seeds
edm::EDGetTokenT< edm::View< TrajectorySeed > > theSeedCollectionToken

Member Data Documentation

edm::EDGetTokenT<edm::View<TrajectorySeed> > CosmicMuonProducer::theSeedCollectionToken
private

Definition at line 28 of file CosmicMuonProducer.h.

MuonServiceProxy* CosmicMuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 27 of file CosmicMuonProducer.h.

MuonTrackFinder* CosmicMuonProducer::theTrackFinder
private

Definition at line 24 of file CosmicMuonProducer.h.