CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

MuonTrackFinder Class Reference

#include <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, with default cleaner. For the STA reconstruction the trackLoader must have the propagator.
 MuonTrackFinder (MuonTrajectoryBuilder *ConcreteMuonTrajectoryBuilder, MuonTrackLoader *trackLoader, MuonTrajectoryCleaner *cleaner)
 Constructor, with user-defined cleaner. For the STA reconstruction the trackLoader must have the propagator.
edm::OrphanHandle
< reco::TrackCollection
reconstruct (const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &)
 reconstruct standalone tracks starting from a collection of seeds
void reconstruct (const std::vector< TrackCand > &, edm::Event &)
virtual ~MuonTrackFinder ()
 destructor

Private Member Functions

edm::OrphanHandle
< reco::TrackCollection
load (const TrajectoryContainer &, edm::Event &)
 convert the trajectories into tracks and load them in to the event
void load (const CandidateContainer &, 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

Date:
2010/03/02 14:04:18
Revision:
1.25
Author:
R. Bellan - INFN Torino

Concrete Track finder for the Muon Reco

Date:
2010/03/24 19:50:19
Revision:
1.40
Author:
R. Bellan - INFN Torino

Definition at line 28 of file MuonTrackFinder.h.


Member Typedef Documentation

Definition at line 33 of file MuonTrackFinder.h.

Definition at line 34 of file MuonTrackFinder.h.

Definition at line 32 of file MuonTrackFinder.h.


Constructor & Destructor Documentation

MuonTrackFinder::MuonTrackFinder ( MuonTrajectoryBuilder ConcreteMuonTrajectoryBuilder,
MuonTrackLoader trackLoader 
)

Constructor, with default cleaner. For the STA reconstruction the trackLoader must have the propagator.

Definition at line 31 of file MuonTrackFinder.cc.

                                                               :
  theTrajBuilder(ConcreteMuonTrajectoryBuilder),
  theTrajCleaner(new MuonTrajectoryCleaner()),
  theTrackLoader(trackLoader) {
}
MuonTrackFinder::MuonTrackFinder ( MuonTrajectoryBuilder ConcreteMuonTrajectoryBuilder,
MuonTrackLoader trackLoader,
MuonTrajectoryCleaner cleaner 
)

Constructor, with user-defined cleaner. For the STA reconstruction the trackLoader must have the propagator.

Definition at line 39 of file MuonTrackFinder.cc.

                                                                 :
  theTrajBuilder(ConcreteMuonTrajectoryBuilder),
  theTrajCleaner(cleaner),
  theTrackLoader(trackLoader) {
}
MuonTrackFinder::~MuonTrackFinder ( ) [virtual]

destructor

Definition at line 48 of file MuonTrackFinder.cc.

References LogTrace, theTrackLoader, theTrajBuilder, and theTrajCleaner.

                                  {

  LogTrace("Muon|RecoMuon|MuonTrackFinder")<<"MuonTrackFinder destructor called"<<endl;
  delete theTrajBuilder;
  delete theTrajCleaner;
  delete theTrackLoader;

}

Member Function Documentation

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 64 of file MuonTrackFinder.cc.

References MuonTrackLoader::loadTracks(), and theTrackLoader.

Referenced by reconstruct().

                                       {
  
  return theTrackLoader->loadTracks(trajectories, event);
}
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 71 of file MuonTrackFinder.cc.

References MuonTrackLoader::loadTracks(), and theTrackLoader.

                                         {
                           
    theTrackLoader->loadTracks(muonCands, event);

}
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 118 of file MuonTrackFinder.cc.

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

                                               {

  const string metname = "Muon|RecoMuon|MuonTrackFinder";

  // percolate the event 
  setEvent(event);

  // Muon Candidate container
  CandidateContainer muonCandidates;

  // reconstruct the muon candidates
  for (vector<TrackCand>::const_iterator staCand = staCandColl.begin(); staCand != staCandColl.end(); ++staCand) {
    CandidateContainer muonCands_temp = theTrajBuilder->trajectories(*staCand);
    muonCandidates.insert(muonCandidates.end(), muonCands_temp.begin(),muonCands_temp.end());
  }                                  
  
  // clean the cloned candidates
  if(theTrajCleaner) theTrajCleaner->clean(muonCandidates);

  // convert the trajectories into staTracks and load them into the event
  LogTrace(metname)<<"Load Muon Candidates into the event"<<endl;
  load(muonCandidates,event);

}
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 80 of file MuonTrackFinder.cc.

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

Referenced by GlobalCosmicMuonProducer::produce(), and FastL3MuonProducer::produce().

                                             {
  
  const string metname = "Muon|RecoMuon|MuonTrackFinder";
  LogTrace(metname)<<"SA Recostruction starting from: "<<seeds->size()<<endl;  
  
  // Percolate the event 
  setEvent(event);
  
  // Trajectory container
  TrajectoryContainer muonTrajectories;
  TrajectorySeedCollection::size_type nSeed = 0;
  // reconstruct the trajectory
  edm::View<TrajectorySeed>::const_iterator seed;
  for(seed = seeds->begin();
      seed != seeds->end(); ++seed, ++nSeed){
    LogTrace(metname)<<"+++ New Seed +++"<<endl;
    TrajectoryContainer muonTrajs_temp = theTrajBuilder->trajectories(*seed);
    for(TrajectoryContainer::iterator it = muonTrajs_temp.begin(); 
        it != muonTrajs_temp.end(); ++it){
      (*it)->setSeedRef(seeds->refAt(nSeed));
      muonTrajectories.push_back(*it); 
    }
  }
  
  // clean the clone traj
  LogTrace(metname)<<"Clean the trajectories container"<<endl;
  if(theTrajCleaner) theTrajCleaner->clean(muonTrajectories, event); //used by reference...
  
  // convert the trajectories into tracks and load them in to the event
  LogTrace(metname)
    <<"Convert the trajectories into tracks and load them in to the event"<<endl;
  return load(muonTrajectories,event);
  
}
void MuonTrackFinder::setEvent ( const edm::Event event) [private]

percolate the Event Setup

Definition at line 58 of file MuonTrackFinder.cc.

References MuonTrajectoryBuilder::setEvent(), and theTrajBuilder.

Referenced by reconstruct().

                                                 {
  theTrajBuilder->setEvent(event);
}

Member Data Documentation

Definition at line 76 of file MuonTrackFinder.h.

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

Definition at line 72 of file MuonTrackFinder.h.

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

Definition at line 74 of file MuonTrackFinder.h.

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