Seeds Cleaner based on direction
- Author
- A. Grelli - Purdue University, Pavia University
Definition at line 34 of file TrackerSeedCleaner.h.
the cleaner
Definition at line 61 of file TrackerSeedCleaner.cc.
References SiPixelRawToDigiRegional_cfi::deltaPhi, PV3DBase< T, PVType, FrameType >::eta(), MuonErrorMatrixValues_cff::etaRange, TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalMomentum(), LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PtMinSelector_cfg::ptMin, query::result, trajectoryStateTransform::transientState(), PV3DBase< T, PVType, FrameType >::x(), reco::BeamSpot::x0(), PV3DBase< T, PVType, FrameType >::y(), reco::BeamSpot::y0(), PV3DBase< T, PVType, FrameType >::z(), and reco::BeamSpot::z0().
Referenced by TSGFromL2Muon::produce().
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())) ;
105 Margin phiMargin = region.phiMargin();
106 double phiLimit = (phiMargin.right() < 0.1 ) ? 0.1 : phiMargin.right();
108 double ptSeed = pSeed.
perp();
109 double ptMin = (region.ptMin()>3.5) ? 3.5: region.ptMin();
111 bool inEtaRange = etaSeed >= (etaRange.mean() - etaLimit) && etaSeed <= (etaRange.mean() + etaLimit) ;
112 bool inPhiRange = (fabs(
deltaPhi(phiSeed,
double(region.direction().phi()))) < phiLimit );
114 bool inPtRange = ptSeed >= ptMin && ptSeed<= 2*(muR->pt());
117 if(seed->nHits()==3) inPtRange =
true;
122 result.push_back(*seed);
123 LogDebug(
"TrackerSeedCleaner")<<
" Keeping the seed : this seed passed pt selection";
129 result.push_back(*seed);
130 LogDebug(
"TrackerSeedCleaner")<<
" Keeping the seed : this seed passed direction selection";
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";
154 LogDebug(
"TrackerSeedCleaner")<<seeds.size()<<
" trajectory seeds to the events after cleaning"<<endl;
double z0() const
z coordinate
Geom::Phi< T > phi() const
void define(std::vector< TrajectorySeed > &)
collection definition
RedundantSeedCleaner * theRedundantCleaner
bool useDirection_Cleaner
const MuonServiceProxy * theProxyService
FreeTrajectoryState const * freeState(bool withErrors=true) const
edm::Handle< reco::BeamSpot > bsHandle_
PixelRecoRange< float > Range
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
GlobalVector globalMomentum() const
double y0() const
y coordinate
double x0() const
x coordinate