44 theProxyService = service;
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;
77 for (TrajectorySeedCollection::iterator
seed = seeds.begin();
seed < seeds.end(); ++
seed) {
78 if (
seed->nHits() < 2)
83 seed->startingState(), recHit->surface(), theProxyService->magneticField().product());
87 if (!tsAtClosestApproachSeed.isValid())
89 GlobalPoint vSeed1 = tsAtClosestApproachSeed.trackStateAtPCA().position();
90 GlobalVector pSeed = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
95 double phiSeed = pSeed.
phi();
102 double etaLimit = (fabs(fabs(etaRange.max()) - fabs(etaRange.mean())) < 0.1)
104 : fabs(fabs(etaRange.max()) - fabs(etaRange.mean()));
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);
115 bool inPtRange = ptSeed >= ptMin && ptSeed <= 2 * (muR->pt());
118 if (
seed->nHits() == 3)
122 if (inPtRange && usePt_Cleaner && !useDirection_Cleaner) {
123 result.push_back(*
seed);
124 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed pt selection";
128 if (inEtaRange && inPhiRange && !usePt_Cleaner && useDirection_Cleaner) {
129 result.push_back(*
seed);
130 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed direction selection";
134 if (inEtaRange && inPhiRange && inPtRange && usePt_Cleaner && useDirection_Cleaner) {
135 result.push_back(*
seed);
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;
double z0() const
z coordinate
PixelRecoRange< float > Range
const Margin & phiMargin() const
Geom::Phi< T > phi() const
virtual void setEvent(const edm::Event &)
setEvent
GlobalVector const & direction() const
the direction around which region is constructed
FreeTrajectoryState const * freeState(bool withErrors=true) const
std::vector< TrajectorySeed > tkSeeds
std::shared_ptr< TrackingRecHit const > RecHitPointer
float ptMin() const
minimal pt of interest
GlobalVector globalMomentum() const
double y0() const
y coordinate
virtual void init(const MuonServiceProxy *service)
intizialization
virtual void clean(const reco::TrackRef &, const RectangularEtaPhiTrackingRegion ®ion, tkSeeds &)
the cleaner
double x0() const
x coordinate
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval