Skip to content

Commit 01c7544

Browse files
authored
Merge pull request cms-sw#40812 from Dr15Jones/clangTrackingTools
Changed binary to logical operations in TrackingTools packages
2 parents 803f553 + b463013 commit 01c7544

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

TrackingTools/GsfTracking/src/GsfTrajectoryFitter.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ Trajectory GsfTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
6767
if (hits.front()->isValid()) {
6868
auto const& ihit = hits.front();
6969
//update
70-
assert((!(ihit)->canImproveWithTrack()) | (nullptr != theHitCloner));
71-
assert((!(ihit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>(ihit.get())));
70+
assert((!(ihit)->canImproveWithTrack()) || (nullptr != theHitCloner));
71+
assert((!(ihit)->canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>(ihit.get())));
7272
auto preciseHit = theHitCloner->makeShared(ihit, predTsos);
7373
dump(*preciseHit, 1, "GsfTrackFitters");
7474
{ currTsos = updator()->update(predTsos, *preciseHit); }
@@ -119,8 +119,8 @@ Trajectory GsfTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
119119

120120
if ((**ihit).isValid()) {
121121
//update
122-
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != theHitCloner));
123-
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
122+
assert((!(*ihit)->canImproveWithTrack()) || (nullptr != theHitCloner));
123+
assert((!(*ihit)->canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
124124
if (!predTsos.isValid()) {
125125
return Trajectory();
126126
}

TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
101101
}
102102

103103
if LIKELY (hit.isValid()) {
104-
assert((hit.geographicalId() != 0U) | !hit.canImproveWithTrack());
104+
assert((hit.geographicalId() != 0U) || !hit.canImproveWithTrack());
105105
assert(hit.surface() != nullptr);
106106
//update
107107
LogTrace("TrackFitters") << "THE HIT IS VALID: updating hit with predTsos";
108-
assert((!hit.canImproveWithTrack()) | (nullptr != theHitCloner));
109-
assert((!hit.canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>((ihit).get())));
108+
assert((!hit.canImproveWithTrack()) || (nullptr != theHitCloner));
109+
assert((!hit.canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>((ihit).get())));
110110
auto preciseHit = theHitCloner->makeShared(ihit, predTsos);
111111
dump(*preciseHit, hitcounter, "TrackFitters");
112112
assert(preciseHit->isValid());
113-
assert((preciseHit->geographicalId() != 0U) | (!preciseHit->canImproveWithTrack()));
113+
assert((preciseHit->geographicalId() != 0U) || (!preciseHit->canImproveWithTrack()));
114114
assert(preciseHit->surface() != nullptr);
115115

116116
if UNLIKELY (!preciseHit->isValid()) {

TrackingTools/TrackFitters/src/KFTrajectorySmoother.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ Trajectory KFTrajectorySmoother::trajectory(const Trajectory& aTraj) const {
115115
break;
116116
}
117117

118-
assert((hit->geographicalId() != 0U) | (!hit->canImproveWithTrack()));
118+
assert((hit->geographicalId() != 0U) || (!hit->canImproveWithTrack()));
119119
assert(hit->surface() != nullptr);
120-
assert((!(hit)->canImproveWithTrack()) | (nullptr != theHitCloner));
121-
assert((!(hit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>(hit.get())));
120+
assert((!(hit)->canImproveWithTrack()) || (nullptr != theHitCloner));
121+
assert((!(hit)->canImproveWithTrack()) || (nullptr != dynamic_cast<BaseTrackerRecHit const*>(hit.get())));
122122
auto preciseHit = theHitCloner->makeShared(hit, combTsos);
123123
assert(preciseHit->isValid());
124-
assert((preciseHit->geographicalId() != 0U) | (!preciseHit->canImproveWithTrack()));
124+
assert((preciseHit->geographicalId() != 0U) || (!preciseHit->canImproveWithTrack()));
125125
assert(preciseHit->surface() != nullptr);
126126

127127
dump(*hit, hitCounter, "TrackFitters");

TrackingTools/TrajectoryFiltering/interface/SeedExtensionTrajectoryFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool SeedExtensionTrajectoryFilter::looseTBC(const T& traj) const {
6363
} else {
6464
nhits = traj.measurements().size();
6565
}
66-
return (nhits > int(traj.seedNHits()) + theExtension) | (0 == traj.lostHits());
66+
return (nhits > int(traj.seedNHits()) + theExtension) || (0 == traj.lostHits());
6767
}
6868

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

0 commit comments

Comments
 (0)