Skip to content

Commit

Permalink
avoid creation of TTRH if not accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Feb 22, 2014
1 parent e12cdeb commit 9ef436a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
7 changes: 7 additions & 0 deletions RecoTracker/MeasurementDet/plugins/TkGluedMeasurementDet.cc
Expand Up @@ -352,6 +352,12 @@ TkGluedMeasurementDet::HitCollectorForFastMeasurements::HitCollectorForFastMeasu
void
TkGluedMeasurementDet::HitCollectorForFastMeasurements::add(SiStripMatchedRecHit2D const& hit2d)
{
std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
if (!diffEst.first) return;
target_.add(std::move(TSiStripMatchedRecHit::build(geomDet_, &hit2d, matcher_, cpe_ )),diffEst.second);
hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
}
/*
static thread_local std::auto_ptr<TSiStripMatchedRecHit> lcache;
std::auto_ptr<TSiStripMatchedRecHit> & cache = lcache;
TSiStripMatchedRecHit::buildInPlace( cache, geomDet_, &hit2d, matcher_, cpe_ );
Expand All @@ -365,6 +371,7 @@ TkGluedMeasurementDet::HitCollectorForFastMeasurements::add(SiStripMatchedRecHit
}
hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
}
*/

void
TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected(const TransientTrackingRecHit& hit,
Expand Down
8 changes: 0 additions & 8 deletions RecoTracker/TkTrackingRegions/src/OuterEstimator.h
Expand Up @@ -38,14 +38,6 @@ class dso_internal OuterEstimator final : public MeasurementEstimator {
return theHitCompatibility(&hit) ? std::make_pair(true,1.) : std::make_pair(false,0.) ;
}

virtual std::pair<bool,double> estimate(
const TrajectoryStateOnSurface& ts,
const TrackingRecHit& hit,
const edm::EventSetup& iSetup)
const {
return theHitCompatibility(&hit,iSetup) ? std::make_pair(true,1.) : std::make_pair(false,0.) ;
}

virtual bool estimate(
const TrajectoryStateOnSurface& ts,
const BoundPlane& plane
Expand Down
18 changes: 0 additions & 18 deletions RecoTracker/TkTrackingRegions/src/OuterHitCompatibility.cc
Expand Up @@ -23,21 +23,3 @@ bool OuterHitCompatibility::operator() ( const TrackingRecHit * hit) const
return true;
}


bool OuterHitCompatibility::operator() ( const TrackingRecHit* hit, const edm::EventSetup& iSetup) const
{
edm::ESHandle<TrackerGeometry> tracker;
iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
DetId tmp=hit->geographicalId();
GlobalPoint hitPos = tracker->idToDet(tmp)->surface().toGlobal(hit->localPosition());
float hitR = hitPos.perp();
float hitPhi = hitPos.phi();

if ( !checkPhi(hitPhi, hitR) ) return false;

float hitZ = hitPos.z();
if ( !(*theRZCompatibility)(hitR,hitZ) ) return false;

return true;
}

1 change: 0 additions & 1 deletion RecoTracker/TkTrackingRegions/src/OuterHitCompatibility.h
Expand Up @@ -35,7 +35,6 @@ class dso_internal OuterHitCompatibility {


bool operator() (const TrackingRecHit * hit) const;
bool operator() (const TrackingRecHit* hit, const edm::EventSetup& iSetup) const;

bool checkPhi(float phi, float r) const {
OuterHitPhiPrediction::Range hitPhiRange = thePhiPrediction(r);
Expand Down

0 comments on commit 9ef436a

Please sign in to comment.