19 float maxFracShared = 0;
23 float gsfEta = gsfTrackRef->eta();
24 float gsfPhi = gsfTrackRef->phi();
25 const HitPattern& gsfHitPattern = gsfTrackRef->hitPattern();
27 constexpr
float dR2 = 0.3 * 0.3;
30 for (
auto ctfTkIter = ctfTrackCollection->begin(); ctfTkIter != ctfTrackCollection->end(); ctfTkIter++,
counter++) {
36 unsigned int shared = 0;
37 int gsfHitCounter = 0;
38 int numGsfInnerHits = 0;
39 int numCtfInnerHits = 0;
43 for (
auto elHitsIt = gsfTrackRef->recHitsBegin(); elHitsIt != gsfTrackRef->recHitsEnd();
44 elHitsIt++, gsfHitCounter++) {
45 if (!((**elHitsIt).isValid()))
59 int ctfHitsCounter = 0;
61 for (
auto ctfHitsIt = ctfTkIter->recHitsBegin(); ctfHitsIt != ctfTkIter->recHitsEnd();
62 ctfHitsIt++, ctfHitsCounter++) {
63 if (!((**ctfHitsIt).isValid()))
85 if ((numGsfInnerHits == 0) || (numCtfInnerHits == 0)) {
89 if (static_cast<float>(shared) /
std::min(numGsfInnerHits, numCtfInnerHits) > maxFracShared) {
90 maxFracShared = static_cast<float>(shared) /
std::min(numGsfInnerHits, numCtfInnerHits);
96 return {ctfTrackRef, maxFracShared};