RecoMuon/GlobalTrackingTools/src/MuonTrackingRegionByPtBuilder.cc
//
// Member function to be compatible with TrackingRegionProducerFactory: create many ROI for many tracks
//

Member function to be compatible with TrackingRegionProducerFactory: create many ROI for many tracks
Member function to be compatible with TrackingRegionProducerFactory : create many ROI for many tracks
std::vector<std::unique_ptr<TrackingRegion>> MuonTrackingRegionByPtBuilder::regions(const edm::Event& ev,
                                                                                    const edm::EventSetup& es) const {
  std::vector<std::unique_ptr<TrackingRegion>> result;
  edm::Handle<reco::TrackCollection> tracks;
  ev.getByToken(inputCollectionToken, tracks);
  int nRegions = 0;
  for (auto it = tracks->cbegin(), ed = tracks->cend(); it != ed && nRegions < theMaxRegions; ++it) {
    result.push_back(region(*it, ev, es));
    nRegions++;
  }
  return result;
}
std :: vector < std :: unique_ptr < TrackingRegion > > MuonTrackingRegionByPtBuilder :: regions ( const edm :: Event & ev , const edm :: EventSetup & es ) const { std :: vector < std :: unique_ptr < TrackingRegion > > result ; edm :: Handle < reco :: TrackCollection > tracks ; ev . getByToken ( inputCollectionToken , tracks ) ; int nRegions = 0 ; for ( auto it = tracks -> cbegin ( ) , ed = tracks -> cend ( ) ; it != ed && nRegions < theMaxRegions ; ++ it ) { result . push_back ( region ( * it , ev , es ) ) ; nRegions ++ ; } return result ; }
Member function to be compatible with TrackingRegionProducerFactory: create many ROI for many tracks
Member function to be compatible with TrackingRegionProducerFactory : create many ROI for many tracks