Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:48

0001 #include "TrackingTools/TrackFitters/interface/RecHitSplitter.h"
0002 
0003 RecHitSplitter::RecHitContainer RecHitSplitter::split(const RecHitContainer& hits) const {
0004   RecHitContainer singles;
0005   singles.reserve(2 * hits.size());
0006 
0007   for (RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) {
0008     if (!(**ihit).isValid()) {
0009       singles.push_back((*ihit));
0010     } else {
0011       RecHitContainer shits = (**ihit).transientHits();
0012       for (RecHitContainer::const_iterator ishit = shits.begin(); ishit != shits.end(); ishit++) {
0013         singles.push_back(*ishit);
0014       }
0015     }
0016   }
0017   return singles;
0018 }