Skip to content

Commit 9760658

Browse files
committed
use branchless 'and' in tracker hit matching
1 parent ba7dc7f commit 9760658

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

RecoTracker/MeasurementDet/BuildFile.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<use name="TrackingTools/GeomPropagators"/>
55
<use name="CalibFormats/SiStripObjects"/>
66
<use name="DataFormats/Common"/>
7+
<use name="DataFormats/Math"/>
78
<use name="DataFormats/SiPixelCluster"/>
89
<use name="FWCore/Framework"/>
910
<use name="FWCore/ParameterSet"/>

RecoTracker/MeasurementDet/plugins/doubleMatch.icc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace {
4646
#include "RecHitPropagator.h"
4747
#include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
4848
#include "DataFormats/GeometrySurface/interface/LocalError.h"
49+
#include "DataFormats/Math/interface/logic.h"
4950

5051
namespace {
5152
inline void print(const char* where, const TrajectoryStateOnSurface& t1, const TrajectoryStateOnSurface& t2) {
@@ -128,7 +129,7 @@ void TkGluedMeasurementDet::doubleMatch(const TrajectoryStateOnSurface& ts,
128129
return;
129130
}
130131

131-
if ((!monoHits.empty()) && (!stereoHits.empty())) {
132+
if (reco::branchless_and(!monoHits.empty(), !stereoHits.empty())) {
132133
const GluedGeomDet* gluedDet = &specificGeomDet();
133134
LocalVector trdir = (ts.isValid() ? ts.localDirection() : surface().toLocal(position() - GlobalPoint(0, 0, 0)));
134135

0 commit comments

Comments
 (0)