19 float maxFracShared = 0;
24 const HitPattern& gsfHitPattern = gsfTrackRef->hitPattern();
27 for (
auto ctfTkIter = ctfTrackCollection->begin(); ctfTkIter != ctfTrackCollection->end(); ctfTkIter++,
counter++) {
28 double dEta = gsfTrackRef->eta() - ctfTkIter->eta();
29 double dPhi = gsfTrackRef->phi() - ctfTkIter->phi();
30 double pi = acos(-1.);
38 unsigned int shared = 0;
39 int gsfHitCounter = 0;
40 int numGsfInnerHits = 0;
41 int numCtfInnerHits = 0;
45 for (
auto elHitsIt = gsfTrackRef->recHitsBegin(); elHitsIt != gsfTrackRef->recHitsEnd();
46 elHitsIt++, gsfHitCounter++) {
47 if (!((**elHitsIt).isValid()))
61 int ctfHitsCounter = 0;
63 for (
auto ctfHitsIt = ctfTkIter->recHitsBegin(); ctfHitsIt != ctfTkIter->recHitsEnd();
64 ctfHitsIt++, ctfHitsCounter++) {
65 if (!((**ctfHitsIt).isValid()))
87 if ((numGsfInnerHits == 0) || (numCtfInnerHits == 0)) {
91 if (static_cast<float>(shared) /
std::min(numGsfInnerHits, numCtfInnerHits) > maxFracShared) {
92 maxFracShared = static_cast<float>(shared) /
std::min(numGsfInnerHits, numCtfInnerHits);
98 return make_pair(ctfTrackRef, maxFracShared);