CMS 3D CMS Logo

FastL3MuonProducer Class Reference

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

#include <FastSimulation/Muons/plugins/FastL3MuonProducer.h>

Inheritance diagram for FastL3MuonProducer:

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

List of all members.

Public Member Functions

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

Private Attributes

FastL3MuonTrajectoryBuilderl3mtb
edm::InputTag theL2CollectionLabel
 Seed STA (input).
std::string theL2SeededTkLabel
 Label for L2SeededTracks (output).
bool theL2TrajectoryFlag
MuonServiceProxytheService
 the event setup proxy, it takes care the services update
edm::InputTag theTrackerTrackCollectionLabel
 Tracker tracks (input).
MuonTrackFindertheTrackFinder
bool updatedAtVtx


Detailed Description

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

Fast L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon and from pixel seeded tracks (by default - the latter is configuratble).

Date
2008/05/14 17:43:23
Revision
1.4
Author:
Patrick Janot - CERN
Date
2008/03/14 19:12:07
Revision
1.2
Author:
P. Janot - CERN

Definition at line 25 of file FastL3MuonProducer.h.


Constructor & Destructor Documentation

FastL3MuonProducer::FastL3MuonProducer ( const edm::ParameterSet parameterSet  ) 

constructor with config

Definition at line 29 of file FastL3MuonProducer.cc.

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

00029                                                                           {
00030 
00031   LogTrace("FastL3MuonProducer") << "constructor called" << std::endl;
00032 
00033   // Parameter set for the Builder
00034   edm::ParameterSet trajectoryBuilderParameters = 
00035     parameterSet.getParameter<edm::ParameterSet>("L3TrajBuilderParameters");
00036 
00037   // L2 Muon Collection Label
00038   theL2CollectionLabel = 
00039     parameterSet.getParameter<edm::InputTag>("MuonCollectionLabel");
00040   updatedAtVtx = (theL2CollectionLabel.instance() == "UpdatedAtVtx");
00041 
00042   // service parameters
00043   edm::ParameterSet serviceParameters = 
00044     parameterSet.getParameter<edm::ParameterSet>("ServiceParameters");
00045 
00046   // TrackLoader parameters
00047   edm::ParameterSet trackLoaderParameters = 
00048     parameterSet.getParameter<edm::ParameterSet>("TrackLoaderParameters");
00049   
00050   // the services
00051   theService = new MuonServiceProxy(serviceParameters);
00052   
00053   // instantiate the concrete trajectory builder in the Track Finder
00054   MuonTrackLoader* mtl = new MuonTrackLoader(trackLoaderParameters,theService);
00055   l3mtb = new FastL3MuonTrajectoryBuilder(trajectoryBuilderParameters, theService);
00056   theTrackFinder = new MuonTrackFinder(l3mtb, mtl);
00057 
00058   theL2SeededTkLabel = trackLoaderParameters.getUntrackedParameter<std::string>("MuonSeededTracksInstance",std::string());
00059   
00060   produces<reco::TrackCollection>(theL2SeededTkLabel);
00061   produces<TrackingRecHitCollection>(theL2SeededTkLabel);
00062   produces<reco::TrackExtraCollection>(theL2SeededTkLabel);
00063   produces<std::vector<Trajectory> >(theL2SeededTkLabel) ;
00064   produces<TrajTrackAssociationCollection>(theL2SeededTkLabel);
00065 
00066   produces<reco::TrackCollection>();
00067   produces<TrackingRecHitCollection>();
00068   produces<reco::TrackExtraCollection>();
00069   produces<std::vector<Trajectory> >() ;
00070   produces<TrajTrackAssociationCollection>();
00071 
00072   produces<reco::MuonTrackLinksCollection>();
00073 
00074 }

FastL3MuonProducer::~FastL3MuonProducer (  )  [virtual]

destructor

Definition at line 80 of file FastL3MuonProducer.cc.

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

