CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
RecHitSplitter Class Reference

#include <RecHitSplitter.h>

Public Types

typedef TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
 

Public Member Functions

 RecHitSplitter ()
 
RecHitContainer split (const RecHitContainer &hits) const
 
 ~RecHitSplitter ()
 

Detailed Description

Splits the matcher RecHits from the input container and returns a container that has only unmatched hits. Ported from ORCA

Author
todorov, cerati

Definition at line 13 of file RecHitSplitter.h.

Member Typedef Documentation

Definition at line 17 of file RecHitSplitter.h.

Constructor & Destructor Documentation

RecHitSplitter::RecHitSplitter ( )
inline

Definition at line 19 of file RecHitSplitter.h.

19 {}
RecHitSplitter::~RecHitSplitter ( )
inline

Definition at line 21 of file RecHitSplitter.h.

References hfClusterShapes_cfi::hits, and split().

21 {}

Member Function Documentation

RecHitSplitter::RecHitContainer RecHitSplitter::split ( const RecHitContainer hits) const

Definition at line 4 of file RecHitSplitter.cc.

Referenced by KFSplittingFitter::sorter(), and ~RecHitSplitter().

4  {
5 
6  RecHitContainer singles; singles.reserve(2*hits.size());
7 
8  for(RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end();
9  ihit++) {
10  if(!(**ihit).isValid()) {
11  singles.push_back((*ihit));
12  } else {
13  RecHitContainer shits = (**ihit).transientHits();
14  for(RecHitContainer::const_iterator ishit = shits.begin();
15  ishit != shits.end(); ishit++) {
16  singles.push_back(*ishit);
17  }
18  }
19  }
20  return singles;
21 }
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer