CMS 3D CMS Logo

MuonTrackFinder Class Reference

Track finder for the Muon Reco. More...

#include <RecoMuon/TrackingTools/interface/MuonTrackFinder.h>

List of all members.

Public Types

typedef
MuonCandidate::CandidateContainer 
CandidateContainer
typedef std::pair< const
Trajectory *, reco::TrackRef
TrackCand
typedef
MuonCandidate::TrajectoryContainer 
TrajectoryContainer

Public Member Functions

 MuonTrackFinder (MuonTrajectoryBuilder *ConcreteMuonTrajectoryBuilder, MuonTrackLoader *trackLoader)
 constructor, for the STA reconstruction the trackLoader must have the propagator.
void reconstruct (const std::vector< TrackCand > &, edm::Event &)
 reconstruct global tracks starting from a collection of standalone tracks and one of trakectories.
edm::OrphanHandle
< reco::TrackCollection
reconstruct (const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &)
 reconstruct standalone tracks starting from a collection of seeds
virtual ~MuonTrackFinder ()
 destructor

Private Member Functions

void load (const CandidateContainer &, edm::Event &)
 convert the trajectories into tracks and load them in to the event
edm::OrphanHandle
< reco::TrackCollection
load (const TrajectoryContainer &, edm::Event &)
 convert the trajectories into tracks and load them in to the event
void setEvent (const edm::Event &)
 percolate the Event Setup

Private Attributes

MuonTrackLoadertheTrackLoader
MuonTrajectoryBuildertheTrajBuilder
MuonTrajectoryCleanertheTrajCleaner


Detailed Description

Track finder for the Muon Reco.

Concrete Track finder for the Muon Reco.

Date
2007/12/17 17:23:07
Revision
1.24
Author:
R. Bellan - INFN Torino
Date
2008/02/13 13:54:26
Revision
1.38
Author:
R. Bellan - INFN Torino

Definition at line 28 of file MuonTrackFinder.h.


Member Typedef Documentation

typedef MuonCandidate::CandidateContainer MuonTrackFinder::CandidateContainer

Definition at line 33 of file MuonTrackFinder.h.

typedef std::pair<const Trajectory*, reco::TrackRef> MuonTrackFinder::TrackCand

Definition at line 34 of file MuonTrackFinder.h.

typedef MuonCandidate::TrajectoryContainer MuonTrackFinder::TrajectoryContainer

Definition at line 32 of file MuonTrackFinder.h.


Constructor & Destructor Documentation

MuonTrackFinder::MuonTrackFinder ( MuonTrajectoryBuilder ConcreteMuonTrajectoryBuilder,
MuonTrackLoader trackLoader 
)

constructor, for the STA reconstruction the trackLoader must have the propagator.

Definition at line 31 of file MuonTrackFinder.cc.

References theTrajCleaner.

00032                                                                :
00033   theTrajBuilder(ConcreteMuonTrajectoryBuilder),
00034   theTrackLoader(trackLoader){
00035   
00036   theTrajCleaner = new MuonTrajectoryCleaner();
00037 
00038 }

MuonTrackFinder::~MuonTrackFinder (  )  [virtual]

destructor

Definition at line 42 of file MuonTrackFinder.cc.

References lat::endl(), LogTrace, theTrackLoader, theTrajBuilder, and theTrajCleaner.

00042                                   {
00043 
00044   LogTrace("Muon|RecoMuon|MuonTrackFinder")<<"MuonTrackFinder destructor called"<<endl;
00045   if(theTrajBuilder) delete theTrajBuilder;
00046   if(theTrajCleaner) delete theTrajCleaner;
00047   if(theTrackLoader) delete theTrackLoader;
00048 
00049 }


Member Function Documentation

void MuonTrackFinder::load ( const CandidateContainer muonCands,
edm::Event event 
) [private]

convert the trajectories into tracks and load them in to the event

Definition at line 65 of file MuonTrackFinder.cc.

References MuonTrackLoader::loadTracks(), and theTrackLoader.

00066                                          {
00067                            
00068     theTrackLoader->loadTracks(muonCands, event);
00069 
00070 }

edm::OrphanHandle< reco::TrackCollection > MuonTrackFinder::load ( const TrajectoryContainer trajectories,
edm::Event event 
) [private]

convert the trajectories into tracks and load them in to the event

Definition at line 58 of file MuonTrackFinder.cc.

References MuonTrackLoader::loadTracks(), and theTrackLoader.

Referenced by reconstruct().

00059                                        {
00060   
00061   return theTrackLoader->loadTracks(trajectories, event);
00062 }

void MuonTrackFinder::reconstruct ( const std::vector< TrackCand > &  staCandColl,
edm::Event event 
)

reconstruct global tracks starting from a collection of standalone tracks and one of trakectories.

