1 #ifndef FASTSIMULATION_TRACKING_SEEDFINDER_H 2 #define FASTSIMULATION_TRACKING_SEEDFINDER_H 37 std::vector<unsigned int>
getSeed(
const std::vector<const FastTrackerRecHit*>& trackerRecHits)
const {
51 std::vector<TrajectorySeedHitCandidate> seedHitCandidates;
54 seedHitCandidates.push_back(seedHitCandidate);
56 return iterateHits(0, seedHitCandidates, hitIndicesInTree,
true);
64 std::vector<int>& hitIndicesInTree,
66 unsigned int trackerHit)
const {
68 if (hitIndicesInTree[node->
getIndex()] < 0) {
79 std::vector<const FastTrackerRecHit*> seedCandidateHitList(node->
getDepth() + 1);
80 seedCandidateHitList[node->
getDepth()] = currentTrackerHit.
hit();
82 while (parentNode !=
nullptr) {
83 seedCandidateHitList[parentNode->
getDepth()] =
84 trackerRecHits[hitIndicesInTree[parentNode->
getIndex()]].hit();
90 if (!selectorFunction->pass(seedCandidateHitList)) {
98 hitIndicesInTree[node->
getIndex()] = trackerHit;
105 for (
unsigned int ichild = 0; ichild < node->
getChildrenSize(); ++ichild) {
118 const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
119 std::vector<int> hitIndicesInTree,
120 bool processSkippedHits)
const {
121 for (
unsigned int irecHit =
start; irecHit < trackerRecHits.size(); ++irecHit) {
128 unsigned int currentHitIndex = irecHit;
130 for (
unsigned int inext = currentHitIndex + 1; inext < trackerRecHits.size(); ++inext) {
132 if (trackerRecHits[currentHitIndex].getTrackingLayer() == trackerRecHits[inext].getTrackingLayer()) {
133 if (processSkippedHits) {
135 std::vector<unsigned int> seedHits =
iterateHits(inext, trackerRecHits, hitIndicesInTree,
false);
136 if (!seedHits.empty()) {
153 std::vector<unsigned int> seedIndices(seedNode->
getDepth() + 1);
162 return std::vector<unsigned int>();
const SeedingNode< DATA > * getChild(unsigned int ichild) const
std::vector< unsigned int > iterateHits(unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
const FastTrackerRecHit * hit() const
The Hit itself.
const SeedingNode< DATA > * getRoot(unsigned int i) const
unsigned int numberOfNodes() const
unsigned int getIndex() const
SeedFinder(const SeedingTree< TrackingLayer > &seedingTree, const TrackerTopology &trackerTopology)
std::vector< unsigned int > getSeed(const std::vector< const FastTrackerRecHit *> &trackerRecHits) const
const SeedingTree< TrackingLayer > & _seedingTree
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 TrackingLayer & getTrackingLayer() const
const SeedingNode * getParent() const
void addHitSelector(SeedFinderSelector *seedFinderSelector, unsigned int nHits)
unsigned int getChildrenSize() const
const DATA & getData() const
const SingleSet & getSingleSet() const
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
unsigned int numberOfRoots() const
const TrackerTopology * _trackerTopology
std::vector< std::vector< SeedFinderSelector * > > _selectorFunctionsByHits