Skip to content

Commit b5b8115

Browse files
committed
Fixed non-zero momentum check in opening angle calculation
1 parent 276ecb9 commit b5b8115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

L1Trigger/L1TTrackMatch/interface/DisplacedVertexProducer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Vertex_Parameters {
127127
std::valarray<float> p_trk_2 = calcPVec(b_in, x_dv_in, y_dv_in);
128128
std::valarray<float> p_tot = p_trk_1 + p_trk_2;
129129
p_mag = sqrt(pow(p_tot[0], 2) + pow(p_tot[1], 2));
130-
if (((p_trk_1[0] != 0.0) || (p_trk_2[1] != 0.0)) && ((p_trk_2[0] != 0.0) || (p_trk_2[1] != 0.0))) {
130+
if (((p_trk_1[0] != 0.0) || (p_trk_1[1] != 0.0)) && ((p_trk_2[0] != 0.0) || (p_trk_2[1] != 0.0))) {
131131
openingAngle = (p_trk_1[0] * p_trk_2[0] + p_trk_1[1] * p_trk_2[1]) /
132132
(sqrt(pow(p_trk_1[0], 2) + pow(p_trk_1[1], 2)) * sqrt(pow(p_trk_2[0], 2) + pow(p_trk_2[1], 2)));
133133
}

0 commit comments

Comments
 (0)