116 for (
unsigned seedIndex = 0; seedIndex < seeds->size(); ++seedIndex) {
118 std::vector<int32_t> recHitCombinationIndices;
121 if (seed.
nHits() == 0) {
123 seed, *recHitCombinations, *simTracks,
maxSeedMatchEstimator, *propagator, *magneticField, *trackerGeometry);
128 recHitCombinationIndices.push_back(icomb);
132 for (
auto icomb : recHitCombinationIndices) {
133 if (icomb < 0 ||
unsigned(icomb) >= recHitCombinations->size()) {
135 <<
" found seed with recHitCombination out or range: " << icomb << std::endl;
140 std::vector<const FastTrackerRecHit*> selectedRecHits;
145 selectedRecHits.push_back(static_cast<const FastTrackerRecHit*>(&*ihit));
150 if (!selectedRecHits.empty()) {
151 lastHitToSkip = selectedRecHits.back();
158 for (
unsigned hitIndex = hitsAlongMomentum ? 0 : recHitCombination.size() - 1;
159 hitIndex < recHitCombination.size();
160 hitsAlongMomentum ? ++hitIndex : --hitIndex) {
165 if (lastHitToSkip->
sameId(selectedRecHit)) {
166 lastHitToSkip =
nullptr;
182 selectedRecHits.push_back(selectedRecHit);
190 selectedRecHits.back() = selectedRecHit;
PropagationDirection direction() const
void setRecHitCombinationIndex(edm::OwnVector< T > &recHits, int32_t icomb)
std::pair< const_iterator, const_iterator > range
static std::vector< int > matchRecHitCombinations(const TrajectorySeed &seed, const FastTrackerRecHitCombinationCollection &recHitCombinationCollection, const std::vector< SimTrack > &simTrackCollection, double maxMatchEstimator, const Propagator &propagator, const MagneticField &magneticField, const TrackerGeometry &trackerGeometry)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool sameId(const FastTrackerRecHit *other, size_t i=0, size_t j=0) const
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
static TrackingLayer createFromDetId(const DetId &detId, const TrackerTopology &trackerTopology)
std::vector< TrackCandidate > TrackCandidateCollection
constexpr uint32_t rawId() const
get the raw id
FastTrackerRecHitSplitter hitSplitter
const SurfaceType & surface() const
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken
recHitContainer::const_iterator const_iterator
unsigned int detId() const
edm::EDGetTokenT< std::vector< bool > > hitMasksToken
double maxSeedMatchEstimator
bool hitIsMasked(const FastTrackerRecHit *hit, const std::vector< bool > &hitMasks)
int32_t getRecHitCombinationIndex(const T &object)
std::vector< FastTrackerRecHitRef > FastTrackerRecHitCombination
PTrajectoryStateOnDet const & startingState() const
void split(const FastTrackerRecHit &hitIn, edm::OwnVector< TrackingRecHit > &hitsOut, bool alongMomentum) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
unsigned int nHits() const
double hitLocalError(const TrackingRecHit *hit)
const TrackerGeomDet * idToDet(DetId) const override
bool isUninitialized() const
DetId geographicalId() const
T const * product() const
std::string propagatorLabel