00080                                         {
00081 
00082   LogTrace("FastL3MuonProducer") << "destructor called" << std::endl;
00083   if (theService) delete theService;
00084   if (theTrackFinder) delete theTrackFinder;
00085 
00086 }


Member Function Documentation

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

reconstruct muons

Implements edm::EDProducer.

Definition at line 92 of file FastL3MuonProducer.cc.

References FastL3MuonTrajectoryBuilder::clear(), it, L2Muons_cfi::L2Muons, l3mtb, edm::InputTag::label(), MuonTrackFinder::reconstruct(), theL2CollectionLabel, theService, theTrackFinder, and updatedAtVtx.

00092                                                                                  {
00093   // const std::string metname = "Muon|RecoMuon|FastL3MuonProducer";  
00094   // LogTrace(metname)<<endl<<endl<<endl;
00095   // LogTrace(metname)<<"Fast L3 Muon Reconstruction started"<<endl;  
00096 
00097   typedef std::vector<Trajectory> TrajColl;
00098 
00099   // Update the services
00100   theService->update(eventSetup);
00101 
00102   // Take the L2 muon container(s)
00103   // LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl;
00104 
00105   edm::Handle<reco::TrackCollection> L2Muons;
00106   event.getByLabel(theL2CollectionLabel,L2Muons);
00107 
00108   edm::Handle<std::vector<Trajectory> > L2MuonsTraj;
00109   std::vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands;
00110 
00111   event.getByLabel(theL2CollectionLabel.label(), L2MuonsTraj);      
00112   
00113   edm::Handle<TrajTrackAssociationCollection> L2AssoMap;
00114   event.getByLabel(theL2CollectionLabel.label(),L2AssoMap);
00115   
00116   edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap;
00117   event.getByLabel(theL2CollectionLabel.label(),updatedL2AssoMap);
00118   
00119   TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin();
00120   TrajTrackAssociationCollection::const_iterator lt = L2AssoMap->end();
00121 
00122   for( ; it!=lt; ++it){ 
00123     
00124     const edm::Ref<std::vector<Trajectory> > traj = it->key;
00125     const reco::TrackRef tk 
00126       = updatedAtVtx && updatedL2AssoMap->find(it->val) != updatedL2AssoMap->end() ? 
00127       (*updatedL2AssoMap)[it->val] : it->val;
00128     MuonTrajectoryBuilder::TrackCand L2Cand = MuonTrajectoryBuilder::TrackCand(0,tk);
00129     if( traj->isValid() ) L2Cand.first = &*traj ;
00130     L2TrackCands.push_back(L2Cand);
00131     
00132   }
00133 
00134   theTrackFinder->reconstruct(L2TrackCands, event);      
00135   l3mtb->clear();
00136   
00137   /*
00138   LogTrace(metname)<<"Event loaded"
00139                    <<"================================"
00140                    <<endl<<endl;
00141   */
00142 }


Member Data Documentation

FastL3MuonTrajectoryBuilder* FastL3MuonProducer::l3mtb [private]

Definition at line 52 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), and produce().

edm::InputTag FastL3MuonProducer::theL2CollectionLabel [private]

Seed STA (input).

Definition at line 42 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), and produce().

std::string FastL3MuonProducer::theL2SeededTkLabel [private]

Label for L2SeededTracks (output).

Definition at line 48 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer().

bool FastL3MuonProducer::theL2TrajectoryFlag [private]

Definition at line 54 of file FastL3MuonProducer.h.

MuonServiceProxy* FastL3MuonProducer::theService [private]

the event setup proxy, it takes care the services update

Definition at line 58 of file FastL3MuonProducer.h.

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

edm::InputTag FastL3MuonProducer::theTrackerTrackCollectionLabel [private]

Tracker tracks (input).

Definition at line 45 of file FastL3MuonProducer.h.

MuonTrackFinder* FastL3MuonProducer::theTrackFinder [private]

Definition at line 51 of file FastL3MuonProducer.h.

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

bool FastL3MuonProducer::updatedAtVtx [private]

Definition at line 55 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), and produce().


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