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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 38 of file GlobalCosmicMuonProducer.cc.

38  {
39  edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters");
40  theTrackCollectionToken = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("MuonCollectionLabel"));
41 
42  // service parameters
43  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
44 
45  // TrackLoader parameters
46  edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters");
47 
48  // the services
49  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
50  edm::ConsumesCollector iC = consumesCollector();
51  theTrackFinder = std::make_unique<MuonTrackFinder>(
52  std::make_unique<GlobalCosmicMuonTrajectoryBuilder>(tbpar, theService.get(), iC),
53  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
54  iC);
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 >
GlobalCosmicMuonProducer::theTrackCollectionToken
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
Definition: GlobalCosmicMuonProducer.h:30
edm::ParameterSet
Definition: ParameterSet.h:47
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
iEvent
int iEvent
Definition: GenABIO.cc:224
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Trajectory
Definition: Trajectory.h:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MuonTrajectoryBuilder::TrackCand
std::pair< const Trajectory *, reco::TrackRef > TrackCand
Definition: MuonTrajectoryBuilder.h:25
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
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:45
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40