CMS 3D CMS Logo

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

#include <GlobalCosmicMuonProducer.h>

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

Public Member Functions

 GlobalCosmicMuonProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~GlobalCosmicMuonProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

std::unique_ptr< MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::EDGetTokenT< reco::TrackCollectiontheTrackCollectionToken
 
std::unique_ptr< 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

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

Author
: Chang Liu - Purdue University Chang.nosp@m..Liu.nosp@m.@cern.nosp@m..ch

Definition at line 21 of file GlobalCosmicMuonProducer.h.

Constructor & Destructor Documentation

◆ GlobalCosmicMuonProducer()

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

Definition at line 39 of file GlobalCosmicMuonProducer.cc.

39  {
40  edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters");
41  theTrackCollectionToken = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("MuonCollectionLabel"));
42 
43  // service parameters
44  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
45 
46  // TrackLoader parameters
47  edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters");
48 
49  // the services
50  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
51  edm::ConsumesCollector iC = consumesCollector();
52  theTrackFinder = std::make_unique<MuonTrackFinder>(
53  std::make_unique<GlobalCosmicMuonTrajectoryBuilder>(tbpar, theService.get(), iC),
54  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()));
55 
56  produces<reco::TrackCollection>();
57  produces<TrackingRecHitCollection>();
58  produces<reco::TrackExtraCollection>();
59  produces<std::vector<Trajectory> >();
60  produces<TrajTrackAssociationCollection>();
61 
62  produces<reco::MuonTrackLinksCollection>();
63 }

References edm::ParameterSet::getParameter(), theService, theTrackCollectionToken, and theTrackFinder.

◆ ~GlobalCosmicMuonProducer()

GlobalCosmicMuonProducer::~GlobalCosmicMuonProducer ( )
override

Definition at line 65 of file GlobalCosmicMuonProducer.cc.

65 {}

Member Function Documentation

◆ produce()

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

Definition at line 68 of file GlobalCosmicMuonProducer.cc.

68  {
69  const std::string metname = "Muon|RecoMuon|GlobalCosmicMuonProducer";
70  LogTrace(metname) << "Global Cosmic Muon Reconstruction started";
71 
73  iEvent.getByToken(theTrackCollectionToken, cosMuons);
74  if (!cosMuons.isValid()) {
75  LogTrace(metname) << "Muon Track collection is invalid!!!";
76  return;
77  }
78 
79  // Update the services
80  theService->update(iSetup);
81 
82  // Reconstruct the tracks in the tracker+muon system
83  LogTrace(metname) << "Track Reconstruction";
84 
85  std::vector<MuonTrajectoryBuilder::TrackCand> cosTrackCands;
86  for (unsigned int position = 0; position != cosMuons->size(); ++position) {
87  reco::TrackRef cosTrackRef(cosMuons, position);
89  cosTrackCands.push_back(cosCand);
90  }
91  theTrackFinder->reconstruct(cosTrackCands, iEvent, iSetup);
92  LogTrace(metname) << "Event loaded";
93 }

References iEvent, edm::HandleBase::isValid(), LogTrace, metname, position, AlCaHLTBitMon_QueryRunRegistry::string, theService, theTrackCollectionToken, and theTrackFinder.

Member Data Documentation

◆ theService

std::unique_ptr<MuonServiceProxy> GlobalCosmicMuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 34 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

◆ theTrackCollectionToken

edm::EDGetTokenT<reco::TrackCollection> GlobalCosmicMuonProducer::theTrackCollectionToken
private

Definition at line 30 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

◆ theTrackFinder

std::unique_ptr<MuonTrackFinder> GlobalCosmicMuonProducer::theTrackFinder
private

Definition at line 31 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

edm::Handle< reco::TrackCollection >
edm::Ref< TrackCollection >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalCosmicMuonProducer::theTrackCollectionToken
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
Definition: GlobalCosmicMuonProducer.h:30
edm::ParameterSet
Definition: ParameterSet.h:36
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Trajectory
Definition: Trajectory.h:38
MuonTrajectoryBuilder::TrackCand
std::pair< const Trajectory *, reco::TrackRef > TrackCand
Definition: MuonTrajectoryBuilder.h:25
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
GlobalCosmicMuonProducer::theTrackFinder
std::unique_ptr< MuonTrackFinder > theTrackFinder
Definition: GlobalCosmicMuonProducer.h:31
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
GlobalCosmicMuonProducer::theService
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
Definition: GlobalCosmicMuonProducer.h:34
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43