61 if (cleanBySharedHits)
62 theRedundantCleaner->define(
seeds);
66 LogDebug(
"TrackerSeedCleaner") <<
seeds.size() <<
" trajectory seeds to the events before cleaning" << endl;
73 std::vector<TrajectorySeed>
result;
78 if (
seed->nHits() < 2)
83 seed->startingState(),
recHit->surface(), theProxyService->magneticField().product());
86 tscblBuilder(*
state.freeState(),
bs);
87 if (!tsAtClosestApproachSeed.isValid())
89 GlobalPoint vSeed1 = tsAtClosestApproachSeed.trackStateAtPCA().position();
90 GlobalVector pSeed = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
94 double etaSeed =
state.globalMomentum().eta();
95 double phiSeed = pSeed.
phi();
102 double etaLimit = (fabs(fabs(
etaRange.max()) - fabs(
etaRange.mean())) < 0.1)
106 Margin phiMargin =
region.phiMargin();
107 double phiLimit = (phiMargin.right() < 0.1) ? 0.1 : phiMargin.right();
109 double ptSeed = pSeed.
perp();
112 bool inEtaRange = etaSeed >= (
etaRange.mean() - etaLimit) && etaSeed <= (
etaRange.mean() + etaLimit);
113 bool inPhiRange = (fabs(
deltaPhi(phiSeed,
double(
region.direction().phi()))) < phiLimit);
115 bool inPtRange = ptSeed >=
ptMin && ptSeed <= 2 * (muR->pt());
118 if (
seed->nHits() == 3)
122 if (inPtRange && usePt_Cleaner && !useDirection_Cleaner) {
124 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed pt selection";
128 if (inEtaRange && inPhiRange && !usePt_Cleaner && useDirection_Cleaner) {
130 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed direction selection";
134 if (inEtaRange && inPhiRange && inPtRange && usePt_Cleaner && useDirection_Cleaner) {
136 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed direction and pt selection";
139 LogDebug(
"TrackerSeedCleaner") <<
" eta for current seed " << etaSeed <<
"\n"
140 <<
" phi for current seed " << phiSeed <<
"\n"
141 <<
" eta for L2 track " << muR->eta() <<
"\n"
142 <<
" phi for L2 track " << muR->phi() <<
"\n";
146 if (!
result.empty() && (useDirection_Cleaner || usePt_Cleaner))
149 LogDebug(
"TrackerSeedCleaner") <<
seeds.size() <<
" trajectory seeds to the events after cleaning" << endl;