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);
150 double zPS = clusterPS.
position().Z();
151 double xPS = clusterPS.
position().X();
152 double yPS = clusterPS.
position().Y();
154 double etaPS = fabs(clusterPS.
positionREP().eta());
157 float xPSonEcal = xPS;
158 float yPSonEcal = yPS;
183 double inflation = 2.4 - (etaPS - 1.6);
184 float rangeX = maxEcalRadius * (1 + (0.05 + 1.0 / maxEcalRadius * deltaX / 2.)) * inflation;
185 float rangeY = maxEcalRadius * (1 + (0.05 + 1.0 / maxEcalRadius * deltaY / 2.)) * inflation;
188 std::vector<reco::PFRecHit const *>
recHits;
189 KDTreeBox trackBox(xPSonEcal - rangeX, xPSonEcal + rangeX, yPSonEcal - rangeY, yPSonEcal + rangeY);
197 const auto &corners =
recHit->getCornersXYZ();
202 for (BlockEltSet::const_iterator clusterIt =
ret->second.begin(); clusterIt !=
ret->second.end(); clusterIt++) {
204 double clusterz = clusterref->position().z();
206 const auto &posxyz =
recHit->position() * zPS / clusterz;
210 for (
unsigned jc = 0; jc < 4; ++jc) {
211 auto cornerpos = corners[jc].basicVector() * zPS / clusterz;
212 x[3 - jc] = cornerpos.x() +
213 (cornerpos.x() - posxyz.x()) * (0.05 + 1.0 / fabs((cornerpos.x() - posxyz.x())) * deltaX / 2.);
214 y[3 - jc] = cornerpos.y() +
215 (cornerpos.y() - posxyz.y()) * (0.05 + 1.0 / fabs((cornerpos.y() - posxyz.y())) * deltaY / 2.);
221 bool isinside = TMath::IsInside(xPS, yPS, 5,
x,
y);
236 const auto &psElt = it->first;
237 const auto &ecalEltSet = it->second;
240 for (
const auto &ecalElt : ecalEltSet) {
241 double clusterphi = ecalElt->clusterRef()->positionREP().phi();
242 double clustereta = ecalElt->clusterRef()->positionREP().eta();
244 multitracks.
linkedClusters.push_back(std::make_pair(clusterphi, clustereta));
252 psElt->setMultilinks(multitracks,
_fieldType);