If the latter is invalid, trajectories are refitted.

Definition at line 112 of file MuonTrackFinder.cc.

References MuonTrajectoryCleaner::clean(), lat::endl(), load(), LogTrace, setEvent(), theTrajBuilder, theTrajCleaner, and MuonTrajectoryBuilder::trajectories().

00113                                                {
00114 
00115   const string metname = "Muon|RecoMuon|MuonTrackFinder";
00116 
00117   // percolate the event 
00118   setEvent(event);
00119 
00120   // Muon Candidate container
00121   CandidateContainer muonCandidates;
00122 
00123   // reconstruct the muon candidates
00124   for (vector<TrackCand>::const_iterator staCand = staCandColl.begin(); staCand != staCandColl.end(); ++staCand) {
00125     CandidateContainer muonCands_temp = theTrajBuilder->trajectories(*staCand);
00126     muonCandidates.insert(muonCandidates.end(), muonCands_temp.begin(),muonCands_temp.end());
00127   }                                  
00128   
00129   // clean the cloned candidates
00130   theTrajCleaner->clean(muonCandidates);
00131 
00132   // convert the trajectories into staTracks and load them into the event
00133   LogTrace(metname)<<"Load Muon Candidates into the event"<<endl;
00134   load(muonCandidates,event);
00135 
00136 }

edm::OrphanHandle< reco::TrackCollection > MuonTrackFinder::reconstruct ( const edm::Handle< edm::View< TrajectorySeed > > &  seeds,
edm::Event event 
)

reconstruct standalone tracks starting from a collection of seeds

Definition at line 74 of file MuonTrackFinder.cc.

References edm::View< T >::begin(), MuonTrajectoryCleaner::clean(), edm::View< T >::end(), lat::endl(), it, load(), LogTrace, setEvent(), theTrajBuilder, theTrajCleaner, and MuonTrajectoryBuilder::trajectories().

Referenced by CosmicMuonProducer::produce(), StandAloneMuonProducer::produce(), GlobalMuonProducer::produce(), FastL3MuonProducer::produce(), GlobalCosmicMuonProducer::produce(), L2MuonProducer::produce(), and L3MuonProducer::produce().

00075                                              {
00076   
00077   const string metname = "Muon|RecoMuon|MuonTrackFinder";
00078   LogTrace(metname)<<"SA Recostruction starting from: "<<seeds->size()<<endl;  
00079   
00080   // Percolate the event 
00081   setEvent(event);
00082   
00083   // Trajectory container
00084   TrajectoryContainer muonTrajectories;
00085   TrajectorySeedCollection::size_type nSeed = 0;
00086   // reconstruct the trajectory
00087   edm::View<TrajectorySeed>::const_iterator seed;
00088   for(seed = seeds->begin();
00089       seed != seeds->end(); ++seed, ++nSeed){
00090     LogTrace(metname)<<"+++ New Seed +++"<<endl;
00091     TrajectoryContainer muonTrajs_temp = theTrajBuilder->trajectories(*seed);
00092     for(TrajectoryContainer::iterator it = muonTrajs_temp.begin(); 
00093         it != muonTrajs_temp.end(); ++it){
00094       (*it)->setSeedRef(seeds->refAt(nSeed));
00095       muonTrajectories.push_back(*it); 
00096     }
00097   }
00098   
00099   // clean the clone traj
00100   LogTrace(metname)<<"Clean the trajectories container"<<endl;
00101   theTrajCleaner->clean(muonTrajectories); //used by reference...
00102   
00103   // convert the trajectories into tracks and load them in to the event
00104   LogTrace(metname)
00105     <<"Convert the trajectories into tracks and load them in to the event"<<endl;
00106   return load(muonTrajectories,event);
00107   
00108 }

void MuonTrackFinder::setEvent ( const edm::Event event  )  [private]

percolate the Event Setup

Definition at line 52 of file MuonTrackFinder.cc.

References MuonTrajectoryBuilder::setEvent(), and theTrajBuilder.

Referenced by reconstruct().

00052                                                  {
00053   theTrajBuilder->setEvent(event);
00054 }


Member Data Documentation

MuonTrackLoader* MuonTrackFinder::theTrackLoader [private]

Definition at line 71 of file MuonTrackFinder.h.

Referenced by load(), and ~MuonTrackFinder().

MuonTrajectoryBuilder* MuonTrackFinder::theTrajBuilder [private]

Definition at line 67 of file MuonTrackFinder.h.

Referenced by reconstruct(), setEvent(), and ~MuonTrackFinder().

MuonTrajectoryCleaner* MuonTrackFinder::theTrajCleaner [private]

Definition at line 69 of file MuonTrackFinder.h.

Referenced by MuonTrackFinder(), reconstruct(), and ~MuonTrackFinder().


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