CMS 3D CMS Logo

Public Member Functions | Private Attributes

PixelTrackCleanerWrapper Class Reference

#include <PixelTrackCleanerWrapper.h>

List of all members.

Public Member Functions

pixeltrackfitting::TracksWithTTRHs clean (const pixeltrackfitting::TracksWithTTRHs &initialT_TTRHs)
 PixelTrackCleanerWrapper (PixelTrackCleaner *tc)

Private Attributes

PixelTrackCleanertheCleaner

Detailed Description

Definition at line 8 of file PixelTrackCleanerWrapper.h.


Constructor & Destructor Documentation

PixelTrackCleanerWrapper::PixelTrackCleanerWrapper ( PixelTrackCleaner tc) [inline]

Definition at line 10 of file PixelTrackCleanerWrapper.h.

: theCleaner(tc) {}

Member Function Documentation

pixeltrackfitting::TracksWithTTRHs PixelTrackCleanerWrapper::clean ( const pixeltrackfitting::TracksWithTTRHs initialT_TTRHs) [inline]

Definition at line 11 of file PixelTrackCleanerWrapper.h.

References SeedingHitSet::add(), PixelTrackCleaner::cleanTracks(), i, n, SeedingHitSet::size(), and theCleaner.

Referenced by PixelTrackReconstruction::run().

                                                               {
    
    pixeltrackfitting::TracksWithRecHits initialT_TRHs;
    std::map<const TrackingRecHit *, TransientTrackingRecHit::ConstRecHitPointer> hitMap;

    for (pixeltrackfitting::TracksWithTTRHs::const_iterator it = initialT_TTRHs.begin(), iend = initialT_TTRHs.end(); it < iend; ++it) {
      SeedingHitSet ttrhs = it->second;
      std::vector<const TrackingRecHit *> trhs;
      for (unsigned int i=0, n=ttrhs.size(); i < n; ++i) { 
        const TrackingRecHit * trh = ttrhs[i]->hit();
        trhs.push_back(trh);
        hitMap[trh]=ttrhs[i];
      }
      initialT_TRHs.push_back( pixeltrackfitting::TrackWithRecHits(it->first, trhs) );
    }

    pixeltrackfitting::TracksWithRecHits finalT_TRHs = theCleaner->cleanTracks(initialT_TRHs);
    pixeltrackfitting::TracksWithTTRHs finalT_TTRHs;

    for (pixeltrackfitting::TracksWithRecHits::const_iterator it = finalT_TRHs.begin(), iend = finalT_TRHs.end(); it < iend; ++it) {
       const std::vector<const TrackingRecHit *> & trhs = it->second; 
       SeedingHitSet ttrhs;
       for (unsigned int i=0, n=trhs.size(); i < n; ++i) {
         const TrackingRecHit * trh = trhs[i];
         ttrhs.add( hitMap[trh]);
       }
       finalT_TTRHs.push_back( pixeltrackfitting::TrackWithTTRHs(it->first, ttrhs));
    }
    return finalT_TTRHs;
  }

Member Data Documentation

Definition at line 43 of file PixelTrackCleanerWrapper.h.

Referenced by clean().