55 event.getByToken(beamspotToken_, bsHandle_);
65 if(cleanBySharedHits) theRedundantCleaner->define(seeds);
69 LogDebug(
"TrackerSeedCleaner")<<seeds.size()<<
" trajectory seeds to the events before cleaning"<<endl;
76 std::vector<TrajectorySeed >
result;
81 for(TrajectorySeedCollection::iterator
seed = seeds.begin();
seed<seeds.end(); ++
seed){
82 if(
seed->nHits() < 2)
continue;
88 if (!tsAtClosestApproachSeed.isValid())
continue;
89 GlobalPoint vSeed1 = tsAtClosestApproachSeed.trackStateAtPCA().position();
90 GlobalVector pSeed = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
96 double phiSeed = pSeed.
phi();
103 double etaLimit = (fabs(fabs(etaRange.max()) - fabs(etaRange.mean())) <0.1) ? 0.1 : fabs(fabs(etaRange.max()) - fabs(etaRange.mean())) ;
106 double phiLimit = (phiMargin.right() < 0.1 ) ? 0.1 : phiMargin.
right();
108 double ptSeed = pSeed.
perp();
111 bool inEtaRange = etaSeed >= (etaRange.mean() - etaLimit) && etaSeed <= (etaRange.mean() + etaLimit) ;
114 bool inPtRange = ptSeed >= ptMin && ptSeed<= 2*(muR->pt());
117 if(
seed->nHits()==3) inPtRange =
true;
120 if(inPtRange && usePt_Cleaner && !useDirection_Cleaner) {
122 result.push_back(*
seed);
123 LogDebug(
"TrackerSeedCleaner")<<
" Keeping the seed : this seed passed pt selection";
127 if( inEtaRange && inPhiRange && !usePt_Cleaner && useDirection_Cleaner) {
129 result.push_back(*
seed);
130 LogDebug(
"TrackerSeedCleaner")<<
" Keeping the seed : this seed passed direction selection";
135 if( inEtaRange && inPhiRange && inPtRange && usePt_Cleaner && useDirection_Cleaner) {
137 result.push_back(*
seed);
138 LogDebug(
"TrackerSeedCleaner")<<
" Keeping the seed : this seed passed direction and pt selection";
143 LogDebug(
"TrackerSeedCleaner")<<
" eta for current seed "<<etaSeed<<
"\n"
144 <<
" phi for current seed "<<phiSeed<<
"\n"
145 <<
" eta for L2 track "<<muR->eta()<<
"\n"
146 <<
" phi for L2 track "<<muR->phi()<<
"\n";
152 if(result.size()!=0 && (useDirection_Cleaner || usePt_Cleaner)) seeds.swap(result);
154 LogDebug(
"TrackerSeedCleaner")<<seeds.size()<<
" trajectory seeds to the events after cleaning"<<endl;
double z0() const
z coordinate
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::shared_ptr< TrackingRecHit const > RecHitPointer
PixelRecoRange< float > Range
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