#include <MuonSeedSimpleCleaner.h>
Public Member Functions | |
virtual void | clean (TrajectorySeedCollection &seeds) |
Private Member Functions | |
bool | checkPt (const TrajectorySeed &seed) const |
Definition at line 6 of file MuonSeedSimpleCleaner.h.
bool MuonSeedSimpleCleaner::checkPt | ( | const TrajectorySeed & | seed | ) | const [private] |
Definition at line 27 of file MuonSeedSimpleCleaner.cc.
References PTrajectoryStateOnDet::detId(), LocalTrajectoryParameters::momentum(), TrajectorySeed::nHits(), AlCaHLTBitMon_ParallelJobs::p, PTrajectoryStateOnDet::parameters(), PV3DBase< T, PVType, FrameType >::perp(), query::result, TrajectorySeed::startingState(), DetId::subdetId(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by clean().
{ bool result = true; if(seed.nHits() == 1) { int rawId = seed.startingState().detId(); DetId detId(rawId); bool isBarrel = (detId.subdetId() == 1); LocalVector p = seed.startingState().parameters().momentum(); // homemade local-to-global double pt = (isBarrel) ? -p.z() : p.perp(); if(fabs(pt) < 3.05) { result = false; } } return result; }
void MuonSeedSimpleCleaner::clean | ( | TrajectorySeedCollection & | seeds | ) | [virtual] |
Implements MuonSeedVCleaner.
Definition at line 3 of file MuonSeedSimpleCleaner.cc.
References checkPt().
{ for(std::vector<TrajectorySeed>::iterator seed = seeds.begin(); seed != seeds.end(); ++seed){ if(!checkPt(*seed)) { seeds.erase(seed--); } else { int counter =0; for(std::vector<TrajectorySeed>::iterator seed2 = seed; seed2 != seeds.end(); ++seed2) if( seed->startingState().parameters().vector() == seed2->startingState().parameters().vector() ) ++counter; if( counter > 1 ) { seeds.erase(seed--); } } } }