36 void clear()
override;
74 :
KDTreeLinkerBase(conf), resPSpitch_(0.19), resPSlength_(6.1), ps1ToEcal_(1.072), ps2ToEcal_(1.057) {}
91 const std::vector<reco::PFRecHitFraction> &
fraction = clusterref->recHitFractions();
96 double clusterz = clusterref->position().Z();
99 for (
size_t rhit = 0; rhit <
fraction.size(); ++rhit) {
112 rechitsSet.insert(&rechit);
123 std::vector<KDTreeNodeInfo<reco::PFRecHit const *, 2>> eltList;
126 for (RecHitSet::const_iterator it = rechitsSet.begin(); it != rechitsSet.end(); it++) {
128 const auto &posxyz = rh->
position();
131 eltList.push_back(rhinfo);
146 (*it)->setIsValidMultilinks(
true);
152 double zPS = clusterPS.
position().Z();
153 double xPS = clusterPS.
position().X();
154 double yPS = clusterPS.
position().Y();
156 double etaPS = fabs(clusterPS.
positionREP().eta());
159 float xPSonEcal = xPS;
160 float yPSonEcal = yPS;
185 double inflation = 2.4 - (etaPS - 1.6);
186 float rangeX = maxEcalRadius * (1 + (0.05 + 1.0 / maxEcalRadius * deltaX / 2.)) * inflation;
187 float rangeY = maxEcalRadius * (1 + (0.05 + 1.0 / maxEcalRadius * deltaY / 2.)) * inflation;
190 std::vector<reco::PFRecHit const *>
recHits;
191 KDTreeBox trackBox(xPSonEcal - rangeX, xPSonEcal + rangeX, yPSonEcal - rangeY, yPSonEcal + rangeY);
199 const auto &corners =
recHit->getCornersXYZ();
204 for (BlockEltSet::const_iterator clusterIt =
ret->second.begin(); clusterIt !=
ret->second.end(); clusterIt++) {
206 double clusterz = clusterref->position().z();
208 const auto &posxyz =
recHit->position() * zPS / clusterz;
212 for (
unsigned jc = 0; jc < 4; ++jc) {
213 auto cornerpos = corners[jc].basicVector() * zPS / clusterz;
214 x[3 - jc] = cornerpos.x() +
215 (cornerpos.x() - posxyz.x()) * (0.05 + 1.0 / fabs((cornerpos.x() - posxyz.x())) * deltaX / 2.);
216 y[3 - jc] = cornerpos.y() +
217 (cornerpos.y() - posxyz.y()) * (0.05 + 1.0 / fabs((cornerpos.y() - posxyz.y())) * deltaY / 2.);
223 bool isinside = TMath::IsInside(xPS, yPS, 5,
x,
y);
240 for (BlockEltSet::iterator jt = it->second.begin(); jt != it->second.end(); ++jt) {
241 double clusterphi = (*jt)->clusterRef()->positionREP().phi();
242 double clustereta = (*jt)->clusterRef()->positionREP().eta();
244 multitracks.
linkedClusters.push_back(std::make_pair(clusterphi, clustereta));
247 it->first->setMultilinks(multitracks);