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::EDConsumerBase 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 ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::EDGetTokenT
< reco::TrackCollection
theTrackCollectionToken
 
MuonTrackFindertheTrackFinder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 20 of file GlobalCosmicMuonProducer.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file GlobalCosmicMuonProducer.cc.

References edm::EDConsumerBase::consumesCollector(), edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, theService, theTrackCollectionToken, and theTrackFinder.

40 {
41 
42  edm::ParameterSet tbpar = iConfig.getParameter<edm::ParameterSet>("TrajectoryBuilderParameters");
43  theTrackCollectionToken =consumes<reco::TrackCollection>( iConfig.getParameter<edm::InputTag>("MuonCollectionLabel"));
44 
45  // service parameters
46  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
47 
48  // TrackLoader parameters
49  edm::ParameterSet trackLoaderParameters = iConfig.getParameter<edm::ParameterSet>("TrackLoaderParameters");
50 
51  // the services
52  theService = new MuonServiceProxy(serviceParameters);
55  new MuonTrackLoader(trackLoaderParameters,iC, theService));
56 
57  produces<reco::TrackCollection>();
58  produces<TrackingRecHitCollection>();
59  produces<reco::TrackExtraCollection>();
60  produces<std::vector<Trajectory> >();
61  produces<TrajTrackAssociationCollection>();
62 
63  produces<reco::MuonTrackLinksCollection>();
64 
65 }
T getParameter(std::string const &) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
GlobalCosmicMuonProducer::~GlobalCosmicMuonProducer ( )

Definition at line 68 of file GlobalCosmicMuonProducer.cc.

References theService, and theTrackFinder.

69 {
70  if (theService) delete theService;
71  if (theTrackFinder) delete theTrackFinder;
72 }
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 77 of file GlobalCosmicMuonProducer.cc.

References edm::Event::getByToken(), edm::HandleBase::isValid(), LogTrace, metname, position, MuonTrackFinder::reconstruct(), AlCaHLTBitMon_QueryRunRegistry::string, theService, theTrackCollectionToken, theTrackFinder, and MuonServiceProxy::update().

78 {
79  const std::string metname = "Muon|RecoMuon|GlobalCosmicMuonProducer";
80  LogTrace(metname)<<"Global Cosmic Muon Reconstruction started";
81 
83  iEvent.getByToken(theTrackCollectionToken,cosMuons);
84  if (!cosMuons.isValid()) {
85  LogTrace(metname)<< "Muon Track collection is invalid!!!";
86  return;
87  }
88 
89  // Update the services
90  theService->update(iSetup);
91 
92  // Reconstruct the tracks in the tracker+muon system
93  LogTrace(metname)<<"Track Reconstruction";
94 
95  std::vector<MuonTrajectoryBuilder::TrackCand> cosTrackCands;
96  for ( unsigned int position = 0; position != cosMuons->size(); ++position ) {
97  reco::TrackRef cosTrackRef(cosMuons,position);
99  cosTrackCands.push_back(cosCand);
100  }
101  theTrackFinder->reconstruct(cosTrackCands,iEvent);
102  LogTrace(metname)<<"Event loaded";
103 
104 }
void update(const edm::EventSetup &setup)
update the services each event
std::pair< const Trajectory *, reco::TrackRef > TrackCand
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
const std::string metname
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
bool isValid() const
Definition: HandleBase.h:76
#define LogTrace(id)
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
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::EDGetTokenT<reco::TrackCollection> GlobalCosmicMuonProducer::theTrackCollectionToken
private

Definition at line 29 of file GlobalCosmicMuonProducer.h.

Referenced by GlobalCosmicMuonProducer(), and produce().

MuonTrackFinder* GlobalCosmicMuonProducer::theTrackFinder
private