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

◆ RecHitContainer

Definition at line 15 of file RecHitSplitter.h.

Constructor & Destructor Documentation

◆ RecHitSplitter()

RecHitSplitter::RecHitSplitter ( )
inline

Definition at line 17 of file RecHitSplitter.h.

17 {}

◆ ~RecHitSplitter()

RecHitSplitter::~RecHitSplitter ( )
inline

Definition at line 19 of file RecHitSplitter.h.

19 {}

Member Function Documentation

◆ split()

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

Definition at line 3 of file RecHitSplitter.cc.

References hfClusterShapes_cfi::hits.

Referenced by KFSplittingFitter::sorter().

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