Given the list of hits this will search for candidate Seed objects and return them.
53 bool foundGoodSeed(
false);
65 if (eigenVal0 > 5. && eigenVal1 > 0.001) {
73 hitPairListPtr.sort(SeedFinderAlgBase::Sort3DHitsByArcLen3D());
79 hit3DList.resize(hitPairListPtr.size());
81 std::copy(hitPairListPtr.begin(), hitPairListPtr.end(), hit3DList.begin());
91 checkList.resize(hitPairListPtr.size());
93 std::copy(hitPairListPtr.begin(), hitPairListPtr.end(), checkList.begin());
95 std::reverse(checkList.begin(), checkList.end());
106 hit3DList.sort(SeedFinderAlgBase::Sort3DHitsByAbsArcLen3D());
109 double seedDir[3] = {seedPca.getEigenVectors().row(2)(0),
110 seedPca.getEigenVectors().row(2)(1),
111 seedPca.getEigenVectors().row(2)(2)};
112 double seedStart[3] = {
113 hit3DList.front()->getX(), hit3DList.front()->getY(), hit3DList.front()->getZ()};
115 if (hit3DList.size() > 10) {
120 LineFit2DHits(hit3DList, seedStart[0], newSeedPos, newSeedDir, chiDOF);
124 double cosAng = seedDir[0] * newSeedDir[0] + seedDir[1] * newSeedDir[1] +
125 seedDir[2] * newSeedDir[2];
127 if (cosAng < 0.) newSeedDir *= -1.;
129 seedStart[0] = newSeedPos[0];
130 seedStart[1] = newSeedPos[1];
131 seedStart[2] = newSeedPos[2];
132 seedDir[0] = newSeedDir[0];
133 seedDir[1] = newSeedDir[1];
134 seedDir[2] = newSeedDir[2];
138 for (
const auto& hit3D : hit3DList)
139 hit3D->setStatusBit(0x40000000);
141 seedHitPairVec.emplace_back(std::pair<recob::Seed, reco::HitPairListPtr>(
144 foundGoodSeed =
true;
149 return foundGoodSeed;
void PCAAnalysis_calc3DDocas(const reco::HitPairListPtr &hitPairVector, const reco::PrincipalComponents &pca) const
bool getHitsAtEnd(reco::HitPairListPtr &hit3DList, reco::PrincipalComponents &seedPca) const
Separate function to find hits at the ends of the input hits.
void flipAxis(size_t axis)
PrincipalComponentsAlg m_pcaAlg
const EigenValues & getEigenValues() const
std::list< const reco::ClusterHit3D * > HitPairListPtr
void LineFit2DHits(const reco::HitPairListPtr &hitList, double XOrigin, TVector3 &Pos, TVector3 &Dir, double &ChiDOF) const
const EigenVectors & getEigenVectors() const