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 9 of file PixelTrackCleanerWrapper.h.


Constructor & Destructor Documentation

PixelTrackCleanerWrapper::PixelTrackCleanerWrapper ( PixelTrackCleaner tc) [inline]

Definition at line 11 of file PixelTrackCleanerWrapper.h.

: theCleaner(tc) {}

Member Function Documentation

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

Definition at line 12 of file PixelTrackCleanerWrapper.h.

References PixelTrackCleaner::cleanTracks(), i, n, SeedingHitSet::nullPtr(), 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;
       assert(!(trhs.size()<2));
       if (trhs.size()<2) continue;
       SeedingHitSet ttrhs( hitMap[trhs[0]], hitMap[trhs[1]], trhs.size()>2 ? hitMap[trhs[2]] : SeedingHitSet::nullPtr()); 
       finalT_TTRHs.push_back( pixeltrackfitting::TrackWithTTRHs(it->first, ttrhs));
    }
    return finalT_TTRHs;
  }

Member Data Documentation

Definition at line 42 of file PixelTrackCleanerWrapper.h.

Referenced by clean().