41 theProxyService = service;
58 if (cleanBySharedHits)
59 theRedundantCleaner->define(seeds);
61 theTTRHBuilder = theProxyService->eventSetup().getHandle(theTTRHBuilderToken);
63 LogDebug(
"TrackerSeedCleaner") << seeds.size() <<
" trajectory seeds to the events before cleaning" << endl;
70 std::vector<TrajectorySeed>
result;
74 for (TrajectorySeedCollection::iterator
seed = seeds.begin();
seed < seeds.end(); ++
seed) {
75 if (
seed->nHits() < 2)
80 seed->startingState(), recHit->surface(), theProxyService->magneticField().product());
84 if (!tsAtClosestApproachSeed.isValid())
86 GlobalPoint vSeed1 = tsAtClosestApproachSeed.trackStateAtPCA().position();
87 GlobalVector pSeed = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
92 double phiSeed = pSeed.
phi();
99 double etaLimit = (fabs(fabs(etaRange.max()) - fabs(etaRange.mean())) < 0.1)
101 : fabs(fabs(etaRange.max()) - fabs(etaRange.mean()));
104 double phiLimit = (phiMargin.right() < 0.1) ? 0.1 : phiMargin.
right();
106 double ptSeed = pSeed.
perp();
109 bool inEtaRange = etaSeed >= (etaRange.mean() - etaLimit) && etaSeed <= (etaRange.mean() + etaLimit);
112 bool inPtRange = ptSeed >= ptMin && ptSeed <= 2 * (muR->pt());
115 if (
seed->nHits() == 3)
119 if (inPtRange && usePt_Cleaner && !useDirection_Cleaner) {
120 result.push_back(*
seed);
121 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed pt selection";
125 if (inEtaRange && inPhiRange && !usePt_Cleaner && useDirection_Cleaner) {
126 result.push_back(*
seed);
127 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed direction selection";
131 if (inEtaRange && inPhiRange && inPtRange && usePt_Cleaner && useDirection_Cleaner) {
132 result.push_back(*
seed);
133 LogDebug(
"TrackerSeedCleaner") <<
" Keeping the seed : this seed passed direction and pt selection";
136 LogDebug(
"TrackerSeedCleaner") <<
" eta for current seed " << etaSeed <<
"\n"
137 <<
" phi for current seed " << phiSeed <<
"\n"
138 <<
" eta for L2 track " << muR->eta() <<
"\n"
139 <<
" phi for L2 track " << muR->phi() <<
"\n";
143 if (!result.empty() && (useDirection_Cleaner || usePt_Cleaner))
146 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
tuple RedundantSeedCleaner
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