Skip to content

Commit

Permalink
Merge pull request #40812 from Dr15Jones/clangTrackingTools
Browse files Browse the repository at this point in the history
Changed binary to logical operations in TrackingTools packages
  • Loading branch information
cmsbuild authored Feb 20, 2023
2 parents 803f553 + b463013 commit 01c7544
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions TrackingTools/GsfTracking/src/GsfTrajectoryFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Trajectory GsfTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
if (hits.front()->isValid()) {
auto const& ihit = hits.front();
//update
assert((!(ihit)->canImproveWithTrack()) | (nullptr != theHitCloner));
assert((!(ihit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>(ihit.get())));
assert((!(ihit)->canImproveWithTrack()) || (nullptr != theHitCloner));
assert((!(ihit)->canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>(ihit.get())));
auto preciseHit = theHitCloner->makeShared(ihit, predTsos);
dump(*preciseHit, 1, "GsfTrackFitters");
{ currTsos = updator()->update(predTsos, *preciseHit); }
Expand Down Expand Up @@ -119,8 +119,8 @@ Trajectory GsfTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,

if ((**ihit).isValid()) {
//update
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != theHitCloner));
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
assert((!(*ihit)->canImproveWithTrack()) || (nullptr != theHitCloner));
assert((!(*ihit)->canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
if (!predTsos.isValid()) {
return Trajectory();
}
Expand Down
8 changes: 4 additions & 4 deletions TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
}

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

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

assert((hit->geographicalId() != 0U) | (!hit->canImproveWithTrack()));
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())));
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) | (!preciseHit->canImproveWithTrack()));
assert((preciseHit->geographicalId() != 0U) || (!preciseHit->canImproveWithTrack()));
assert(preciseHit->surface() != nullptr);

dump(*hit, hitCounter, "TrackFitters");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool SeedExtensionTrajectoryFilter::looseTBC(const T& traj) const {
} else {
nhits = traj.measurements().size();
}
return (nhits > int(traj.seedNHits()) + theExtension) | (0 == traj.lostHits());
return (nhits > int(traj.seedNHits()) + theExtension) || (0 == traj.lostHits());
}

// strict case as a real seeding: do not allow even inactive
Expand Down

0 comments on commit 01c7544

Please sign in to comment.