CMS 3D CMS Logo

StandAloneMuonProducer Class Reference

StandAlone muon reconstructor: reconstructs muons using DT, CSC and RPC information,
starting from internal seeds (L2 muon track segments). More...

#include <RecoMuon/StandAloneMuonProducer/src/StandAloneMuonProducer.h>

Inheritance diagram for StandAloneMuonProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muons
 StandAloneMuonProducer (const edm::ParameterSet &)
 constructor with config
virtual ~StandAloneMuonProducer ()
 destructor

Private Member Functions

void setAlias (std::string alias)

Private Attributes

std::string theAlias
edm::InputTag theSeedCollectionLabel
 MuonSeed Collection Label.
MuonServiceProxytheService
 the event setup proxy, it takes care the services update
MuonTrackFindertheTrackFinder
 the track finder


Detailed Description

StandAlone muon reconstructor: reconstructs muons using DT, CSC and RPC information,
starting from internal seeds (L2 muon track segments).

Date
2008/02/13 13:53:54
Revision
1.29

Author:
R.Bellan - INFN TO
Date
2007/03/20 15:57:44
Revision
1.8

Author:
R.Bellan - INFN TO

Definition at line 26 of file StandAloneMuonProducer.h.


Constructor & Destructor Documentation

StandAloneMuonProducer::StandAloneMuonProducer ( const edm::ParameterSet parameterSet  ) 

constructor with config

Definition at line 45 of file StandAloneMuonProducer.cc.

References lat::endl(), edm::ParameterSet::getParameter(), LogTrace, MuonServiceProxy_cff::MuonServiceProxy, setAlias(), theAlias, theSeedCollectionLabel, theService, and theTrackFinder.

00045                                                                               {
00046   LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"constructor called"<<endl;
00047 
00048   // Parameter set for the Builder
00049   ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("STATrajBuilderParameters");
00050   
00051   // MuonSeed Collection Label
00052   theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
00053   
00054   // service parameters
00055   ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
00056   
00057   // TrackLoader parameters
00058   ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
00059   
00060   // the services
00061   theService = new MuonServiceProxy(serviceParameters);
00062 
00063   // instantiate the concrete trajectory builder in the Track Finder
00064   theTrackFinder = new MuonTrackFinder(new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService),
00065                                        new MuonTrackLoader(trackLoaderParameters,theService));
00066 
00067   setAlias(parameterSet.getParameter<std::string>("@module_label"));
00068   
00069   produces<reco::TrackCollection>().setBranchAlias(theAlias + "Tracks");
00070   produces<reco::TrackCollection>("UpdatedAtVtx").setBranchAlias(theAlias + "UpdatedAtVtxTracks");
00071   produces<TrackingRecHitCollection>().setBranchAlias(theAlias + "RecHits");
00072   produces<reco::TrackExtraCollection>().setBranchAlias(theAlias + "TrackExtras");
00073   produces<reco::TrackToTrackMap>().setBranchAlias(theAlias + "TrackToTrackMap");
00074   
00075   produces<std::vector<Trajectory> >().setBranchAlias(theAlias + "Trajectories");
00076   produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias + "TrajToTrackMap");
00077 }

StandAloneMuonProducer::~StandAloneMuonProducer (  )  [virtual]

destructor

Definition at line 80 of file StandAloneMuonProducer.cc.

References lat::endl(), LogTrace, theService, and theTrackFinder.

00080                                                {
00081   LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"StandAloneMuonProducer destructor called"<<endl;
00082   if (theService) delete theService;
00083   if (theTrackFinder) delete theTrackFinder;
00084 }


Member Function Documentation

void StandAloneMuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

reconstruct muons

Implements edm::EDProducer.

Definition at line 87 of file StandAloneMuonProducer.cc.

References lat::endl(), edm::InputTag::label(), LogTrace, MuonTrackFinder::reconstruct(), theSeedCollectionLabel, theService, and theTrackFinder.

00087                                                                               {
00088   const std::string metname = "Muon|RecoMuon|StandAloneMuonProducer";
00089   
00090   LogTrace(metname)<<endl<<endl<<endl;
00091   LogTrace(metname)<<"Stand Alone Muon Reconstruction Started"<<endl;
00092 
00093   // Take the seeds container
00094   LogTrace(metname)<<"Taking the seeds: "<<theSeedCollectionLabel.label()<<endl;
00095   Handle<View<TrajectorySeed> > seeds; 
00096   event.getByLabel(theSeedCollectionLabel,seeds);
00097 
00098   // Update the services
00099   theService->update(eventSetup);
00100   NavigationSetter setter(*theService->muonNavigationSchool());
00101 
00102   // Reconstruct 
00103   LogTrace(metname)<<"Track Reconstruction"<<endl;
00104   theTrackFinder->reconstruct(seeds,event);
00105  
00106   LogTrace(metname)<<"Event loaded"
00107                    <<"================================"
00108                    <<endl<<endl;
00109 }

void StandAloneMuonProducer::setAlias ( std::string  alias  )  [inline, private]

Definition at line 52 of file StandAloneMuonProducer.h.

References theAlias.

Referenced by StandAloneMuonProducer().

00052                                   {
00053     alias.erase( alias.size() - 1, alias.size() );
00054     theAlias=alias;
00055   }


Member Data Documentation

std::string StandAloneMuonProducer::theAlias [private]

Definition at line 50 of file StandAloneMuonProducer.h.

Referenced by setAlias(), and StandAloneMuonProducer().

edm::InputTag StandAloneMuonProducer::theSeedCollectionLabel [private]

MuonSeed Collection Label.

Definition at line 42 of file StandAloneMuonProducer.h.

Referenced by produce(), and StandAloneMuonProducer().

MuonServiceProxy* StandAloneMuonProducer::theService [private]

the event setup proxy, it takes care the services update

Definition at line 48 of file StandAloneMuonProducer.h.

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

MuonTrackFinder* StandAloneMuonProducer::theTrackFinder [private]

the track finder

Definition at line 45 of file StandAloneMuonProducer.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:45 2009 for CMSSW by  doxygen 1.5.4