CMS 3D CMS Logo

PixelTrackCleanerWrapper.h
Go to the documentation of this file.
1 #ifndef RecoPixelVertexing_PixelTrackFitting_PixelTrackCleanerWrapper_H
2 #define RecoPixelVertexing_PixelTrackFitting_PixelTrackCleanerWrapper_H
3 
7 
8 #include <map>
9 #include <cassert>
10 
12 public:
16  std::map<const TrackingRecHit *, SeedingHitSet::ConstRecHitPointer> hitMap;
17 
18  for (pixeltrackfitting::TracksWithTTRHs::const_iterator it = initialT_TTRHs.begin(), iend = initialT_TTRHs.end();
19  it < iend;
20  ++it) {
21  SeedingHitSet ttrhs = it->second;
22  std::vector<const TrackingRecHit *> trhs;
23  for (unsigned int i = 0, n = ttrhs.size(); i < n; ++i) {
24  const TrackingRecHit *trh = ttrhs[i]->hit();
25  trhs.push_back(trh);
26  hitMap[trh] = ttrhs[i];
27  }
28  initialT_TRHs.push_back(pixeltrackfitting::TrackWithRecHits(it->first, trhs));
29  }
30 
31  pixeltrackfitting::TracksWithRecHits finalT_TRHs = theCleaner->cleanTracks(initialT_TRHs);
33 
34  for (pixeltrackfitting::TracksWithRecHits::const_iterator it = finalT_TRHs.begin(), iend = finalT_TRHs.end();
35  it < iend;
36  ++it) {
37  const std::vector<const TrackingRecHit *> &trhs = it->second;
38  assert(!(trhs.size() < 2));
39  if (trhs.size() < 2)
40  continue;
41  SeedingHitSet ttrhs(hitMap[trhs[0]],
42  hitMap[trhs[1]],
43  trhs.size() > 2 ? hitMap[trhs[2]] : SeedingHitSet::nullPtr(),
44  trhs.size() > 3 ? hitMap[trhs[3]] : SeedingHitSet::nullPtr());
45 
46  finalT_TTRHs.push_back(pixeltrackfitting::TrackWithTTRHs(it->first, ttrhs));
47  }
48  return finalT_TTRHs;
49  }
50 
51 private:
53 };
54 #endif
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
PixelTrackCleaner.h
SeedingHitSet
Definition: SeedingHitSet.h:6
cms::cuda::assert
assert(be >=bs)
PixelTrackCleanerWrapper::PixelTrackCleanerWrapper
PixelTrackCleanerWrapper(const PixelTrackCleaner *tc)
Definition: PixelTrackCleanerWrapper.h:13
PixelTrackCleaner::cleanTracks
virtual TracksWithRecHits cleanTracks(const TracksWithRecHits &tracksWithRecHits) const
Definition: PixelTrackCleaner.h:27
TrackerTopology.h
pixeltrackfitting::TrackWithTTRHs
std::pair< reco::Track *, SeedingHitSet > TrackWithTTRHs
Definition: TracksWithHits.h:12
TracksWithHits.h
pixeltrackfitting::TracksWithRecHits
std::vector< TrackWithRecHits > TracksWithRecHits
Definition: TracksWithHits.h:13
SeedingHitSet::nullPtr
static ConstRecHitPointer nullPtr()
Definition: SeedingHitSet.h:12
PixelTrackCleanerWrapper::clean
pixeltrackfitting::TracksWithTTRHs clean(const pixeltrackfitting::TracksWithTTRHs &initialT_TTRHs) const
Definition: PixelTrackCleanerWrapper.h:14
PixelTrackCleaner
Definition: PixelTrackCleaner.h:14
pixeltrackfitting::TracksWithTTRHs
std::vector< TrackWithTTRHs > TracksWithTTRHs
Definition: TracksWithHits.h:14
TrackingRecHit
Definition: TrackingRecHit.h:21
SeedingHitSet::size
unsigned int size() const
Definition: SeedingHitSet.h:41
PixelTrackCleanerWrapper::theCleaner
const PixelTrackCleaner * theCleaner
Definition: PixelTrackCleanerWrapper.h:52
pixeltrackfitting::TrackWithRecHits
std::pair< reco::Track *, std::vector< const TrackingRecHit * > > TrackWithRecHits
Definition: TracksWithHits.h:11
PixelTrackCleanerWrapper
Definition: PixelTrackCleanerWrapper.h:11