CMS 3D CMS Logo

L3MuonProducer Class Reference

L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon. More...

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

Inheritance diagram for L3MuonProducer:

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

List of all members.

Public Member Functions

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

Private Attributes

edm::InputTag theL2CollectionLabel
 Seed STA Label.
std::string theL2SeededTkLabel
 Label for L2SeededTracks.
MuonServiceProxytheService
 the event setup proxy, it takes care the services update
MuonTrackFindertheTrackFinder


Detailed Description

L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.

Date
2008/02/27 21:50:42
Revision
1.13
Author:
A. Everett - Purdue University
Date
2008/02/14 16:26:32
Revision
1.4
Author:
A. Everett - Purdue University

Definition at line 23 of file L3MuonProducer.h.


Constructor & Destructor Documentation

L3MuonProducer::L3MuonProducer ( const edm::ParameterSet parameterSet  ) 

constructor with config

Definition at line 44 of file L3MuonProducer.cc.

References lat::endl(), edm::ParameterSet::getParameter(), LogTrace, MuonServiceProxy_cff::MuonServiceProxy, theL2CollectionLabel, theL2SeededTkLabel, theService, and theTrackFinder.

00044                                                                {
00045 
00046   LogTrace("L3MuonProducer") << "constructor called" << endl;
00047 
00048   // Parameter set for the Builder
00049   ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L3TrajBuilderParameters");
00050 
00051   // L2 Muon Collection Label
00052   theL2CollectionLabel = parameterSet.getParameter<InputTag>("MuonCollectionLabel");
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   MuonTrackLoader* mtl = new MuonTrackLoader(trackLoaderParameters,theService);
00065   L3MuonTrajectoryBuilder* l3mtb = new L3MuonTrajectoryBuilder(trajectoryBuilderParameters, theService);
00066   theTrackFinder = new MuonTrackFinder(l3mtb, mtl);
00067 
00068   theL2SeededTkLabel = trackLoaderParameters.getUntrackedParameter<std::string>("MuonSeededTracksInstance",std::string());
00069   
00070   produces<reco::TrackCollection>(theL2SeededTkLabel);
00071   produces<TrackingRecHitCollection>(theL2SeededTkLabel);
00072   produces<reco::TrackExtraCollection>(theL2SeededTkLabel);
00073   produces<vector<Trajectory> >(theL2SeededTkLabel) ;
00074   produces<TrajTrackAssociationCollection>(theL2SeededTkLabel);
00075 
00076   produces<reco::TrackCollection>();
00077   produces<TrackingRecHitCollection>();
00078   produces<reco::TrackExtraCollection>();
00079   produces<vector<Trajectory> >() ;
00080   produces<TrajTrackAssociationCollection>();
00081 
00082   produces<reco::MuonTrackLinksCollection>();
00083 
00084 }

L3MuonProducer::~L3MuonProducer (  )  [virtual]

destructor

Definition at line 90 of file L3MuonProducer.cc.

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

00090                                 {
00091 
00092   LogTrace("L3MuonProducer") << "destructor called" << endl;
00093   if (theService) delete theService;
00094   if (theTrackFinder) delete theTrackFinder;
00095 
00096 }


Member Function Documentation

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

reconstruct muons

Implements edm::EDProducer.

Definition at line 102 of file L3MuonProducer.cc.

References lat::endl(), edm::InputTag::instance(), edm::Ref< C, T, F >::isNonnull(), it, L2Muons_cfi::L2Muons, edm::InputTag::label(), LogTrace, MuonTrackFinder::reconstruct(), theL2CollectionLabel, theService, and theTrackFinder.

00102                                                                        {
00103   const string metname = "Muon|RecoMuon|L3MuonProducer";  
00104   LogTrace(metname)<<endl<<endl<<endl;
00105   LogTrace(metname)<<"L3 Muon Reconstruction started"<<endl;  
00106 
00107   typedef vector<Trajectory> TrajColl;
00108 
00109   // Update the services
00110   theService->update(eventSetup);
00111 
00112   // Take the L2 muon container(s)
00113   LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl;
00114 
00115   Handle<reco::TrackCollection> L2Muons;
00116   event.getByLabel(theL2CollectionLabel,L2Muons);
00117 
00118   Handle<vector<Trajectory> > L2MuonsTraj;
00119   vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands;
00120 
00121 
00122   event.getByLabel(theL2CollectionLabel.label(), L2MuonsTraj);      
00123   
00124   edm::Handle<TrajTrackAssociationCollection> L2AssoMap;
00125   event.getByLabel(theL2CollectionLabel.label(),L2AssoMap);
00126   
00127   edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap;
00128   event.getByLabel(theL2CollectionLabel.label(),updatedL2AssoMap);
00129       
00130   for(TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin(); it != L2AssoMap->end(); ++it){    
00131     const Ref<vector<Trajectory> > traj = it->key;
00132     const reco::TrackRef tkRegular  = it->val;
00133     reco::TrackRef tkUpdated;
00134     reco::TrackToTrackMap::const_iterator iEnd;
00135     reco::TrackToTrackMap::const_iterator iii;
00136     if ( theL2CollectionLabel.instance() == "UpdatedAtVtx") {
00137       iEnd = updatedL2AssoMap->end();
00138       iii = updatedL2AssoMap->find(it->val);
00139       if (iii != iEnd ) tkUpdated = (*updatedL2AssoMap)[it->val] ;
00140     }
00141     
00142     const reco::TrackRef tk = ( tkUpdated.isNonnull() ) ? tkUpdated : tkRegular ;      
00143     
00144     MuonTrajectoryBuilder::TrackCand L2Cand = MuonTrajectoryBuilder::TrackCand(0,tk);
00145     if( traj->isValid() ) L2Cand.first = &*traj ;
00146     L2TrackCands.push_back(L2Cand);
00147   }
00148   
00149   theTrackFinder->reconstruct(L2TrackCands, event);      
00150   
00151   LogTrace(metname)<<"Event loaded"
00152                    <<"================================"
00153                    <<endl<<endl;
00154     
00155 }


Member Data Documentation

edm::InputTag L3MuonProducer::theL2CollectionLabel [private]

Seed STA Label.

Definition at line 40 of file L3MuonProducer.h.

Referenced by L3MuonProducer(), and produce().

std::string L3MuonProducer::theL2SeededTkLabel [private]

Label for L2SeededTracks.

Definition at line 43 of file L3MuonProducer.h.

Referenced by L3MuonProducer().

MuonServiceProxy* L3MuonProducer::theService [private]

the event setup proxy, it takes care the services update

Definition at line 48 of file L3MuonProducer.h.

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

MuonTrackFinder* L3MuonProducer::theTrackFinder [private]

Definition at line 45 of file L3MuonProducer.h.

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


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