CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GlobalCosmicMuonProducer Class Reference

#include <GlobalCosmicMuonProducer.h>

Inheritance diagram for GlobalCosmicMuonProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalCosmicMuonProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~GlobalCosmicMuonProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::InputTag theTrackCollectionLabel
 
MuonTrackFindertheTrackFinder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Date:
2009/07/29 12:46:25
Revision:
1.10
Author
: Chang Liu - Purdue University Chang.nosp@m..Liu.nosp@m.@cern.nosp@m..ch

Definition at line 20 of file GlobalCosmicMuonProducer.h.

Constructor & Destructor Documentation

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

Definition at line 42 of file GlobalCosmicMuonProducer.cc.

References edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, theService, theTrackCollectionLabel, and theTrackFinder.

43 {
44 
45  edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters");
46  theTrackCollectionLabel = iConfig.getParameter<edm::InputTag>("MuonCollectionLabel");
47 
48  // service parameters
49  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
50 
51  // TrackLoader parameters
52  edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters");
53 
54  // the services
55  theService = new MuonServiceProxy(serviceParameters);
56 
58  new MuonTrackLoader(trackLoaderParameters, theService));
59 
60  produces<reco::TrackCollection>();
61  produces<TrackingRecHitCollection>();
62  produces<reco::TrackExtraCollection>();
63  produces<std::vector<Trajectory> >();
64  produces<TrajTrackAssociationCollection>();
65 
66  produces<reco::MuonTrackLinksCollection>();
67 
68 }
T getParameter(std::string const &) const
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
GlobalCosmicMuonProducer::~GlobalCosmicMuonProducer ( )

Definition at line 71 of file GlobalCosmicMuonProducer.cc.

References theService, and theTrackFinder.

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

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 80 of file GlobalCosmicMuonProducer.cc.

References edm::Event::getByLabel(), edm::HandleBase::isValid(), LogTrace, metname, position, MuonTrackFinder::reconstruct(), theService, theTrackCollectionLabel, theTrackFinder, and MuonServiceProxy::update().

81 {
82  const std::string metname = "Muon|RecoMuon|GlobalCosmicMuonProducer";
83  LogTrace(metname)<<"Global Cosmic Muon Reconstruction started";
84 
86  iEvent.getByLabel(theTrackCollectionLabel,cosMuons);
87  if (!cosMuons.isValid()) {
88  LogTrace(metname)<< "Muon Track collection is invalid!!!";
89  return;
90  }
91 
92  // Update the services
93  theService->update(iSetup);
94 
95  // Reconstruct the tracks in the tracker+muon system
96  LogTrace(metname)<<"Track Reconstruction";
97 
98  std::vector<MuonTrajectoryBuilder::TrackCand> cosTrackCands;
99  for ( unsigned int position = 0; position != cosMuons->size(); ++position ) {
100  reco::TrackRef cosTrackRef(cosMuons,position);
102  cosTrackCands.push_back(cosCand);
103  }
104  theTrackFinder->reconstruct(cosTrackCands,iEvent);
105  LogTrace(metname)<<"Event loaded";
106 
107 }
void update(const edm::EventSetup &setup)
update the services each event
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const std::string metname
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
#define LogTrace(id)
static int position[264][3]
Definition: ReadPGInfo.cc:509
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::OrphanHandle< reco::TrackCollection > reconstruct(const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &)
reconstruct standalone tracks starting from a collection of seeds

Member Data Documentation

MuonServiceProxy* GlobalCosmicMuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 33 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), produce(), and ~GlobalCosmicMuonProducer().

edm::InputTag GlobalCosmicMuonProducer::theTrackCollectionLabel
private

Definition at line 29 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

MuonTrackFinder* GlobalCosmicMuonProducer::theTrackFinder
private