1 #ifndef FASTSIMULATION_TRACKING_SEEDFINDER_H
2 #define FASTSIMULATION_TRACKING_SEEDFINDER_H
19 typedef std::function<bool(const std::vector<const FastTrackerRecHit *>& hits)>
Selector;
30 _selector=[](
const std::vector<const FastTrackerRecHit*>& hits) ->
bool
41 std::vector<unsigned int>
getSeed(
const std::vector<const FastTrackerRecHit *>& trackerRecHits)
const
56 std::vector<TrajectorySeedHitCandidate> seedHitCandidates;
59 seedHitCandidates.push_back(
std::move(seedHitCandidate));
61 return iterateHits(0,seedHitCandidates,hitIndicesInTree,
true);
68 const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
69 std::vector<int>& hitIndicesInTree,
74 if (hitIndicesInTree[node->
getIndex()]<0)
83 std::vector<const FastTrackerRecHit*> seedCandidateHitList(node->
getDepth()+1);
84 seedCandidateHitList[node->
getDepth()]=currentTrackerHit.
hit();
86 while (parentNode!=
nullptr)
88 seedCandidateHitList[parentNode->
getDepth()]=trackerRecHits[hitIndicesInTree[parentNode->
getIndex()]].hit();
97 hitIndicesInTree[node->
getIndex()]=trackerHit;
107 for (
unsigned int ichild = 0; ichild<node->
getChildrenSize(); ++ichild)
122 const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
123 std::vector<int> hitIndicesInTree,
124 bool processSkippedHits)
const
126 for (
unsigned int irecHit = start; irecHit<trackerRecHits.size(); ++irecHit)
135 unsigned int currentHitIndex=irecHit;
137 for (
unsigned int inext=currentHitIndex+1; inext< trackerRecHits.size(); ++inext)
140 if (trackerRecHits[currentHitIndex].getTrackingLayer()==trackerRecHits[inext].getTrackingLayer())
142 if (processSkippedHits)
151 if (seedHits.size()>0)
173 std::vector<unsigned int> seedIndices(seedNode->
getDepth()+1);
184 return std::vector<unsigned int>();
tuple start
Check for commandline option errors.
const SingleSet & getSingleSet() const
const DATA & getData() const
unsigned int getChildrenSize() const
const SeedingNode< TrackingLayer > * insertHit(const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
unsigned int getDepth() const
const SeedingNode * getParent() const
unsigned int numberOfNodes() const
unsigned int numberOfRoots() const
std::vector< unsigned int > getSeed(const std::vector< const FastTrackerRecHit * > &trackerRecHits) const
SeedFinder(const SeedingTree< TrackingLayer > &seedingTree, const TrackerTopology &trackerTopology)
Functor that operates on <T>
std::vector< unsigned int > iterateHits(unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
const SeedingTree< TrackingLayer > & _seedingTree
const SeedingNode< DATA > * getRoot(unsigned int i) const
void setHitSelector(Selector selector)
const FastTrackerRecHit * hit() const
The Hit itself.
unsigned int getIndex() const
const TrackingLayer & getTrackingLayer() const
const SeedingNode< DATA > * getChild(unsigned int ichild) const
const TrackerTopology * _trackerTopology