38 void clear()
override;
80 const std::vector<reco::PFRecHitFraction> &
fraction = clusterref->recHitFractions();
84 for (
size_t rhit = 0; rhit <
fraction.size(); ++rhit) {
103 std::vector<KDTreeNodeInfo<reco::PFRecHit const *, 2>> eltList;
110 eltList.push_back(rh1);
115 float phi = rh1.dims[1] - 2 *
M_PI;
117 eltList.push_back(rh2);
121 float phi = rh1.dims[1] + 2 *
M_PI;
123 eltList.push_back(rh3);
156 double trackx = atECAL.
position().X();
157 double tracky = atECAL.
position().Y();
158 double trackz = atECAL.
position().Z();
165 std::vector<reco::PFRecHit const *>
recHits;
171 const auto &cornersxyz =
recHit->getCornersXYZ();
172 const auto &posxyz =
recHit->position();
173 const auto &rhrep =
recHit->positionREP();
174 const auto &corners =
recHit->getCornersREP();
176 double rhsizeeta = fabs(corners[3].
eta() - corners[1].
eta());
177 double rhsizephi = fabs(corners[3].
phi() - corners[1].
phi());
178 if (rhsizephi >
M_PI)
179 rhsizephi = 2. *
M_PI - rhsizephi;
181 double deta = fabs(rhrep.eta() - tracketa);
182 double dphi = fabs(rhrep.phi() - trackphi);
184 dphi = 2. *
M_PI - dphi;
189 for (BlockEltSet::const_iterator clusterIt =
ret->second.begin(); clusterIt !=
ret->second.end(); clusterIt++) {
191 double clusterz = clusterref->position().z();
192 int fracsNbr = clusterref->recHitFractions().size();
196 if (fabs(trackz) > 300.)
199 double _rhsizeeta = rhsizeeta * (2.00 + 1.0 / (fracsNbr *
std::min(1.,
trackPt / 2.)));
200 double _rhsizephi = rhsizephi * (2.00 + 1.0 / (fracsNbr *
std::min(1.,
trackPt / 2.)));
203 if (deta < (_rhsizeeta / 2.) && dphi < (_rhsizephi / 2.))
209 if (fabs(trackz) < 300.)
211 if (trackz * clusterz < 0.)
216 for (
unsigned jc = 0; jc < 4; ++jc) {
217 auto cornerposxyz = cornersxyz[jc];
218 x[3 - jc] = cornerposxyz.x() +
219 (cornerposxyz.x() - posxyz.x()) * (1.00 + 0.50 / fracsNbr /
std::min(1.,
trackPt / 2.));
220 y[3 - jc] = cornerposxyz.y() +
221 (cornerposxyz.y() - posxyz.y()) * (1.00 + 0.50 / fracsNbr /
std::min(1.,
trackPt / 2.));
227 bool isinside = TMath::IsInside(trackx, tracky, 5,
x,
y);
243 const auto &ecalElt = it->first;
244 const auto &trackEltSet = it->second;
247 for (
const auto &trackElt : trackEltSet) {
255 trackElt->setIsValidMultilinks(
true,
_fieldType);