Skip to content

Commit

Permalink
Merge pull request #8373 from VinInn/PR8343to75X
Browse files Browse the repository at this point in the history
port of 8342 from 73X to 75X
  • Loading branch information
cmsbuild committed Mar 18, 2015
2 parents e093d46 + 60c7acb commit c9fdc62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions TrackingTools/TrackFitters/src/KFFittingSmoother.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Trajectory KFFittingSmoother::fitOne(const TrajectorySeed& aSeed,
double log_pixel_prob_cut = theLogPixelProbabilityCut; // ggiurgiu@fnal.gov


unsigned int outlierId = 0;
unsigned int outlierId = 0xffffffff;
const GeomDet* outlierDet = 0;

unsigned int low_pixel_prob_Id = 0; // ggiurgiu@fnal.gov
Expand Down Expand Up @@ -137,7 +137,9 @@ Trajectory KFFittingSmoother::fitOne(const TrajectorySeed& aSeed,
double estimate = tm->estimate();

// --- here is the block of code about generic chi2-based Outlier Rejection ---
if ( estimate > cut && theEstimateCut > 0 ) {
if ( ( (estimate>cut) & (theEstimateCut>0) ) &&
tm->recHit()->det()!=nullptr // do not consider outliers constraints and other special "hits"
) {
hasoutliers = true;
cut = estimate;
outlierId = tm->recHit()->geographicalId().rawId();
Expand Down
5 changes: 3 additions & 2 deletions TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,17 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
}
}


if likely(hit.isValid()) {
assert(hit.geographicalId()!=0U);
assert( (hit.geographicalId()!=0U) | !hit.canImproveWithTrack() ) ;
assert(hit.surface()!=nullptr);
//update
LogTrace("TrackFitters") << "THE HIT IS VALID: updating hit with predTsos";
assert( (!(*ihit)->canImproveWithTrack()) | (nullptr!=theHitCloner));
assert( (!(*ihit)->canImproveWithTrack()) | (nullptr!=dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
auto preciseHit = theHitCloner->makeShared(*ihit,predTsos);
assert(preciseHit->isValid());
assert(preciseHit->geographicalId()!=0U);
assert( (preciseHit->geographicalId()!=0U) | (!preciseHit->canImproveWithTrack()) );
assert(preciseHit->surface()!=nullptr);

if unlikely(!preciseHit->isValid()){
Expand Down
4 changes: 2 additions & 2 deletions TrackingTools/TrackFitters/src/KFTrajectorySmoother.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ KFTrajectorySmoother::trajectory(const Trajectory& aTraj) const {
break;
}

assert(hit->geographicalId()!=0U);
assert( (hit->geographicalId()!=0U) | (!hit->canImproveWithTrack()) );
assert(hit->surface()!=nullptr);
assert( (!(hit)->canImproveWithTrack()) | (nullptr!=theHitCloner));
assert( (!(hit)->canImproveWithTrack()) | (nullptr!=dynamic_cast<BaseTrackerRecHit const*>(hit.get())));
auto preciseHit = theHitCloner->makeShared(hit,combTsos);
assert(preciseHit->isValid());
assert(preciseHit->geographicalId()!=0U);
assert( (preciseHit->geographicalId()!=0U) | (!preciseHit->canImproveWithTrack()) );
assert(preciseHit->surface()!=nullptr);

if unlikely(!preciseHit->isValid()){
Expand Down

0 comments on commit c9fdc62

Please sign in to comment.